sv 0.8.10 → 0.8.12
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 +352 -326
- package/dist/index.js +1 -1
- package/dist/{install-Da9nxDO6.js → install-CDGqSUYA.js} +28 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -90,7 +90,7 @@ else mindent = Math.min(mindent, indent);
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
//#endregion
|
|
93
|
-
//#region packages/core/dist/common-
|
|
93
|
+
//#region packages/core/dist/common-BqRWA_Gj.js
|
|
94
94
|
function decircular(object) {
|
|
95
95
|
const seenObjects = new WeakMap();
|
|
96
96
|
function internalDecircular(value, path$1 = []) {
|
|
@@ -286,6 +286,7 @@ var object_exports = {};
|
|
|
286
286
|
__export(object_exports, {
|
|
287
287
|
create: () => create,
|
|
288
288
|
createEmpty: () => createEmpty,
|
|
289
|
+
createFromPrimitives: () => createFromPrimitives,
|
|
289
290
|
overrideProperties: () => overrideProperties,
|
|
290
291
|
overrideProperty: () => overrideProperty,
|
|
291
292
|
properties: () => properties,
|
|
@@ -354,6 +355,23 @@ function create(obj) {
|
|
|
354
355
|
}
|
|
355
356
|
return objExpression;
|
|
356
357
|
}
|
|
358
|
+
function createFromPrimitives(obj) {
|
|
359
|
+
const objExpression = createEmpty();
|
|
360
|
+
const getExpression = (value) => {
|
|
361
|
+
let expression;
|
|
362
|
+
if (Array.isArray(value)) {
|
|
363
|
+
expression = createEmpty$1();
|
|
364
|
+
for (const v of value) push(expression, getExpression(v));
|
|
365
|
+
} else if (typeof value === "object" && value !== null) expression = createFromPrimitives(value);
|
|
366
|
+
else expression = createLiteral(value);
|
|
367
|
+
return expression;
|
|
368
|
+
};
|
|
369
|
+
for (const [prop, value] of Object.entries(obj)) {
|
|
370
|
+
if (value === undefined) continue;
|
|
371
|
+
property(objExpression, prop, getExpression(value));
|
|
372
|
+
}
|
|
373
|
+
return objExpression;
|
|
374
|
+
}
|
|
357
375
|
function createEmpty() {
|
|
358
376
|
const objectExpression = {
|
|
359
377
|
type: "ObjectExpression",
|
|
@@ -971,7 +989,11 @@ function setupAddons(addons, workspace) {
|
|
|
971
989
|
const setupResult = {
|
|
972
990
|
unsupported: [],
|
|
973
991
|
dependsOn: [],
|
|
974
|
-
runsAfter: []
|
|
992
|
+
runsAfter: [],
|
|
993
|
+
defaultSelection: {
|
|
994
|
+
create: false,
|
|
995
|
+
add: false
|
|
996
|
+
}
|
|
975
997
|
};
|
|
976
998
|
addon.setup?.({
|
|
977
999
|
...workspace,
|
|
@@ -980,7 +1002,10 @@ function setupAddons(addons, workspace) {
|
|
|
980
1002
|
setupResult.runsAfter.push(name);
|
|
981
1003
|
},
|
|
982
1004
|
unsupported: (reason) => setupResult.unsupported.push(reason),
|
|
983
|
-
runsAfter: (name) => setupResult.runsAfter.push(name)
|
|
1005
|
+
runsAfter: (name) => setupResult.runsAfter.push(name),
|
|
1006
|
+
defaultSelection: (defaultSelection) => {
|
|
1007
|
+
setupResult.defaultSelection = defaultSelection;
|
|
1008
|
+
}
|
|
984
1009
|
});
|
|
985
1010
|
addonSetupResults[addon.id] = setupResult;
|
|
986
1011
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sv",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI for creating and updating SvelteKit projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"tinyexec": "^0.3.2",
|
|
38
38
|
"valibot": "^0.41.0",
|
|
39
39
|
"@sveltejs/addons": "0.0.0",
|
|
40
|
-
"@sveltejs/
|
|
41
|
-
"@sveltejs/
|
|
40
|
+
"@sveltejs/create": "0.0.0",
|
|
41
|
+
"@sveltejs/cli-core": "0.0.0"
|
|
42
42
|
},
|
|
43
43
|
"keywords": [
|
|
44
44
|
"create",
|