@theholocron/holocron-config 7.28.2 → 7.30.0

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.
@@ -1,2 +1,2 @@
1
- import { t as nextjs } from "../nextjs-D1E4Gf4-.js";
1
+ import { t as nextjs } from "../nextjs-DfhjuPT3.js";
2
2
  export { nextjs };
@@ -1,2 +1,2 @@
1
- import { n as nodeDocsSite, t as nodeDocs } from "../node-docs-BW6pdsNO.js";
1
+ import { n as nodeDocsSite, t as nodeDocs } from "../node-docs-CjztgtG8.js";
2
2
  export { nodeDocs, nodeDocsSite };
@@ -1,23 +1,2 @@
1
- import { ComposedPreset } from "@theholocron/cli";
2
- //#region configs/react.d.ts
3
- /**
4
- * Preset for single-package React/Vite application repos. Includes Storybook,
5
- * interaction tests, Knip + Lighthouse audit, and UI required checks.
6
- * Does NOT include Vercel deployment or Cypress user-flow — add nextjs() for those.
7
- *
8
- * @example
9
- * const preset = react();
10
- * export default defineConfig({
11
- * ...preset,
12
- * repo: { ...preset.repo, name: "theholocron/my-app", topics: ["react", "vite"] },
13
- * workflows: [
14
- * ...preset.workflows,
15
- * { name: "test", with: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } } },
16
- * "sync",
17
- * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
18
- * ],
19
- * });
20
- */
21
- declare function react(): ComposedPreset;
22
- //#endregion
23
- export { react };
1
+ import { n as ReactOptions, t as react } from "../react-DKXFl0ZG.js";
2
+ export { type ReactOptions, react };
@@ -1,28 +1,27 @@
1
1
  import { t as node } from "../node-3iHN9DIf.js";
2
2
  import { t as typecheck } from "../typecheck-epaimGtp.js";
3
- import { t as react$1 } from "../react-Pm9PjGpV.js";
3
+ import { t as react$1 } from "../react-hLw4lgas.js";
4
4
  import { compose } from "@theholocron/cli";
5
5
  //#region configs/react.ts
6
6
  /**
7
7
  * Preset for single-package React/Vite application repos. Includes Storybook,
8
8
  * interaction tests, Knip + Lighthouse audit, and UI required checks.
9
- * Does NOT include Vercel deployment or Cypress user-flow — add nextjs() for those.
9
+ *
10
+ * Pass `test` overrides to merge repo-specific options (e.g. run-chromatic)
11
+ * into the single test workflow entry so the sync tool sees one complete entry:
10
12
  *
11
13
  * @example
12
- * const preset = react();
14
+ * const preset = react({
15
+ * test: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } },
16
+ * });
13
17
  * export default defineConfig({
14
18
  * ...preset,
15
- * repo: { ...preset.repo, name: "theholocron/my-app", topics: ["react", "vite"] },
16
- * workflows: [
17
- * ...preset.workflows,
18
- * { name: "test", with: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } } },
19
- * "sync",
20
- * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
21
- * ],
19
+ * repo: { ...preset.repo, name: "theholocron/my-app" },
20
+ * workflows: [...preset.workflows, "sync", { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } }],
22
21
  * });
23
22
  */
24
- function react() {
25
- return compose(node(), typecheck(), react$1());
23
+ function react(options) {
24
+ return compose(node(), typecheck(), react$1(options));
26
25
  }
27
26
  //#endregion
28
27
  export { react };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,12 @@ import { monorepo } from "./configs/monorepo.js";
2
2
  import { n as NextjsOptions, r as nextjs$1, t as nextjs } from "./nextjs-CaFUxEzC.js";
3
3
  import { NodeDocsPreset, NodeDocsSitePreset, nodeDocs, nodeDocsSite } from "./configs/node-docs.js";
4
4
  import { HolocronPreset as ComposedPreset$1 } from "./configs/node.js";
5
- import { react } from "./configs/react.js";
5
+ import { n as ReactOptions, r as react$1, t as react } from "./react-DKXFl0ZG.js";
6
6
  import { Capability, Capability as Capability$1, ComposedPreset, compose } from "@theholocron/cli";
7
+ //#region constants.d.ts
8
+ /** Cloudflare account ID for the theholocron org. */
9
+ declare const CLOUDFLARE_ACCOUNT_ID = "9c558af98664d13fc89b7e0a0d93d5a8";
10
+ //#endregion
7
11
  //#region capabilities/node.d.ts
8
12
  /**
9
13
  * Base capability for all theholocron Node.js repositories.
@@ -44,15 +48,6 @@ interface AuditOptions {
44
48
  */
45
49
  declare function audit({ knip, performance, lighthouseConfig }?: AuditOptions): Capability$1;
46
50
  //#endregion
47
- //#region capabilities/react.d.ts
48
- /**
49
- * Adds React/Storybook UI testing and browser runtime config.
50
- * Contributes: secrets provider, browser runtime property, Storybook + interaction
51
- * test jobs, audit with Knip + Lighthouse, and UI required checks.
52
- * Requires: node, typecheck
53
- */
54
- declare function react$1(): Capability$1;
55
- //#endregion
56
51
  //#region capabilities/monorepo.d.ts
57
52
  /**
58
53
  * Adjusts a repo to be a monorepo — sets uses_external_packages: true
@@ -64,4 +59,4 @@ declare function react$1(): Capability$1;
64
59
  */
65
60
  declare function monorepo$1(): Capability$1;
66
61
  //#endregion
67
- export { type AuditOptions, type Capability, type ComposedPreset, type ComposedPreset$1 as HolocronPreset, type NextjsOptions, type NodeDocsPreset, type NodeDocsSitePreset, audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactCapability, typecheck };
62
+ export { type AuditOptions, CLOUDFLARE_ACCOUNT_ID, type Capability, type ComposedPreset, type ComposedPreset$1 as HolocronPreset, type NextjsOptions, type NodeDocsPreset, type NodeDocsSitePreset, type ReactOptions, audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactCapability, typecheck };
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
+ import { i as CLOUDFLARE_ACCOUNT_ID, n as nodeDocsSite, r as docs, t as nodeDocs } from "./node-docs-CjztgtG8.js";
1
2
  import { t as node } from "./node-3iHN9DIf.js";
2
3
  import { t as typecheck } from "./typecheck-epaimGtp.js";
3
- import { n as nodeDocsSite, r as docs, t as nodeDocs } from "./node-docs-BW6pdsNO.js";
4
- import { t as react$1 } from "./react-Pm9PjGpV.js";
5
- import { n as nextjs$1, t as nextjs } from "./nextjs-D1E4Gf4-.js";
4
+ import { t as react$1 } from "./react-hLw4lgas.js";
5
+ import { n as nextjs$1, t as nextjs } from "./nextjs-DfhjuPT3.js";
6
6
  import { react } from "./configs/react.js";
7
7
  import { monorepo } from "./configs/monorepo.js";
8
8
  import { compose } from "@theholocron/cli";
@@ -44,4 +44,4 @@ function monorepo$1() {
44
44
  };
45
45
  }
46
46
  //#endregion
47
- export { audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactCapability, typecheck };
47
+ export { CLOUDFLARE_ACCOUNT_ID, audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactCapability, typecheck };
@@ -1,6 +1,6 @@
1
1
  import { t as node } from "./node-3iHN9DIf.js";
2
2
  import { t as typecheck } from "./typecheck-epaimGtp.js";
3
- import { t as react } from "./react-Pm9PjGpV.js";
3
+ import { t as react } from "./react-hLw4lgas.js";
4
4
  import { compose } from "@theholocron/cli";
5
5
  //#region capabilities/nextjs.ts
6
6
  /**
@@ -1,6 +1,10 @@
1
1
  import { t as node } from "./node-3iHN9DIf.js";
2
2
  import { t as typecheck } from "./typecheck-epaimGtp.js";
3
3
  import { compose } from "@theholocron/cli";
4
+ //#region constants.ts
5
+ /** Cloudflare account ID for the theholocron org. */
6
+ const CLOUDFLARE_ACCOUNT_ID = "9c558af98664d13fc89b7e0a0d93d5a8";
7
+ //#endregion
4
8
  //#region capabilities/docs.ts
5
9
  /**
6
10
  * Adds a documentation site deployed to Cloudflare Pages with PR previews.
@@ -19,8 +23,9 @@ function docs() {
19
23
  https: true
20
24
  },
21
25
  providers: {
22
- deployment: ["cloudflare", { accountId: "9c558af98664d13fc89b7e0a0d93d5a8" }],
23
- dns: "cloudflare"
26
+ deployment: ["cloudflare", { accountId: CLOUDFLARE_ACCOUNT_ID }],
27
+ dns: "cloudflare",
28
+ workers: ["cloudflare", { accountId: CLOUDFLARE_ACCOUNT_ID }]
24
29
  },
25
30
  workflows: [{
26
31
  name: "deploy",
@@ -83,4 +88,4 @@ function nodeDocsSite() {
83
88
  return compose(node(), docs());
84
89
  }
85
90
  //#endregion
86
- export { nodeDocsSite as n, docs as r, nodeDocs as t };
91
+ export { CLOUDFLARE_ACCOUNT_ID as i, nodeDocsSite as n, docs as r, nodeDocs as t };
@@ -0,0 +1,42 @@
1
+ import { Capability, ComposedPreset } from "@theholocron/cli";
2
+ //#region capabilities/react.d.ts
3
+ interface ReactOptions {
4
+ /** Extra `with:` inputs merged into the `test` workflow entry (e.g. run-chromatic). */
5
+ test?: Record<string, unknown>;
6
+ }
7
+ /**
8
+ * Adds React/Storybook UI testing and browser runtime config.
9
+ * Contributes: secrets provider, browser runtime property, Storybook + interaction
10
+ * test jobs, audit with Knip + Lighthouse, and UI required checks.
11
+ * Requires: node, typecheck
12
+ *
13
+ * Pass `test` overrides to merge repo-specific options into the single test
14
+ * workflow entry so the sync tool sees one complete entry rather than two
15
+ * conflicting ones:
16
+ *
17
+ * @example
18
+ * compose(node(), typecheck(), react({ test: { "run-chromatic": { projects: [...] } } }))
19
+ */
20
+ declare function react$1({ test: testOverrides }?: ReactOptions): Capability;
21
+ //#endregion
22
+ //#region configs/react.d.ts
23
+ /**
24
+ * Preset for single-package React/Vite application repos. Includes Storybook,
25
+ * interaction tests, Knip + Lighthouse audit, and UI required checks.
26
+ *
27
+ * Pass `test` overrides to merge repo-specific options (e.g. run-chromatic)
28
+ * into the single test workflow entry so the sync tool sees one complete entry:
29
+ *
30
+ * @example
31
+ * const preset = react({
32
+ * test: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } },
33
+ * });
34
+ * export default defineConfig({
35
+ * ...preset,
36
+ * repo: { ...preset.repo, name: "theholocron/my-app" },
37
+ * workflows: [...preset.workflows, "sync", { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } }],
38
+ * });
39
+ */
40
+ declare function react(options?: ReactOptions): ComposedPreset;
41
+ //#endregion
42
+ export { ReactOptions as n, react$1 as r, react as t };
@@ -4,8 +4,15 @@
4
4
  * Contributes: secrets provider, browser runtime property, Storybook + interaction
5
5
  * test jobs, audit with Knip + Lighthouse, and UI required checks.
6
6
  * Requires: node, typecheck
7
+ *
8
+ * Pass `test` overrides to merge repo-specific options into the single test
9
+ * workflow entry so the sync tool sees one complete entry rather than two
10
+ * conflicting ones:
11
+ *
12
+ * @example
13
+ * compose(node(), typecheck(), react({ test: { "run-chromatic": { projects: [...] } } }))
7
14
  */
8
- function react() {
15
+ function react({ test: testOverrides = {} } = {}) {
9
16
  return {
10
17
  id: "react",
11
18
  requires: ["node", "typecheck"],
@@ -26,7 +33,8 @@ function react() {
26
33
  with: {
27
34
  "run-unit": false,
28
35
  "run-storybook": true,
29
- "run-interaction": true
36
+ "run-interaction": true,
37
+ ...testOverrides
30
38
  }
31
39
  }],
32
40
  requiredChecks: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-config",
3
- "version": "7.28.2",
3
+ "version": "7.30.0",
4
4
  "description": "Shareable holocron configuration presets for theholocron repositories.",
5
5
  "homepage": "https://github.com/theholocron/configs/tree/main/packages/holocron-config#readme",
6
6
  "bugs": "https://github.com/theholocron/configs/issues",
@@ -18,13 +18,13 @@
18
18
  ],
19
19
  "type": "module",
20
20
  "devDependencies": {
21
- "@theholocron/cli": "^3.38.0",
21
+ "@theholocron/cli": "^3.45.1",
22
22
  "tsdown": "^0.22.14",
23
23
  "typescript": "^5.9.3",
24
24
  "vitest": "^4.1.10",
25
25
  "@vitest/coverage-v8": "^4.1.10",
26
- "@theholocron/tsconfig": "7.28.2",
27
- "@theholocron/vitest-config": "7.28.2"
26
+ "@theholocron/tsconfig": "7.30.0",
27
+ "@theholocron/vitest-config": "7.30.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@theholocron/cli": ">=2.0.0-alpha.1"