create-astrale-domain 0.3.0-beta.17 → 0.3.0-beta.170
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 +54 -3
- package/dist/index.js +347 -129
- package/package.json +14 -9
- package/template/.env.example +9 -8
- package/template/.gitignore.template +8 -2
- package/template/.variants/custom/README.md +20 -10
- package/template/.variants/custom/__tests__/variant.test.ts +4 -4
- package/template/.variants/custom/domain.ts +23 -0
- package/template/.variants/custom/{views/app → frontend}/index.html +1 -0
- package/template/.variants/custom/frontend/main.ts +3 -0
- package/template/.variants/custom/frontend/package.json +11 -0
- package/template/.variants/custom/frontend/public/favicon.svg +4 -0
- package/template/.variants/custom/frontend/tsconfig.json +17 -0
- package/template/.variants/custom/schema/{application/index.ts → schema.ts} +2 -1
- package/template/.variants/custom/ui/application/__tests__/application.test.ts +9 -0
- package/template/.variants/custom/ui/application/index.ts +11 -0
- package/template/.variants/custom/views/application/__tests__/application.view.test.ts +15 -0
- package/template/.variants/custom/views/application/application.view.ts +7 -0
- package/template/.variants/custom/views/application/index.ts +1 -0
- package/template/.variants/custom/views/index.ts +1 -1
- package/template/.variants/custom/vite.config.ts +11 -2
- package/template/.variants/none/README.md +13 -4
- package/template/.variants/none/__tests__/variant.test.ts +3 -3
- package/template/.variants/none/domain.ts +13 -0
- package/template/.variants/none/schema/schema.ts +6 -0
- package/template/.variants/react/README.md +20 -10
- package/template/.variants/react/__tests__/variant.test.ts +4 -4
- package/template/.variants/react/domain.ts +23 -0
- package/template/.variants/react/frontend/index.html +1 -0
- package/template/.variants/react/frontend/package.json +7 -1
- package/template/.variants/react/frontend/public/favicon.svg +4 -0
- package/template/.variants/react/frontend/src/styles.css +1 -1
- package/template/.variants/react/frontend/tsconfig.json +19 -0
- package/template/.variants/react/schema/{application/index.ts → schema.ts} +2 -1
- package/template/.variants/react/vite.config.ts +2 -3
- package/template/CLAUDE.md +38 -3
- package/template/index.ts +1 -1
- package/template/package.json +13 -27
- package/template/pnpm-workspace.yaml +9 -21
- package/template/runtime.ts +1 -2
- package/template/schema/__tests__/schema.test.ts +14 -0
- package/template/schema/index.ts +1 -1
- package/template/tests/datasets/demo.ts +21 -0
- package/template/tests/e2e/domain.test.ts +9 -0
- package/template/tsconfig.json +8 -14
- package/template/.variants/custom/application.ts +0 -9
- package/template/.variants/custom/views/app/main.ts +0 -10
- package/template/.variants/custom/views/application/__tests__/routes.test.ts +0 -7
- package/template/.variants/custom/views/application/routes.ts +0 -12
- package/template/.variants/none/application.ts +0 -8
- package/template/.variants/none/schema/application/index.ts +0 -5
- package/template/.variants/react/application.ts +0 -9
- package/template/.variants/react/views/application/__tests__/routes.test.ts +0 -7
- package/template/.variants/react/views/application/routes.ts +0 -12
- package/template/.variants/react/views/index.ts +0 -1
- package/template/schema/application/__tests__/schema.test.ts +0 -11
- package/template/tests/e2e/application.test.ts +0 -10
- package/template/tsconfig.package.json +0 -29
package/README.md
CHANGED
|
@@ -11,12 +11,63 @@ npx -y create-astrale-domain@beta my-domain --yes
|
|
|
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
|
+
Every generated Environment is canonical: each `astrale-domain deploy <environment>` makes one
|
|
15
|
+
immutable deployment of the release, at its own URL, with a signing key generated for it, or reuses
|
|
16
|
+
the deployment of the same release, whose changed secrets are then rewritten in place on that
|
|
17
|
+
deployment only. A generated project names no instance, keeps no signing key file
|
|
18
|
+
(`.astrale/identity.json`), and has no watch script: each change is deployed.
|
|
19
|
+
|
|
20
|
+
- Managed generation (the default `astrale` adapter) deploys on Admin's Services. It writes
|
|
21
|
+
`development` and `production`, both using the authenticated Astrale CLI identity. There is no
|
|
22
|
+
organisation placeholder to configure before deploying.
|
|
23
|
+
- Cloudflare generation (`--adapter cloudflare`) deploys into the platform's dispatch namespace,
|
|
24
|
+
where only the platform deploys (Shell, Services and the other platform Domains). It writes
|
|
25
|
+
`development` and `production` in namespace mode; replace the generated namespace placeholders
|
|
26
|
+
with the platform's namespace name and routing domain. A deploy on the placeholders is refused
|
|
27
|
+
before anything is uploaded. Every other Domain uses the default `astrale` adapter.
|
|
28
|
+
|
|
29
|
+
No active instance, local Worker, Vite server, or tunnel is part of the standard Domain-author
|
|
30
|
+
journey. A deploy never installs: install the URL it prints with
|
|
31
|
+
`astrale domain install <url> --direct -i <instance>`. `--instance` was removed: which instance runs
|
|
32
|
+
a deployment is chosen when its URL is installed.
|
|
33
|
+
|
|
14
34
|
Generated projects have one package journey:
|
|
15
35
|
|
|
16
36
|
```bash
|
|
17
37
|
pnpm pack
|
|
18
38
|
```
|
|
19
39
|
|
|
20
|
-
The existing `astrale-domain package` command compiles the public Schema
|
|
21
|
-
|
|
22
|
-
|
|
40
|
+
The existing `astrale-domain package` command compiles only the public Schema contract, normalizes
|
|
41
|
+
emitted declarations to semantic SDK facades, and verifies the package boundary. Runtime, handlers,
|
|
42
|
+
Providers, frontend code, and deployment adapters remain implementation inputs and are not part of
|
|
43
|
+
the published Domain contract package.
|
|
44
|
+
|
|
45
|
+
## Versions
|
|
46
|
+
|
|
47
|
+
The version lives in the generated `package.json` and follows standard SemVer. A new Domain starts
|
|
48
|
+
at the pre-release `0.1.0-alpha.0`: it has no stable version yet, so there is nothing for its first
|
|
49
|
+
versions to stay compatible with. In `0.x`, a breaking change raises the minor (`^0.1` does not
|
|
50
|
+
accept `0.2`) and a feature or fix raises the patch. Advance or leave the pre-release with the usual
|
|
51
|
+
tools:
|
|
52
|
+
|
|
53
|
+
- npm: `npm version prerelease --preid alpha` gives `0.1.0-alpha.1`; `npm version minor` (or
|
|
54
|
+
`patch`) leaves alpha at `0.1.0`.
|
|
55
|
+
- Release Please: set `"versioning": "prerelease"`, `"prerelease": true`,
|
|
56
|
+
`"prerelease-type": "alpha"`, `"bump-minor-pre-major": true`, and
|
|
57
|
+
`"bump-patch-for-minor-pre-major": true` in `release-please-config.json`, plus
|
|
58
|
+
`"initial-version": "0.1.0-alpha.0"` while `.release-please-manifest.json` has no version for the
|
|
59
|
+
package (otherwise its first version is `1.0.0`). The two `bump-*-pre-major` flags apply the `0.x`
|
|
60
|
+
rule above, as in the SDK's own configuration. Each release PR then proposes the next pre-release
|
|
61
|
+
number (`0.1.0-alpha.1`, `0.1.0-alpha.2`, ...), whether its commits are fixes, features, or
|
|
62
|
+
breaking changes. To leave alpha, remove `"prerelease": true` and keep the other settings: the next
|
|
63
|
+
version is `0.1.0`, even with a breaking change pending. After that, a fix or a feature gives `0.1.1` and
|
|
64
|
+
a breaking change gives `0.2.0`.
|
|
65
|
+
|
|
66
|
+
Keep both `bump-*-pre-major` flags: without them, a breaking change moves the project to
|
|
67
|
+
`1.0.0-alpha.0` while in alpha, or to `1.0.0` when it leaves alpha or later. Do not leave Release
|
|
68
|
+
Please on its default versioning while the version is a pre-release either: it bumps the numbers and
|
|
69
|
+
copies the suffix unchanged (with the flags above, `0.1.0-alpha.0` becomes `0.1.1-alpha.0` after a
|
|
70
|
+
fix or feature), so the project never leaves alpha.
|
|
71
|
+
|
|
72
|
+
npm refuses to publish a pre-release without a dist-tag: pass one explicitly, for example
|
|
73
|
+
`npm publish --tag alpha`.
|