create-geonosis 1.2.0 → 1.3.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.
@@ -12,6 +12,7 @@ var VALUED = /* @__PURE__ */ new Set([
12
12
  "--themekit",
13
13
  "--ui"
14
14
  ]);
15
+ var SWITCHES = /* @__PURE__ */ new Set(["--help", "-h", "--no-install"]);
15
16
  var read = (argv) => {
16
17
  const flags = {};
17
18
  let dir;
@@ -27,6 +28,11 @@ var read = (argv) => {
27
28
  continue;
28
29
  }
29
30
  if (!VALUED.has(token)) {
31
+ if (!SWITCHES.has(token)) {
32
+ throw new Error(
33
+ `${token} is not an option create-geonosis takes. Run create-geonosis --help for the ones it does.`
34
+ );
35
+ }
30
36
  flags[token] = "true";
31
37
  continue;
32
38
  }
@@ -265,7 +271,7 @@ var workspacesOf = (answers) => {
265
271
 
266
272
  // src/files.ts
267
273
  import { countersFor, rulesFor } from "@geonosis/cli";
268
- var VERSION = "1.2.0";
274
+ var VERSION = "1.3.0";
269
275
  var SCHEMA = "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json";
270
276
  var CATALOG = {
271
277
  "@types/node": "^24.3.0",
@@ -660,15 +666,19 @@ var filesFor = (answers) => {
660
666
  "lefthook.yml": [
661
667
  "# Staged scope only, so a commit never waits on a file it did not touch. When one fires, fix",
662
668
  "# or delete the code \u2014 never downgrade the rule to get past it.",
669
+ "#",
670
+ "# Each binary is called through node_modules/.bin, never through npx, bunx or pnpm: a git",
671
+ "# hook's PATH is not the shell's and carries no version-manager shim, so the runner fails to",
672
+ "# START and what you read is its message rather than the gate refusing anything.",
663
673
  "pre-commit:",
664
674
  " parallel: true",
665
675
  " commands:",
666
676
  " fmt:",
667
677
  " glob: '*.{ts,tsx,js,json}'",
668
- ` run: ${exec(answers.runtime)} oxfmt --config .oxfmtrc.json --check {staged_files}`,
678
+ " run: node_modules/.bin/oxfmt --config .oxfmtrc.json --check {staged_files}",
669
679
  " lint:",
670
680
  " glob: '*.{ts,tsx}'",
671
- ` run: ${exec(answers.runtime)} oxlint --config .oxlintrc.json {staged_files}`,
681
+ " run: node_modules/.bin/oxlint --config .oxlintrc.json {staged_files}",
672
682
  ""
673
683
  ].join("\n"),
674
684
  "turbo.json": json({
@@ -3,7 +3,7 @@ import {
3
3
  parseAnswers,
4
4
  wantsInstall,
5
5
  writeScaffold
6
- } from "./chunk-EYLIDXZ4.js";
6
+ } from "./chunk-3FX4T27X.js";
7
7
 
8
8
  // src/create-geonosis-cli.ts
9
9
  var USAGE = `create-geonosis <dir> --runtime pnpm|bun --backend medusa|sagaflow-cf|none --ui tiered-shadcn|atoms-only|none
@@ -25,8 +25,20 @@ default borrowed from another repo would be that repo's stack hardcoded into thi
25
25
 
26
26
  Exit: 0 written \xB7 1 refused (a directory with something in it, an answer that is not one) \xB7 2 a run
27
27
  that could not be made at all.`;
28
+ var CONFIG_SHAPE = `create-geonosis reads no configuration file.
29
+
30
+ It WRITES them: geonosis.json, .oxlintrc.json, geonosis.ratchet.json and gate-baseline.json, from
31
+ the answers given on the command line. Every answer is a flag, and there is no default for the three
32
+ that decide the shape of the tree \u2014 see create-geonosis --help.
33
+
34
+ For the shape of what it wrote, ask the bin that reads it: geonosis-<tool> --print-config-shape.`;
28
35
  var main = () => {
29
36
  const argv = process.argv.slice(2);
37
+ if (argv.includes("--print-config-shape")) {
38
+ process.stdout.write(`${CONFIG_SHAPE}
39
+ `);
40
+ return 0;
41
+ }
30
42
  if (argv.length === 0 || argv.includes("--help") || argv.includes("-h")) {
31
43
  process.stdout.write(`${USAGE}
32
44
  `);
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  wantsInstall,
14
14
  workspacesOf,
15
15
  writeScaffold
16
- } from "./chunk-EYLIDXZ4.js";
16
+ } from "./chunk-3FX4T27X.js";
17
17
  export {
18
18
  BACKENDS,
19
19
  CORPUS_DIR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-geonosis",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "types": "./dist/index.d.ts",
5
5
  "description": "Scaffold a microcompany repo that passes its own geonosis gates on day one.",
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@geonosis/cli": "1.2.0"
37
+ "@geonosis/cli": "1.3.0"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=22"