create-astrale-domain 0.3.0-beta.16 → 0.3.0-beta.161

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.
Files changed (57) hide show
  1. package/README.md +44 -4
  2. package/dist/index.js +377 -110
  3. package/package.json +14 -9
  4. package/template/.gitignore.template +7 -1
  5. package/template/.variants/custom/README.md +19 -10
  6. package/template/.variants/custom/__tests__/variant.test.ts +4 -4
  7. package/template/.variants/custom/domain.ts +23 -0
  8. package/template/.variants/custom/{views/app → frontend}/index.html +1 -0
  9. package/template/.variants/custom/frontend/main.ts +3 -0
  10. package/template/.variants/custom/frontend/package.json +11 -0
  11. package/template/.variants/custom/frontend/public/favicon.svg +4 -0
  12. package/template/.variants/custom/frontend/tsconfig.json +17 -0
  13. package/template/.variants/custom/schema/{application/index.ts → schema.ts} +2 -1
  14. package/template/.variants/custom/ui/application/__tests__/application.test.ts +9 -0
  15. package/template/.variants/custom/ui/application/index.ts +11 -0
  16. package/template/.variants/custom/views/application/__tests__/application.view.test.ts +15 -0
  17. package/template/.variants/custom/views/application/application.view.ts +7 -0
  18. package/template/.variants/custom/views/application/index.ts +1 -0
  19. package/template/.variants/custom/views/index.ts +1 -1
  20. package/template/.variants/custom/vite.config.ts +11 -2
  21. package/template/.variants/none/README.md +10 -2
  22. package/template/.variants/none/__tests__/variant.test.ts +3 -3
  23. package/template/.variants/none/domain.ts +13 -0
  24. package/template/.variants/none/schema/schema.ts +6 -0
  25. package/template/.variants/react/README.md +18 -10
  26. package/template/.variants/react/__tests__/variant.test.ts +4 -4
  27. package/template/.variants/react/domain.ts +23 -0
  28. package/template/.variants/react/frontend/index.html +1 -0
  29. package/template/.variants/react/frontend/package.json +7 -1
  30. package/template/.variants/react/frontend/public/favicon.svg +4 -0
  31. package/template/.variants/react/frontend/src/styles.css +1 -1
  32. package/template/.variants/react/frontend/tsconfig.json +19 -0
  33. package/template/.variants/react/schema/{application/index.ts → schema.ts} +2 -1
  34. package/template/.variants/react/vite.config.ts +2 -3
  35. package/template/CLAUDE.md +32 -3
  36. package/template/index.ts +1 -1
  37. package/template/package.json +13 -26
  38. package/template/pnpm-workspace.yaml +16 -21
  39. package/template/runtime.ts +1 -2
  40. package/template/schema/__tests__/schema.test.ts +14 -0
  41. package/template/schema/index.ts +1 -1
  42. package/template/tests/datasets/demo.ts +21 -0
  43. package/template/tests/e2e/domain.test.ts +9 -0
  44. package/template/tsconfig.json +8 -14
  45. package/template/.variants/custom/application.ts +0 -9
  46. package/template/.variants/custom/views/app/main.ts +0 -10
  47. package/template/.variants/custom/views/application/__tests__/routes.test.ts +0 -7
  48. package/template/.variants/custom/views/application/routes.ts +0 -12
  49. package/template/.variants/none/application.ts +0 -8
  50. package/template/.variants/none/schema/application/index.ts +0 -5
  51. package/template/.variants/react/application.ts +0 -9
  52. package/template/.variants/react/views/application/__tests__/routes.test.ts +0 -7
  53. package/template/.variants/react/views/application/routes.ts +0 -12
  54. package/template/.variants/react/views/index.ts +0 -1
  55. package/template/schema/application/__tests__/schema.test.ts +0 -11
  56. package/template/tests/e2e/application.test.ts +0 -10
  57. package/template/tsconfig.package.json +0 -29
package/README.md CHANGED
@@ -5,18 +5,58 @@ Official scaffolder for a new Astrale Domain project.
5
5
  During the SDK beta program, generate a project from the beta package set explicitly:
6
6
 
7
7
  ```bash
8
- npx -y create-astrale-domain@beta my-domain --yes
8
+ npx -y create-astrale-domain@beta my-domain --yes --instance development
9
9
  ```
10
10
 
11
11
  The generated project must resolve the SDK and deployment adapters from npm; it must not retain
12
12
  workspace links or repository-only source paths.
13
13
 
14
+ Managed generation requires an explicit Astrale instance and writes one installed `development`
15
+ Environment; authors add staging and production only when their distinct instances exist.
16
+ Cloudflare generation does not accept `--instance` and creates deploy-only development and
17
+ production Environments. In both cases `pnpm dev` watches and deploys `development` remotely; no
18
+ active instance, local Worker, Vite server, or tunnel is part of the standard Domain-author journey.
19
+ An installed frontend Environment still opens its default View through generic Project tooling;
20
+ stopping development closes only that local View session and retains the remote deployment and
21
+ installation.
22
+
14
23
  Generated projects have one package journey:
15
24
 
16
25
  ```bash
17
26
  pnpm pack
18
27
  ```
19
28
 
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.
29
+ The existing `astrale-domain package` command compiles only the public Schema contract, normalizes
30
+ emitted declarations to semantic SDK facades, and verifies the package boundary. Runtime, handlers,
31
+ Providers, frontend code, and deployment adapters remain implementation inputs and are not part of
32
+ the published Domain contract package.
33
+
34
+ ## Versions
35
+
36
+ The version lives in the generated `package.json` and follows standard SemVer. A new Domain starts
37
+ at the pre-release `0.1.0-alpha.0`: it has no stable version yet, so there is nothing for its first
38
+ versions to stay compatible with. In `0.x`, a breaking change raises the minor (`^0.1` does not
39
+ accept `0.2`) and a feature or fix raises the patch. Advance or leave the pre-release with the usual
40
+ tools:
41
+
42
+ - npm: `npm version prerelease --preid alpha` gives `0.1.0-alpha.1`; `npm version minor` (or
43
+ `patch`) leaves alpha at `0.1.0`.
44
+ - Release Please: set `"versioning": "prerelease"`, `"prerelease": true`,
45
+ `"prerelease-type": "alpha"`, `"bump-minor-pre-major": true`, and
46
+ `"bump-patch-for-minor-pre-major": true` in `release-please-config.json`, plus
47
+ `"initial-version": "0.1.0-alpha.0"` while `.release-please-manifest.json` has no version for the
48
+ package (otherwise its first version is `1.0.0`). The two `bump-*-pre-major` flags apply the `0.x`
49
+ rule above, as in the SDK's own configuration. Each release PR then proposes the next pre-release
50
+ number (`0.1.0-alpha.1`, `0.1.0-alpha.2`, ...), whether its commits are fixes, features, or
51
+ breaking changes. To leave alpha, remove `"prerelease": true` and keep the other settings: the next
52
+ version is `0.1.0`, even with a breaking change pending. After that, a fix or a feature gives `0.1.1` and
53
+ a breaking change gives `0.2.0`.
54
+
55
+ Keep both `bump-*-pre-major` flags: without them, a breaking change moves the project to
56
+ `1.0.0-alpha.0` while in alpha, or to `1.0.0` when it leaves alpha or later. Do not leave Release
57
+ Please on its default versioning while the version is a pre-release either: it bumps the numbers and
58
+ copies the suffix unchanged (with the flags above, `0.1.0-alpha.0` becomes `0.1.1-alpha.0` after a
59
+ fix or feature), so the project never leaves alpha.
60
+
61
+ npm refuses to publish a pre-release without a dist-tag: pass one explicitly, for example
62
+ `npm publish --tag alpha`.