@acryldev/blends 1.7.11 → 1.7.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.
@@ -0,0 +1,12 @@
1
+ import { existsSync } from 'node:fs'
2
+ import { resolve } from 'node:path'
3
+
4
+ /**
5
+ * The `--from` a packer hands to create: an existing folder as an absolute path, anything else (a registry id such as acrylblends.small-crm) as given.
6
+ * create takes a folder source only when it is written as one (./x, ../x, /x, C:\x), so a template name is never read as a folder; a release workflow
7
+ * passes apps/<product> bare, which create would refuse as an unknown source (product-release run 44482560217 failed that way on all six runners).
8
+ */
9
+ export function createSource(from, cwd = process.cwd()) {
10
+ const folder = resolve(cwd, from)
11
+ return existsSync(folder) ? folder : from
12
+ }