@lucasacoutinho/archer 0.0.0-stage → 0.2.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.
Files changed (50) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +5 -0
  3. package/README.md +459 -2
  4. package/dist/bun/plugin.cjs +85 -0
  5. package/dist/bun/plugin.d.cts +7 -0
  6. package/dist/bun/plugin.d.ts +7 -0
  7. package/dist/bun/plugin.js +11 -0
  8. package/dist/bun.cjs +2238 -0
  9. package/dist/bun.d.cts +13 -0
  10. package/dist/bun.d.ts +13 -0
  11. package/dist/bun.js +28 -0
  12. package/dist/chunk-2AKMBLHG.js +2165 -0
  13. package/dist/chunk-67YEOTXP.js +25 -0
  14. package/dist/chunk-IDVLHNL2.js +46 -0
  15. package/dist/chunk-ZZ6TR4PO.js +201 -0
  16. package/dist/cli.js +2643 -0
  17. package/dist/index.cjs +2484 -0
  18. package/dist/index.d.cts +45 -0
  19. package/dist/index.d.ts +45 -0
  20. package/dist/index.js +54 -0
  21. package/dist/jest/plugin.cjs +85 -0
  22. package/dist/jest/plugin.d.cts +7 -0
  23. package/dist/jest/plugin.d.ts +7 -0
  24. package/dist/jest/plugin.js +11 -0
  25. package/dist/jest.cjs +2237 -0
  26. package/dist/jest.d.cts +13 -0
  27. package/dist/jest.d.ts +13 -0
  28. package/dist/jest.js +27 -0
  29. package/dist/matchers-Cqnbsyxe.d.cts +11 -0
  30. package/dist/matchers-Cqnbsyxe.d.ts +11 -0
  31. package/dist/node.cjs +2237 -0
  32. package/dist/node.d.cts +13 -0
  33. package/dist/node.d.ts +13 -0
  34. package/dist/node.js +27 -0
  35. package/dist/reporters-BbAXMpuW.d.cts +6 -0
  36. package/dist/reporters-xh-HQneS.d.ts +6 -0
  37. package/dist/suite-BwnPDCvU.d.cts +337 -0
  38. package/dist/suite-BwnPDCvU.d.ts +337 -0
  39. package/dist/vitest/plugin.cjs +85 -0
  40. package/dist/vitest/plugin.d.cts +7 -0
  41. package/dist/vitest/plugin.d.ts +7 -0
  42. package/dist/vitest/plugin.js +11 -0
  43. package/dist/vitest.cjs +2531 -0
  44. package/dist/vitest.d.cts +37 -0
  45. package/dist/vitest.d.ts +37 -0
  46. package/dist/vitest.js +139 -0
  47. package/package.json +216 -4
  48. package/skills/archer/SKILL.md +81 -0
  49. package/skills/archer/agents/openai.yaml +4 -0
  50. package/skills/archer/references/rules.md +87 -0
@@ -0,0 +1,13 @@
1
+ import { A as ArcherOptions, a as ArchitectureSuite } from './suite-BwnPDCvU.cjs';
2
+ export { S as Selector } from './suite-BwnPDCvU.cjs';
3
+
4
+ interface JestArchTestOptions extends ArcherOptions {
5
+ /** Per-test timeout in milliseconds. */
6
+ readonly timeout?: number;
7
+ }
8
+ /**
9
+ * Registers an architecture test in Jest and returns its rule builder.
10
+ */
11
+ declare function arch(name: string, options?: JestArchTestOptions): ArchitectureSuite;
12
+
13
+ export { ArcherOptions, type JestArchTestOptions, arch };
package/dist/jest.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { A as ArcherOptions, a as ArchitectureSuite } from './suite-BwnPDCvU.js';
2
+ export { S as Selector } from './suite-BwnPDCvU.js';
3
+
4
+ interface JestArchTestOptions extends ArcherOptions {
5
+ /** Per-test timeout in milliseconds. */
6
+ readonly timeout?: number;
7
+ }
8
+ /**
9
+ * Registers an architecture test in Jest and returns its rule builder.
10
+ */
11
+ declare function arch(name: string, options?: JestArchTestOptions): ArchitectureSuite;
12
+
13
+ export { ArcherOptions, type JestArchTestOptions, arch };
package/dist/jest.js ADDED
@@ -0,0 +1,27 @@
1
+ import {
2
+ ArchitectureSuite
3
+ } from "./chunk-2AKMBLHG.js";
4
+ import {
5
+ ArchitectureError
6
+ } from "./chunk-IDVLHNL2.js";
7
+
8
+ // src/adapters/jest/index.ts
9
+ import { test } from "@jest/globals";
10
+ function arch(name, options = {}) {
11
+ const { timeout, ...archerOptions } = options;
12
+ const suite = new ArchitectureSuite(archerOptions);
13
+ test(
14
+ name,
15
+ async () => {
16
+ const result = await suite.check();
17
+ if (!result.ok) {
18
+ throw new ArchitectureError(result);
19
+ }
20
+ },
21
+ timeout
22
+ );
23
+ return suite;
24
+ }
25
+ export {
26
+ arch
27
+ };
@@ -0,0 +1,11 @@
1
+ interface ArcherMatcherResult {
2
+ readonly message: () => string;
3
+ readonly pass: boolean;
4
+ }
5
+ declare function toRespectArchitecture(received: unknown): Promise<ArcherMatcherResult>;
6
+ /** Matchers shared by the Vitest, Jest, and Bun test plugins. */
7
+ declare const archerMatchers: {
8
+ toRespectArchitecture: typeof toRespectArchitecture;
9
+ };
10
+
11
+ export { archerMatchers as a };
@@ -0,0 +1,11 @@
1
+ interface ArcherMatcherResult {
2
+ readonly message: () => string;
3
+ readonly pass: boolean;
4
+ }
5
+ declare function toRespectArchitecture(received: unknown): Promise<ArcherMatcherResult>;
6
+ /** Matchers shared by the Vitest, Jest, and Bun test plugins. */
7
+ declare const archerMatchers: {
8
+ toRespectArchitecture: typeof toRespectArchitecture;
9
+ };
10
+
11
+ export { archerMatchers as a };