create-geonosis 1.0.0 → 1.2.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,4 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  // Committed, so `pnpm install` can link the bin on a fresh clone — before `pnpm build` has
3
3
  // produced dist/. A bin that only exists after a build is a bin that is missing when you need it.
4
- import '../dist/create-geonosis-cli.js'
4
+ //
5
+ // In the repo, `src/` sits beside `dist/`, and a dist older than src answered for a fix it did not
6
+ // carry once (#62). The published package ships no src, so there the check is skipped.
7
+ import { existsSync, readdirSync, statSync } from 'node:fs'
8
+ import { dirname, join } from 'node:path'
9
+ import { fileURLToPath } from 'node:url'
10
+
11
+ const here = dirname(fileURLToPath(import.meta.url))
12
+ const newest = (dir) =>
13
+ existsSync(dir)
14
+ ? readdirSync(dir, { withFileTypes: true }).reduce((most, entry) => {
15
+ const at = join(dir, entry.name)
16
+ return Math.max(most, entry.isDirectory() ? newest(at) : statSync(at).mtimeMs)
17
+ }, 0)
18
+ : 0
19
+ const src = join(here, '..', 'src')
20
+ if (existsSync(src) && newest(src) > newest(join(here, '..', 'dist'))) {
21
+ process.stderr.write(
22
+ 'create-geonosis: dist is older than src — run pnpm build before trusting this bin.\n',
23
+ )
24
+ process.exit(2)
25
+ }
26
+
27
+ await import('../dist/create-geonosis-cli.js')
@@ -265,7 +265,7 @@ var workspacesOf = (answers) => {
265
265
 
266
266
  // src/files.ts
267
267
  import { countersFor, rulesFor } from "@geonosis/cli";
268
- var VERSION = "1.0.0";
268
+ var VERSION = "1.2.0";
269
269
  var SCHEMA = "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json";
270
270
  var CATALOG = {
271
271
  "@types/node": "^24.3.0",
@@ -3,7 +3,7 @@ import {
3
3
  parseAnswers,
4
4
  wantsInstall,
5
5
  writeScaffold
6
- } from "./chunk-UWL7ARNA.js";
6
+ } from "./chunk-EYLIDXZ4.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
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  wantsInstall,
14
14
  workspacesOf,
15
15
  writeScaffold
16
- } from "./chunk-UWL7ARNA.js";
16
+ } from "./chunk-EYLIDXZ4.js";
17
17
  export {
18
18
  BACKENDS,
19
19
  CORPUS_DIR,
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "create-geonosis",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
+ "types": "./dist/index.d.ts",
4
5
  "description": "Scaffold a microcompany repo that passes its own geonosis gates on day one.",
5
6
  "keywords": [
6
7
  "scaffold",
@@ -23,14 +24,17 @@
23
24
  "create-geonosis": "bin/create-geonosis.mjs"
24
25
  },
25
26
  "exports": {
26
- ".": "./dist/index.js"
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "default": "./dist/index.js"
30
+ }
27
31
  },
28
32
  "files": [
29
33
  "bin",
30
34
  "dist"
31
35
  ],
32
36
  "dependencies": {
33
- "@geonosis/cli": "1.0.0"
37
+ "@geonosis/cli": "1.2.0"
34
38
  },
35
39
  "engines": {
36
40
  "node": ">=22"