sv 0.6.19 → 0.6.20
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 { AtRule, Element, __commonJS, __require, __toESM, addPnpmBuildDependendencies, box, cancel, confirm, create, detectSync, esm_exports, from, getUserAgent, group, installDependencies, intro, isCancel, log, multiselect, note, outro, packageManagerPrompt, parseCss, parseHtml as parseHtml$1, parseHtml$1 as parseHtml, parseJson, parseScript, parseSvelte, resolveCommand, select, spinner, templates, text, up, walk_exports } from "./package-manager-
|
|
3
|
-
import { __commonJS$1, __export, __toESM$1, addFromString, applyAddons, array_exports, common_exports, createWorkspace, dedent_default, exports_exports, formatFiles, function_exports, getHighlighter, imports_exports, kit_exports, object_exports, require_picocolors, setupAddons, variables_exports } from "./install-
|
|
2
|
+
import { AtRule, Element, __commonJS, __require, __toESM, addPnpmBuildDependendencies, box, cancel, confirm, create, detectSync, esm_exports, from, getUserAgent, group, installDependencies, intro, isCancel, log, multiselect, note, outro, packageManagerPrompt, parseCss, parseHtml as parseHtml$1, parseHtml$1 as parseHtml, parseJson, parseScript, parseSvelte, resolveCommand, select, spinner, templates, text, up, walk_exports } from "./package-manager-f0ge7H2V.js";
|
|
3
|
+
import { __commonJS$1, __export, __toESM$1, addFromString, applyAddons, array_exports, common_exports, createWorkspace, dedent_default, exports_exports, formatFiles, function_exports, getHighlighter, imports_exports, kit_exports, object_exports, require_picocolors, setupAddons, variables_exports } from "./install-PTlNv0EA.js";
|
|
4
4
|
import fs, { existsSync } from "node:fs";
|
|
5
5
|
import path, { dirname, join } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -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.6.
|
|
15
|
+
var version = "0.6.20";
|
|
16
16
|
var type = "module";
|
|
17
17
|
var description = "A CLI for creating and updating SvelteKit projects";
|
|
18
18
|
var license = "MIT";
|
|
@@ -4557,8 +4557,11 @@ var sveltekit_adapter_default = defineAddon({
|
|
|
4557
4557
|
} else imports_exports.addDefault(ast, adapter.package, adapterName);
|
|
4558
4558
|
const { value: config } = exports_exports.defaultExport(ast, object_exports.createEmpty());
|
|
4559
4559
|
const kitConfig = config.properties.find((p) => p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "kit");
|
|
4560
|
-
if (kitConfig && kitConfig.value.type === "ObjectExpression")
|
|
4561
|
-
|
|
4560
|
+
if (kitConfig && kitConfig.value.type === "ObjectExpression") {
|
|
4561
|
+
const adapterProp = kitConfig.value.properties.find((p) => p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "adapter");
|
|
4562
|
+
if (adapterProp) adapterProp.comments = [];
|
|
4563
|
+
object_exports.overrideProperties(kitConfig.value, { adapter: function_exports.callByIdentifier(adapterName, []) });
|
|
4564
|
+
} else object_exports.properties(config, { kit: object_exports.create({ adapter: function_exports.callByIdentifier(adapterName, []) }) });
|
|
4562
4565
|
return generateCode();
|
|
4563
4566
|
});
|
|
4564
4567
|
}
|
|
@@ -5582,7 +5585,8 @@ else return replacement(...match, match.index, str, match.groups);
|
|
|
5582
5585
|
const TABLE_TYPE = {
|
|
5583
5586
|
mysql: "mysqlTable",
|
|
5584
5587
|
postgresql: "pgTable",
|
|
5585
|
-
sqlite: "sqliteTable"
|
|
5588
|
+
sqlite: "sqliteTable",
|
|
5589
|
+
turso: "sqliteTable"
|
|
5586
5590
|
};
|
|
5587
5591
|
let drizzleDialect;
|
|
5588
5592
|
let schemaPath;
|
|
@@ -5631,7 +5635,7 @@ var lucia_default = defineAddon({
|
|
|
5631
5635
|
const userAttributes = userTable.arguments[1];
|
|
5632
5636
|
const sessionAttributes = sessionTable.arguments[1];
|
|
5633
5637
|
if (userAttributes?.type !== "ObjectExpression" || sessionAttributes?.type !== "ObjectExpression") throw new Error("unexpected shape of `user` or `session` table definition");
|
|
5634
|
-
if (drizzleDialect === "sqlite") {
|
|
5638
|
+
if (drizzleDialect === "sqlite" || drizzleDialect === "turso") {
|
|
5635
5639
|
imports_exports.addNamed(ast, "drizzle-orm/sqlite-core", {
|
|
5636
5640
|
sqliteTable: "sqliteTable",
|
|
5637
5641
|
text: "text",
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __commonJS, __toESM, be, detectSync, getUserAgent, log, parseJson, parseScript as parseScript$1, parseScript$1 as parseScript, resolveCommand, serializeScript, stripAst, up, walk_exports } from "./package-manager-
|
|
1
|
+
import { __commonJS, __toESM, be, detectSync, getUserAgent, log, parseJson, parseScript as parseScript$1, parseScript$1 as parseScript, resolveCommand, serializeScript, stripAst, up, walk_exports } from "./package-manager-f0ge7H2V.js";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process$1 from "node:process";
|
|
@@ -40206,8 +40206,10 @@ function getUserAgent() {
|
|
|
40206
40206
|
function addPnpmBuildDependendencies(cwd$1, packageManager, allowedPackages) {
|
|
40207
40207
|
if (!packageManager || packageManager !== "pnpm") return;
|
|
40208
40208
|
const pnpmWorkspacePath = up("pnpm-workspace.yaml", { cwd: cwd$1 });
|
|
40209
|
-
|
|
40210
|
-
|
|
40209
|
+
let packageDirectory;
|
|
40210
|
+
if (pnpmWorkspacePath) packageDirectory = path.dirname(pnpmWorkspacePath);
|
|
40211
|
+
else packageDirectory = cwd$1;
|
|
40212
|
+
const pkgPath = path.join(packageDirectory, "package.json");
|
|
40211
40213
|
const content = fs.readFileSync(pkgPath, "utf-8");
|
|
40212
40214
|
const { data, generateCode } = parseJson(content);
|
|
40213
40215
|
data.pnpm ??= {};
|
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __commonJS, __require, __toESM, addPnpmBuildDependendencies, be, create } from "./package-manager-
|
|
1
|
+
import { __commonJS, __require, __toESM, addPnpmBuildDependendencies, be, create } from "./package-manager-f0ge7H2V.js";
|
|
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.6.
|
|
3
|
+
"version": "0.6.20",
|
|
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.6",
|
|
38
38
|
"tinyexec": "^0.3.1",
|
|
39
39
|
"valibot": "^0.41.0",
|
|
40
|
-
"@sveltejs/clack-prompts": "0.9.1",
|
|
41
40
|
"@sveltejs/addons": "0.0.0",
|
|
42
|
-
"@sveltejs/
|
|
43
|
-
"@sveltejs/create": "0.0.0"
|
|
41
|
+
"@sveltejs/clack-prompts": "0.9.1",
|
|
42
|
+
"@sveltejs/create": "0.0.0",
|
|
43
|
+
"@sveltejs/cli-core": "0.0.0"
|
|
44
44
|
},
|
|
45
45
|
"keywords": [
|
|
46
46
|
"create",
|