sv 0.15.2 → 0.15.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.
package/dist/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as name, a as detectPackageManager, d as program, g as helpConfig, h as forwardExitCode, l as from, n as add, r as create, u as Command, v as version } from "./engine-
|
|
2
|
+
import { _ as name, a as detectPackageManager, d as program, g as helpConfig, h as forwardExitCode, l as from, n as add, r as create, u as Command, v as version } from "./engine-DSL32Woe.mjs";
|
|
3
3
|
import { color, resolveCommandArray } from "@sveltejs/sv-utils";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { execSync } from "node:child_process";
|
|
@@ -1394,7 +1394,7 @@ ${r ? import_picocolors.default.cyan(x$1) : ""}
|
|
|
1394
1394
|
//#endregion
|
|
1395
1395
|
//#region package.json
|
|
1396
1396
|
var name = "sv";
|
|
1397
|
-
var version = "0.15.
|
|
1397
|
+
var version = "0.15.3";
|
|
1398
1398
|
//#endregion
|
|
1399
1399
|
//#region src/core/errors.ts
|
|
1400
1400
|
var UnsupportedError = class extends Error {
|
|
@@ -7776,7 +7776,7 @@ var sveltekit_adapter_default = defineAddon({
|
|
|
7776
7776
|
setup: ({ isKit, unsupported }) => {
|
|
7777
7777
|
if (!isKit) unsupported("Requires SvelteKit");
|
|
7778
7778
|
},
|
|
7779
|
-
run: ({ sv, options, file, cwd }) => {
|
|
7779
|
+
run: ({ sv, options, packageManager, file, cwd }) => {
|
|
7780
7780
|
const adapter = adapters.find((a) => a.id === options.adapter);
|
|
7781
7781
|
sv.file(file.package, transforms.json(({ data }) => {
|
|
7782
7782
|
const devDeps = data["devDependencies"];
|
|
@@ -7815,6 +7815,7 @@ var sveltekit_adapter_default = defineAddon({
|
|
|
7815
7815
|
}));
|
|
7816
7816
|
if (adapter.package === "@sveltejs/adapter-cloudflare") {
|
|
7817
7817
|
sv.devDependency("wrangler", "^4.81.0");
|
|
7818
|
+
if (packageManager === "pnpm") sv.file(file.findUp("pnpm-workspace.yaml"), pnpm.allowBuilds("workerd", "sharp"));
|
|
7818
7819
|
const ext = fileExists(cwd, "wrangler.toml") ? "toml" : "jsonc";
|
|
7819
7820
|
const applyWranglerConfig = (data) => {
|
|
7820
7821
|
if (ext === "jsonc") data.$schema ??= "./node_modules/wrangler/config-schema.json";
|
|
@@ -10962,22 +10963,33 @@ async function installDependencies(agent, cwd) {
|
|
|
10962
10963
|
spacing: 0,
|
|
10963
10964
|
retainLog: true
|
|
10964
10965
|
});
|
|
10966
|
+
const { command, args } = constructCommand(COMMANDS[agent].install, []);
|
|
10967
|
+
const proc = z(command, args, {
|
|
10968
|
+
nodeOptions: {
|
|
10969
|
+
cwd,
|
|
10970
|
+
stdio: "pipe"
|
|
10971
|
+
},
|
|
10972
|
+
throwOnError: false
|
|
10973
|
+
});
|
|
10974
|
+
const output = [];
|
|
10965
10975
|
try {
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
throwOnError: true
|
|
10973
|
-
});
|
|
10974
|
-
for await (const line of proc) task.message(line);
|
|
10976
|
+
for await (const line of proc) {
|
|
10977
|
+
output.push(line);
|
|
10978
|
+
task.message(line);
|
|
10979
|
+
}
|
|
10980
|
+
} catch {}
|
|
10981
|
+
if ((proc.exitCode ?? 0) === 0) {
|
|
10975
10982
|
task.success(`Successfully installed dependencies with ${color.command(agent)}`);
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10983
|
+
return;
|
|
10984
|
+
}
|
|
10985
|
+
if (agent === "pnpm" && output.join("\n").includes("ERR_PNPM_IGNORED_BUILDS")) {
|
|
10986
|
+
task.success(`Installed dependencies with ${color.command(agent)}`);
|
|
10987
|
+
R$1.warn(`Some build scripts were skipped. Run ${color.command(`${agent} approve-builds`)} to approve them.`);
|
|
10988
|
+
return;
|
|
10980
10989
|
}
|
|
10990
|
+
task.error("Failed to install dependencies");
|
|
10991
|
+
Pt("Operation failed.");
|
|
10992
|
+
process$1.exit(2);
|
|
10981
10993
|
}
|
|
10982
10994
|
async function detectPackageManager(cwd) {
|
|
10983
10995
|
return (await detect({ cwd }))?.name ?? getUserAgent() ?? "npm";
|
|
@@ -11564,6 +11576,8 @@ async function createProject(cwd, options) {
|
|
|
11564
11576
|
});
|
|
11565
11577
|
if (options.fromPlayground) await createProjectFromPlayground(options.fromPlayground, projectPath);
|
|
11566
11578
|
R$1.success("Project created");
|
|
11579
|
+
const packageManager = options.install === false ? null : options.install === true ? await packageManagerPrompt(projectPath) : options.install;
|
|
11580
|
+
if (packageManager) workspace.packageManager = packageManager;
|
|
11567
11581
|
let argsFormattedAddons = [];
|
|
11568
11582
|
let addOnFilesToFormat = [];
|
|
11569
11583
|
let addOnSuccessfulAddons = [];
|
|
@@ -11588,7 +11602,6 @@ async function createProject(cwd, options) {
|
|
|
11588
11602
|
addOnSuccessfulAddons = successfulAddons;
|
|
11589
11603
|
addonSetupResults = setupResults;
|
|
11590
11604
|
}
|
|
11591
|
-
const packageManager = options.install === false ? null : options.install === true ? await packageManagerPrompt(projectPath) : options.install;
|
|
11592
11605
|
const argsFormatted = [];
|
|
11593
11606
|
argsFormatted.push("--template", template);
|
|
11594
11607
|
if (language === "typescript") argsFormatted.push("--types", "ts");
|
|
@@ -11597,7 +11610,6 @@ async function createProject(cwd, options) {
|
|
|
11597
11610
|
if (argsFormattedAddons.length > 0) argsFormatted.push("--add", ...argsFormattedAddons);
|
|
11598
11611
|
updateReadme(directory, buildAndLogArgs(packageManager, "create", argsFormatted, [directory]));
|
|
11599
11612
|
updateAgent(directory, language, packageManager ?? "npm", loadedAddons);
|
|
11600
|
-
if (packageManager) workspace.packageManager = packageManager;
|
|
11601
11613
|
const addOnNextSteps = getNextSteps(addOnSuccessfulAddons, workspace, answers, addonSetupResults);
|
|
11602
11614
|
addPnpmAllowBuilds(projectPath, packageManager, "esbuild");
|
|
11603
11615
|
if (packageManager) {
|
package/dist/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as defineAddonOptions, m as create$1, o as officialAddons, s as defineAddon, t as add, y as svDeprecated } from "../engine-
|
|
1
|
+
import { c as defineAddonOptions, m as create$1, o as officialAddons, s as defineAddon, t as add, y as svDeprecated } from "../engine-DSL32Woe.mjs";
|
|
2
2
|
//#region src/index.ts
|
|
3
3
|
function create(cwdOrOptions, legacyOptions) {
|
|
4
4
|
if (typeof cwdOrOptions === "string") {
|
package/dist/src/testing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as __toESM, b as __commonJSMin, f as R, i as addPnpmAllowBuilds, m as create, p as z, t as add, x as __require } from "../engine-
|
|
1
|
+
import { S as __toESM, b as __commonJSMin, f as R, i as addPnpmAllowBuilds, m as create, p as z, t as add, x as __require } from "../engine-DSL32Woe.mjs";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process$1 from "node:process";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sv",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
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.2.
|
|
28
|
+
"@sveltejs/sv-utils": "0.2.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0",
|