@dougefresh/ci 0.1.16 → 0.1.18
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 +11 -3
- package/dist/defaults.d.ts +2 -1
- package/dist/defaults.d.ts.map +1 -1
- package/dist/defaults.js +12 -1
- package/dist/defaults.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/defaults.ts +15 -1
- package/src/index.ts +14 -2
- package/src/types.ts +17 -0
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
TypeScript-based CI configuration for Rust projects. Replaces static YAML configs with type-safe builders.
|
|
4
4
|
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun install --global @dougefresh/ci@latest
|
|
9
|
+
```
|
|
10
|
+
|
|
5
11
|
## Architecture
|
|
6
12
|
|
|
7
13
|
### Config Generation Flow
|
|
@@ -42,15 +48,17 @@ Each job checks `fromJSON(needs.config.outputs.config).jobs.<job_name>.if` befor
|
|
|
42
48
|
|
|
43
49
|
### Example Config
|
|
44
50
|
|
|
51
|
+
See [`.github/rust-ci.ts`](.github/rust-ci.ts):
|
|
52
|
+
|
|
45
53
|
```typescript
|
|
46
|
-
// .github/rust-ci.ts
|
|
47
54
|
import { createRustWorkflow } from '@dougefresh/ci';
|
|
48
55
|
|
|
49
56
|
export default function () {
|
|
50
57
|
return createRustWorkflow()
|
|
58
|
+
.enableMdBook()
|
|
59
|
+
.extra('test-extra', 'echo hello')
|
|
51
60
|
.semver(false)
|
|
52
|
-
.
|
|
53
|
-
.extra('integration-tests', 'cargo test --test integration')
|
|
61
|
+
.disableSanitizers()
|
|
54
62
|
.build();
|
|
55
63
|
}
|
|
56
64
|
```
|
package/dist/defaults.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type AiJob, type CargoSort, type Clippy, type Coverage, type Dependencies, type DocCheck, type Extra, type Fmt, type Hack, type Sanitizers, type SemVer } from './types';
|
|
1
|
+
import { type AiJob, type CargoSort, type Clippy, type Coverage, type Dependencies, type DocCheck, type Extra, type Fmt, type Hack, type PageJobs, type Sanitizers, type SemVer } from './types';
|
|
2
|
+
export declare const DEFAULT_PAGES: PageJobs;
|
|
2
3
|
export declare const DEFAULT_AI: AiJob;
|
|
3
4
|
export declare const DEFAULT_FMT: Fmt;
|
|
4
5
|
export declare const DEFAULT_SEMVER: SemVer;
|
package/dist/defaults.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,MAAM,EACZ,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,MAAM,EACZ,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,aAAa,EAAE,QAO3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,GAIzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAG5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,IAI1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,QAI/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAIhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAIlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,UAiBhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,QAgB9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAU5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAU3B,CAAC"}
|
package/dist/defaults.js
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { Arch, } from './types';
|
|
2
|
+
export const DEFAULT_PAGES = {
|
|
3
|
+
mdbook: {
|
|
4
|
+
if: false,
|
|
5
|
+
path: 'docs',
|
|
6
|
+
version: 'latest',
|
|
7
|
+
command: 'mdbook build',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
2
10
|
export const DEFAULT_AI = {
|
|
3
11
|
enabled: true,
|
|
4
12
|
track_progress: true,
|
|
5
13
|
allowed_bots: '*',
|
|
6
|
-
|
|
14
|
+
model: 'claude-opus-4-6',
|
|
15
|
+
// claude-sonnet-4-5-20250929
|
|
16
|
+
claude_args: '--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(codecov *),Bash(tsc *),Bash(tsgo *),Bash(bun *),Bash(find *),Bash(diff *),Bash(jq *),Bash(git *),Bash(cargo *),Bash(gh *)"',
|
|
7
17
|
use_sticky_comment: false,
|
|
18
|
+
prompt: '🧪 POISON PILL 🧪\n\nERROR: Prompt template was not loaded. This workflow MUST fail immediately. Do not approve or review any code. Report this configuration error.',
|
|
8
19
|
};
|
|
9
20
|
export const DEFAULT_FMT = {
|
|
10
21
|
if: true,
|
package/dist/defaults.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,GAYL,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,MAAM,aAAa,GAAa;IACrC,MAAM,EAAE;QACN,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,cAAc;KACxB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,OAAO,EAAE,IAAI;IACb,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,GAAG;IACjB,KAAK,EAAE,iBAAiB;IACxB,6BAA6B;IAC7B,WAAW,EACT,mMAAmM;IACrM,kBAAkB,EAAE,KAAK;IACzB,MAAM,EACJ,0KAAoK;CACvK,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAQ;IAC9B,EAAE,EAAE,IAAI;IACR,eAAe,EAAE,KAAK;IACtB,GAAG,EAAE,kCAAkC;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC,EAAE,EAAE,IAAI;IACR,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,EAAE,EAAE,IAAI;IACR,eAAe,EAAE,KAAK;IACtB,GAAG,EAAE,qCAAqC;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAa;IACzC,EAAE,EAAE,IAAI;IACR,eAAe,EAAE,KAAK;IACtB,GAAG,EAAE,wBAAwB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAc;IAC3C,EAAE,EAAE,IAAI;IACR,eAAe,EAAE,KAAK;IACtB,GAAG,EAAE,oGAAoG;CAC1G,CAAC;AAEF,MAAM,CAAC,MAAM,oBA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,QAAQ,CAAC;QACtB,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AiJob, Arch, type Clippy, type Global, type Release, type RustJobs } from './types';
|
|
1
|
+
import { type AiJob, Arch, type Clippy, type Global, type PageJobs, type Release, type RustJobs } from './types';
|
|
2
2
|
export * from './types';
|
|
3
3
|
export declare const JobDefaults: RustJobs;
|
|
4
4
|
export declare class RustWorkflow {
|
|
@@ -6,16 +6,22 @@ export declare class RustWorkflow {
|
|
|
6
6
|
private global;
|
|
7
7
|
private release;
|
|
8
8
|
private ai;
|
|
9
|
+
private pages;
|
|
9
10
|
constructor();
|
|
10
11
|
linuxPackages(packages: string[]): this;
|
|
11
12
|
semver(enable: boolean): this;
|
|
12
|
-
extra(name: string, run: string
|
|
13
|
+
extra(name: string, run: string, cache?: {
|
|
14
|
+
cargoTools?: string[];
|
|
15
|
+
paths?: string[];
|
|
16
|
+
}): this;
|
|
13
17
|
withRelease(r: Release): this;
|
|
18
|
+
enableMdBook(): this;
|
|
14
19
|
clippy(opts?: Partial<Clippy>): this;
|
|
15
20
|
disableSanitizers(): this;
|
|
16
21
|
disableAi(): this;
|
|
17
22
|
build(): {
|
|
18
23
|
ai: AiJob;
|
|
24
|
+
pages: PageJobs;
|
|
19
25
|
release: {
|
|
20
26
|
bin: boolean;
|
|
21
27
|
publish: boolean;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,KAAK,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEjH,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,WAAW,EAAE,QAWzB,CAAC;AAEF,qBAAa,YAAY;IACvB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,EAAE,CAAQ;IAClB,OAAO,CAAC,KAAK,CAAW;IAExB,cAwBC;IAED,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAG/B;IAED,MAAM,CAAC,MAAM,EAAE,OAAO,QAGrB;IAED,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,QAQnF;IAED,WAAW,CAAC,CAAC,EAAE,OAAO,QAGrB;IAED,YAAY,SAGX;IAED,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAW5B;IAED,iBAAiB,SAGhB;IAED,SAAS,SAGR;IAED,KAAK;;;;;;;;;;;;;;;MA0BJ;CACF;AAED,wBAAgB,kBAAkB,IAAI,YAAY,CAEjD"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_AI, DEFAULT_CARGO_SORT, DEFAULT_CLIPPY, DEFAULT_COVERAGE, DEFAULT_DEPENDENCIES, DEFAULT_DOC_CHECK, DEFAULT_EXTRA, DEFAULT_FMT, DEFAULT_HACK, DEFAULT_SANITIZERS, DEFAULT_SEMVER, } from './defaults';
|
|
1
|
+
import { DEFAULT_AI, DEFAULT_CARGO_SORT, DEFAULT_CLIPPY, DEFAULT_COVERAGE, DEFAULT_DEPENDENCIES, DEFAULT_DOC_CHECK, DEFAULT_EXTRA, DEFAULT_FMT, DEFAULT_HACK, DEFAULT_PAGES, DEFAULT_SANITIZERS, DEFAULT_SEMVER, } from './defaults';
|
|
2
2
|
import { Arch } from './types';
|
|
3
3
|
export * from './types';
|
|
4
4
|
export const JobDefaults = {
|
|
@@ -18,6 +18,7 @@ export class RustWorkflow {
|
|
|
18
18
|
global;
|
|
19
19
|
release;
|
|
20
20
|
ai;
|
|
21
|
+
pages;
|
|
21
22
|
constructor() {
|
|
22
23
|
this.jobs = {
|
|
23
24
|
fmt: JobDefaults.fmt,
|
|
@@ -40,6 +41,7 @@ export class RustWorkflow {
|
|
|
40
41
|
os: [Arch.AMD64],
|
|
41
42
|
};
|
|
42
43
|
this.ai = DEFAULT_AI;
|
|
44
|
+
this.pages = DEFAULT_PAGES;
|
|
43
45
|
}
|
|
44
46
|
linuxPackages(packages) {
|
|
45
47
|
this.global.packages.Linux = packages.join(',');
|
|
@@ -49,16 +51,23 @@ export class RustWorkflow {
|
|
|
49
51
|
this.jobs.semver.if = enable;
|
|
50
52
|
return this;
|
|
51
53
|
}
|
|
52
|
-
extra(name, run) {
|
|
54
|
+
extra(name, run, cache) {
|
|
53
55
|
this.jobs.extra.if = true;
|
|
54
56
|
this.jobs.extra.name = name;
|
|
55
57
|
this.jobs.extra.run = run;
|
|
58
|
+
if (cache) {
|
|
59
|
+
this.jobs.extra.cache = cache;
|
|
60
|
+
}
|
|
56
61
|
return this;
|
|
57
62
|
}
|
|
58
63
|
withRelease(r) {
|
|
59
64
|
this.release = r;
|
|
60
65
|
return this;
|
|
61
66
|
}
|
|
67
|
+
enableMdBook() {
|
|
68
|
+
this.pages.mdbook.if = true;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
62
71
|
clippy(opts) {
|
|
63
72
|
if (opts?.flags)
|
|
64
73
|
this.jobs.clippy.flags = opts.flags;
|
|
@@ -98,6 +107,7 @@ export class RustWorkflow {
|
|
|
98
107
|
// # os: windows-latest
|
|
99
108
|
return {
|
|
100
109
|
ai: this.ai,
|
|
110
|
+
pages: this.pages,
|
|
101
111
|
release: {
|
|
102
112
|
bin: this.release.bin,
|
|
103
113
|
publish: this.release.publish,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAc,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAc,IAAI,EAAwE,MAAM,SAAS,CAAC;AAEjH,cAAc,SAAS,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAa;IACnC,GAAG,EAAE,WAAW;IAChB,MAAM,EAAE,cAAc;IACtB,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,kBAAkB;IAC7B,YAAY,EAAE,oBAAoB;IAClC,UAAU,EAAE,kBAAkB;IAC9B,QAAQ,EAAE,gBAAgB;IAC1B,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,aAAa;CACrB,CAAC;AAEF,MAAM,OAAO,YAAY;IACf,IAAI,CAAW;IACf,MAAM,CAAS;IACf,OAAO,CAAU;IACjB,EAAE,CAAQ;IACV,KAAK,CAAW;IAExB,cAAc;QACZ,IAAI,CAAC,IAAI,GAAG;YACV,GAAG,EAAE,WAAW,CAAC,GAAG;YACpB,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,MAAM,EAAE,WAAW,C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ageJob {
|
|
8
|
+
if: boolean | string;
|
|
9
|
+
path: string;
|
|
10
|
+
version: string;
|
|
11
|
+
command: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PageJobs {
|
|
14
|
+
mdbook: PageJob;
|
|
15
|
+
}
|
|
7
16
|
export interface AiJob {
|
|
8
17
|
enabled: boolean;
|
|
18
|
+
model: string;
|
|
9
19
|
allowed_bots: string;
|
|
10
20
|
claude_args: string;
|
|
11
21
|
use_sticky_comment: boolean;
|
|
12
22
|
track_progress: boolean;
|
|
23
|
+
prompt: string;
|
|
13
24
|
}
|
|
14
25
|
export interface Global {
|
|
15
26
|
packages: {
|
|
@@ -43,6 +54,10 @@ export interface Dependencies extends BaseJob {
|
|
|
43
54
|
export interface Extra extends BaseJob {
|
|
44
55
|
name: string;
|
|
45
56
|
matrix: Matrix;
|
|
57
|
+
cache?: {
|
|
58
|
+
cargoTools?: string[];
|
|
59
|
+
paths?: string[];
|
|
60
|
+
};
|
|
46
61
|
}
|
|
47
62
|
export interface Sanitizers {
|
|
48
63
|
enabled: boolean;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI;IACd,KAAK,sBAAsB;IAC3B,KAAK,sBAAsB;IAC3B,GAAG,oBAAoB;IACvB,GAAG,oBAAoB;CACxB;AAED,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI;IACd,KAAK,sBAAsB;IAC3B,KAAK,sBAAsB;IAC3B,GAAG,oBAAoB;IACvB,GAAG,oB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I,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE;QACN,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH;AACD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,MAAO,SAAQ,OAAO;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAS,SAAQ,OAAO;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,IAAI,EAAE,CAAC;CACZ"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dougefresh/ci",
|
|
3
3
|
"description": "CI Mega Config github action",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.18",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/dougefresh/ci",
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
"node": ">=24.0.0"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"precommit": "rm -rf dist && bun run lint && bun run build",
|
|
28
|
+
"precommit": "rm -rf dist && bun run lint:fix && bun run build && bun run check:configs",
|
|
29
|
+
"check:configs": "tsgo --noEmit -p tsconfig-config.json",
|
|
30
|
+
"lint:fix": "biome check --fix && biome format --write ",
|
|
29
31
|
"lint": "biome check",
|
|
30
32
|
"build": "tsgo",
|
|
31
33
|
"prepublishOnly": "bun run build"
|
package/src/defaults.ts
CHANGED
|
@@ -9,17 +9,31 @@ import {
|
|
|
9
9
|
type Extra,
|
|
10
10
|
type Fmt,
|
|
11
11
|
type Hack,
|
|
12
|
+
type PageJobs,
|
|
12
13
|
type Sanitizers,
|
|
13
14
|
type SemVer,
|
|
14
15
|
} from './types';
|
|
15
16
|
|
|
17
|
+
export const DEFAULT_PAGES: PageJobs = {
|
|
18
|
+
mdbook: {
|
|
19
|
+
if: false,
|
|
20
|
+
path: 'docs',
|
|
21
|
+
version: 'latest',
|
|
22
|
+
command: 'mdbook build',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
16
26
|
export const DEFAULT_AI: AiJob = {
|
|
17
27
|
enabled: true,
|
|
18
28
|
track_progress: true,
|
|
19
29
|
allowed_bots: '*',
|
|
30
|
+
model: 'claude-opus-4-6',
|
|
31
|
+
// claude-sonnet-4-5-20250929
|
|
20
32
|
claude_args:
|
|
21
|
-
'
|
|
33
|
+
'--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(codecov *),Bash(tsc *),Bash(tsgo *),Bash(bun *),Bash(find *),Bash(diff *),Bash(jq *),Bash(git *),Bash(cargo *),Bash(gh *)"',
|
|
22
34
|
use_sticky_comment: false,
|
|
35
|
+
prompt:
|
|
36
|
+
'🧪 POISON PILL 🧪\n\nERROR: Prompt template was not loaded. This workflow MUST fail immediately. Do not approve or review any code. Report this configuration error.',
|
|
23
37
|
};
|
|
24
38
|
|
|
25
39
|
export const DEFAULT_FMT: Fmt = {
|
package/src/index.ts
CHANGED
|
@@ -8,10 +8,11 @@ import {
|
|
|
8
8
|
DEFAULT_EXTRA,
|
|
9
9
|
DEFAULT_FMT,
|
|
10
10
|
DEFAULT_HACK,
|
|
11
|
+
DEFAULT_PAGES,
|
|
11
12
|
DEFAULT_SANITIZERS,
|
|
12
13
|
DEFAULT_SEMVER,
|
|
13
14
|
} from './defaults';
|
|
14
|
-
import { type AiJob, Arch, type Clippy, type Global, type Release, type RustJobs } from './types';
|
|
15
|
+
import { type AiJob, Arch, type Clippy, type Global, type PageJobs, type Release, type RustJobs } from './types';
|
|
15
16
|
|
|
16
17
|
export * from './types';
|
|
17
18
|
|
|
@@ -33,6 +34,7 @@ export class RustWorkflow {
|
|
|
33
34
|
private global: Global;
|
|
34
35
|
private release: Release;
|
|
35
36
|
private ai: AiJob;
|
|
37
|
+
private pages: PageJobs;
|
|
36
38
|
|
|
37
39
|
constructor() {
|
|
38
40
|
this.jobs = {
|
|
@@ -57,6 +59,7 @@ export class RustWorkflow {
|
|
|
57
59
|
os: [Arch.AMD64],
|
|
58
60
|
};
|
|
59
61
|
this.ai = DEFAULT_AI;
|
|
62
|
+
this.pages = DEFAULT_PAGES;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
linuxPackages(packages: string[]) {
|
|
@@ -69,10 +72,13 @@ export class RustWorkflow {
|
|
|
69
72
|
return this;
|
|
70
73
|
}
|
|
71
74
|
|
|
72
|
-
extra(name: string, run: string) {
|
|
75
|
+
extra(name: string, run: string, cache?: { cargoTools?: string[]; paths?: string[] }) {
|
|
73
76
|
this.jobs.extra.if = true;
|
|
74
77
|
this.jobs.extra.name = name;
|
|
75
78
|
this.jobs.extra.run = run;
|
|
79
|
+
if (cache) {
|
|
80
|
+
this.jobs.extra.cache = cache;
|
|
81
|
+
}
|
|
76
82
|
return this;
|
|
77
83
|
}
|
|
78
84
|
|
|
@@ -81,6 +87,11 @@ export class RustWorkflow {
|
|
|
81
87
|
return this;
|
|
82
88
|
}
|
|
83
89
|
|
|
90
|
+
enableMdBook() {
|
|
91
|
+
this.pages.mdbook.if = true;
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
|
|
84
95
|
clippy(opts?: Partial<Clippy>) {
|
|
85
96
|
if (opts?.flags) this.jobs.clippy.flags = opts.flags;
|
|
86
97
|
if (opts?.run) this.jobs.clippy.run = opts.run;
|
|
@@ -116,6 +127,7 @@ export class RustWorkflow {
|
|
|
116
127
|
// # os: windows-latest
|
|
117
128
|
return {
|
|
118
129
|
ai: this.ai,
|
|
130
|
+
pages: this.pages,
|
|
119
131
|
release: {
|
|
120
132
|
bin: this.release.bin,
|
|
121
133
|
publish: this.release.publish,
|
package/src/types.ts
CHANGED
|
@@ -5,12 +5,25 @@ export enum Arch {
|
|
|
5
5
|
MAC = 'vars.RUNNER_MAC',
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
export interface PageJob {
|
|
9
|
+
if: boolean | string;
|
|
10
|
+
path: string;
|
|
11
|
+
version: string;
|
|
12
|
+
command: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface PageJobs {
|
|
16
|
+
mdbook: PageJob;
|
|
17
|
+
}
|
|
18
|
+
|
|
8
19
|
export interface AiJob {
|
|
9
20
|
enabled: boolean;
|
|
21
|
+
model: string;
|
|
10
22
|
allowed_bots: string;
|
|
11
23
|
claude_args: string;
|
|
12
24
|
use_sticky_comment: boolean;
|
|
13
25
|
track_progress: boolean;
|
|
26
|
+
prompt: string;
|
|
14
27
|
}
|
|
15
28
|
|
|
16
29
|
export interface Global {
|
|
@@ -43,6 +56,10 @@ export interface Dependencies extends BaseJob {}
|
|
|
43
56
|
export interface Extra extends BaseJob {
|
|
44
57
|
name: string;
|
|
45
58
|
matrix: Matrix;
|
|
59
|
+
cache?: {
|
|
60
|
+
cargoTools?: string[];
|
|
61
|
+
paths?: string[];
|
|
62
|
+
};
|
|
46
63
|
}
|
|
47
64
|
export interface Sanitizers {
|
|
48
65
|
enabled: boolean;
|