sv 0.9.7 → 0.9.8
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.
|
@@ -1,156 +1,8 @@
|
|
|
1
|
-
import { Element, MagicString, T, Tag, __toESM, any, be, detect, getUserAgent, parseCss, parseHtml, parseHtml$1, parseJson, parseScript, parseScript$1, parseSvelte, require_picocolors, resolveCommand, serializeScript, stripAst, walk } from "./create-
|
|
1
|
+
import { Element, MagicString, T, Tag, __toESM, any, be, createPrinter, dedent_default, defineAddon, defineAddonOptions, detect, getUserAgent, import_picocolors as import_picocolors$2, parseCss, parseHtml, parseHtml$1, parseJson, parseScript, parseScript$1, parseSvelte, require_picocolors, resolveCommand, serializeScript, stripAst, walk } from "./create-G_G45yBx.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
|
|
6
|
-
//#region ../core/addon/config.ts
|
|
7
|
-
function defineAddon(config) {
|
|
8
|
-
return config;
|
|
9
|
-
}
|
|
10
|
-
function defineAddonOptions() {
|
|
11
|
-
return createOptionBuilder({});
|
|
12
|
-
}
|
|
13
|
-
function createOptionBuilder(options$6) {
|
|
14
|
-
return {
|
|
15
|
-
add(key, question) {
|
|
16
|
-
const newOptions = {
|
|
17
|
-
...options$6,
|
|
18
|
-
[key]: question
|
|
19
|
-
};
|
|
20
|
-
return createOptionBuilder(newOptions);
|
|
21
|
-
},
|
|
22
|
-
build() {
|
|
23
|
-
return options$6;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region ../../node_modules/.pnpm/dedent@1.6.0/node_modules/dedent/dist/dedent.mjs
|
|
30
|
-
function ownKeys(object, enumerableOnly) {
|
|
31
|
-
var keys = Object.keys(object);
|
|
32
|
-
if (Object.getOwnPropertySymbols) {
|
|
33
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
35
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
-
})), keys.push.apply(keys, symbols);
|
|
37
|
-
}
|
|
38
|
-
return keys;
|
|
39
|
-
}
|
|
40
|
-
function _objectSpread(target) {
|
|
41
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
42
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
43
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function(key) {
|
|
44
|
-
_defineProperty(target, key, source[key]);
|
|
45
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
46
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
return target;
|
|
50
|
-
}
|
|
51
|
-
function _defineProperty(obj, key, value) {
|
|
52
|
-
key = _toPropertyKey(key);
|
|
53
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
54
|
-
value,
|
|
55
|
-
enumerable: true,
|
|
56
|
-
configurable: true,
|
|
57
|
-
writable: true
|
|
58
|
-
});
|
|
59
|
-
else obj[key] = value;
|
|
60
|
-
return obj;
|
|
61
|
-
}
|
|
62
|
-
function _toPropertyKey(arg) {
|
|
63
|
-
var key = _toPrimitive(arg, "string");
|
|
64
|
-
return typeof key === "symbol" ? key : String(key);
|
|
65
|
-
}
|
|
66
|
-
function _toPrimitive(input, hint) {
|
|
67
|
-
if (typeof input !== "object" || input === null) return input;
|
|
68
|
-
var prim = input[Symbol.toPrimitive];
|
|
69
|
-
if (prim !== void 0) {
|
|
70
|
-
var res = prim.call(input, hint || "default");
|
|
71
|
-
if (typeof res !== "object") return res;
|
|
72
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
73
|
-
}
|
|
74
|
-
return (hint === "string" ? String : Number)(input);
|
|
75
|
-
}
|
|
76
|
-
const dedent = createDedent({});
|
|
77
|
-
var dedent_default = dedent;
|
|
78
|
-
function createDedent(options$6) {
|
|
79
|
-
dedent$1.withOptions = (newOptions) => createDedent(_objectSpread(_objectSpread({}, options$6), newOptions));
|
|
80
|
-
return dedent$1;
|
|
81
|
-
function dedent$1(strings, ...values) {
|
|
82
|
-
const raw = typeof strings === "string" ? [strings] : strings.raw;
|
|
83
|
-
const { escapeSpecialCharacters = Array.isArray(strings), trimWhitespace = true } = options$6;
|
|
84
|
-
let result = "";
|
|
85
|
-
for (let i = 0; i < raw.length; i++) {
|
|
86
|
-
let next = raw[i];
|
|
87
|
-
if (escapeSpecialCharacters) next = next.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\\{/g, "{");
|
|
88
|
-
result += next;
|
|
89
|
-
if (i < values.length) result += values[i];
|
|
90
|
-
}
|
|
91
|
-
const lines = result.split("\n");
|
|
92
|
-
let mindent = null;
|
|
93
|
-
for (const l of lines) {
|
|
94
|
-
const m = l.match(/^(\s+)\S+/);
|
|
95
|
-
if (m) {
|
|
96
|
-
const indent = m[1].length;
|
|
97
|
-
if (!mindent) mindent = indent;
|
|
98
|
-
else mindent = Math.min(mindent, indent);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (mindent !== null) {
|
|
102
|
-
const m = mindent;
|
|
103
|
-
result = lines.map((l) => l[0] === " " || l[0] === " " ? l.slice(m) : l).join("\n");
|
|
104
|
-
}
|
|
105
|
-
if (trimWhitespace) result = result.trim();
|
|
106
|
-
if (escapeSpecialCharacters) result = result.replace(/\\n/g, "\n");
|
|
107
|
-
return result;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
//#endregion
|
|
112
|
-
//#region ../core/utils.ts
|
|
113
|
-
function createPrinter(...conditions) {
|
|
114
|
-
return conditions.map((condition) => {
|
|
115
|
-
return (content, alt = "") => condition ? content : alt;
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
//#endregion
|
|
120
|
-
//#region ../core/common.ts
|
|
121
|
-
function splitVersion(str) {
|
|
122
|
-
const [major, minor, patch] = str?.split(".") ?? [];
|
|
123
|
-
function toVersionNumber(val) {
|
|
124
|
-
return val !== void 0 && val !== "" && !isNaN(Number(val)) ? Number(val) : void 0;
|
|
125
|
-
}
|
|
126
|
-
return {
|
|
127
|
-
major: toVersionNumber(major),
|
|
128
|
-
minor: toVersionNumber(minor),
|
|
129
|
-
patch: toVersionNumber(patch)
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
function isVersionUnsupportedBelow(versionStr, belowStr) {
|
|
133
|
-
const version = splitVersion(versionStr);
|
|
134
|
-
const below = splitVersion(belowStr);
|
|
135
|
-
if (version.major === void 0 || below.major === void 0) return void 0;
|
|
136
|
-
if (version.major < below.major) return true;
|
|
137
|
-
if (version.major > below.major) return false;
|
|
138
|
-
if (version.minor === void 0 || below.minor === void 0) if (version.major === below.major) return false;
|
|
139
|
-
else return true;
|
|
140
|
-
if (version.minor < below.minor) return true;
|
|
141
|
-
if (version.minor > below.minor) return false;
|
|
142
|
-
if (version.patch === void 0 || below.patch === void 0) if (version.minor === below.minor) return false;
|
|
143
|
-
else return true;
|
|
144
|
-
if (version.patch < below.patch) return true;
|
|
145
|
-
if (version.patch > below.patch) return false;
|
|
146
|
-
if (version.patch === below.patch) return false;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region ../core/index.ts
|
|
151
|
-
var import_picocolors$2 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
152
|
-
|
|
153
|
-
//#endregion
|
|
154
6
|
//#region ../../node_modules/.pnpm/decircular@1.0.0/node_modules/decircular/index.js
|
|
155
7
|
function decircular(object) {
|
|
156
8
|
const seenObjects = /* @__PURE__ */ new WeakMap();
|
|
@@ -1149,10 +1001,14 @@ var drizzle_default = defineAddon({
|
|
|
1149
1001
|
if (options$6.database === "sqlite") {
|
|
1150
1002
|
addNamed(ast, {
|
|
1151
1003
|
from: "drizzle-orm/sqlite-core",
|
|
1152
|
-
imports: [
|
|
1004
|
+
imports: [
|
|
1005
|
+
"integer",
|
|
1006
|
+
"sqliteTable",
|
|
1007
|
+
"text"
|
|
1008
|
+
]
|
|
1153
1009
|
});
|
|
1154
1010
|
userSchemaExpression = parseExpression(`sqliteTable('user', {
|
|
1155
|
-
id:
|
|
1011
|
+
id: text('id').primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
1156
1012
|
age: integer('age')
|
|
1157
1013
|
})`);
|
|
1158
1014
|
}
|
|
@@ -2629,6 +2485,7 @@ var tailwindcss_default = defineAddon({
|
|
|
2629
2485
|
const prettierInstalled = Boolean(dependencyVersion("prettier"));
|
|
2630
2486
|
sv.devDependency("tailwindcss", "^4.1.13");
|
|
2631
2487
|
sv.devDependency("@tailwindcss/vite", "^4.1.13");
|
|
2488
|
+
sv.pnpmBuildDependency("@tailwindcss/oxide");
|
|
2632
2489
|
if (prettierInstalled) sv.devDependency("prettier-plugin-tailwindcss", "^0.6.14");
|
|
2633
2490
|
for (const plugin of plugins) {
|
|
2634
2491
|
if (!options$6.plugins.includes(plugin.id)) continue;
|
|
@@ -3177,4 +3034,4 @@ function orderAddons(addons, setupResults) {
|
|
|
3177
3034
|
}
|
|
3178
3035
|
|
|
3179
3036
|
//#endregion
|
|
3180
|
-
export { addDefault, applyAddons, communityAddonIds, create, createDefault, createWorkspace, formatFiles, getAddonDetails, getCommunityAddon, getHighlighter, installAddon,
|
|
3037
|
+
export { addDefault, applyAddons, communityAddonIds, create, createDefault, createWorkspace, formatFiles, getAddonDetails, getCommunityAddon, getHighlighter, installAddon, officialAddons, overrideProperties, setupAddons };
|
package/dist/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { create } from "../create-
|
|
2
|
-
import { installAddon, officialAddons } from "../install-
|
|
1
|
+
import { create } from "../create-G_G45yBx.js";
|
|
2
|
+
import { installAddon, officialAddons } from "../install-DhHe_LP6.js";
|
|
3
3
|
|
|
4
4
|
export { create, installAddon, officialAddons };
|
package/dist/lib/testing.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ type AgentName = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'deno';
|
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region utils/package-manager.d.ts
|
|
5
5
|
|
|
6
|
-
declare function addPnpmBuildDependencies(cwd: string, packageManager: AgentName | null | undefined, allowedPackages: string[]): void
|
|
6
|
+
declare function addPnpmBuildDependencies(cwd: string, packageManager: AgentName | null | undefined, allowedPackages: string[]): Promise<void>;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region lib/testing.d.ts
|
|
9
9
|
type ProjectVariant = "kit-js" | "kit-ts" | "vite-js" | "vite-ts";
|
package/dist/lib/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __commonJS, __require, __toESM, addPnpmBuildDependencies, be, create, ve } from "../create-
|
|
1
|
+
import { __commonJS, __require, __toESM, addPnpmBuildDependencies, be, create, ve } from "../create-G_G45yBx.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs";
|
|
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.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI for creating and updating SvelteKit projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"ps-tree": "^1.2.0",
|
|
37
37
|
"tinyexec": "^0.3.2",
|
|
38
38
|
"valibot": "^0.41.0",
|
|
39
|
-
"@sveltejs/cli-core": "0.0.0",
|
|
40
39
|
"@sveltejs/addons": "0.0.0",
|
|
40
|
+
"@sveltejs/cli-core": "0.0.0",
|
|
41
41
|
"@sveltejs/create": "0.0.0"
|
|
42
42
|
},
|
|
43
43
|
"keywords": [
|