sv 0.10.3 → 0.10.5
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.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as
|
|
3
|
-
import { a as communityAddonIds, c as officialAddons, d as create$2, f as overrideProperties, i as createWorkspace, l as createDefault, o as getCommunityAddon, r as setupAddons, s as getAddonDetails, t as applyAddons, u as addDefault } from "./install-
|
|
2
|
+
import { $ as et, A as parseSvelte, B as isVersionUnsupportedBelow, C as dist, G as De, J, K as Fe, O as parseJson, Q as We, T as resolveCommand, X as T, Y as Ke, Z as Ue, a as getUserAgent, at as Option, b as detect, c as packageManagerPrompt, d as from, et as ke, f as commonFilePaths, g as getPackageJson, h as getHighlighter, i as addPnpmBuildDependencies, it as Command, k as parseScript, lt as __toESM, m as formatFiles, n as templates, nt as Vu, o as installDependencies, ot as program, q as Ge, r as AGENT_NAMES, rt as require_picocolors, s as installOption, t as create$1, tt as ze, u as up$1, w as getSharedFiles } from "./create-DJeT6Cfe.js";
|
|
3
|
+
import { a as communityAddonIds, c as officialAddons, d as create$2, f as overrideProperties, i as createWorkspace, l as createDefault, o as getCommunityAddon, r as setupAddons, s as getAddonDetails, t as applyAddons, u as addDefault } from "./install-jbRIQkth.js";
|
|
4
4
|
import { exec, execSync } from "node:child_process";
|
|
5
5
|
import path, { dirname, join } from "node:path";
|
|
6
6
|
import fs, { existsSync } from "node:fs";
|
|
@@ -12,7 +12,7 @@ import { pipeline } from "node:stream/promises";
|
|
|
12
12
|
|
|
13
13
|
//#region package.json
|
|
14
14
|
var name = "sv";
|
|
15
|
-
var version = "0.10.
|
|
15
|
+
var version = "0.10.5";
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region ../../node_modules/.pnpm/empathic@1.1.0/node_modules/empathic/package.mjs
|
|
@@ -1520,7 +1520,6 @@ async function createProject(cwd, options$1) {
|
|
|
1520
1520
|
const workspace = await createVirtualWorkspace({
|
|
1521
1521
|
cwd: projectPath,
|
|
1522
1522
|
template,
|
|
1523
|
-
packageManager: "npm",
|
|
1524
1523
|
type: language
|
|
1525
1524
|
});
|
|
1526
1525
|
if (options$1.addOns || options$1.add.length > 0) {
|
|
@@ -1606,21 +1605,25 @@ async function confirmExternalDependencies(dependencies) {
|
|
|
1606
1605
|
}
|
|
1607
1606
|
return installDeps;
|
|
1608
1607
|
}
|
|
1609
|
-
async function createVirtualWorkspace({ cwd, template,
|
|
1610
|
-
const override = {};
|
|
1608
|
+
async function createVirtualWorkspace({ cwd, template, type }) {
|
|
1609
|
+
const override = { dependencies: {} };
|
|
1611
1610
|
if (template === "minimal" || template === "demo" || template === "library") override.kit = {
|
|
1612
1611
|
routesDirectory: "src/routes",
|
|
1613
1612
|
libDirectory: "src/lib"
|
|
1614
1613
|
};
|
|
1614
|
+
const { data: packageJson } = getPackageJson(dist(`templates/${template}`));
|
|
1615
|
+
override.dependencies = {
|
|
1616
|
+
...packageJson.devDependencies,
|
|
1617
|
+
...packageJson.dependencies,
|
|
1618
|
+
...override.dependencies
|
|
1619
|
+
};
|
|
1615
1620
|
const tentativeWorkspace = await createWorkspace({
|
|
1616
1621
|
cwd,
|
|
1617
|
-
packageManager,
|
|
1618
1622
|
override
|
|
1619
1623
|
});
|
|
1620
1624
|
return {
|
|
1621
1625
|
...tentativeWorkspace,
|
|
1622
1626
|
typescript: type === "typescript",
|
|
1623
|
-
dependencyVersion: () => void 0,
|
|
1624
1627
|
files: {
|
|
1625
1628
|
...tentativeWorkspace.files,
|
|
1626
1629
|
viteConfig: type === "typescript" ? commonFilePaths.viteConfigTS : commonFilePaths.viteConfig,
|
|
@@ -32447,4 +32447,4 @@ function to_valid_package_name(name) {
|
|
|
32447
32447
|
}
|
|
32448
32448
|
|
|
32449
32449
|
//#endregion
|
|
32450
|
-
export {
|
|
32450
|
+
export { et$1 as $, parseSvelte as A, isVersionUnsupportedBelow as B, dist as C, parseHtml as D, parseCss as E, serializeScript as F, De as G, dedent_default as H, stripAst as I, J, Fe as K, Element as L, import_picocolors$1 as M, parseHtml$1 as N, parseJson as O, parseScript$1 as P, We as Q, Tag as R, ve as S, resolveCommand as T, defineAddon as U, createPrinter as V, defineAddonOptions as W, T as X, Ke as Y, Ue as Z, installPackages as _, getUserAgent as a, Option as at, detect as b, packageManagerPrompt as c, __require as ct, from as d, ke as et, commonFilePaths as f, getPackageJson as g, getHighlighter as h, addPnpmBuildDependencies as i, Command as it, MagicString as j, parseScript as k, any as l, __toESM as lt, formatFiles as m, templates as n, Vu as nt, installDependencies as o, program as ot, fileExists as p, Ge as q, AGENT_NAMES as r, require_picocolors as rt, installOption as s, __commonJS as st, create as t, ze as tt, up as u, readFile as v, getSharedFiles as w, be as x, writeFile as y, walk as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as parseSvelte, D as parseHtml, E as parseCss, F as serializeScript, H as dedent_default, I as stripAst, L as Element, M as import_picocolors$1, N as parseHtml$1, O as parseJson, P as parseScript$1, R as Tag, T as resolveCommand, U as defineAddon, V as createPrinter, W as defineAddonOptions, X as T, _ as installPackages, a as getUserAgent, b as detect, f as commonFilePaths, g as getPackageJson, h as getHighlighter, j as MagicString, k as parseScript, l as any, lt as __toESM, p as fileExists, rt as require_picocolors, v as readFile, w as getSharedFiles, x as be, y as writeFile, z as walk } from "./create-DJeT6Cfe.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import process from "node:process";
|
|
@@ -2940,20 +2940,23 @@ async function createWorkspace({ cwd, packageManager, override }) {
|
|
|
2940
2940
|
const svelteConfigPath = path.join(resolvedCwd, commonFilePaths.svelteConfigTS);
|
|
2941
2941
|
const svelteConfig = fs.existsSync(svelteConfigPath) ? commonFilePaths.svelteConfigTS : commonFilePaths.svelteConfig;
|
|
2942
2942
|
let dependencies = {};
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2943
|
+
if (override?.dependencies) dependencies = override.dependencies;
|
|
2944
|
+
else {
|
|
2945
|
+
let directory = resolvedCwd;
|
|
2946
|
+
const workspaceRoot = findWorkspaceRoot(directory);
|
|
2947
|
+
const { root } = path.parse(directory);
|
|
2948
|
+
while (directory && directory.length >= workspaceRoot.length) {
|
|
2949
|
+
if (fs.existsSync(path.join(directory, commonFilePaths.packageJson))) {
|
|
2950
|
+
const { data: packageJson } = getPackageJson(directory);
|
|
2951
|
+
dependencies = {
|
|
2952
|
+
...packageJson.devDependencies,
|
|
2953
|
+
...packageJson.dependencies,
|
|
2954
|
+
...dependencies
|
|
2955
|
+
};
|
|
2956
|
+
}
|
|
2957
|
+
if (root === directory) break;
|
|
2958
|
+
directory = path.dirname(directory);
|
|
2954
2959
|
}
|
|
2955
|
-
if (root === directory) break;
|
|
2956
|
-
directory = path.dirname(directory);
|
|
2957
2960
|
}
|
|
2958
2961
|
for (const [key, value] of Object.entries(dependencies)) dependencies[key] = value.replaceAll(/[^\d|.]/g, "");
|
|
2959
2962
|
const kit = override?.kit ? override.kit : dependencies["@sveltejs/kit"] ? parseKitOptions(resolvedCwd) : void 0;
|
|
@@ -3055,9 +3058,13 @@ async function applyAddons({ addons, workspace, addonSetupResults, options: opti
|
|
|
3055
3058
|
const status = {};
|
|
3056
3059
|
const ordered = orderAddons(Object.entries(addons).map(([, addon]) => addon), addonSetupResults);
|
|
3057
3060
|
for (const addon of ordered) {
|
|
3061
|
+
const workspaceOptions = options$7[addon.id] || {};
|
|
3058
3062
|
const { files, pnpmBuildDependencies, cancels } = await runAddon({
|
|
3059
|
-
workspace
|
|
3060
|
-
|
|
3063
|
+
workspace: await createWorkspace({
|
|
3064
|
+
cwd: workspace.cwd,
|
|
3065
|
+
packageManager: workspace.packageManager
|
|
3066
|
+
}),
|
|
3067
|
+
workspaceOptions,
|
|
3061
3068
|
addon,
|
|
3062
3069
|
multiple: ordered.length > 1
|
|
3063
3070
|
});
|
package/dist/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as create } from "../create-
|
|
2
|
-
import { c as officialAddons, n as installAddon } from "../install-
|
|
1
|
+
import { t as create } from "../create-DJeT6Cfe.js";
|
|
2
|
+
import { c as officialAddons, n as installAddon } from "../install-jbRIQkth.js";
|
|
3
3
|
|
|
4
4
|
export { create, installAddon, officialAddons };
|
package/dist/lib/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as ve, ct as
|
|
1
|
+
import { S as ve, ct as __require, i as addPnpmBuildDependencies, lt as __toESM, st as __commonJS, t as create, x as be } from "../create-DJeT6Cfe.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import process$1 from "node:process";
|
package/dist/shared.json
CHANGED
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"typescript"
|
|
138
138
|
],
|
|
139
139
|
"exclude": [],
|
|
140
|
-
"contents": "{\n\t\"extends\": \"./.svelte-kit/tsconfig.json\",\n\t\"compilerOptions\": {\n\t\t\"rewriteRelativeImportExtensions\": true,\n\t\t\"allowJs\": true,\n\t\t\"checkJs\": true,\n\t\t\"
|
|
140
|
+
"contents": "{\n\t\"extends\": \"./.svelte-kit/tsconfig.json\",\n\t\"compilerOptions\": {\n\t\t\"rewriteRelativeImportExtensions\": true,\n\t\t\"allowJs\": true,\n\t\t\"checkJs\": true,\n\t\t\"forceConsistentCasingInFileNames\": true,\n\t\t\"resolveJsonModule\": true,\n\t\t\"skipLibCheck\": true,\n\t\t\"sourceMap\": true,\n\t\t\"strict\": true,\n\t\t\"module\": \"NodeNext\",\n\t\t\"moduleResolution\": \"NodeNext\"\n\t}\n}\n"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"name": "vite.config.js",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"typescript",
|
|
158
158
|
"checkjs"
|
|
159
159
|
],
|
|
160
|
-
"contents": "{\n\t\"extends\": \"./.svelte-kit/tsconfig.json\",\n\t\"compilerOptions\": {\n\t\t\"
|
|
160
|
+
"contents": "{\n\t\"extends\": \"./.svelte-kit/tsconfig.json\",\n\t\"compilerOptions\": {\n\t\t\"forceConsistentCasingInFileNames\": true,\n\t\t\"resolveJsonModule\": true,\n\t\t\"skipLibCheck\": true,\n\t\t\"sourceMap\": true,\n\t\t\"module\": \"NodeNext\",\n\t\t\"moduleResolution\": \"NodeNext\"\n\t}\n}\n"
|
|
161
161
|
}
|
|
162
162
|
]
|
|
163
163
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sv",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI for creating and updating SvelteKit projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"tinyexec": "^0.3.2",
|
|
38
38
|
"valibot": "^0.41.0",
|
|
39
39
|
"@sveltejs/addons": "0.0.0",
|
|
40
|
-
"@sveltejs/
|
|
41
|
-
"@sveltejs/
|
|
40
|
+
"@sveltejs/cli-core": "0.0.0",
|
|
41
|
+
"@sveltejs/create": "0.0.0"
|
|
42
42
|
},
|
|
43
43
|
"keywords": [
|
|
44
44
|
"create",
|