@venizia/vulcan 0.1.0-1 → 0.1.0-2
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/base/rules.md
CHANGED
|
@@ -58,7 +58,7 @@ classes) and `V-C-05` (`getError` / `ApplicationError`) - the last two, with the
|
|
|
58
58
|
| ID | Rule | Enforced by |
|
|
59
59
|
|----|------|-------------|
|
|
60
60
|
| V-C-01 | **English only in code** - identifiers, comments, commit messages, logs, docs. Vietnamese belongs in chat. | SOFT |
|
|
61
|
-
| V-C-02 | **
|
|
61
|
+
| V-C-02 | **One options object first, at most 5 parameters.** Fold every argument you can into a single options object in the first position: `fn({ key, value })`, not `fn(key, value)`, and one parameter is not an exception - `isValidName({ name })`, not `isValidName(name)`. A second parameter is allowed only where the first object cannot carry it, for example a repository method that takes its data and its query options separately. Never more than 5 parameters. A single positional parameter reads fine until the second one arrives, and by then the method is published and every call site pays. The cost is highest on an interface others implement: `IStorageHelper` carried three positional methods for exactly this reason and the migration touched 72 call sites. Mixing the two styles in one interface is itself the defect - a reader cannot tell which shape a method takes without opening it. | SOFT - lint (`venizia/max-params-own`, 5) once `@venizia/dev-configs` ships `houseConfigs` |
|
|
62
62
|
| V-C-04 | **Never abbreviate identifiers:** `ProductRepository` not `ProductRepo`, `ProductDocument` not `ProductDoc`; type parameters too (`TDocument`, not `TDoc`). A project lists its own exceptions in its rules (IGNIS: `tz` for a time zone). | SOFT |
|
|
63
63
|
| V-C-06 | **Never a silent catch - log it.** Always braces. Early return. `switch` with `default` over a long if-else chain. Strict TypeScript; no `any` where a type exists. | LINT (braces, floating promises) + SOFT |
|
|
64
64
|
| V-C-07 | **A function name opens with its verb** - `generate` `build` `to` `is` `has` `assert` `extract` `enrich` `get` `resolve`. `is*` returns a boolean and leaves the branch to the caller; `assert*` throws and returns `void`, so the code after it needs none - reach for `assert*` when every caller would throw on `false` anyway. `has*` is the ownership question (`hasBucket`, never `isBucketExists`). That list is for UTILITY functions; service methods lean on a wider set. **Arrow functions, not `function` declarations** (do not churn existing ones). State plus the operations on it live in a class with static members - the `LoggerFactory` shape - never module-level `let` plus exported arrows. | SOFT |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/vulcan",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-2",
|
|
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": {
|
|
@@ -43,9 +43,8 @@
|
|
|
43
43
|
"test": "NODE_ENV=test bun test --env-file=.env.test"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@venizia/
|
|
47
|
-
"@venizia/vulcan-
|
|
48
|
-
"@venizia/vulcan-okf": "0.1.0-1",
|
|
46
|
+
"@venizia/vulcan-atlas": "0.1.0-2",
|
|
47
|
+
"@venizia/vulcan-okf": "0.1.0-2",
|
|
49
48
|
"zod": "^4.5.4"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
package/src/common/types.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { TConstValue } from '@venizia/ignis-helpers/common';
|
|
2
1
|
import type { VulcanCommands, VulcanTools } from './constants.ts';
|
|
3
2
|
|
|
3
|
+
/** The values of a const class's static fields: `TConstValue<typeof Colors>` is `'red' | 'blue'`. */
|
|
4
|
+
export type TConstValue<TClass> = Extract<TClass[keyof TClass], string | number> & {};
|
|
5
|
+
|
|
4
6
|
export type TVulcanCommand = TConstValue<typeof VulcanCommands>;
|
|
5
7
|
export type TVulcanTool = TConstValue<typeof VulcanTools>;
|
|
6
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TConstValue } from '
|
|
1
|
+
import type { TConstValue } from '../../common/index.ts';
|
|
2
2
|
import type { CodingAgents, ConfigExtensions, HookEvents } from './constants.ts';
|
|
3
3
|
|
|
4
4
|
export type TConfigExtension = TConstValue<typeof ConfigExtensions>;
|
package/src/init/common/types.ts
CHANGED
package/src/sync/common/types.ts
CHANGED