sv 0.14.1 → 0.15.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/dist/bin.mjs +1 -1
- package/dist/{engine-BdGJvT03.d.mts → engine-3mrtB4nw.d.mts} +12 -57
- package/dist/{engine-CK31LRlH.mjs → engine-CzIdz0uO.mjs} +530 -513
- package/dist/shared.json +3 -3
- package/dist/src/index.d.mts +8 -3
- package/dist/src/index.mjs +12 -1
- package/dist/src/testing.d.mts +7 -44
- package/dist/src/testing.mjs +12 -8
- package/dist/templates/addon/assets/src/index.js +1 -1
- package/dist/templates/addon/assets/src/sv-utils.js +3 -0
- package/dist/templates/addon/assets/tsdown.config.js +1 -1
- package/dist/templates/addon/package.json +4 -4
- package/dist/templates/demo/package.json +5 -5
- package/dist/templates/library/package.json +7 -7
- package/dist/templates/minimal/package.json +5 -5
- package/package.json +2 -2
package/dist/shared.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"checkjs"
|
|
37
37
|
],
|
|
38
38
|
"exclude": [],
|
|
39
|
-
"contents": "{\n\t\"scripts\": {\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./jsconfig.json\",\n\t\t\"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch\"\n\t},\n\t\"devDependencies\": {\n\t\t\"svelte-check\": \"^4.4.
|
|
39
|
+
"contents": "{\n\t\"scripts\": {\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./jsconfig.json\",\n\t\t\"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch\"\n\t},\n\t\"devDependencies\": {\n\t\t\"svelte-check\": \"^4.4.6\",\n\t\t\"typescript\": \"^6.0.2\"\n\t}\n}\n"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"name": "README.md",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"mcp"
|
|
53
53
|
],
|
|
54
54
|
"exclude": [],
|
|
55
|
-
"contents": "You are able to use the Svelte MCP server, where you have access to comprehensive Svelte 5 and SvelteKit documentation. Here's how to use the available tools effectively:\n\n## Available MCP Tools:\n\n### 1. list-sections\n\nUse this FIRST to discover all available documentation sections. Returns a structured list with titles, use_cases, and paths.\nWhen asked about Svelte or SvelteKit topics, ALWAYS use this tool at the start of the chat to find relevant sections.\n\n### 2. get-documentation\n\nRetrieves full documentation content for specific sections. Accepts single or multiple sections.\nAfter calling the list-sections tool, you MUST analyze the returned documentation sections (especially the use_cases field) and then use the get-documentation tool to fetch ALL documentation sections that are relevant for the user's task.\n\n### 3. svelte-autofixer\n\nAnalyzes Svelte code and returns issues and suggestions.\nYou MUST use this tool whenever writing Svelte code before sending it to the user. Keep calling it until no issues or suggestions are returned.\n\n### 4. playground-link\n\nGenerates a Svelte Playground link with the provided code.\nAfter completing the code, ask the user if they want a playground link. Only call this tool after user confirmation and NEVER if code was written to files in their project.\n"
|
|
55
|
+
"contents": "You are able to use the Svelte MCP server, where you have access to comprehensive Svelte 5 and SvelteKit documentation. Here's how to use the available tools effectively:\n\n## Available Svelte MCP Tools:\n\n### 1. list-sections\n\nUse this FIRST to discover all available documentation sections. Returns a structured list with titles, use_cases, and paths.\nWhen asked about Svelte or SvelteKit topics, ALWAYS use this tool at the start of the chat to find relevant sections.\n\n### 2. get-documentation\n\nRetrieves full documentation content for specific sections. Accepts single or multiple sections.\nAfter calling the list-sections tool, you MUST analyze the returned documentation sections (especially the use_cases field) and then use the get-documentation tool to fetch ALL documentation sections that are relevant for the user's task.\n\n### 3. svelte-autofixer\n\nAnalyzes Svelte code and returns issues and suggestions.\nYou MUST use this tool whenever writing Svelte code before sending it to the user. Keep calling it until no issues or suggestions are returned.\n\n### 4. playground-link\n\nGenerates a Svelte Playground link with the provided code.\nAfter completing the code, ask the user if they want a playground link. Only call this tool after user confirmation and NEVER if code was written to files in their project.\n"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"name": "jsconfig.json",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"typescript"
|
|
77
77
|
],
|
|
78
78
|
"exclude": [],
|
|
79
|
-
"contents": "{\n\t\"scripts\": {\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json\",\n\t\t\"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch\"\n\t},\n\t\"devDependencies\": {\n\t\t\"svelte-check\": \"^4.4.
|
|
79
|
+
"contents": "{\n\t\"scripts\": {\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json\",\n\t\t\"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch\"\n\t},\n\t\"devDependencies\": {\n\t\t\"svelte-check\": \"^4.4.6\",\n\t\t\"typescript\": \"^6.0.2\"\n\t}\n}\n"
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
"name": "svelte.config.js",
|
package/dist/src/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as StringQuestion, C as BooleanQuestion, D as OptionValues, E as OptionDefinition, O as Question, S as BaseQuestion, T as NumberQuestion, _ as SvApi, a as Addon, b as Workspace, c as AddonReference, d as ConditionDefinition, f as ConfiguredAddon, g as SetupResult, h as PreparedAddon, i as add, j as officialAddons, k as SelectQuestion, l as AddonResult, m as OptionBuilder, n as InstallOptions, o as AddonDefinition, p as LoadedAddon, r as OptionMap, s as AddonInput, t as AddonMap, u as AddonSource, v as defineAddon, w as MultiSelectQuestion, x as WorkspaceOptions, y as defineAddonOptions } from "../engine-3mrtB4nw.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/create/index.d.ts
|
|
4
4
|
type TemplateType = (typeof templateTypes)[number];
|
|
@@ -6,11 +6,11 @@ type LanguageType = (typeof languageTypes)[number];
|
|
|
6
6
|
declare const templateTypes: readonly ["minimal", "demo", "library", "addon", "svelte"];
|
|
7
7
|
declare const languageTypes: readonly ["typescript", "checkjs", "none"];
|
|
8
8
|
type Options = {
|
|
9
|
+
cwd: string;
|
|
9
10
|
name: string;
|
|
10
11
|
template: TemplateType;
|
|
11
12
|
types: LanguageType;
|
|
12
13
|
};
|
|
13
|
-
declare function create(cwd: string, options: Options): void;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/core/processors.d.ts
|
|
16
16
|
type FileEditor = Workspace & {
|
|
@@ -22,4 +22,9 @@ type FileType = {
|
|
|
22
22
|
content: (editor: FileEditor) => string;
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
|
25
|
-
|
|
25
|
+
//#region src/index.d.ts
|
|
26
|
+
/** @deprecated use `create({ cwd, ...options })` instead. */
|
|
27
|
+
declare function create(cwd: string, options: Omit<Options, "cwd">): void;
|
|
28
|
+
declare function create(options: Options): void;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { type Addon, type AddonDefinition, type AddonInput, type AddonMap, type AddonReference, type AddonResult, type AddonSource, type BaseQuestion, type BooleanQuestion, type ConfiguredAddon, type FileEditor, type FileType, type InstallOptions, type LanguageType, type LoadedAddon, type MultiSelectQuestion, type NumberQuestion, type OptionBuilder, type OptionDefinition, type OptionMap, type OptionValues, type PreparedAddon, type Question, type SelectQuestion, type SetupResult, type StringQuestion, type SvApi, type TemplateType, type Workspace, type WorkspaceOptions, add, create, defineAddon, defineAddonOptions, officialAddons };
|
package/dist/src/index.mjs
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as defineAddonOptions, m as create$1, o as officialAddons, s as defineAddon, t as add, y as svDeprecated } from "../engine-CzIdz0uO.mjs";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
function create(cwdOrOptions, legacyOptions) {
|
|
4
|
+
if (typeof cwdOrOptions === "string") {
|
|
5
|
+
svDeprecated("use `create({ cwd, ...options })` instead of `create(cwd, options)`");
|
|
6
|
+
create$1({
|
|
7
|
+
cwd: cwdOrOptions,
|
|
8
|
+
...legacyOptions
|
|
9
|
+
});
|
|
10
|
+
} else create$1(cwdOrOptions);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
2
13
|
export { add, create, defineAddon, defineAddonOptions, officialAddons };
|
package/dist/src/testing.d.mts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { r as OptionMap, t as AddonMap } from "../engine-
|
|
2
|
-
import
|
|
3
|
-
import * as _playwright_test0 from "@playwright/test";
|
|
1
|
+
import { r as OptionMap, t as AddonMap } from "../engine-3mrtB4nw.mjs";
|
|
2
|
+
import * as _$_playwright_test0 from "@playwright/test";
|
|
4
3
|
import { Page } from "@playwright/test";
|
|
5
|
-
import * as vitest from "vitest";
|
|
4
|
+
import * as _$vitest from "vitest";
|
|
6
5
|
import { TestProject } from "vitest/node";
|
|
7
6
|
|
|
8
|
-
//#region src/core/package-manager.d.ts
|
|
9
|
-
declare function addPnpmBuildDependencies(cwd: string, packageManager: AgentName | null | undefined, allowedPackages: string[]): Promise<void>;
|
|
10
|
-
//#endregion
|
|
11
7
|
//#region src/testing.d.ts
|
|
12
8
|
type ProjectVariant = "kit-js" | "kit-ts" | "vite-js" | "vite-ts";
|
|
13
9
|
declare const variants: ProjectVariant[];
|
|
@@ -16,39 +12,6 @@ type CreateProject = (options: {
|
|
|
16
12
|
variant: ProjectVariant; /** @default true */
|
|
17
13
|
clean?: boolean;
|
|
18
14
|
}) => string;
|
|
19
|
-
type SetupOptions = {
|
|
20
|
-
cwd: string;
|
|
21
|
-
variants: readonly ProjectVariant[]; /** @default false */
|
|
22
|
-
clean?: boolean;
|
|
23
|
-
};
|
|
24
|
-
declare function setup({
|
|
25
|
-
cwd,
|
|
26
|
-
clean,
|
|
27
|
-
variants
|
|
28
|
-
}: SetupOptions): {
|
|
29
|
-
templatesDir: string;
|
|
30
|
-
};
|
|
31
|
-
type CreateOptions = {
|
|
32
|
-
cwd: string;
|
|
33
|
-
testName: string;
|
|
34
|
-
templatesDir: string;
|
|
35
|
-
};
|
|
36
|
-
declare function createProject({
|
|
37
|
-
cwd,
|
|
38
|
-
testName,
|
|
39
|
-
templatesDir
|
|
40
|
-
}: CreateOptions): CreateProject;
|
|
41
|
-
type PreviewOptions = {
|
|
42
|
-
cwd: string;
|
|
43
|
-
command?: string;
|
|
44
|
-
};
|
|
45
|
-
declare function startPreview({
|
|
46
|
-
cwd,
|
|
47
|
-
command
|
|
48
|
-
}: PreviewOptions): Promise<{
|
|
49
|
-
url: string;
|
|
50
|
-
close: () => Promise<void>;
|
|
51
|
-
}>;
|
|
52
15
|
declare module "vitest" {
|
|
53
16
|
interface ProvidedContext {
|
|
54
17
|
testDir: string;
|
|
@@ -103,12 +66,12 @@ declare function prepareServer({
|
|
|
103
66
|
buildCommand,
|
|
104
67
|
previewCommand
|
|
105
68
|
}: PrepareServerOptions): Promise<PrepareServerReturn>;
|
|
106
|
-
type PlaywrightContext = Pick<typeof _playwright_test0, "chromium">;
|
|
107
|
-
type VitestContext = Pick<typeof vitest, "inject" | "test" | "beforeAll" | "beforeEach">;
|
|
69
|
+
type PlaywrightContext = Pick<typeof _$_playwright_test0, "chromium">;
|
|
70
|
+
type VitestContext = Pick<typeof _$vitest, "inject" | "test" | "beforeAll" | "beforeEach">;
|
|
108
71
|
declare function createSetupTest(vitest: VitestContext, playwright?: PlaywrightContext): <Addons extends AddonMap>(addons: Addons, options?: SetupTestOptions<Addons>) => {
|
|
109
|
-
test: vitest.TestAPI<Fixtures>;
|
|
72
|
+
test: _$vitest.TestAPI<Fixtures>;
|
|
110
73
|
testCases: Array<AddonTestCase<AddonMap>>;
|
|
111
74
|
prepareServer: typeof prepareServer;
|
|
112
75
|
};
|
|
113
76
|
//#endregion
|
|
114
|
-
export { AddonTestCase, CreateProject, Fixtures, PlaywrightContext, PrepareServerOptions, PrepareServerReturn, ProjectVariant, SetupTestOptions, VitestContext,
|
|
77
|
+
export { AddonTestCase, CreateProject, Fixtures, PlaywrightContext, PrepareServerOptions, PrepareServerReturn, ProjectVariant, SetupTestOptions, VitestContext, createSetupTest, prepareServer, setupGlobal, variants };
|
package/dist/src/testing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as __toESM, b as __commonJSMin, f as R, i as addPnpmOnlyBuiltDependencies, m as create, p as z, t as add, x as __require } from "../engine-CzIdz0uO.mjs";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process$1 from "node:process";
|
|
@@ -618,22 +618,26 @@ function setup({ cwd, clean = false, variants }) {
|
|
|
618
618
|
for (const variant of variants) {
|
|
619
619
|
const templatePath = path.resolve(templatesDir, variant);
|
|
620
620
|
if (fs.existsSync(templatePath)) continue;
|
|
621
|
-
if (variant === "kit-js") create(
|
|
621
|
+
if (variant === "kit-js") create({
|
|
622
|
+
cwd: templatePath,
|
|
622
623
|
name: variant,
|
|
623
624
|
template: "minimal",
|
|
624
625
|
types: "checkjs"
|
|
625
626
|
});
|
|
626
|
-
else if (variant === "kit-ts") create(
|
|
627
|
+
else if (variant === "kit-ts") create({
|
|
628
|
+
cwd: templatePath,
|
|
627
629
|
name: variant,
|
|
628
630
|
template: "minimal",
|
|
629
631
|
types: "typescript"
|
|
630
632
|
});
|
|
631
|
-
else if (variant === "vite-js") create(
|
|
633
|
+
else if (variant === "vite-js") create({
|
|
634
|
+
cwd: templatePath,
|
|
632
635
|
name: variant,
|
|
633
636
|
template: "svelte",
|
|
634
637
|
types: "none"
|
|
635
638
|
});
|
|
636
|
-
else if (variant === "vite-ts") create(
|
|
639
|
+
else if (variant === "vite-ts") create({
|
|
640
|
+
cwd: templatePath,
|
|
637
641
|
name: variant,
|
|
638
642
|
template: "svelte",
|
|
639
643
|
types: "typescript"
|
|
@@ -812,13 +816,13 @@ function createSetupTest(vitest, playwright) {
|
|
|
812
816
|
addonTestCase,
|
|
813
817
|
cwd
|
|
814
818
|
});
|
|
815
|
-
|
|
819
|
+
await add({
|
|
816
820
|
cwd,
|
|
817
821
|
addons,
|
|
818
822
|
options: kind.options,
|
|
819
823
|
packageManager: "pnpm"
|
|
820
824
|
});
|
|
821
|
-
|
|
825
|
+
addPnpmOnlyBuiltDependencies(cwd, "pnpm", "esbuild");
|
|
822
826
|
}
|
|
823
827
|
execSync("pnpm install", {
|
|
824
828
|
cwd: path.resolve(cwd, testName),
|
|
@@ -846,4 +850,4 @@ function createSetupTest(vitest, playwright) {
|
|
|
846
850
|
};
|
|
847
851
|
}
|
|
848
852
|
//#endregion
|
|
849
|
-
export {
|
|
853
|
+
export { createSetupTest, prepareServer, setupGlobal, variants };
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"sv": "latest",
|
|
29
29
|
"@sveltejs/sv-utils": "latest",
|
|
30
|
-
"@playwright/test": "^1.
|
|
31
|
-
"@types/node": "^25.2
|
|
32
|
-
"tsdown": "^0.21.
|
|
33
|
-
"vitest": "^4.1.
|
|
30
|
+
"@playwright/test": "^1.59.1",
|
|
31
|
+
"@types/node": "^25.5.2",
|
|
32
|
+
"tsdown": "^0.21.7",
|
|
33
|
+
"vitest": "^4.1.3"
|
|
34
34
|
},
|
|
35
35
|
"keywords": ["sv-add", "svelte", "sveltekit"]
|
|
36
36
|
}
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@fontsource/fira-mono": "^5.2.7",
|
|
14
14
|
"@neoconfetti/svelte": "^2.2.2",
|
|
15
|
-
"@sveltejs/adapter-auto": "^7.0.
|
|
16
|
-
"@sveltejs/kit": "^2.
|
|
17
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
18
|
-
"svelte": "^5.
|
|
19
|
-
"vite": "^
|
|
15
|
+
"@sveltejs/adapter-auto": "^7.0.1",
|
|
16
|
+
"@sveltejs/kit": "^2.57.0",
|
|
17
|
+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
18
|
+
"svelte": "^5.55.2",
|
|
19
|
+
"vite": "^8.0.7"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"svelte": "^5.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@sveltejs/adapter-auto": "^7.0.
|
|
27
|
-
"@sveltejs/kit": "^2.
|
|
26
|
+
"@sveltejs/adapter-auto": "^7.0.1",
|
|
27
|
+
"@sveltejs/kit": "^2.57.0",
|
|
28
28
|
"@sveltejs/package": "^2.5.7",
|
|
29
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
30
|
-
"publint": "^0.3.
|
|
31
|
-
"svelte": "^5.
|
|
32
|
-
"typescript": "^
|
|
33
|
-
"vite": "^
|
|
29
|
+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
30
|
+
"publint": "^0.3.18",
|
|
31
|
+
"svelte": "^5.55.2",
|
|
32
|
+
"typescript": "^6.0.2",
|
|
33
|
+
"vite": "^8.0.7"
|
|
34
34
|
},
|
|
35
35
|
"keywords": ["svelte"]
|
|
36
36
|
}
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"prepare": "svelte-kit sync || echo ''"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@sveltejs/adapter-auto": "^7.0.
|
|
14
|
-
"@sveltejs/kit": "^2.
|
|
15
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
16
|
-
"svelte": "^5.
|
|
17
|
-
"vite": "^
|
|
13
|
+
"@sveltejs/adapter-auto": "^7.0.1",
|
|
14
|
+
"@sveltejs/kit": "^2.57.0",
|
|
15
|
+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
16
|
+
"svelte": "^5.55.2",
|
|
17
|
+
"vite": "^8.0.7"
|
|
18
18
|
}
|
|
19
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sv",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A command line interface (CLI) for creating and maintaining Svelte applications",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sveltejs/sv-utils": "0.
|
|
28
|
+
"@sveltejs/sv-utils": "0.2.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0",
|