sprawlify 0.1.3 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -10
  2. 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.3";
13
+ var version = "0.1.5";
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.utils, file.path);
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,18 +4226,16 @@ const rawConfigSchema = z.object({
4226
4226
  aliases: z.object({
4227
4227
  components: z.string(),
4228
4228
  utils: z.string(),
4229
- ui: z.string().optional(),
4230
- lib: z.string().optional()
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
- tailwindconfig: z.string(),
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
- hooks: z.string(),
4241
4239
  ui: z.string()
4242
4240
  }) });
4243
4241
  //#endregion
@@ -4265,10 +4263,9 @@ function resolveConfigPaths(cwd, config) {
4265
4263
  cwd,
4266
4264
  tailwindconfig: config.tailwind.config ? path.resolve(cwd, config.tailwind.config) : "",
4267
4265
  tailwindcss: path.resolve(cwd, config.tailwind.css),
4268
- utils: resolveImport(config.aliases["utils"], tsConfig),
4269
4266
  components: resolveImport(config.aliases["components"], tsConfig),
4270
- ui: config.aliases["ui"] ? resolveImport(config.aliases["ui"], tsConfig) : path.resolve(resolveImport(config.aliases["components"], tsConfig) ?? cwd, "ui"),
4271
- lib: config.aliases["lib"] ? resolveImport(config.aliases["lib"], tsConfig) : path.resolve(resolveImport(config.aliases["utils"], tsConfig) ?? cwd, "..")
4267
+ ui: resolveImport(config.aliases["ui"], tsConfig),
4268
+ lib: resolveImport(config.aliases["lib"], tsConfig)
4272
4269
  }
4273
4270
  });
4274
4271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprawlify",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "A command-line interface for Sprawlify.",
5
5
  "license": "MIT",
6
6
  "author": "sprawlify <npm@sprawlify.com>",