create-bht-component-registry 0.2.1 → 0.4.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.
Files changed (3) hide show
  1. package/README.md +4 -3
  2. package/dist/cli.js +25 -9
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -4,7 +4,7 @@ Scaffold a [bht-component-registry](https://github.com/behivetech/bht-component-
4
4
  component registry that stays in git: docs generated from source, live examples,
5
5
  versions via Changesets, a static site you can deploy anywhere — and keep it current with `update`.
6
6
 
7
- Hosted & expanded version, guides and consulting: https://platform.behivetech.com
7
+ The expanded version, guides and consulting: https://platform.behivetech.com
8
8
 
9
9
  ## Create a registry
10
10
 
@@ -57,9 +57,10 @@ npx create-bht-component-registry update --dry-run
57
57
  `update` needs a clean git tree, because it replaces whole files and `git diff` is how you review
58
58
  the result. It reads `templateVersion` from `registry.config.json`, fetches the newer template,
59
59
  and replaces only **template-owned** paths — the ones listed in the target release's
60
- `template.manifest.json` (the docs app, `packages/**`, the generator, workflows, root config,
61
- `docs/**`, …). It never touches:
60
+ `template.manifest.json` (the docs app including its default guide pages, `packages/**`, the
61
+ generators, workflows, root config, …). It never touches:
62
62
 
63
+ - `docs/**` — your pages, and your copies of guide pages (a same-path copy replaces the default)
63
64
  - `registry/**` — your components
64
65
  - `registry.config.json` — your settings (only `templateVersion` is bumped)
65
66
  - `.changeset/*.md` — your pending changesets
package/dist/cli.js CHANGED
@@ -250,10 +250,19 @@ var DEFAULT_MANIFEST = {
250
250
  "apps/docs/**",
251
251
  "packages/**",
252
252
  "scripts/**",
253
+ // The generator entry point; the generators it loads from scripts/generators
254
+ // are owned with scripts/**, the owner's own under generators/ never are.
255
+ "plopfile.ts",
256
+ // A one-line re-export of packages/env's Vitest config; the setup and
257
+ // stubs it points at are owned with packages/**.
258
+ "vitest.config.ts",
253
259
  // Shipped by pre-release templates (their task runner). Still owned so `update`
254
260
  // removes them from repos created from those.
255
261
  "turbo/generators/**",
256
262
  ".github/workflows/**",
263
+ // AI-assistant rules (CLAUDE.md is owned below); the owner's own go in
264
+ // .github/instructions/*.instructions.md, which the template never ships.
265
+ ".github/copilot-instructions.md",
257
266
  ".changeset/config.json",
258
267
  "turbo.json",
259
268
  "pnpm-workspace.yaml",
@@ -268,12 +277,14 @@ var DEFAULT_MANIFEST = {
268
277
  "CONTRIBUTING.md",
269
278
  "SECURITY.md",
270
279
  "LICENSE",
271
- "docs/**"
280
+ "TERMS.md"
272
281
  ],
273
- never: ["registry/**", "registry.config.json", ".changeset/*.md", "apps/docs/src/generated/**"],
282
+ // docs/ is the owner's: their pages, and their copies of the template's
283
+ // guide (which ships under apps/docs/default-docs/ and is owned with the app).
284
+ never: ["registry/**", "generators/**", "docs/**", "registry.config.json", ".changeset/*.md", "apps/docs/src/generated/**"],
274
285
  templateOnly: ["packages/create-bht-component-registry/**", ".github/ISSUE_TEMPLATE/**", ".github/PULL_REQUEST_TEMPLATE.md"],
275
286
  readmeMarker: DEFAULT_README_MARKER,
276
- rewriteScope: ["apps/docs/e2e/public.spec.ts", "apps/docs/package.json"]
287
+ rewriteScope: ["apps/docs/e2e/public.spec.ts", "apps/docs/package.json", "docs/using-this-registry.md"]
277
288
  };
278
289
  function stringArray(value, key, source) {
279
290
  if (!Array.isArray(value) || value.some((item) => typeof item !== "string")) {
@@ -634,7 +645,7 @@ function readOwnVersion() {
634
645
 
635
646
  // src/commands/create.ts
636
647
  var DEFAULT_REGISTRY = "https://registry.npmjs.org";
637
- var DEFAULT_CATEGORIES = ["atoms", "molecules", "organisms", "templates", "forms"];
648
+ var DEFAULT_CATEGORIES = ["atoms", "molecules", "organisms", "templates", "forms", "hooks", "utils"];
638
649
  var DEFAULT_DIR = "my-registry";
639
650
  var CATEGORY_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
640
651
  function defaultDeps() {
@@ -778,8 +789,8 @@ function printNextSteps(dir, scope, installed, log2) {
778
789
  log2.info(" pnpm dev");
779
790
  log2.blank();
780
791
  log2.info(`Create the npm org for @${scope} at https://www.npmjs.com/org/create before your first \`pnpm release\`.`);
781
- log2.info("Guides: docs/getting-started.md");
782
- log2.info("Hosted & expanded version: https://platform.behivetech.com/expanded");
792
+ log2.info("Guide: apps/docs/default-docs/guide/getting-started.md \u2014 also at /docs on the site. Pages under docs/ are yours; a same-path copy there replaces a default page.");
793
+ log2.info("Expanded version (dashboard, roles, audit log, on your infrastructure): apps/docs/default-docs/guide/expanded.md");
783
794
  log2.blank();
784
795
  }
785
796
  async function create(options, overrides = {}) {
@@ -1010,7 +1021,7 @@ var HELP = `
1010
1021
  create options
1011
1022
  --scope <name> npm scope without the @ (required; prompted if missing)
1012
1023
  --registry <url> registry to publish to (default: https://registry.npmjs.org)
1013
- --categories <a,b,c> starter categories (default: atoms,molecules,organisms,templates,forms)
1024
+ --categories <a,b,c> starter categories (default: atoms,molecules,organisms,templates,forms,hooks,utils)
1014
1025
  --template-version <x.y.z> template release to download (default: this CLI's version)
1015
1026
  --no-install skip \`pnpm install\` and \`pnpm build\`
1016
1027
  -y, --yes accept defaults instead of prompting
@@ -1025,7 +1036,7 @@ var HELP = `
1025
1036
  -h, --help show this help
1026
1037
  -v, --version print the version
1027
1038
 
1028
- Hosted & expanded version: https://platform.behivetech.com
1039
+ Behive Tech \u2014 the expanded version and consulting: https://platform.behivetech.com
1029
1040
  `;
1030
1041
  async function main(argv) {
1031
1042
  let parsed;
@@ -1067,7 +1078,12 @@ async function main(argv) {
1067
1078
  }
1068
1079
  const [command, ...rest] = positionals;
1069
1080
  if (command === "update") {
1070
- return update({ to: string("to"), from: string("from"), dryRun: flag("dry-run"), yes: flag("yes") });
1081
+ return update({
1082
+ to: string("to"),
1083
+ from: string("from"),
1084
+ dryRun: flag("dry-run"),
1085
+ yes: flag("yes")
1086
+ });
1071
1087
  }
1072
1088
  const dir = command === "create" ? rest[0] : command;
1073
1089
  const categories = string("categories");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bht-component-registry",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "description": "Scaffold a bht-component-registry — a component registry that stays in git — and keep it up to date with `update`.",
5
5
  "keywords": [
6
6
  "component-registry",
@@ -40,8 +40,8 @@
40
40
  "tsup": "^8.5.1",
41
41
  "typescript": "^5.9.3",
42
42
  "vitest": "^4.1.10",
43
- "@bht-component-registry/eslint-config": "0.1.0",
44
43
  "@bht-component-registry/scope": "0.1.0",
44
+ "@bht-component-registry/eslint-config": "0.1.0",
45
45
  "@bht-component-registry/typescript-config": "0.0.2"
46
46
  },
47
47
  "publishConfig": {