@zigordev/dev 0.0.0 → 1.0.1
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/README.md +217 -1
- package/bin/zigordev.js +29 -0
- package/biome.json +49 -0
- package/commitlint.js +16 -0
- package/dist/cli.d.ts +13 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +184 -0
- package/dist/cli.js.map +1 -0
- package/dist/commits.d.ts +3 -0
- package/dist/commits.d.ts.map +1 -0
- package/dist/commits.js +15 -0
- package/dist/commits.js.map +1 -0
- package/dist/files.d.ts +3 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +38 -0
- package/dist/files.js.map +1 -0
- package/dist/first-publish.d.ts +16 -0
- package/dist/first-publish.d.ts.map +1 -0
- package/dist/first-publish.js +126 -0
- package/dist/first-publish.js.map +1 -0
- package/dist/release.d.ts +21 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +81 -0
- package/dist/release.js.map +1 -0
- package/dist/rule.d.ts +17 -0
- package/dist/rule.d.ts.map +1 -0
- package/dist/rule.js +2 -0
- package/dist/rule.js.map +1 -0
- package/dist/rules/actions.d.ts +3 -0
- package/dist/rules/actions.d.ts.map +1 -0
- package/dist/rules/actions.js +57 -0
- package/dist/rules/actions.js.map +1 -0
- package/dist/rules/attribution.d.ts +3 -0
- package/dist/rules/attribution.d.ts.map +1 -0
- package/dist/rules/attribution.js +37 -0
- package/dist/rules/attribution.js.map +1 -0
- package/dist/rules/comments.d.ts +3 -0
- package/dist/rules/comments.d.ts.map +1 -0
- package/dist/rules/comments.js +368 -0
- package/dist/rules/comments.js.map +1 -0
- package/dist/rules/docs.d.ts +3 -0
- package/dist/rules/docs.d.ts.map +1 -0
- package/dist/rules/docs.js +32 -0
- package/dist/rules/docs.js.map +1 -0
- package/dist/rules/identity.d.ts +4 -0
- package/dist/rules/identity.d.ts.map +1 -0
- package/dist/rules/identity.js +64 -0
- package/dist/rules/identity.js.map +1 -0
- package/dist/rules/index.d.ts +3 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +12 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/links.d.ts +3 -0
- package/dist/rules/links.d.ts.map +1 -0
- package/dist/rules/links.js +52 -0
- package/dist/rules/links.js.map +1 -0
- package/dist/rules/scripts.d.ts +3 -0
- package/dist/rules/scripts.d.ts.map +1 -0
- package/dist/rules/scripts.js +50 -0
- package/dist/rules/scripts.js.map +1 -0
- package/dist/rules/shared.d.ts +3 -0
- package/dist/rules/shared.d.ts.map +1 -0
- package/dist/rules/shared.js +26 -0
- package/dist/rules/shared.js.map +1 -0
- package/dist/shared.d.ts +5 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +33 -0
- package/dist/shared.js.map +1 -0
- package/lefthook.yml +36 -0
- package/package.json +54 -4
- package/semantic-release.js +22 -0
- package/shared/.claude/hooks/guard.mjs +785 -0
- package/shared/.claude/hooks/guard.sh +7 -0
- package/shared/.claude/rules/api.md +48 -0
- package/shared/.claude/rules/core.md +71 -0
- package/shared/.claude/rules/data.md +43 -0
- package/shared/.claude/rules/docs.md +49 -0
- package/shared/.claude/rules/infra.md +49 -0
- package/shared/.claude/rules/tests.md +40 -0
- package/shared/.claude/rules/web.md +42 -0
- package/shared/.claude/rules/workflows.md +19 -0
- package/shared/.claude/settings.json +84 -0
- package/shared/.claude/skills/finish-work/SKILL.md +20 -0
- package/shared/.claude/skills/start-work/SKILL.md +16 -0
- package/shared/.claude/skills/write-decision-record/SKILL.md +20 -0
- package/shared/.claude/skills/write-decision-record/template.md +21 -0
- package/shared/.commitlintrc.json +3 -0
- package/shared/.github/pull_request_template.md +23 -0
- package/shared/.markdownlint-cli2.jsonc +8 -0
- package/shared/lefthook.yml +2 -0
- package/shared/renovate.json +5 -0
- package/tsconfig/base.json +20 -0
- package/tsconfig/library.json +9 -0
- package/tsconfig/node.json +11 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
const always = [
|
|
4
|
+
'build',
|
|
5
|
+
'check',
|
|
6
|
+
'check:quick',
|
|
7
|
+
'format',
|
|
8
|
+
'format:check',
|
|
9
|
+
'lint',
|
|
10
|
+
'test',
|
|
11
|
+
'typecheck',
|
|
12
|
+
];
|
|
13
|
+
const withLocalStack = ['dev', 'local:down', 'local:reset', 'local:up'];
|
|
14
|
+
function finding(message) {
|
|
15
|
+
return { rule: 'scripts', path: 'package.json', message };
|
|
16
|
+
}
|
|
17
|
+
function readScripts(path) {
|
|
18
|
+
try {
|
|
19
|
+
const manifest = JSON.parse(readFileSync(path, 'utf8'));
|
|
20
|
+
if (typeof manifest !== 'object' || manifest === null) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
const scripts = Reflect.get(manifest, 'scripts');
|
|
24
|
+
return typeof scripts === 'object' && scripts !== null ? { ...scripts } : {};
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export const scripts = {
|
|
31
|
+
name: 'scripts',
|
|
32
|
+
summary: 'package.json has the standard scripts',
|
|
33
|
+
run({ root }) {
|
|
34
|
+
const path = join(root, 'package.json');
|
|
35
|
+
if (!existsSync(path)) {
|
|
36
|
+
return [finding('the file is missing')];
|
|
37
|
+
}
|
|
38
|
+
const present = readScripts(path);
|
|
39
|
+
if (present === undefined) {
|
|
40
|
+
return [finding('the file is not a JSON object')];
|
|
41
|
+
}
|
|
42
|
+
const required = existsSync(join(root, 'compose.yaml'))
|
|
43
|
+
? [...always, ...withLocalStack]
|
|
44
|
+
: always;
|
|
45
|
+
return required
|
|
46
|
+
.filter((name) => typeof present[name] !== 'string')
|
|
47
|
+
.map((name) => finding(`the script "${name}" is missing`));
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=scripts.js.map
|
|
@@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AAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACxC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC1C,CAAC;QACD,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC,CAAC;QACpD,CAAC;QACD,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,cAAc,CAAC;YAChC,CAAC,CAAC,MAAM,CAAC;QACX,OAAO,QAAQ;aACZ,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC;aACnD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,eAAe,IAAI,cAAc,CAAC,CAAC,CAAC;IAC/D,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/rules/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,YAAY,CAAC;AAQhD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAmB3C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { compare, sharedFiles } from '../shared.js';
|
|
2
|
+
const messages = {
|
|
3
|
+
missing: 'the shared file is missing, so run "zigordev sync"',
|
|
4
|
+
different: 'the file differs from the shared one, so run "zigordev sync"',
|
|
5
|
+
};
|
|
6
|
+
export function shared(source) {
|
|
7
|
+
return {
|
|
8
|
+
name: 'shared',
|
|
9
|
+
summary: 'every shared file matches the copy in @zigordev/dev',
|
|
10
|
+
run({ root }) {
|
|
11
|
+
const files = sharedFiles(source);
|
|
12
|
+
if (files.length === 0) {
|
|
13
|
+
return [{ rule: 'shared', path: source, message: 'the package holds no shared files' }];
|
|
14
|
+
}
|
|
15
|
+
const findings = [];
|
|
16
|
+
for (const path of files) {
|
|
17
|
+
const difference = compare(root, source, path);
|
|
18
|
+
if (difference !== undefined) {
|
|
19
|
+
findings.push({ rule: 'shared', path, message: messages[difference] });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return findings;
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/rules/shared.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,QAAQ,GAAG;IACf,OAAO,EAAE,oDAAoD;IAC7D,SAAS,EAAE,8DAA8D;CAC1E,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,MAAc;IACnC,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,qDAAqD;QAC9D,GAAG,CAAC,EAAE,IAAI,EAAE;YACV,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;YAClC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC,CAAC;YAC1F,CAAC;YACD,MAAM,QAAQ,GAAc,EAAE,CAAC;YAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;gBAC/C,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;oBAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/shared.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type Difference = 'missing' | 'different';
|
|
2
|
+
export declare function sharedFiles(source: string): string[];
|
|
3
|
+
export declare function compare(root: string, source: string, path: string): Difference | undefined;
|
|
4
|
+
export declare function sync(root: string, source: string): string[];
|
|
5
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,CAAC;AAWjD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAM1F;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAW3D"}
|
package/dist/shared.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
function list(folder, prefix) {
|
|
4
|
+
return readdirSync(join(folder, prefix), { withFileTypes: true })
|
|
5
|
+
.flatMap((entry) => {
|
|
6
|
+
const path = prefix === '' ? entry.name : `${prefix}/${entry.name}`;
|
|
7
|
+
return entry.isDirectory() ? list(folder, path) : [path];
|
|
8
|
+
})
|
|
9
|
+
.sort();
|
|
10
|
+
}
|
|
11
|
+
export function sharedFiles(source) {
|
|
12
|
+
return existsSync(source) ? list(source, '') : [];
|
|
13
|
+
}
|
|
14
|
+
export function compare(root, source, path) {
|
|
15
|
+
const copy = join(root, path);
|
|
16
|
+
if (!existsSync(copy)) {
|
|
17
|
+
return 'missing';
|
|
18
|
+
}
|
|
19
|
+
return readFileSync(copy).equals(readFileSync(join(source, path))) ? undefined : 'different';
|
|
20
|
+
}
|
|
21
|
+
export function sync(root, source) {
|
|
22
|
+
const written = [];
|
|
23
|
+
for (const path of sharedFiles(source)) {
|
|
24
|
+
if (compare(root, source, path) === undefined) {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
mkdirSync(dirname(join(root, path)), { recursive: true });
|
|
28
|
+
writeFileSync(join(root, path), readFileSync(join(source, path)));
|
|
29
|
+
written.push(path);
|
|
30
|
+
}
|
|
31
|
+
return written;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAI1C,SAAS,IAAI,CAAC,MAAc,EAAE,MAAc;IAC1C,OAAO,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;SAC9D,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,CA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AAI,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/lefthook.yml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
pre-commit:
|
|
2
|
+
commands:
|
|
3
|
+
biome:
|
|
4
|
+
priority: 1
|
|
5
|
+
glob: "*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json,jsonc,css,md,yml,yaml}"
|
|
6
|
+
run: pnpm exec biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
|
|
7
|
+
stage_fixed: true
|
|
8
|
+
markdownlint:
|
|
9
|
+
priority: 2
|
|
10
|
+
glob: "*.md"
|
|
11
|
+
run: pnpm exec markdownlint-cli2 --no-globs {staged_files}
|
|
12
|
+
gitleaks:
|
|
13
|
+
priority: 3
|
|
14
|
+
run: gitleaks git --pre-commit --staged --no-banner --redact
|
|
15
|
+
comments:
|
|
16
|
+
priority: 4
|
|
17
|
+
run: pnpm exec zigordev check comments {staged_files}
|
|
18
|
+
identity:
|
|
19
|
+
priority: 5
|
|
20
|
+
run: pnpm exec zigordev check identity
|
|
21
|
+
|
|
22
|
+
commit-msg:
|
|
23
|
+
commands:
|
|
24
|
+
commitlint:
|
|
25
|
+
run: pnpm exec commitlint --edit {1}
|
|
26
|
+
|
|
27
|
+
pre-push:
|
|
28
|
+
piped: true
|
|
29
|
+
commands:
|
|
30
|
+
not-main:
|
|
31
|
+
priority: 1
|
|
32
|
+
use_stdin: true
|
|
33
|
+
run: "! grep -q ' refs/heads/main '"
|
|
34
|
+
check:
|
|
35
|
+
priority: 2
|
|
36
|
+
run: pnpm run check:quick
|
package/package.json
CHANGED
|
@@ -1,10 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zigordev/dev",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "The developer setup every zigordev repo shares: the zigordev command, the Biome config, the TypeScript bases, the git hooks and the commit rules",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=26"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"zigordev": "./bin/zigordev.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin",
|
|
15
|
+
"dist",
|
|
16
|
+
"biome.json",
|
|
17
|
+
"commitlint.js",
|
|
18
|
+
"lefthook.yml",
|
|
19
|
+
"semantic-release.js",
|
|
20
|
+
"shared",
|
|
21
|
+
"tsconfig"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
"./biome": "./biome.json",
|
|
25
|
+
"./commitlint": "./commitlint.js",
|
|
26
|
+
"./lefthook.yml": "./lefthook.yml",
|
|
27
|
+
"./semantic-release": "./semantic-release.js",
|
|
28
|
+
"./tsconfig/base.json": "./tsconfig/base.json",
|
|
29
|
+
"./tsconfig/node.json": "./tsconfig/node.json",
|
|
30
|
+
"./tsconfig/library.json": "./tsconfig/library.json"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@commitlint/config-conventional": "21.2.4"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@biomejs/biome": "^2.6.0",
|
|
37
|
+
"@commitlint/cli": "^21.2.0",
|
|
38
|
+
"lefthook": "^2.2.0",
|
|
39
|
+
"markdownlint-cli2": "^0.24.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@commitlint/lint": "21.2.4",
|
|
43
|
+
"@commitlint/load": "21.2.4",
|
|
44
|
+
"@types/node": "26.6.6",
|
|
45
|
+
"typescript": "7.0.2",
|
|
46
|
+
"vitest": "5.1.1"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
6
51
|
"repository": {
|
|
7
52
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/zigordev/toolkit.git"
|
|
53
|
+
"url": "git+https://github.com/zigordev/toolkit.git",
|
|
54
|
+
"directory": "packages/dev"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsc -p tsconfig.build.json",
|
|
58
|
+
"typecheck": "tsc -p tsconfig.json"
|
|
9
59
|
}
|
|
10
|
-
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const parserOpts = {
|
|
2
|
+
headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/,
|
|
3
|
+
breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/,
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
branches: ['main'],
|
|
8
|
+
plugins: [
|
|
9
|
+
['@semantic-release/commit-analyzer', { preset: 'angular', parserOpts }],
|
|
10
|
+
['@semantic-release/release-notes-generator', { preset: 'angular', parserOpts }],
|
|
11
|
+
[
|
|
12
|
+
'@semantic-release/github',
|
|
13
|
+
{
|
|
14
|
+
successComment: false,
|
|
15
|
+
failComment: false,
|
|
16
|
+
failTitle: false,
|
|
17
|
+
labels: false,
|
|
18
|
+
releasedLabels: false,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
],
|
|
22
|
+
};
|