@drupal-canvas/create 1.7.0 → 1.9.0
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/index.js +14 -19
- package/docs/experimental.md +2 -0
- package/package.json +1 -1
- package/templates.json +9 -4
package/dist/index.js
CHANGED
|
@@ -28,7 +28,6 @@ var templates_default = [
|
|
|
28
28
|
{
|
|
29
29
|
id: "nextjs",
|
|
30
30
|
label: "Next.js",
|
|
31
|
-
experimental: true,
|
|
32
31
|
repository: {
|
|
33
32
|
url: "https://github.com/drupal-canvas/headless-templates.git",
|
|
34
33
|
ref: "main",
|
|
@@ -38,7 +37,6 @@ var templates_default = [
|
|
|
38
37
|
{
|
|
39
38
|
id: "astro",
|
|
40
39
|
label: "Astro",
|
|
41
|
-
experimental: true,
|
|
42
40
|
repository: {
|
|
43
41
|
url: "https://github.com/drupal-canvas/headless-templates.git",
|
|
44
42
|
ref: "main",
|
|
@@ -48,7 +46,6 @@ var templates_default = [
|
|
|
48
46
|
{
|
|
49
47
|
id: "nuxt",
|
|
50
48
|
label: "Nuxt",
|
|
51
|
-
experimental: true,
|
|
52
49
|
repository: {
|
|
53
50
|
url: "https://github.com/drupal-canvas/headless-templates.git",
|
|
54
51
|
ref: "main",
|
|
@@ -58,12 +55,20 @@ var templates_default = [
|
|
|
58
55
|
{
|
|
59
56
|
id: "tanstack-start",
|
|
60
57
|
label: "TanStack Start",
|
|
61
|
-
experimental: true,
|
|
62
58
|
repository: {
|
|
63
59
|
url: "https://github.com/drupal-canvas/headless-templates.git",
|
|
64
60
|
ref: "main",
|
|
65
61
|
path: "tanstack-start"
|
|
66
62
|
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "angular",
|
|
66
|
+
label: "Angular",
|
|
67
|
+
repository: {
|
|
68
|
+
url: "https://github.com/drupal-canvas/headless-templates.git",
|
|
69
|
+
ref: "main",
|
|
70
|
+
path: "angular"
|
|
71
|
+
}
|
|
67
72
|
}
|
|
68
73
|
];
|
|
69
74
|
|
|
@@ -773,7 +778,7 @@ function detectPackageManager() {
|
|
|
773
778
|
// package.json
|
|
774
779
|
var package_default = {
|
|
775
780
|
name: "@drupal-canvas/create",
|
|
776
|
-
version: "1.
|
|
781
|
+
version: "1.9.0",
|
|
777
782
|
description: "CLI to scaffold a codebase for working with Drupal Canvas Code Components"};
|
|
778
783
|
|
|
779
784
|
// src/lib/meta-info.ts
|
|
@@ -1161,9 +1166,6 @@ program.name(getName()).description(getDescription()).version(getVersion()).argu
|
|
|
1161
1166
|
).option(
|
|
1162
1167
|
"-a, --agents <agents>",
|
|
1163
1168
|
'comma-separated list of additional agents to support, or "none" to skip compatibility symlinks'
|
|
1164
|
-
).option(
|
|
1165
|
-
"--experimental-headless",
|
|
1166
|
-
"enable experimental headless frontend templates"
|
|
1167
1169
|
).option(
|
|
1168
1170
|
"--site-name <name>",
|
|
1169
1171
|
"use slugified site name as the suggested project name"
|
|
@@ -1180,7 +1182,6 @@ program.name(getName()).description(getDescription()).version(getVersion()).argu
|
|
|
1180
1182
|
const selectedAgents = parseAgentSelection(options.agents);
|
|
1181
1183
|
const predefinedTemplates = templates_default;
|
|
1182
1184
|
assertUniqueTemplateIdentifiers(predefinedTemplates);
|
|
1183
|
-
const availableTemplates = options.experimentalHeadless ? predefinedTemplates : predefinedTemplates.filter((template2) => !template2.experimental);
|
|
1184
1185
|
if (options.template) {
|
|
1185
1186
|
const template2 = resolveTemplate(
|
|
1186
1187
|
predefinedTemplates,
|
|
@@ -1210,7 +1211,7 @@ program.name(getName()).description(getDescription()).version(getVersion()).argu
|
|
|
1210
1211
|
`Template "${options.template}" not found.
|
|
1211
1212
|
|
|
1212
1213
|
Available templates:
|
|
1213
|
-
${
|
|
1214
|
+
${predefinedTemplates.map((availableTemplate) => `- ${availableTemplate.id}`).join("\n")}`
|
|
1214
1215
|
);
|
|
1215
1216
|
process.exit(1);
|
|
1216
1217
|
}
|
|
@@ -1271,18 +1272,12 @@ ${availableTemplates.map((availableTemplate) => `- ${availableTemplate.id}`).joi
|
|
|
1271
1272
|
}
|
|
1272
1273
|
let templateId = options.template;
|
|
1273
1274
|
if (!templateId) {
|
|
1274
|
-
if (
|
|
1275
|
-
templateId =
|
|
1275
|
+
if (!interactive) {
|
|
1276
|
+
templateId = "default";
|
|
1276
1277
|
} else {
|
|
1277
|
-
if (!interactive) {
|
|
1278
|
-
p5.log.error(
|
|
1279
|
-
"Template is required in a non-interactive run. Use --template."
|
|
1280
|
-
);
|
|
1281
|
-
process.exit(1);
|
|
1282
|
-
}
|
|
1283
1278
|
const selected = await p5.select({
|
|
1284
1279
|
message: "Select a template",
|
|
1285
|
-
options:
|
|
1280
|
+
options: predefinedTemplates.map((template2) => ({
|
|
1286
1281
|
value: template2.id,
|
|
1287
1282
|
label: template2.label
|
|
1288
1283
|
}))
|
package/docs/experimental.md
CHANGED
|
@@ -21,6 +21,7 @@ Select a template
|
|
|
21
21
|
Astro
|
|
22
22
|
Nuxt
|
|
23
23
|
TanStack Start
|
|
24
|
+
Angular
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
The available experimental template IDs are:
|
|
@@ -31,6 +32,7 @@ The available experimental template IDs are:
|
|
|
31
32
|
| `astro` | Astro |
|
|
32
33
|
| `nuxt` | Nuxt |
|
|
33
34
|
| `tanstack-start` | TanStack Start |
|
|
35
|
+
| `angular` | Angular |
|
|
34
36
|
|
|
35
37
|
The experimental flag is only needed for interactive discovery. An experimental
|
|
36
38
|
template ID can be provided directly without it:
|
package/package.json
CHANGED
package/templates.json
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
{
|
|
12
12
|
"id": "nextjs",
|
|
13
13
|
"label": "Next.js",
|
|
14
|
-
"experimental": true,
|
|
15
14
|
"repository": {
|
|
16
15
|
"url": "https://github.com/drupal-canvas/headless-templates.git",
|
|
17
16
|
"ref": "main",
|
|
@@ -21,7 +20,6 @@
|
|
|
21
20
|
{
|
|
22
21
|
"id": "astro",
|
|
23
22
|
"label": "Astro",
|
|
24
|
-
"experimental": true,
|
|
25
23
|
"repository": {
|
|
26
24
|
"url": "https://github.com/drupal-canvas/headless-templates.git",
|
|
27
25
|
"ref": "main",
|
|
@@ -31,7 +29,6 @@
|
|
|
31
29
|
{
|
|
32
30
|
"id": "nuxt",
|
|
33
31
|
"label": "Nuxt",
|
|
34
|
-
"experimental": true,
|
|
35
32
|
"repository": {
|
|
36
33
|
"url": "https://github.com/drupal-canvas/headless-templates.git",
|
|
37
34
|
"ref": "main",
|
|
@@ -41,11 +38,19 @@
|
|
|
41
38
|
{
|
|
42
39
|
"id": "tanstack-start",
|
|
43
40
|
"label": "TanStack Start",
|
|
44
|
-
"experimental": true,
|
|
45
41
|
"repository": {
|
|
46
42
|
"url": "https://github.com/drupal-canvas/headless-templates.git",
|
|
47
43
|
"ref": "main",
|
|
48
44
|
"path": "tanstack-start"
|
|
49
45
|
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "angular",
|
|
49
|
+
"label": "Angular",
|
|
50
|
+
"repository": {
|
|
51
|
+
"url": "https://github.com/drupal-canvas/headless-templates.git",
|
|
52
|
+
"ref": "main",
|
|
53
|
+
"path": "angular"
|
|
54
|
+
}
|
|
50
55
|
}
|
|
51
56
|
]
|