@django-stack/cli 0.12.1 → 0.12.2
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/dist/bin.js +29 -7
- package/package.json +1 -1
- package/templates/backend/pyproject.toml +1 -1
- package/templates/base/AGENTS.md +22 -0
- package/templates/frontend-astro/package.json +1 -1
- package/templates/frontend-next/package.json +3 -3
- package/templates/frontend-nuxt/package.json +2 -2
- package/templates/frontend-sveltekit/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -1029,6 +1029,24 @@ function probeRequest(probe, failureThreshold) {
|
|
|
1029
1029
|
...check
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Which registry a Magic Containers registry is. Bunny returns no type, so
|
|
1034
|
+
* this goes by the host name, and by the display name or a type field when
|
|
1035
|
+
* there is no host name. Public Docker Hub and GitHub are built in.
|
|
1036
|
+
*/
|
|
1037
|
+
function registryKind(item) {
|
|
1038
|
+
const host = (text(item.hostName) ?? text(item.host) ?? text(item.url) ?? "").toLowerCase();
|
|
1039
|
+
const label = `${text(item.type) ?? ""} ${text(item.displayName) ?? ""}`.toLowerCase().replace(/[\s_-]/g, "");
|
|
1040
|
+
if (host) {
|
|
1041
|
+
if (/(^|\.|\/)(docker\.io|docker\.com)(\/|$)/.test(host)) return "dockerHub";
|
|
1042
|
+
if (/(^|\.|\/)ghcr\.io(\/|$)/.test(host)) return "gitHub";
|
|
1043
|
+
if (/(^|\.|\/)bunny\.net(\/|$)/.test(host)) return "bunny";
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
if (label.includes("dockerhub")) return "dockerHub";
|
|
1047
|
+
if (label.includes("github") || label.includes("ghcr")) return "gitHub";
|
|
1048
|
+
if (label.includes("bunny")) return "bunny";
|
|
1049
|
+
}
|
|
1032
1050
|
/** The image fields of a container. */
|
|
1033
1051
|
function imageFields(container, options) {
|
|
1034
1052
|
const { image } = container;
|
|
@@ -1310,25 +1328,29 @@ var BunnyClient = class {
|
|
|
1310
1328
|
const list = listOf(await this.api.mc("GET", "/registries"));
|
|
1311
1329
|
const registries = {};
|
|
1312
1330
|
let namespace;
|
|
1313
|
-
|
|
1314
|
-
|
|
1331
|
+
const listed = [];
|
|
1332
|
+
const ordered = [...list].sort((a, b) => Number(b.isPublic === true) - Number(a.isPublic === true));
|
|
1333
|
+
for (const item of ordered) {
|
|
1315
1334
|
const id = text(item.id);
|
|
1316
1335
|
if (!id) continue;
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1336
|
+
const kind = registryKind(item);
|
|
1337
|
+
listed.push(text(item.displayName) ?? text(item.hostName) ?? id);
|
|
1338
|
+
if (kind === "dockerHub" && !registries.dockerHub) registries.dockerHub = id;
|
|
1339
|
+
else if (kind === "gitHub" && !registries.gitHub) registries.gitHub = id;
|
|
1340
|
+
else if (kind === "bunny" && !registries.bunny) {
|
|
1320
1341
|
registries.bunny = id;
|
|
1321
1342
|
namespace = text(item.namespace ?? item.accountId ?? item.userName ?? item.username);
|
|
1322
1343
|
}
|
|
1323
1344
|
}
|
|
1324
1345
|
return {
|
|
1325
1346
|
registries,
|
|
1326
|
-
namespace
|
|
1347
|
+
namespace,
|
|
1348
|
+
listed
|
|
1327
1349
|
};
|
|
1328
1350
|
}
|
|
1329
1351
|
async ensureRegistries() {
|
|
1330
1352
|
const found = await this.registries();
|
|
1331
|
-
if (!found.registries.dockerHub) throw new Error(
|
|
1353
|
+
if (!found.registries.dockerHub) throw new Error(`Could not find the public Docker Hub registry among the registries Bunny returned (${found.listed.join(", ") || "none"}). Please report this at https://github.com/dwarsbit/django-stack/issues.`);
|
|
1332
1354
|
if (!found.registries.bunny) {
|
|
1333
1355
|
const created = await this.api.mc("POST", "/registries", {
|
|
1334
1356
|
displayName: "Bunny Container Registry",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@django-stack/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "The production-ready batteries included Django stack. Create and manage DjangoStack projects: a Django backend, a frontend, Postgres and Docker Compose in one command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Leon van der Grient",
|
|
@@ -5,7 +5,7 @@ description = "The Django backend of {{project_name}}."
|
|
|
5
5
|
requires-python = ">=3.12"
|
|
6
6
|
dependencies = [
|
|
7
7
|
"Django>=6.1,<6.2",
|
|
8
|
-
"django-stack[server,s3]>=0.12.
|
|
8
|
+
"django-stack[server,s3]>=0.12.2",
|
|
9
9
|
"django-headless[schema]>=1.1.1",
|
|
10
10
|
"django-content-studio[images,huey]>=1.11.0",
|
|
11
11
|
]
|
package/templates/base/AGENTS.md
CHANGED
|
@@ -19,6 +19,28 @@ There is no Node and no frontend service: the pages read the content with
|
|
|
19
19
|
the ORM.
|
|
20
20
|
<!-- @end -->
|
|
21
21
|
|
|
22
|
+
## Skills
|
|
23
|
+
|
|
24
|
+
Django Headless and Django Content Studio each publish an agent skill. Read the skill before you change what it
|
|
25
|
+
covers, and use the options it shows instead of writing your own
|
|
26
|
+
serializers, views or admin code:
|
|
27
|
+
|
|
28
|
+
- Django Headless, for the API (`@expose()`, permissions, filters, the
|
|
29
|
+
TypeScript client):
|
|
30
|
+
https://raw.githubusercontent.com/dwarsbit/django-headless/main/skills/django-headless/SKILL.md
|
|
31
|
+
- Django Content Studio, for the admin (`ModelStudio`, the edit page,
|
|
32
|
+
widgets, the dashboard, the media library):
|
|
33
|
+
https://djangocontentstudio.org/skills/django-content-studio/SKILL.md
|
|
34
|
+
|
|
35
|
+
Their full documentation is available as Markdown at
|
|
36
|
+
https://djangoheadless.org/llms.txt and
|
|
37
|
+
https://djangocontentstudio.org/llms.txt. If a skill is installed in your
|
|
38
|
+
skills folder, such as `.claude/skills/`, it takes the place of the link.
|
|
39
|
+
|
|
40
|
+
The skills follow the latest release; `backend/uv.lock` pins the installed
|
|
41
|
+
one. When a skill shows an option the project does not have, upgrade both
|
|
42
|
+
packages with `npx @django-stack/cli update` instead of working around it.
|
|
43
|
+
|
|
22
44
|
## Layout
|
|
23
45
|
|
|
24
46
|
```
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@django-headless/client": "^1.1.1",
|
|
16
|
-
"@django-stack/next": "^0.12.
|
|
17
|
-
"@django-stack/react": "^0.12.
|
|
18
|
-
"@django-stack/utils": "^0.12.
|
|
16
|
+
"@django-stack/next": "^0.12.2",
|
|
17
|
+
"@django-stack/react": "^0.12.2",
|
|
18
|
+
"@django-stack/utils": "^0.12.2",
|
|
19
19
|
"next": "^16.4.4",
|
|
20
20
|
"react": "^19.3.1",
|
|
21
21
|
"react-dom": "^19.3.1",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@django-headless/client": "^1.1.1",
|
|
18
|
-
"@django-stack/utils": "^0.12.
|
|
19
|
-
"@django-stack/vue": "^0.12.
|
|
18
|
+
"@django-stack/utils": "^0.12.2",
|
|
19
|
+
"@django-stack/vue": "^0.12.2",
|
|
20
20
|
"nuxt": "^4.6.3",
|
|
21
21
|
"nuxt-security": "^2.7.0",
|
|
22
22
|
"vue": "^3.5.44",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@django-headless/client": "^1.1.1",
|
|
22
|
-
"@django-stack/svelte": "^0.12.
|
|
23
|
-
"@django-stack/utils": "^0.12.
|
|
22
|
+
"@django-stack/svelte": "^0.12.2",
|
|
23
|
+
"@django-stack/utils": "^0.12.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@sveltejs/adapter-node": "^6.0.1",
|