@venizia/vulcan 0.3.3 → 0.3.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/vulcan",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "VULCAN - one setup, one workflow for every project: init, sync, doctor, upgrade, and `vulcan x` for the shipped tools. Bun-only.",
|
|
5
5
|
"homepage": "https://github.com/VENIZIA-AI/vulcan/tree/main/packages/cli",
|
|
6
6
|
"repository": {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"test": "NODE_ENV=test bun test --env-file=.env.test"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@venizia/vulcan-atlas": "0.3.
|
|
48
|
-
"@venizia/vulcan-okf": "0.3.
|
|
47
|
+
"@venizia/vulcan-atlas": "0.3.4",
|
|
48
|
+
"@venizia/vulcan-okf": "0.3.4",
|
|
49
49
|
"zod": "^4.5.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -42,6 +42,8 @@ export interface IPreset {
|
|
|
42
42
|
checks: string[];
|
|
43
43
|
/** Paths under the dev port worth opening (`/api/hello`); none means the root. */
|
|
44
44
|
urls: string[];
|
|
45
|
+
/** The app's `package.json` `imports` (Node subpath imports), copied as they are written. */
|
|
46
|
+
imports: Record<string, string>;
|
|
45
47
|
/** The folder holding the files to copy, absolute once the preset is located. */
|
|
46
48
|
files: string;
|
|
47
49
|
atlas: IPresetAtlasSource[];
|
package/src/create/preset.ts
CHANGED
|
@@ -29,11 +29,22 @@ const PRESET_SCHEMA = z
|
|
|
29
29
|
scripts: z.record(z.string(), z.string()).default({}),
|
|
30
30
|
checks: z.array(z.string()).default([]),
|
|
31
31
|
urls: z.array(z.string().startsWith('/')).default([]),
|
|
32
|
+
imports: z.record(z.string(), z.string()).default({}),
|
|
32
33
|
files: z.string(),
|
|
33
34
|
atlas: z.array(z.object({ name: z.string(), repo: z.string(), ref: z.string() })).default([]),
|
|
34
35
|
})
|
|
35
36
|
// A check is run as `bun run <check>`; an entry that is not a script could be a bun flag.
|
|
36
37
|
.superRefine((value, context) => {
|
|
38
|
+
for (const key of Object.keys(value.imports)) {
|
|
39
|
+
if (!key.startsWith('#')) {
|
|
40
|
+
context.addIssue({
|
|
41
|
+
code: 'custom',
|
|
42
|
+
path: ['imports', key],
|
|
43
|
+
message: `"${key}" is not a subpath import: a key starts with #`,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
37
48
|
value.checks.forEach((check, index) => {
|
|
38
49
|
if (!Object.hasOwn(value.scripts, check)) {
|
|
39
50
|
context.addIssue({
|
package/src/create/workspace.ts
CHANGED
|
@@ -153,6 +153,8 @@ export const renderAppManifest = (opts: {
|
|
|
153
153
|
name: opts.app,
|
|
154
154
|
version: '0.0.0',
|
|
155
155
|
private: true,
|
|
156
|
+
// The preset's own text: no token is replaced here, a path pattern has no use for one.
|
|
157
|
+
...(Object.keys(opts.preset.imports).length === 0 ? {} : { imports: opts.preset.imports }),
|
|
156
158
|
scripts: opts.preset.scripts,
|
|
157
159
|
dependencies: toCatalog({
|
|
158
160
|
dependencies: {
|