sv 0.9.3 → 0.9.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/{addons-uHDStNUk.js → addons-CkfbAJXX.js} +133 -125
- package/dist/bin.js +22900 -171
- package/dist/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Element, T, Tag, __commonJS, __export, __toESM
|
|
1
|
+
import { Element, T, Tag, __commonJS, __export, __toESM, __toESM$1, be, detect, esm_exports, getUserAgent, parseCss$1, parseHtml, parseHtml$1, parseJson$1, parseScript, parseScript$1, parseSvelte, require_picocolors as require_picocolors$1, require_picocolors$1 as require_picocolors, resolveCommand, serializeScript, stripAst, up, walk, walk_exports } from "./package-manager-DO5R9a6p.js";
|
|
2
2
|
import fs, { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
3
3
|
import path, { dirname, join } from "node:path";
|
|
4
4
|
import process$1, { stdin, stdout } from "node:process";
|
|
@@ -288,25 +288,23 @@ else node.elements.unshift(element);
|
|
|
288
288
|
}
|
|
289
289
|
var object_exports = {};
|
|
290
290
|
__export(object_exports, {
|
|
291
|
-
addProperties: () => addProperties,
|
|
292
291
|
create: () => create,
|
|
293
292
|
overrideProperties: () => overrideProperties,
|
|
294
|
-
overrideProperty: () => overrideProperty,
|
|
295
293
|
property: () => property,
|
|
296
|
-
|
|
294
|
+
propertyNode: () => propertyNode
|
|
297
295
|
});
|
|
298
296
|
function property(node, options$6) {
|
|
297
|
+
return propertyNode(node, options$6).value;
|
|
298
|
+
}
|
|
299
|
+
function propertyNode(node, options$6) {
|
|
299
300
|
const properties = node.properties.filter((x$2) => x$2.type === "Property");
|
|
300
301
|
let prop = properties.find((x$2) => x$2.key.name === options$6.name);
|
|
301
|
-
|
|
302
|
-
if (prop) propertyValue = prop.value;
|
|
303
|
-
else {
|
|
302
|
+
if (!prop) {
|
|
304
303
|
let isShorthand = false;
|
|
305
304
|
if (options$6.fallback.type === "Identifier") {
|
|
306
305
|
const identifier = options$6.fallback;
|
|
307
306
|
isShorthand = identifier.name === options$6.name;
|
|
308
307
|
}
|
|
309
|
-
propertyValue = options$6.fallback;
|
|
310
308
|
prop = {
|
|
311
309
|
type: "Property",
|
|
312
310
|
shorthand: isShorthand,
|
|
@@ -314,14 +312,32 @@ else {
|
|
|
314
312
|
type: "Identifier",
|
|
315
313
|
name: options$6.name
|
|
316
314
|
},
|
|
317
|
-
value:
|
|
315
|
+
value: options$6.fallback,
|
|
318
316
|
kind: "init",
|
|
319
317
|
computed: false,
|
|
320
318
|
method: false
|
|
321
319
|
};
|
|
322
320
|
node.properties.push(prop);
|
|
323
321
|
}
|
|
324
|
-
return
|
|
322
|
+
return prop;
|
|
323
|
+
}
|
|
324
|
+
function create(properties) {
|
|
325
|
+
const objectExpression = {
|
|
326
|
+
type: "ObjectExpression",
|
|
327
|
+
properties: []
|
|
328
|
+
};
|
|
329
|
+
return populateObjectExpression({
|
|
330
|
+
objectExpression,
|
|
331
|
+
properties,
|
|
332
|
+
override: false
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
function overrideProperties(objectExpression, properties) {
|
|
336
|
+
populateObjectExpression({
|
|
337
|
+
objectExpression,
|
|
338
|
+
properties,
|
|
339
|
+
override: true
|
|
340
|
+
});
|
|
325
341
|
}
|
|
326
342
|
function overrideProperty(node, options$6) {
|
|
327
343
|
const properties = node.properties.filter((x$2) => x$2.type === "Property");
|
|
@@ -333,51 +349,42 @@ function overrideProperty(node, options$6) {
|
|
|
333
349
|
prop.value = options$6.value;
|
|
334
350
|
return options$6.value;
|
|
335
351
|
}
|
|
336
|
-
function
|
|
337
|
-
|
|
338
|
-
if (value === undefined) continue;
|
|
339
|
-
overrideProperty(node, {
|
|
340
|
-
name: prop,
|
|
341
|
-
value
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
function addProperties(node, options$6) {
|
|
346
|
-
for (const [prop, value] of Object.entries(options$6.properties)) {
|
|
347
|
-
if (value === undefined) continue;
|
|
348
|
-
property(node, {
|
|
349
|
-
name: prop,
|
|
350
|
-
fallback: value
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function removeProperty(node, options$6) {
|
|
355
|
-
const properties = node.properties.filter((x$2) => x$2.type === "Property");
|
|
356
|
-
const propIdx = properties.findIndex((x$2) => x$2.key.name === options$6.name);
|
|
357
|
-
if (propIdx !== -1) node.properties.splice(propIdx, 1);
|
|
358
|
-
}
|
|
359
|
-
function create(properties) {
|
|
360
|
-
const objExpression = {
|
|
361
|
-
type: "ObjectExpression",
|
|
362
|
-
properties: []
|
|
363
|
-
};
|
|
364
|
-
const getExpression = (value) => {
|
|
352
|
+
function populateObjectExpression(options$6) {
|
|
353
|
+
const getExpression = (value, existingExpression) => {
|
|
365
354
|
let expression;
|
|
366
355
|
if (Array.isArray(value)) {
|
|
367
356
|
expression = create$1();
|
|
368
357
|
for (const v$2 of value) append(expression, getExpression(v$2));
|
|
369
|
-
} else if (typeof value === "object" && value !== null)
|
|
358
|
+
} else if (typeof value === "object" && value !== null) if (value.type !== undefined) expression = value;
|
|
359
|
+
else if (options$6.override && existingExpression && existingExpression.type === "ObjectExpression") expression = populateObjectExpression({
|
|
360
|
+
objectExpression: existingExpression,
|
|
361
|
+
properties: value,
|
|
362
|
+
override: options$6.override
|
|
363
|
+
});
|
|
364
|
+
else expression = populateObjectExpression({
|
|
365
|
+
objectExpression: create({}),
|
|
366
|
+
properties: value,
|
|
367
|
+
override: options$6.override
|
|
368
|
+
});
|
|
370
369
|
else expression = createLiteral(value);
|
|
371
370
|
return expression;
|
|
372
371
|
};
|
|
373
|
-
for (const [prop, value] of Object.entries(properties)) {
|
|
372
|
+
for (const [prop, value] of Object.entries(options$6.properties)) {
|
|
374
373
|
if (value === undefined) continue;
|
|
375
|
-
|
|
374
|
+
if (options$6.override) {
|
|
375
|
+
const existingProperties = options$6.objectExpression.properties.filter((x$2) => x$2.type === "Property");
|
|
376
|
+
const existingProperty = existingProperties.find((x$2) => x$2.key.name === prop);
|
|
377
|
+
const existingExpression = existingProperty?.value.type === "ObjectExpression" ? existingProperty.value : undefined;
|
|
378
|
+
overrideProperty(options$6.objectExpression, {
|
|
379
|
+
name: prop,
|
|
380
|
+
value: getExpression(value, existingExpression)
|
|
381
|
+
});
|
|
382
|
+
} else property(options$6.objectExpression, {
|
|
376
383
|
name: prop,
|
|
377
384
|
fallback: getExpression(value)
|
|
378
385
|
});
|
|
379
386
|
}
|
|
380
|
-
return
|
|
387
|
+
return options$6.objectExpression;
|
|
381
388
|
}
|
|
382
389
|
var function_exports = {};
|
|
383
390
|
__export(function_exports, {
|
|
@@ -889,7 +896,7 @@ const addPlugin = (ast, options$6) => {
|
|
|
889
896
|
|
|
890
897
|
//#endregion
|
|
891
898
|
//#region packages/cli/commands/add/utils.ts
|
|
892
|
-
var import_picocolors$5 = __toESM(require_picocolors(), 1);
|
|
899
|
+
var import_picocolors$5 = __toESM$1(require_picocolors(), 1);
|
|
893
900
|
function getPackageJson(cwd) {
|
|
894
901
|
const packageText = readFile(cwd, commonFilePaths.packageJson);
|
|
895
902
|
if (!packageText) {
|
|
@@ -1063,7 +1070,7 @@ function parseKitOptions(cwd) {
|
|
|
1063
1070
|
|
|
1064
1071
|
//#endregion
|
|
1065
1072
|
//#region packages/cli/lib/install.ts
|
|
1066
|
-
var import_picocolors$4 = __toESM(require_picocolors(), 1);
|
|
1073
|
+
var import_picocolors$4 = __toESM$1(require_picocolors(), 1);
|
|
1067
1074
|
async function installAddon({ addons, cwd, options: options$6, packageManager = "npm" }) {
|
|
1068
1075
|
const workspace = await createWorkspace({
|
|
1069
1076
|
cwd,
|
|
@@ -1173,7 +1180,7 @@ async function runAddon({ addon, multiple, workspace }) {
|
|
|
1173
1180
|
dev: true
|
|
1174
1181
|
});
|
|
1175
1182
|
},
|
|
1176
|
-
|
|
1183
|
+
pnpmBuildDependency: (pkg) => {
|
|
1177
1184
|
pnpmBuildDependencies.push(pkg);
|
|
1178
1185
|
}
|
|
1179
1186
|
};
|
|
@@ -1202,7 +1209,7 @@ function defineAddon(config) {
|
|
|
1202
1209
|
function defineAddonOptions() {
|
|
1203
1210
|
return createOptionBuilder({});
|
|
1204
1211
|
}
|
|
1205
|
-
function createOptionBuilder(options$6
|
|
1212
|
+
function createOptionBuilder(options$6) {
|
|
1206
1213
|
return {
|
|
1207
1214
|
add(key, question) {
|
|
1208
1215
|
const newOptions = {
|
|
@@ -1270,8 +1277,8 @@ else if (y > 0) ret += `${CSI}${y}B`;
|
|
|
1270
1277
|
beep
|
|
1271
1278
|
};
|
|
1272
1279
|
} });
|
|
1273
|
-
var import_src$1 = __toESM
|
|
1274
|
-
var import_picocolors$3 = __toESM
|
|
1280
|
+
var import_src$1 = __toESM(require_src(), 1);
|
|
1281
|
+
var import_picocolors$3 = __toESM(require_picocolors$1(), 1);
|
|
1275
1282
|
function hu({ onlyFirst: e$1 = !1 } = {}) {
|
|
1276
1283
|
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
1277
1284
|
return new RegExp(t, e$1 ? void 0 : "g");
|
|
@@ -2006,9 +2013,9 @@ B$1 = new WeakMap(), k$1 = new WeakMap(), I = new WeakMap(), v$1 = new WeakMap()
|
|
|
2006
2013
|
e$1 ? this.filteredOptions = D$1.filter((t) => x$1(this, I).call(this, e$1, t)) : this.filteredOptions = [...D$1], m(this, B$1, FD(this.focusedValue, this.filteredOptions)), this.focusedValue = this.filteredOptions[x$1(this, B$1)]?.value, this.multiple || (this.focusedValue !== void 0 ? this.toggleSelected(this.focusedValue) : this.deselectAll());
|
|
2007
2014
|
}
|
|
2008
2015
|
};
|
|
2009
|
-
var import_picocolors$1 = __toESM
|
|
2010
|
-
var import_picocolors$2 = __toESM
|
|
2011
|
-
var import_src = __toESM
|
|
2016
|
+
var import_picocolors$1 = __toESM(require_picocolors$1(), 1);
|
|
2017
|
+
var import_picocolors$2 = __toESM(require_picocolors$1(), 1);
|
|
2018
|
+
var import_src = __toESM(require_src(), 1);
|
|
2012
2019
|
function Pe() {
|
|
2013
2020
|
return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2014
2021
|
}
|
|
@@ -2708,7 +2715,7 @@ else return true;
|
|
|
2708
2715
|
if (version.patch === below.patch) return false;
|
|
2709
2716
|
return undefined;
|
|
2710
2717
|
}
|
|
2711
|
-
var import_picocolors = __toESM
|
|
2718
|
+
var import_picocolors = __toESM(require_picocolors$1(), 1);
|
|
2712
2719
|
var colors = import_picocolors.default;
|
|
2713
2720
|
|
|
2714
2721
|
//#endregion
|
|
@@ -2886,7 +2893,7 @@ var drizzle_default = defineAddon({
|
|
|
2886
2893
|
},
|
|
2887
2894
|
run: ({ sv, typescript, options: options$6, kit, dependencyVersion }) => {
|
|
2888
2895
|
const ext = typescript ? "ts" : "js";
|
|
2889
|
-
sv.
|
|
2896
|
+
sv.devDependency("drizzle-orm", "^0.40.0");
|
|
2890
2897
|
sv.devDependency("drizzle-kit", "^0.30.2");
|
|
2891
2898
|
sv.devDependency("@types/node", getNodeTypesVersion());
|
|
2892
2899
|
if (options$6.mysql === "mysql2") sv.dependency("mysql2", "^3.12.0");
|
|
@@ -2896,9 +2903,9 @@ var drizzle_default = defineAddon({
|
|
|
2896
2903
|
if (options$6.sqlite === "better-sqlite3") {
|
|
2897
2904
|
sv.dependency("better-sqlite3", "^11.8.0");
|
|
2898
2905
|
sv.devDependency("@types/better-sqlite3", "^7.6.12");
|
|
2899
|
-
sv.
|
|
2906
|
+
sv.pnpmBuildDependency("better-sqlite3");
|
|
2900
2907
|
}
|
|
2901
|
-
if (options$6.sqlite === "libsql" || options$6.sqlite === "turso") sv.
|
|
2908
|
+
if (options$6.sqlite === "libsql" || options$6.sqlite === "turso") sv.devDependency("@libsql/client", "^0.14.0");
|
|
2902
2909
|
sv.file(".env", (content) => generateEnvFileContent(content, options$6));
|
|
2903
2910
|
sv.file(".env.example", (content) => generateEnvFileContent(content, options$6));
|
|
2904
2911
|
if (options$6.docker && (options$6.mysql === "mysql2" || options$6.postgresql === "postgres.js")) sv.file("docker-compose.yml", (content) => {
|
|
@@ -3197,11 +3204,12 @@ var eslint_default = defineAddon({
|
|
|
3197
3204
|
options: {},
|
|
3198
3205
|
run: ({ sv, typescript, dependencyVersion }) => {
|
|
3199
3206
|
const prettierInstalled = Boolean(dependencyVersion("prettier"));
|
|
3200
|
-
sv.devDependency("eslint", "^9.
|
|
3207
|
+
sv.devDependency("eslint", "^9.22.0");
|
|
3201
3208
|
sv.devDependency("@eslint/compat", "^1.2.5");
|
|
3202
3209
|
sv.devDependency("eslint-plugin-svelte", "^3.0.0");
|
|
3203
3210
|
sv.devDependency("globals", "^16.0.0");
|
|
3204
|
-
sv.devDependency("@eslint/js", "^9.
|
|
3211
|
+
sv.devDependency("@eslint/js", "^9.22.0");
|
|
3212
|
+
sv.devDependency("@types/node", getNodeTypesVersion());
|
|
3205
3213
|
if (typescript) sv.devDependency("typescript-eslint", "^8.20.0");
|
|
3206
3214
|
if (prettierInstalled) sv.devDependency("eslint-config-prettier", "^10.0.1");
|
|
3207
3215
|
sv.file("package.json", (content) => {
|
|
@@ -3282,7 +3290,7 @@ var eslint_default = defineAddon({
|
|
|
3282
3290
|
let exportExpression;
|
|
3283
3291
|
if (typescript) {
|
|
3284
3292
|
const tsConfigCall = function_exports.createCall({
|
|
3285
|
-
name: "
|
|
3293
|
+
name: "defineConfig",
|
|
3286
3294
|
args: []
|
|
3287
3295
|
});
|
|
3288
3296
|
tsConfigCall.arguments.push(...eslintConfigs);
|
|
@@ -3302,14 +3310,14 @@ var eslint_default = defineAddon({
|
|
|
3302
3310
|
from: "typescript-eslint",
|
|
3303
3311
|
as: "ts"
|
|
3304
3312
|
});
|
|
3305
|
-
imports_exports.addNamed(ast, {
|
|
3306
|
-
from: "node:url",
|
|
3307
|
-
imports: ["fileURLToPath"]
|
|
3308
|
-
});
|
|
3309
3313
|
imports_exports.addDefault(ast, {
|
|
3310
3314
|
from: "globals",
|
|
3311
3315
|
as: "globals"
|
|
3312
3316
|
});
|
|
3317
|
+
if (typescript) imports_exports.addNamed(ast, {
|
|
3318
|
+
from: "eslint/config",
|
|
3319
|
+
imports: ["defineConfig"]
|
|
3320
|
+
});
|
|
3313
3321
|
imports_exports.addDefault(ast, {
|
|
3314
3322
|
from: "eslint-plugin-svelte",
|
|
3315
3323
|
as: "svelte"
|
|
@@ -3322,6 +3330,10 @@ var eslint_default = defineAddon({
|
|
|
3322
3330
|
from: "@eslint/compat",
|
|
3323
3331
|
imports: ["includeIgnoreFile"]
|
|
3324
3332
|
});
|
|
3333
|
+
imports_exports.addNamed(ast, {
|
|
3334
|
+
from: "node:url",
|
|
3335
|
+
imports: ["fileURLToPath"]
|
|
3336
|
+
});
|
|
3325
3337
|
return generateCode();
|
|
3326
3338
|
});
|
|
3327
3339
|
if (prettierInstalled) sv.file("eslint.config.js", addEslintConfigPrettier);
|
|
@@ -4368,8 +4380,8 @@ var lucia_default = defineAddon({
|
|
|
4368
4380
|
},
|
|
4369
4381
|
run: ({ sv, typescript, options: options$6, kit, dependencyVersion }) => {
|
|
4370
4382
|
const ext = typescript ? "ts" : "js";
|
|
4371
|
-
sv.
|
|
4372
|
-
sv.
|
|
4383
|
+
sv.devDependency("@oslojs/crypto", "^1.0.1");
|
|
4384
|
+
sv.devDependency("@oslojs/encoding", "^1.1.0");
|
|
4373
4385
|
if (options$6.demo) sv.dependency("@node-rs/argon2", "^2.0.2");
|
|
4374
4386
|
sv.file(`drizzle.config.${ext}`, (content) => {
|
|
4375
4387
|
const { ast, generateCode } = parseScript$1(content);
|
|
@@ -4423,16 +4435,16 @@ var lucia_default = defineAddon({
|
|
|
4423
4435
|
"integer"
|
|
4424
4436
|
]
|
|
4425
4437
|
});
|
|
4426
|
-
object_exports.overrideProperties(userAttributes, {
|
|
4427
|
-
if (options$6.demo) object_exports.overrideProperties(userAttributes, {
|
|
4438
|
+
object_exports.overrideProperties(userAttributes, { id: common_exports.parseExpression("text('id').primaryKey()") });
|
|
4439
|
+
if (options$6.demo) object_exports.overrideProperties(userAttributes, {
|
|
4428
4440
|
username: common_exports.parseExpression("text('username').notNull().unique()"),
|
|
4429
4441
|
passwordHash: common_exports.parseExpression("text('password_hash').notNull()")
|
|
4430
|
-
}
|
|
4431
|
-
object_exports.overrideProperties(sessionAttributes, {
|
|
4442
|
+
});
|
|
4443
|
+
object_exports.overrideProperties(sessionAttributes, {
|
|
4432
4444
|
id: common_exports.parseExpression("text('id').primaryKey()"),
|
|
4433
4445
|
userId: common_exports.parseExpression("text('user_id').notNull().references(() => user.id)"),
|
|
4434
4446
|
expiresAt: common_exports.parseExpression("integer('expires_at', { mode: 'timestamp' }).notNull()")
|
|
4435
|
-
}
|
|
4447
|
+
});
|
|
4436
4448
|
}
|
|
4437
4449
|
if (drizzleDialect === "mysql") {
|
|
4438
4450
|
imports_exports.addNamed(ast, {
|
|
@@ -4443,16 +4455,16 @@ var lucia_default = defineAddon({
|
|
|
4443
4455
|
"datetime"
|
|
4444
4456
|
]
|
|
4445
4457
|
});
|
|
4446
|
-
object_exports.overrideProperties(userAttributes, {
|
|
4447
|
-
if (options$6.demo) object_exports.overrideProperties(userAttributes, {
|
|
4458
|
+
object_exports.overrideProperties(userAttributes, { id: common_exports.parseExpression("varchar('id', { length: 255 }).primaryKey()") });
|
|
4459
|
+
if (options$6.demo) object_exports.overrideProperties(userAttributes, {
|
|
4448
4460
|
username: common_exports.parseExpression("varchar('username', { length: 32 }).notNull().unique()"),
|
|
4449
4461
|
passwordHash: common_exports.parseExpression("varchar('password_hash', { length: 255 }).notNull()")
|
|
4450
|
-
}
|
|
4451
|
-
object_exports.overrideProperties(sessionAttributes, {
|
|
4462
|
+
});
|
|
4463
|
+
object_exports.overrideProperties(sessionAttributes, {
|
|
4452
4464
|
id: common_exports.parseExpression("varchar('id', { length: 255 }).primaryKey()"),
|
|
4453
4465
|
userId: common_exports.parseExpression("varchar('user_id', { length: 255 }).notNull().references(() => user.id)"),
|
|
4454
4466
|
expiresAt: common_exports.parseExpression("datetime('expires_at').notNull()")
|
|
4455
|
-
}
|
|
4467
|
+
});
|
|
4456
4468
|
}
|
|
4457
4469
|
if (drizzleDialect === "postgresql") {
|
|
4458
4470
|
imports_exports.addNamed(ast, {
|
|
@@ -4463,16 +4475,16 @@ var lucia_default = defineAddon({
|
|
|
4463
4475
|
"timestamp"
|
|
4464
4476
|
]
|
|
4465
4477
|
});
|
|
4466
|
-
object_exports.overrideProperties(userAttributes, {
|
|
4467
|
-
if (options$6.demo) object_exports.overrideProperties(userAttributes, {
|
|
4478
|
+
object_exports.overrideProperties(userAttributes, { id: common_exports.parseExpression("text('id').primaryKey()") });
|
|
4479
|
+
if (options$6.demo) object_exports.overrideProperties(userAttributes, {
|
|
4468
4480
|
username: common_exports.parseExpression("text('username').notNull().unique()"),
|
|
4469
4481
|
passwordHash: common_exports.parseExpression("text('password_hash').notNull()")
|
|
4470
|
-
}
|
|
4471
|
-
object_exports.overrideProperties(sessionAttributes, {
|
|
4482
|
+
});
|
|
4483
|
+
object_exports.overrideProperties(sessionAttributes, {
|
|
4472
4484
|
id: common_exports.parseExpression("text('id').primaryKey()"),
|
|
4473
4485
|
userId: common_exports.parseExpression("text('user_id').notNull().references(() => user.id)"),
|
|
4474
4486
|
expiresAt: common_exports.parseExpression("timestamp('expires_at', { withTimezone: true, mode: 'date' }).notNull()")
|
|
4475
|
-
}
|
|
4487
|
+
});
|
|
4476
4488
|
}
|
|
4477
4489
|
let code = generateCode();
|
|
4478
4490
|
if (typescript) {
|
|
@@ -4971,10 +4983,7 @@ var mdsvex_default = defineAddon({
|
|
|
4971
4983
|
const previousElement = preprocessorArray;
|
|
4972
4984
|
preprocessorArray = array_exports.create();
|
|
4973
4985
|
array_exports.append(preprocessorArray, previousElement);
|
|
4974
|
-
object_exports.
|
|
4975
|
-
name: "preprocess",
|
|
4976
|
-
value: preprocessorArray
|
|
4977
|
-
});
|
|
4986
|
+
object_exports.overrideProperties(exportDefault, { preprocess: preprocessorArray });
|
|
4978
4987
|
}
|
|
4979
4988
|
const mdsvexCall = function_exports.createCall({
|
|
4980
4989
|
name: "mdsvex",
|
|
@@ -5059,7 +5068,7 @@ var paraglide_default = defineAddon({
|
|
|
5059
5068
|
const ext = typescript ? "ts" : "js";
|
|
5060
5069
|
if (!kit) throw new Error("SvelteKit is required");
|
|
5061
5070
|
const paraglideOutDir = "src/lib/paraglide";
|
|
5062
|
-
sv.
|
|
5071
|
+
sv.devDependency("@inlang/paraglide-js", "^2.0.0");
|
|
5063
5072
|
sv.file("project.inlang/settings.json", (content) => {
|
|
5064
5073
|
if (content) return content;
|
|
5065
5074
|
const { data, generateCode } = parseJson$1(content);
|
|
@@ -5243,19 +5252,19 @@ var playwright_default = defineAddon({
|
|
|
5243
5252
|
const defineConfig = common_exports.parseExpression("defineConfig({})");
|
|
5244
5253
|
const { value: defaultExport } = exports_exports.createDefault(ast, { fallback: defineConfig });
|
|
5245
5254
|
const config = {
|
|
5246
|
-
webServer:
|
|
5255
|
+
webServer: {
|
|
5247
5256
|
command: "npm run build && npm run preview",
|
|
5248
5257
|
port: 4173
|
|
5249
|
-
}
|
|
5250
|
-
testDir:
|
|
5258
|
+
},
|
|
5259
|
+
testDir: "e2e"
|
|
5251
5260
|
};
|
|
5252
5261
|
if (defaultExport.type === "CallExpression" && defaultExport.arguments[0]?.type === "ObjectExpression") {
|
|
5253
5262
|
imports_exports.addNamed(ast, {
|
|
5254
|
-
|
|
5255
|
-
|
|
5263
|
+
imports: ["defineConfig"],
|
|
5264
|
+
from: "@playwright/test"
|
|
5256
5265
|
});
|
|
5257
|
-
object_exports.
|
|
5258
|
-
} else if (defaultExport.type === "ObjectExpression") object_exports.
|
|
5266
|
+
object_exports.overrideProperties(defaultExport.arguments[0], config);
|
|
5267
|
+
} else if (defaultExport.type === "ObjectExpression") object_exports.overrideProperties(defaultExport, config);
|
|
5259
5268
|
else T$2.warn("Unexpected playwright config for playwright add-on. Could not update.");
|
|
5260
5269
|
return generateCode();
|
|
5261
5270
|
});
|
|
@@ -5398,12 +5407,12 @@ const adapters = [
|
|
|
5398
5407
|
const options$2 = defineAddonOptions().add("adapter", {
|
|
5399
5408
|
type: "select",
|
|
5400
5409
|
question: "Which SvelteKit adapter would you like to use?",
|
|
5410
|
+
default: "auto",
|
|
5401
5411
|
options: adapters.map((p$1) => ({
|
|
5402
5412
|
value: p$1.id,
|
|
5403
5413
|
label: p$1.id,
|
|
5404
5414
|
hint: p$1.package
|
|
5405
|
-
}))
|
|
5406
|
-
default: "auto"
|
|
5415
|
+
}))
|
|
5407
5416
|
}).build();
|
|
5408
5417
|
var sveltekit_adapter_default = defineAddon({
|
|
5409
5418
|
id: "sveltekit-adapter",
|
|
@@ -5437,20 +5446,23 @@ var sveltekit_adapter_default = defineAddon({
|
|
|
5437
5446
|
as: adapterName
|
|
5438
5447
|
});
|
|
5439
5448
|
const { value: config } = exports_exports.createDefault(ast, { fallback: object_exports.create({}) });
|
|
5440
|
-
|
|
5441
|
-
if (kitConfig && kitConfig.value.type === "ObjectExpression") {
|
|
5442
|
-
const adapterProp = kitConfig.value.properties.find((p$1) => p$1.type === "Property" && p$1.key.type === "Identifier" && p$1.key.name === "adapter");
|
|
5443
|
-
if (adapterProp) adapterProp.leadingComments = [];
|
|
5444
|
-
object_exports.overrideProperties(kitConfig.value, { properties: { adapter: function_exports.createCall({
|
|
5445
|
-
name: adapterName,
|
|
5446
|
-
args: [],
|
|
5447
|
-
useIdentifiers: true
|
|
5448
|
-
}) } });
|
|
5449
|
-
} else object_exports.addProperties(config, { properties: { kit: object_exports.create({ adapter: function_exports.createCall({
|
|
5449
|
+
object_exports.overrideProperties(config, { kit: { adapter: function_exports.createCall({
|
|
5450
5450
|
name: adapterName,
|
|
5451
5451
|
args: [],
|
|
5452
5452
|
useIdentifiers: true
|
|
5453
|
-
}) }
|
|
5453
|
+
}) } });
|
|
5454
|
+
if (adapter.package !== "@sveltejs/adapter-auto") {
|
|
5455
|
+
const fallback = object_exports.create({});
|
|
5456
|
+
const cfgKitValue = object_exports.property(config, {
|
|
5457
|
+
name: "kit",
|
|
5458
|
+
fallback
|
|
5459
|
+
});
|
|
5460
|
+
const cfgAdapter = object_exports.propertyNode(cfgKitValue, {
|
|
5461
|
+
name: "adapter",
|
|
5462
|
+
fallback
|
|
5463
|
+
});
|
|
5464
|
+
cfgAdapter.leadingComments = [];
|
|
5465
|
+
}
|
|
5454
5466
|
return generateCode();
|
|
5455
5467
|
});
|
|
5456
5468
|
}
|
|
@@ -5458,25 +5470,21 @@ var sveltekit_adapter_default = defineAddon({
|
|
|
5458
5470
|
|
|
5459
5471
|
//#endregion
|
|
5460
5472
|
//#region packages/addons/tailwindcss/index.ts
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
package: "@tailwindcss/forms",
|
|
5471
|
-
version: "^0.5.9"
|
|
5472
|
-
}
|
|
5473
|
-
};
|
|
5473
|
+
const plugins = [{
|
|
5474
|
+
id: "typography",
|
|
5475
|
+
package: "@tailwindcss/typography",
|
|
5476
|
+
version: "^0.5.15"
|
|
5477
|
+
}, {
|
|
5478
|
+
id: "forms",
|
|
5479
|
+
package: "@tailwindcss/forms",
|
|
5480
|
+
version: "^0.5.9"
|
|
5481
|
+
}];
|
|
5474
5482
|
const options$1 = defineAddonOptions().add("plugins", {
|
|
5475
5483
|
type: "multiselect",
|
|
5476
5484
|
question: "Which plugins would you like to add?",
|
|
5477
|
-
options:
|
|
5478
|
-
value: id,
|
|
5479
|
-
label: id,
|
|
5485
|
+
options: plugins.map((p$1) => ({
|
|
5486
|
+
value: p$1.id,
|
|
5487
|
+
label: p$1.id,
|
|
5480
5488
|
hint: p$1.package
|
|
5481
5489
|
})),
|
|
5482
5490
|
default: [],
|
|
@@ -5493,8 +5501,8 @@ var tailwindcss_default = defineAddon({
|
|
|
5493
5501
|
sv.devDependency("tailwindcss", "^4.0.0");
|
|
5494
5502
|
sv.devDependency("@tailwindcss/vite", "^4.0.0");
|
|
5495
5503
|
if (prettierInstalled) sv.devDependency("prettier-plugin-tailwindcss", "^0.6.11");
|
|
5496
|
-
for (const
|
|
5497
|
-
if (!options$6.plugins.includes(id)) continue;
|
|
5504
|
+
for (const plugin of plugins) {
|
|
5505
|
+
if (!options$6.plugins.includes(plugin.id)) continue;
|
|
5498
5506
|
sv.devDependency(plugin.package, plugin.version);
|
|
5499
5507
|
}
|
|
5500
5508
|
sv.file(viteConfigFile, (content) => {
|
|
@@ -5521,8 +5529,8 @@ var tailwindcss_default = defineAddon({
|
|
|
5521
5529
|
}
|
|
5522
5530
|
const lastAtRule = atRules.findLast((rule) => ["plugin", "import"].includes(rule.name));
|
|
5523
5531
|
const pluginPos = lastAtRule.source.end.offset;
|
|
5524
|
-
for (const
|
|
5525
|
-
if (!options$6.plugins.includes(id)) continue;
|
|
5532
|
+
for (const plugin of plugins) {
|
|
5533
|
+
if (!options$6.plugins.includes(plugin.id)) continue;
|
|
5526
5534
|
const pluginRule = findAtRule("plugin", plugin.package);
|
|
5527
5535
|
if (!pluginRule) {
|
|
5528
5536
|
const pluginImport = `\n@plugin '${plugin.package}';`;
|