sprawlify 0.1.4 → 0.1.6
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/index.mjs +6 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { faker } from "@faker-js/faker";
|
|
|
10
10
|
import { cosmiconfig } from "cosmiconfig";
|
|
11
11
|
import { createMatchPath, loadConfig } from "tsconfig-paths";
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version = "0.1.
|
|
13
|
+
var version = "0.1.6";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/utils/file-helper.ts
|
|
16
16
|
const FILE_BACKUP_SUFFIX = ".bak";
|
|
@@ -4086,7 +4086,7 @@ function parseAddOptions(opts, components) {
|
|
|
4086
4086
|
//#endregion
|
|
4087
4087
|
//#region src/commands/add/run.ts
|
|
4088
4088
|
function resolvePresetFilePathFromConfig(config, file) {
|
|
4089
|
-
if (file.type === "registry:utils") return path.resolve(config.resolvedPaths.
|
|
4089
|
+
if (file.type === "registry:utils") return path.resolve(config.resolvedPaths.lib, file.path);
|
|
4090
4090
|
if (file.type === "registry:ui") return path.resolve(config.resolvedPaths.ui, file.path);
|
|
4091
4091
|
return path.resolve(config.resolvedPaths.cwd, file.path);
|
|
4092
4092
|
}
|
|
@@ -4226,15 +4226,14 @@ const rawConfigSchema = z.object({
|
|
|
4226
4226
|
aliases: z.object({
|
|
4227
4227
|
components: z.string(),
|
|
4228
4228
|
utils: z.string(),
|
|
4229
|
-
ui: z.string()
|
|
4230
|
-
lib: z.string()
|
|
4229
|
+
ui: z.string(),
|
|
4230
|
+
lib: z.string()
|
|
4231
4231
|
})
|
|
4232
4232
|
});
|
|
4233
4233
|
const configSchema = rawConfigSchema.extend({ resolvedPaths: z.object({
|
|
4234
4234
|
cwd: z.string(),
|
|
4235
4235
|
tailwindconfig: z.string().optional(),
|
|
4236
4236
|
tailwindcss: z.string(),
|
|
4237
|
-
utils: z.string(),
|
|
4238
4237
|
components: z.string(),
|
|
4239
4238
|
lib: z.string(),
|
|
4240
4239
|
ui: z.string()
|
|
@@ -4264,10 +4263,9 @@ function resolveConfigPaths(cwd, config) {
|
|
|
4264
4263
|
cwd,
|
|
4265
4264
|
tailwindconfig: config.tailwind.config ? path.resolve(cwd, config.tailwind.config) : "",
|
|
4266
4265
|
tailwindcss: path.resolve(cwd, config.tailwind.css),
|
|
4267
|
-
utils: resolveImport(config.aliases["utils"], tsConfig),
|
|
4268
4266
|
components: resolveImport(config.aliases["components"], tsConfig),
|
|
4269
|
-
ui:
|
|
4270
|
-
lib:
|
|
4267
|
+
ui: resolveImport(config.aliases["ui"], tsConfig),
|
|
4268
|
+
lib: resolveImport(config.aliases["lib"], tsConfig)
|
|
4271
4269
|
}
|
|
4272
4270
|
});
|
|
4273
4271
|
}
|