create-geonosis 2.5.0 → 2.5.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # create-geonosis
2
2
 
3
+ ## 2.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ca64972]
8
+ - @geonosis/cli@2.5.2
9
+
10
+ ## 2.5.1
11
+
12
+ ### Patch Changes
13
+
14
+ - 7f24da6: The document domain's scaffold entry composes `documentStore` inside the tenant session instead of
15
+ handing back the bare `documentEntities` registry — the field the generated `Scope` type carries is
16
+ now `DocumentStore<typeof DOCUMENT_ENTITIES.entities, 'tenantId'>`, built from `definitions.session`
17
+ the same way every other store is.
18
+ - Updated dependencies [7f24da6]
19
+ - Updated dependencies [7f24da6]
20
+ - Updated dependencies [7f24da6]
21
+ - Updated dependencies [7f24da6]
22
+ - Updated dependencies [7f24da6]
23
+ - @geonosis/cli@2.5.1
24
+
3
25
  ## 2.5.0
4
26
 
5
27
  ### Patch Changes
@@ -9,11 +9,19 @@ import { dirname, join } from 'node:path'
9
9
  import { fileURLToPath } from 'node:url'
10
10
 
11
11
  const here = dirname(fileURLToPath(import.meta.url))
12
- const newest = (dir) =>
12
+ // tsup never reads a test file, so one counting as source made every bin refuse a build that had
13
+ // not gone stale (#399).
14
+ const NOT_SOURCE = (name) =>
15
+ name.endsWith('.test.ts') ||
16
+ name.endsWith('.test.tsx') ||
17
+ name === '__tests__' ||
18
+ name === '__fixtures__'
19
+ const newest = (dir, skip) =>
13
20
  existsSync(dir)
14
21
  ? readdirSync(dir, { withFileTypes: true }).reduce((most, entry) => {
22
+ if (skip !== undefined && skip(entry.name)) return most
15
23
  const at = join(dir, entry.name)
16
- return Math.max(most, entry.isDirectory() ? newest(at) : statSync(at).mtimeMs)
24
+ return Math.max(most, entry.isDirectory() ? newest(at, skip) : statSync(at).mtimeMs)
17
25
  }, 0)
18
26
  : 0
19
27
  const src = join(here, '..', 'src')
@@ -30,7 +38,7 @@ if (existsSync(src)) {
30
38
  )
31
39
  process.exit(2)
32
40
  }
33
- if (newest(src) > built) {
41
+ if (newest(src, NOT_SOURCE) > built) {
34
42
  process.stderr.write(
35
43
  'create-geonosis: dist is older than src — run pnpm build before trusting this bin.\n',
36
44
  )
@@ -24,25 +24,29 @@ var SEARCH = {
24
24
  "import { pgFtsSearchIndex, type SearchIndex, type SearchProjections } from '@geonosis/search'"
25
25
  ],
26
26
  name: "@geonosis/search",
27
- version: "0.3.6"
27
+ version: "0.3.8"
28
28
  };
29
29
  var DOCUMENT = {
30
30
  at: "domains/document",
31
- built: [" document: DOCUMENT_ENTITIES,"],
31
+ built: [
32
+ " document: documentStore({ registry: DOCUMENT_ENTITIES, seam: definitions.session }),"
33
+ ],
32
34
  declarations: [
33
35
  "/** Every `Document.extend` this repo declares, by the name its rows carry \u2014 grow this map. */",
34
36
  "const DOCUMENT_ENTITIES = documentEntities({})"
35
37
  ],
36
38
  field: "document",
37
- fieldType: "ReturnType<typeof documentEntities>",
38
- imports: ["import { documentEntities } from '@geonosis/document'"],
39
+ fieldType: "DocumentStore<typeof DOCUMENT_ENTITIES.entities, 'tenantId'>",
40
+ imports: [
41
+ "import { documentEntities, documentStore, type DocumentStore } from '@geonosis/document'"
42
+ ],
39
43
  name: "@geonosis/document",
40
- version: "0.1.1"
44
+ version: "0.3.0"
41
45
  };
42
46
  var DOMAINS = [SEARCH, DOCUMENT];
43
47
  var DOMAIN_NAMES = DOMAINS.map((one) => one.field);
44
48
  var FOUNDATIONS = [
45
- { at: "foundations/db", name: "@geonosis/db", version: "0.7.0" },
49
+ { at: "foundations/db", name: "@geonosis/db", version: "0.9.0" },
46
50
  { at: "foundations/events", name: "@geonosis/events", version: "2.1.0" }
47
51
  ];
48
52
  var domainsNamed = (named) => named.map((one) => {
@@ -421,7 +425,7 @@ var workspacesOf = (answers) => {
421
425
 
422
426
  // src/files.ts
423
427
  import { countersFor, LAW_SOURCE, rulesFor, tiersFor } from "@geonosis/cli";
424
- var VERSION = "2.5.0";
428
+ var VERSION = "2.5.2";
425
429
  var SCHEMA = "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json";
426
430
  var CATALOG = {
427
431
  "@types/node": "^24.3.0",
@@ -1013,6 +1017,7 @@ var write = (dir, file, body) => {
1013
1017
  mkdirSync(dirname(path), { recursive: true });
1014
1018
  writeFileSync(path, body);
1015
1019
  };
1020
+ var readJson = (path) => JSON.parse(readFileSync2(path, "utf8"));
1016
1021
  var writeScaffold = (answers) => {
1017
1022
  if (existsSync2(answers.dir) && readdirSync(answers.dir).length > 0) {
1018
1023
  throw new Error(`${answers.dir} is not empty \u2014 nothing was written`);
@@ -1031,13 +1036,15 @@ var run = (what, dir, command, args) => {
1031
1036
  };
1032
1037
  };
1033
1038
  var binsOf = (dir) => {
1034
- const manifest = JSON.parse(readFileSync2(join2(dir, "package.json"), "utf8"));
1039
+ const manifest = readJson(
1040
+ join2(dir, "package.json")
1041
+ );
1035
1042
  if (typeof manifest.bin === "string") return [[manifest.name ?? "", manifest.bin]];
1036
1043
  return Object.entries(manifest.bin ?? {});
1037
1044
  };
1038
1045
  var repoint = (path, at, owed) => {
1039
1046
  if (!existsSync2(path)) return [];
1040
- const manifest = JSON.parse(readFileSync2(path, "utf8"));
1047
+ const manifest = readJson(path);
1041
1048
  const moved = [];
1042
1049
  for (const block of ["dependencies", "devDependencies"]) {
1043
1050
  const declared = manifest[block];
@@ -1068,14 +1075,14 @@ var linkKit = (answers, kit) => {
1068
1075
  const linked = [];
1069
1076
  const at = /* @__PURE__ */ new Map();
1070
1077
  const manifestPath = join2(answers.dir, "package.json");
1071
- const manifest = JSON.parse(readFileSync2(manifestPath, "utf8"));
1078
+ const manifest = readJson(manifestPath);
1072
1079
  for (const relative of [
1073
1080
  ...KIT_PACKAGES.map((name) => `packages/${name}`),
1074
1081
  ...floorDirectories(answers.domains)
1075
1082
  ]) {
1076
1083
  const from = join2(kit, relative);
1077
1084
  if (!existsSync2(from)) continue;
1078
- const declared = JSON.parse(readFileSync2(join2(from, "package.json"), "utf8"));
1085
+ const declared = readJson(join2(from, "package.json"));
1079
1086
  if (declared.name === void 0) continue;
1080
1087
  const to = join2(scope, declared.name.replace("@geonosis/", ""));
1081
1088
  if (!existsSync2(to)) spawnSync("ln", ["-s", from, to]);
@@ -11,7 +11,7 @@ import {
11
11
  parseArgs,
12
12
  wantsInstall,
13
13
  writeScaffold
14
- } from "./chunk-PXBQAET5.js";
14
+ } from "./chunk-YHQOM36G.js";
15
15
 
16
16
  // src/create-geonosis-cli.ts
17
17
  import { existsSync as existsSync2 } from "fs";
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  wantsInstall,
24
24
  workspacesOf,
25
25
  writeScaffold
26
- } from "./chunk-PXBQAET5.js";
26
+ } from "./chunk-YHQOM36G.js";
27
27
  export {
28
28
  BACKENDS,
29
29
  CORPUS_DIR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-geonosis",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
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": [
@@ -35,7 +35,7 @@
35
35
  "dist"
36
36
  ],
37
37
  "dependencies": {
38
- "@geonosis/cli": "2.5.0"
38
+ "@geonosis/cli": "2.5.2"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=22"