create-astrale-domain 0.3.0-beta.39 → 0.3.0-beta.40

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/README.md CHANGED
@@ -17,6 +17,7 @@ Generated projects have one package journey:
17
17
  pnpm pack
18
18
  ```
19
19
 
20
- The existing `astrale-domain package` command compiles the public Schema and independently loadable
21
- Runtime, normalizes emitted declarations to semantic SDK facades, and verifies the archive boundary.
22
- Deployment adapters remain development dependencies and are not part of the published Domain runtime.
20
+ The existing `astrale-domain package` command compiles only the public Schema contract, normalizes
21
+ emitted declarations to semantic SDK facades, and verifies the package boundary. Runtime, handlers,
22
+ Providers, frontend code, and deployment adapters remain implementation inputs and are not part of
23
+ the published Domain contract package.
package/dist/index.js CHANGED
@@ -930,7 +930,6 @@ async function writeProject(opts) {
930
930
  await materializeAdapter(opts);
931
931
  await stampOrigin(opts.dir, opts.origin);
932
932
  await rewritePackageJson(opts.dir, opts.name, opts.link);
933
- if (opts.link) await writeLinkedZodOverride(opts.dir);
934
933
  await signingIdentity({
935
934
  projectDir: opts.dir,
936
935
  origin: opts.origin,
@@ -965,7 +964,7 @@ async function materializeFrontend(opts, template) {
965
964
  pkg.devDependencies ??= {};
966
965
  pkg.scripts ??= {};
967
966
  if (opts.frontend === "react") {
968
- Object.assign(pkg.dependencies, {
967
+ Object.assign(pkg.devDependencies, {
969
968
  "@tanstack/react-router": "1.170.17",
970
969
  react: "^19.2.0",
971
970
  "react-dom": "^19.2.0"
@@ -1041,9 +1040,11 @@ async function rewritePackageJson(dir, name, link) {
1041
1040
  }
1042
1041
  function publishedImports(imports) {
1043
1042
  return Object.fromEntries(
1044
- Object.entries(imports).map(([specifier, target]) => {
1043
+ Object.entries(imports).filter(([specifier]) => specifier === "#schema" || specifier === "#schema/*").map(([specifier, target]) => {
1045
1044
  if (!/^\.\/.*\.ts$/u.test(target)) {
1046
- throw new TypeError(`Package import ${specifier} must target one project TypeScript file.`);
1045
+ throw new TypeError(
1046
+ `Package import ${specifier} must target one project TypeScript file.`
1047
+ );
1047
1048
  }
1048
1049
  return [specifier, `./dist/${target.slice(2, -3)}.js`];
1049
1050
  })
@@ -1065,30 +1066,6 @@ function rewriteAstraleDeps(pkg, link) {
1065
1066
  }
1066
1067
  return changed;
1067
1068
  }
1068
- async function writeLinkedZodOverride(dir) {
1069
- const workspace = join(dir, "pnpm-workspace.yaml");
1070
- if (!existsSync(workspace)) return;
1071
- const start = "# create-astrale-domain: linked overrides";
1072
- const end = "# /create-astrale-domain";
1073
- const block = `
1074
- ${start}
1075
- overrides:
1076
- zod: ${sdkZodVersion()}
1077
- ${end}
1078
- `;
1079
- const text = await readFile(workspace, "utf-8");
1080
- const pattern = new RegExp(`\\n?${escapeRegExp(start)}[\\s\\S]*?${escapeRegExp(end)}\\n?`);
1081
- await writeFile(workspace, text.replace(pattern, "\n").trimEnd() + block);
1082
- }
1083
- function escapeRegExp(value) {
1084
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1085
- }
1086
- function sdkZodVersion() {
1087
- if (SDK_ROOT === void 0) throw new Error("Local SDK checkout is unavailable.");
1088
- const sdkRequire = createRequire(join(SDK_ROOT, "package.json"));
1089
- const pkg = sdkRequire("zod/package.json");
1090
- return pkg.version;
1091
- }
1092
1069
  async function replaceInFile(path, from, to) {
1093
1070
  if (!existsSync(path)) return;
1094
1071
  const text = await readFile(path, "utf-8");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-astrale-domain",
3
- "version": "0.3.0-beta.39",
3
+ "version": "0.3.0-beta.40",
4
4
  "description": "Scaffold a standalone Astrale domain — npm create astrale-domain",
5
5
  "keywords": [
6
6
  "astrale",
@@ -28,8 +28,8 @@
28
28
  "type": "module",
29
29
  "dependencies": {
30
30
  "@clack/prompts": "^0.11.0",
31
- "@astrale-os/adapter-astrale": "^0.5.0-beta.39",
32
- "@astrale-os/adapter-cloudflare": "^0.5.0-beta.46"
31
+ "@astrale-os/adapter-astrale": "^0.5.0-beta.40",
32
+ "@astrale-os/adapter-cloudflare": "^0.5.0-beta.47"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@astrale-os/ox": ">=0.1.0 <1.0.0",
@@ -39,7 +39,7 @@
39
39
  "oxlint": "1.78.0",
40
40
  "typescript": "7.0.2",
41
41
  "vitest": "^4.1.10",
42
- "@astrale-os/sdk": "^0.5.0-beta.43"
42
+ "@astrale-os/sdk": "^0.5.0-beta.44"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=22"
@@ -16,8 +16,9 @@ their exact composition responsibilities.
16
16
  Actions perform one semantic asynchronous operation; Workflows name every explicit multi-step operation.
17
17
 
18
18
  `pnpm pack` runs the single `astrale-domain package` journey. The published package exposes its
19
- Schema at the package root and its independently loadable Runtime at `./runtime`; deployment adapters
20
- remain development-only. Do not add a parallel build or declaration-rewrite script.
19
+ Schema contract at the package root. Runtime, handlers, Providers, frontend code, and deployment
20
+ adapters remain implementation inputs and are not published. Do not add a parallel build or
21
+ declaration-rewrite script.
21
22
 
22
23
  Domain projects do not contain `.spec` directories. Do not add one: public SDK types, package
23
24
  facades, the Domain knowledge rules, and executable tests are the contract guardrails. Import Core
@@ -44,10 +44,6 @@
44
44
  "types": "./schema/index.ts",
45
45
  "import": "./schema/index.ts"
46
46
  },
47
- "./runtime": {
48
- "types": "./runtime.ts",
49
- "import": "./runtime.ts"
50
- },
51
47
  "./package.json": "./package.json"
52
48
  },
53
49
  "publishConfig": {
@@ -58,10 +54,6 @@
58
54
  "types": "./dist/schema/index.d.ts",
59
55
  "import": "./dist/schema/index.js"
60
56
  },
61
- "./runtime": {
62
- "types": "./dist/runtime.d.ts",
63
- "import": "./dist/runtime.js"
64
- },
65
57
  "./package.json": "./package.json"
66
58
  },
67
59
  "access": "public"
@@ -78,8 +70,7 @@
78
70
  "test": "vitest run --config vitest.config.ts"
79
71
  },
80
72
  "dependencies": {
81
- "@astrale-os/sdk": ">=0.5.0-beta.16 <1.0.0",
82
- "zod": "^4.4.3"
73
+ "@astrale-os/sdk": ">=0.5.0-beta.16 <1.0.0"
83
74
  },
84
75
  "devDependencies": {
85
76
  "@astrale-os/ox": ">=0.1.3 <1.0.0",
@@ -1,29 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "rootDir": ".",
5
- "outDir": "./dist",
6
- "noEmit": false,
7
- "declaration": true,
8
- "declarationMap": false,
9
- "sourceMap": false,
10
- "allowImportingTsExtensions": false,
11
- "types": ["node"],
12
- "jsx": "react-jsx"
13
- },
14
- "include": [
15
- "schema",
16
- "states",
17
- "rules",
18
- "queries",
19
- "mutations",
20
- "workflows",
21
- "migrations",
22
- "actions",
23
- "integrations",
24
- "providers",
25
- "utils",
26
- "runtime.ts"
27
- ],
28
- "exclude": ["**/__tests__/**", "tests", "node_modules", "dist", ".dist", ".wrangler"]
29
- }