sv 0.8.5 → 0.8.7
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 +9 -8
- package/package.json +4 -4
package/dist/bin.js
CHANGED
|
@@ -12,7 +12,7 @@ import { promisify } from "node:util";
|
|
|
12
12
|
|
|
13
13
|
//#region packages/cli/package.json
|
|
14
14
|
var name = "sv";
|
|
15
|
-
var version = "0.8.
|
|
15
|
+
var version = "0.8.7";
|
|
16
16
|
var type = "module";
|
|
17
17
|
var description = "A CLI for creating and updating SvelteKit projects";
|
|
18
18
|
var license = "MIT";
|
|
@@ -1138,10 +1138,13 @@ function addToDemoPage(content, path$2) {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
function getNodeTypesVersion() {
|
|
1140
1140
|
const nodeVersion = process$1.versions.node;
|
|
1141
|
+
const isDenoOrBun = Boolean(process$1.versions.deno ?? process$1.versions.bun);
|
|
1141
1142
|
const [major] = nodeVersion.split(".");
|
|
1142
|
-
const
|
|
1143
|
+
const majorNum = Number(major);
|
|
1144
|
+
const isEvenMajor = majorNum % 2 === 0;
|
|
1145
|
+
const isLTS = !!process$1.release.lts || isDenoOrBun && isEvenMajor;
|
|
1143
1146
|
if (isLTS) return `^${major}`;
|
|
1144
|
-
const previousLTSMajor =
|
|
1147
|
+
const previousLTSMajor = isEvenMajor ? majorNum - 2 : majorNum - 1;
|
|
1145
1148
|
return `^${previousLTSMajor}`;
|
|
1146
1149
|
}
|
|
1147
1150
|
|
|
@@ -1240,7 +1243,7 @@ var drizzle_default = defineAddon({
|
|
|
1240
1243
|
options: options$5,
|
|
1241
1244
|
setup: ({ kit, unsupported, cwd, typescript }) => {
|
|
1242
1245
|
const ext = typescript ? "ts" : "js";
|
|
1243
|
-
if (!kit) unsupported("Requires SvelteKit");
|
|
1246
|
+
if (!kit) return unsupported("Requires SvelteKit");
|
|
1244
1247
|
const baseDBPath = path.resolve(kit.libDirectory, "server", "db");
|
|
1245
1248
|
const paths = {
|
|
1246
1249
|
"drizzle config": path.relative(cwd, path.resolve(cwd, `drizzle.config.${ext}`)),
|
|
@@ -1340,7 +1343,6 @@ var drizzle_default = defineAddon({
|
|
|
1340
1343
|
if (options$6.database === "sqlite") {
|
|
1341
1344
|
imports_exports.addNamed(ast, "drizzle-orm/sqlite-core", {
|
|
1342
1345
|
sqliteTable: "sqliteTable",
|
|
1343
|
-
text: "text",
|
|
1344
1346
|
integer: "integer"
|
|
1345
1347
|
});
|
|
1346
1348
|
userSchemaExpression = common_exports.expressionFromString(`sqliteTable('user', {
|
|
@@ -1352,7 +1354,6 @@ var drizzle_default = defineAddon({
|
|
|
1352
1354
|
imports_exports.addNamed(ast, "drizzle-orm/mysql-core", {
|
|
1353
1355
|
mysqlTable: "mysqlTable",
|
|
1354
1356
|
serial: "serial",
|
|
1355
|
-
text: "text",
|
|
1356
1357
|
int: "int"
|
|
1357
1358
|
});
|
|
1358
1359
|
userSchemaExpression = common_exports.expressionFromString(`mysqlTable('user', {
|
|
@@ -1364,7 +1365,6 @@ var drizzle_default = defineAddon({
|
|
|
1364
1365
|
imports_exports.addNamed(ast, "drizzle-orm/pg-core", {
|
|
1365
1366
|
pgTable: "pgTable",
|
|
1366
1367
|
serial: "serial",
|
|
1367
|
-
text: "text",
|
|
1368
1368
|
integer: "integer"
|
|
1369
1369
|
});
|
|
1370
1370
|
userSchemaExpression = common_exports.expressionFromString(`pgTable('user', {
|
|
@@ -6981,7 +6981,8 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
6981
6981
|
}
|
|
6982
6982
|
}
|
|
6983
6983
|
let workspace = await createWorkspace({ cwd: options$6.cwd });
|
|
6984
|
-
const
|
|
6984
|
+
const setups = selectedAddons.length ? selectedAddons.map(({ addon }) => addon) : officialAddons;
|
|
6985
|
+
const addonSetupResults = setupAddons(setups, workspace);
|
|
6985
6986
|
if (selectedAddons.length === 0) {
|
|
6986
6987
|
const addonOptions$1 = officialAddons.filter(({ id }) => addonSetupResults[id].unsupported.length === 0).map(({ id, homepage: homepage$1, shortDescription }) => ({
|
|
6987
6988
|
label: id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sv",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI for creating and updating SvelteKit projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"tar-fs": "^3.0.8",
|
|
38
38
|
"tinyexec": "^0.3.2",
|
|
39
39
|
"valibot": "^0.41.0",
|
|
40
|
-
"@sveltejs/cli-core": "0.0.0",
|
|
41
40
|
"@sveltejs/addons": "0.0.0",
|
|
42
|
-
"@sveltejs/
|
|
43
|
-
"@sveltejs/clack-prompts": "0.9.1"
|
|
41
|
+
"@sveltejs/cli-core": "0.0.0",
|
|
42
|
+
"@sveltejs/clack-prompts": "0.9.1",
|
|
43
|
+
"@sveltejs/create": "0.0.0"
|
|
44
44
|
},
|
|
45
45
|
"keywords": [
|
|
46
46
|
"create",
|