create-githolon 0.102.4 → 0.103.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.
package/index.mjs CHANGED
@@ -44,7 +44,7 @@ var appDartName = appName.replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") ||
44
44
  var appClassNameRaw = appName.split(/[^A-Za-z0-9]+/).filter(Boolean).map((part) => part[0].toUpperCase() + part.slice(1)).join("") || "NomosApp";
45
45
  var appClassName = /^[A-Za-z_]/.test(appClassNameRaw) ? appClassNameRaw : `App${appClassNameRaw}`;
46
46
  var subst = (s) => s.replaceAll("__APP_NAME__", appName).replaceAll("__APP_DART_NAME__", appDartName).replaceAll("__APP_CLASS_NAME__", appClassName).replaceAll("__APP_HASH__", appHash).replaceAll("__NOMOS_VERSION__", NOMOS_VERSION);
47
- for (const f of ["package.json", "README.md", "nomos.package.mjs", "nomos.application.mjs", "CLAUDE.md", "domains/estate.ts"]) {
47
+ for (const f of ["package.json", "README.md", "nomos.project.ts", "nomos.application.ts", "CLAUDE.md", "domains/estate.ts"]) {
48
48
  const p = path.join(targetDir, f);
49
49
  if (existsSync(p)) writeFileSync(p, subst(readFileSync(p, "utf8")), "utf8");
50
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-githolon",
3
- "version": "0.102.4",
3
+ "version": "0.103.0",
4
4
  "type": "module",
5
5
  "description": "Scaffold a Nomos domain package: the starter domain + compile config + live e2e. `npm create githolon my-app`.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -66,8 +66,8 @@ the business world back.
66
66
  Useful files:
67
67
 
68
68
  - [`domains/estate.ts`](domains/estate.ts): nouns, private consequences, and public language;
69
- - [`nomos.package.mjs`](nomos.package.mjs): business-law authoring input; it emits a published USD package asset;
70
- - [`nomos.application.mjs`](nomos.application.mjs): application-composition authoring input; only the emitted `.application.usda` travels;
69
+ - [`nomos.project.ts`](nomos.project.ts): typed business-law authoring input; it emits the readable USDA law closure and its `.law.usdz` package;
70
+ - [`nomos.application.ts`](nomos.application.ts): application-composition authoring input; only the emitted `.application.usda` travels;
71
71
  - `build/application/__APP_DART_NAME___application/`: the sole Flutter application dependency;
72
72
  - `build/__APP_NAME__.proof.mts`: the generated local proof.
73
73
 
@@ -1,5 +1,8 @@
1
- // The package is just the business language Nomos should compile.
2
- export default {
1
+ // The package is both the business language Nomos should compile and the typed contract another
2
+ // law package may import when it depends on one of these domains.
3
+ import { definePackage } from "@githolon/dsl";
4
+
5
+ export default definePackage({
3
6
  name: "__APP_NAME__",
4
7
  rootPart: { name: "__APP_CLASS_NAME__Business", kind: "component" },
5
8
  domains: [{ key: "estate", modules: ["./domains/estate.ts"] }],
@@ -12,4 +15,4 @@ export default {
12
15
  test: "__APP_DART_NAME___scenarios",
13
16
  },
14
17
  },
15
- };
18
+ });
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "description": "A Nomos business application: public intents over private atomic consequences.",
7
7
  "scripts": {
8
- "compile": "githolon compile ./nomos.package.mjs && githolon compile ./nomos.application.mjs",
8
+ "compile": "githolon compile ./nomos.project.ts && githolon compile ./nomos.application.ts",
9
9
  "proof": "githolon proof",
10
10
  "typecheck": "tsc --noEmit"
11
11
  },