sv 0.6.1 → 0.6.3

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.
@@ -0,0 +1,3 @@
1
+ export { create } from '@sveltejs/create';
2
+ export { installAddon } from './install.ts';
3
+ export type { AddonMap, InstallOptions, OptionMap } from './install.ts';
@@ -0,0 +1,20 @@
1
+ import type { Addon, Workspace, PackageManager, OptionValues, AddonSetupResult, AddonWithoutExplicitArgs } from '@sveltejs/cli-core';
2
+ export type InstallOptions<Addons extends AddonMap> = {
3
+ cwd: string;
4
+ addons: Addons;
5
+ options: OptionMap<Addons>;
6
+ packageManager?: PackageManager;
7
+ };
8
+ export type AddonMap = Record<string, Addon<any>>;
9
+ export type OptionMap<Addons extends AddonMap> = {
10
+ [K in keyof Addons]: Partial<OptionValues<Addons[K]['options']>>;
11
+ };
12
+ export declare function installAddon<Addons extends AddonMap>({ addons, cwd, options, packageManager }: InstallOptions<Addons>): Promise<string[]>;
13
+ export type ApplyAddonOptions = {
14
+ addons: AddonMap;
15
+ options: OptionMap<AddonMap>;
16
+ workspace: Workspace<any>;
17
+ addonSetupResults: Record<string, AddonSetupResult>;
18
+ };
19
+ export declare function applyAddons({ addons, workspace, addonSetupResults, options }: ApplyAddonOptions): Promise<string[]>;
20
+ export declare function setupAddons(addons: AddonWithoutExplicitArgs[], workspace: Workspace<any>): Record<string, AddonSetupResult>;
@@ -0,0 +1,31 @@
1
+ export type ProjectVariant = 'kit-js' | 'kit-ts' | 'vite-js' | 'vite-ts';
2
+ export type CreateProject = (options: {
3
+ testId: string;
4
+ variant: ProjectVariant;
5
+ /** @default true */
6
+ clean?: boolean;
7
+ }) => string;
8
+ type SetupOptions = {
9
+ cwd: string;
10
+ variants: readonly ProjectVariant[];
11
+ /** @default false */
12
+ clean?: boolean;
13
+ };
14
+ export declare function setup({ cwd, clean, variants }: SetupOptions): Promise<{
15
+ templatesDir: string;
16
+ }>;
17
+ type CreateOptions = {
18
+ cwd: string;
19
+ testName: string;
20
+ templatesDir: string;
21
+ };
22
+ export declare function createProject({ cwd, testName, templatesDir }: CreateOptions): CreateProject;
23
+ type PreviewOptions = {
24
+ cwd: string;
25
+ command?: string;
26
+ };
27
+ export declare function startPreview({ cwd, command }: PreviewOptions): Promise<{
28
+ url: string;
29
+ close: () => Promise<void>;
30
+ }>;
31
+ export {};