create-astrale-domain 0.3.0-beta.170 → 0.3.0-beta.172
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 +1 -1
- package/dist/index.js +23 -13
- package/package.json +5 -5
- package/template/.variants/custom/README.md +1 -1
- package/template/.variants/custom/schema/schema.ts +2 -0
- package/template/.variants/none/README.md +1 -1
- package/template/.variants/none/schema/schema.ts +1 -0
- package/template/.variants/react/README.md +1 -1
- package/template/.variants/react/schema/schema.ts +2 -0
- package/template/CLAUDE.md +2 -2
- package/template/package.json +0 -2
- package/template/tsconfig.json +0 -3
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ deployment only. A generated project names no instance, keeps no signing key fil
|
|
|
28
28
|
|
|
29
29
|
No active instance, local Worker, Vite server, or tunnel is part of the standard Domain-author
|
|
30
30
|
journey. A deploy never installs: install the URL it prints with
|
|
31
|
-
`astrale domain install <url>
|
|
31
|
+
`astrale domain install <url> -i <instance>`. `--instance` was removed: which instance runs
|
|
32
32
|
a deployment is chosen when its URL is installed.
|
|
33
33
|
|
|
34
34
|
Generated projects have one package journey:
|
package/dist/index.js
CHANGED
|
@@ -783,7 +783,7 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
|
|
|
783
783
|
import { existsSync as existsSync2 } from "node:fs";
|
|
784
784
|
import { relative as relative2, resolve as resolve2 } from "node:path";
|
|
785
785
|
|
|
786
|
-
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.
|
|
786
|
+
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.48/node_modules/@astrale-os/kernel-dsl/dist/v1/addressing/patterns.js
|
|
787
787
|
var DOMAIN_ORIGIN_PATTERN = /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/u;
|
|
788
788
|
var MEMBER_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9_]*$/u;
|
|
789
789
|
var DEPENDENCY_ALIAS_PATTERN = /^[a-z][A-Za-z0-9]*$/u;
|
|
@@ -809,7 +809,7 @@ var patterns = Object.freeze({
|
|
|
809
809
|
revisionFullMatch: DOMAIN_REVISION_FULL_MATCH
|
|
810
810
|
});
|
|
811
811
|
|
|
812
|
-
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.
|
|
812
|
+
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.48/node_modules/@astrale-os/kernel-dsl/dist/v1/addressing/definition-ref.js
|
|
813
813
|
var DEFINITION_KINDS = /* @__PURE__ */ new Set([
|
|
814
814
|
"class",
|
|
815
815
|
"function",
|
|
@@ -845,7 +845,7 @@ function definitionNameMatches(kind, name) {
|
|
|
845
845
|
return kind === "core" ? CORE_SLUG_PATTERN.test(name) : MEMBER_NAME_PATTERN.test(name);
|
|
846
846
|
}
|
|
847
847
|
|
|
848
|
-
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.
|
|
848
|
+
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.48/node_modules/@astrale-os/kernel-dsl/dist/v1/addressing/key.js
|
|
849
849
|
var DEFINITION_KEY = /^(?:class|function|policy|view)\.([A-Za-z][A-Za-z0-9_]*)$/u;
|
|
850
850
|
var CORE_KEY = /^core\.([a-z][a-z0-9-]{0,99})$/u;
|
|
851
851
|
var MEMBER_KEY = /^class\.([A-Za-z][A-Za-z0-9_]*)\.(property|method)\.([A-Za-z][A-Za-z0-9_]*)$/u;
|
|
@@ -879,7 +879,7 @@ function isCanonicalCoordinate(input) {
|
|
|
879
879
|
return DEFINITION_KEY.test(input) || CORE_KEY.test(input) || MEMBER_KEY.test(input);
|
|
880
880
|
}
|
|
881
881
|
|
|
882
|
-
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.
|
|
882
|
+
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.48/node_modules/@astrale-os/kernel-dsl/dist/v1/addressing/class-key.js
|
|
883
883
|
function ClassKey(input) {
|
|
884
884
|
if (!ClassKey.is(input)) {
|
|
885
885
|
throw new TypeError(`Invalid canonical ClassKey: ${JSON.stringify(input)}.`);
|
|
@@ -914,7 +914,7 @@ function ClassKey(input) {
|
|
|
914
914
|
ClassKey2.ref = ref;
|
|
915
915
|
})(ClassKey || (ClassKey = {}));
|
|
916
916
|
|
|
917
|
-
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.
|
|
917
|
+
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.48/node_modules/@astrale-os/kernel-dsl/dist/v1/addressing/method-key.js
|
|
918
918
|
function MethodKey(input) {
|
|
919
919
|
if (!MethodKey.is(input)) {
|
|
920
920
|
throw new TypeError(`Invalid canonical MethodKey: ${JSON.stringify(input)}.`);
|
|
@@ -955,7 +955,7 @@ function MethodKey(input) {
|
|
|
955
955
|
MethodKey2.address = address;
|
|
956
956
|
})(MethodKey || (MethodKey = {}));
|
|
957
957
|
|
|
958
|
-
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.
|
|
958
|
+
// ../node_modules/.pnpm/@astrale-os+kernel-dsl@0.2.0-beta.48/node_modules/@astrale-os/kernel-dsl/dist/v1/addressing/property-key.js
|
|
959
959
|
function PropertyKey(input) {
|
|
960
960
|
if (!PropertyKey.is(input)) {
|
|
961
961
|
throw new TypeError(`Invalid canonical PropertyKey: ${JSON.stringify(input)}.`);
|
|
@@ -1018,6 +1018,7 @@ var HERE = dirname(fileURLToPath(import.meta.url));
|
|
|
1018
1018
|
var CREATE_PACKAGE_ROOT = owningPackageRoot(HERE, "create-astrale-domain");
|
|
1019
1019
|
var SDK_ROOT = sdkCheckoutRoot(CREATE_PACKAGE_ROOT);
|
|
1020
1020
|
var ORIGIN_PLACEHOLDER = "astrale-domain.example.dev";
|
|
1021
|
+
var NAME_PLACEHOLDER = "name: 'Astrale Domain'";
|
|
1021
1022
|
var LINK_PACKAGES = /* @__PURE__ */ new Set([
|
|
1022
1023
|
"@astrale-os/sdk",
|
|
1023
1024
|
"@astrale-os/adapter-cloudflare",
|
|
@@ -1101,7 +1102,7 @@ function sdkCheckoutRoot(createRoot) {
|
|
|
1101
1102
|
return void 0;
|
|
1102
1103
|
}
|
|
1103
1104
|
}
|
|
1104
|
-
function
|
|
1105
|
+
function installedPackageVersion(pkg) {
|
|
1105
1106
|
const manifestPath = join(packageRoot(pkg), "package.json");
|
|
1106
1107
|
const manifest = JSON.parse(readFileSync(manifestPath, "utf-8"));
|
|
1107
1108
|
if (typeof manifest.version !== "string") {
|
|
@@ -1111,9 +1112,9 @@ function installedPackageRange(pkg) {
|
|
|
1111
1112
|
manifest.version
|
|
1112
1113
|
);
|
|
1113
1114
|
if (!match) {
|
|
1114
|
-
throw new Error(`Could not
|
|
1115
|
+
throw new Error(`Could not read an exact version for ${pkg}@${manifest.version}.`);
|
|
1115
1116
|
}
|
|
1116
|
-
return
|
|
1117
|
+
return manifest.version;
|
|
1117
1118
|
}
|
|
1118
1119
|
function packageManagerScript(manager, script, argument) {
|
|
1119
1120
|
const suffix = argument === void 0 ? "" : ` ${argument}`;
|
|
@@ -1158,6 +1159,7 @@ async function writeProject(opts) {
|
|
|
1158
1159
|
await materializeGitignores(opts.dir, opts.frontend);
|
|
1159
1160
|
await materializeAdapter(opts);
|
|
1160
1161
|
await stampOrigin(opts.dir, opts.origin);
|
|
1162
|
+
await stampName(opts.dir, opts.name);
|
|
1161
1163
|
await rewritePackageJson(
|
|
1162
1164
|
opts.dir,
|
|
1163
1165
|
opts.name,
|
|
@@ -1240,6 +1242,14 @@ function assertSafeToDelete(dir) {
|
|
|
1240
1242
|
async function stampOrigin(dir, origin) {
|
|
1241
1243
|
await replaceInFile(join(dir, "schema", "schema.ts"), ORIGIN_PLACEHOLDER, origin);
|
|
1242
1244
|
}
|
|
1245
|
+
async function stampName(dir, packageName) {
|
|
1246
|
+
const name = packageName.slice(packageName.lastIndexOf("/") + 1);
|
|
1247
|
+
await replaceInFile(
|
|
1248
|
+
join(dir, "schema", "schema.ts"),
|
|
1249
|
+
NAME_PLACEHOLDER,
|
|
1250
|
+
`name: ${JSON.stringify(name)}`
|
|
1251
|
+
);
|
|
1252
|
+
}
|
|
1243
1253
|
async function materializeAdapter(opts) {
|
|
1244
1254
|
const config = join(opts.dir, "astrale.config.ts");
|
|
1245
1255
|
await cp(join(templateDir(ADAPTER_PACKAGES[opts.adapter]), "astrale.config.ts"), config);
|
|
@@ -1249,7 +1259,7 @@ async function addAdapterDependency(dir, adapter) {
|
|
|
1249
1259
|
const path = join(dir, "package.json");
|
|
1250
1260
|
const pkg = JSON.parse(await readFile(path, "utf-8"));
|
|
1251
1261
|
pkg.devDependencies ??= {};
|
|
1252
|
-
pkg.devDependencies[adapter] =
|
|
1262
|
+
pkg.devDependencies[adapter] = installedPackageVersion(adapter);
|
|
1253
1263
|
pkg.devDependencies = Object.fromEntries(
|
|
1254
1264
|
Object.entries(pkg.devDependencies).sort(([a], [b3]) => a.localeCompare(b3))
|
|
1255
1265
|
);
|
|
@@ -1322,7 +1332,7 @@ async function rewritePackageJson(dir, name, link, packageManager, frontend) {
|
|
|
1322
1332
|
if (pkg.dependencies?.["@astrale-os/sdk"] === void 0) {
|
|
1323
1333
|
throw new Error("Template is missing the required @astrale-os/sdk dependency.");
|
|
1324
1334
|
}
|
|
1325
|
-
pkg.dependencies["@astrale-os/sdk"] =
|
|
1335
|
+
pkg.dependencies["@astrale-os/sdk"] = installedPackageVersion("@astrale-os/sdk");
|
|
1326
1336
|
rewriteAstraleDeps(pkg, link, packageManager);
|
|
1327
1337
|
await writeFile(path, JSON.stringify(pkg, null, 2) + "\n");
|
|
1328
1338
|
}
|
|
@@ -1557,13 +1567,13 @@ var DEPLOYMENT_HOSTS = {
|
|
|
1557
1567
|
};
|
|
1558
1568
|
var deploySteps = (pm, adapter) => [
|
|
1559
1569
|
`${packageManagerScript(pm, "deploy", "development")} # immutable deployment on ${DEPLOYMENT_HOSTS[adapter]} \u2192 prints its URL`,
|
|
1560
|
-
"astrale domain install <url>
|
|
1570
|
+
"astrale domain install <url> -i <instance> # install that URL"
|
|
1561
1571
|
];
|
|
1562
1572
|
function detectPm() {
|
|
1563
1573
|
const name = process.env.npm_config_user_agent?.split("/")[0];
|
|
1564
1574
|
return PMS.find((p2) => p2 === name);
|
|
1565
1575
|
}
|
|
1566
|
-
var INSTANCE_REMOVED = "--instance was removed: a scaffolded Environment names no instance. Deploy, then install the URL the deploy prints with `astrale domain install <url>
|
|
1576
|
+
var INSTANCE_REMOVED = "--instance was removed: a scaffolded Environment names no instance. Deploy, then install the URL the deploy prints with `astrale domain install <url> -i <instance>`.";
|
|
1567
1577
|
function parseFlags(argv) {
|
|
1568
1578
|
const flags = { positional: [], force: false, yes: false, help: false };
|
|
1569
1579
|
for (let i = 0; i < argv.length; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-astrale-domain",
|
|
3
|
-
"version": "0.3.0-beta.
|
|
3
|
+
"version": "0.3.0-beta.172",
|
|
4
4
|
"description": "Scaffold a standalone Astrale domain — npm create astrale-domain",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astrale",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@astrale-os/adapter-astrale": "0.5.0-beta.
|
|
34
|
-
"@astrale-os/adapter-cloudflare": "0.5.0-beta.
|
|
33
|
+
"@astrale-os/adapter-astrale": "0.5.0-beta.172",
|
|
34
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.179",
|
|
35
35
|
"@clack/prompts": "^0.11.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@astrale-os/kernel-dsl": "0.2.0-beta.
|
|
38
|
+
"@astrale-os/kernel-dsl": "0.2.0-beta.48",
|
|
39
39
|
"@astrale-os/ox": "0.1.4",
|
|
40
|
-
"@astrale-os/sdk": "0.6.0-beta.
|
|
40
|
+
"@astrale-os/sdk": "0.6.0-beta.24",
|
|
41
41
|
"@types/node": "^22.0.0",
|
|
42
42
|
"esbuild": "^0.28.2",
|
|
43
43
|
"oxfmt": "0.63.0",
|
|
@@ -18,7 +18,7 @@ tests/ cross-layer executable journeys
|
|
|
18
18
|
|
|
19
19
|
Run `pnpm run deploy development` to build, verify, and make one immutable deployment of the
|
|
20
20
|
committed `development` Environment. It starts no local Worker, browser server, or tunnel, and never
|
|
21
|
-
installs: install the URL it prints with `astrale domain install <url>
|
|
21
|
+
installs: install the URL it prints with `astrale domain install <url> -i <instance>`.
|
|
22
22
|
There is no watch loop: deploy each change. Run `pnpm build` to build both Worker and browser assets
|
|
23
23
|
and print their build digest.
|
|
24
24
|
Domain projects intentionally own no `.spec` trees and import authoring contracts only through
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineSchema, KernelSchema, view } from '@astrale-os/sdk/schema'
|
|
2
2
|
|
|
3
3
|
export const schema = defineSchema('astrale-domain.example.dev', {
|
|
4
|
+
name: 'Astrale Domain',
|
|
5
|
+
entrypoint: 'application',
|
|
4
6
|
dependencies: { kernel: KernelSchema },
|
|
5
7
|
classes: {},
|
|
6
8
|
views: {
|
|
@@ -11,7 +11,7 @@ tests/ cross-layer executable journeys
|
|
|
11
11
|
|
|
12
12
|
Run `pnpm run deploy development` to build, verify, and make one immutable deployment of the
|
|
13
13
|
committed `development` Environment. It starts no local Worker or tunnel, and never installs: install
|
|
14
|
-
the URL it prints with `astrale domain install <url>
|
|
14
|
+
the URL it prints with `astrale domain install <url> -i <instance>`. There is no watch loop:
|
|
15
15
|
deploy each change. Run `pnpm build` to qualify its deploy bundle and print its build digest. Add
|
|
16
16
|
`views/` and `ui/` later only when the schema gains declared Views. Domain projects intentionally own
|
|
17
17
|
no `.spec` trees and import authoring contracts only through semantic `@astrale-os/sdk/*` subpaths.
|
|
@@ -17,7 +17,7 @@ tests/ cross-layer executable journeys
|
|
|
17
17
|
|
|
18
18
|
Run `pnpm run deploy development` to build, verify, and make one immutable deployment of the
|
|
19
19
|
committed `development` Environment. It starts no local Worker, Vite server, or tunnel, and never
|
|
20
|
-
installs: install the URL it prints with `astrale domain install <url>
|
|
20
|
+
installs: install the URL it prints with `astrale domain install <url> -i <instance>`.
|
|
21
21
|
There is no watch loop: deploy each change. Run `pnpm build` to qualify Worker and frontend output
|
|
22
22
|
and print their build digest, and `pnpm run deploy production` to deploy the `production`
|
|
23
23
|
Environment through the selected adapter. Add semantic `rules/`, `queries/`, `mutations/`, and
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineSchema, KernelSchema, view } from '@astrale-os/sdk/schema'
|
|
2
2
|
|
|
3
3
|
export const schema = defineSchema('astrale-domain.example.dev', {
|
|
4
|
+
name: 'Astrale Domain',
|
|
5
|
+
entrypoint: 'application',
|
|
4
6
|
dependencies: { kernel: KernelSchema },
|
|
5
7
|
classes: {},
|
|
6
8
|
views: {
|
package/template/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Astrale domain
|
|
2
2
|
|
|
3
3
|
Load the `astrale-domain` skill before changing Schema, Rules, Queries, Mutations, Actions,
|
|
4
|
-
Workflows, Integrations, Providers, Views, UI,
|
|
4
|
+
Workflows, Integrations, Providers, Views, UI, or security. Install it user-level if
|
|
5
5
|
needed:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
@@ -36,7 +36,7 @@ declaration-rewrite script.
|
|
|
36
36
|
deployment of it through the Environment's adapter, with a signing key generated for that
|
|
37
37
|
deployment, and prints its URL. A deploy never installs, reads an active instance, or starts a local
|
|
38
38
|
Worker, Vite server, or tunnel: install the URL it prints with
|
|
39
|
-
`astrale domain install <url>
|
|
39
|
+
`astrale domain install <url> -i <instance>`. There is no watch loop: deploy each change.
|
|
40
40
|
Redeploying the same release reuses its deployment. With the Astrale managed adapter the deployments
|
|
41
41
|
live on Admin's Services and every Environment uses the authenticated Astrale CLI identity;
|
|
42
42
|
with the Cloudflare adapter they live in the platform's dispatch namespace, where only the platform
|
package/template/package.json
CHANGED
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
"#functions/*": "./functions/*/index.ts",
|
|
13
13
|
"#integrations": "./integrations/index.ts",
|
|
14
14
|
"#integrations/*": "./integrations/*/index.ts",
|
|
15
|
-
"#migrations": "./migrations/index.ts",
|
|
16
|
-
"#migrations/*": "./migrations/*/index.ts",
|
|
17
15
|
"#mutations": "./mutations/index.ts",
|
|
18
16
|
"#mutations/*": "./mutations/*/index.ts",
|
|
19
17
|
"#queries": "./queries/index.ts",
|
package/template/tsconfig.json
CHANGED
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
"#functions/*": ["./functions/*/index.ts"],
|
|
12
12
|
"#integrations": ["./integrations/index.ts"],
|
|
13
13
|
"#integrations/*": ["./integrations/*/index.ts"],
|
|
14
|
-
"#migrations": ["./migrations/index.ts"],
|
|
15
|
-
"#migrations/*": ["./migrations/*/index.ts"],
|
|
16
14
|
"#mutations": ["./mutations/index.ts"],
|
|
17
15
|
"#mutations/*": ["./mutations/*/index.ts"],
|
|
18
16
|
"#queries": ["./queries/index.ts"],
|
|
@@ -49,7 +47,6 @@
|
|
|
49
47
|
"routes",
|
|
50
48
|
"mutations",
|
|
51
49
|
"functions",
|
|
52
|
-
"migrations",
|
|
53
50
|
"integrations",
|
|
54
51
|
"providers",
|
|
55
52
|
"frontend",
|