@drupal-canvas/create 1.8.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 +5 -20
- package/package.json +1 -1
- package/templates.json +0 -5
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,7 +55,6 @@ 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",
|
|
@@ -68,7 +64,6 @@ var templates_default = [
|
|
|
68
64
|
{
|
|
69
65
|
id: "angular",
|
|
70
66
|
label: "Angular",
|
|
71
|
-
experimental: true,
|
|
72
67
|
repository: {
|
|
73
68
|
url: "https://github.com/drupal-canvas/headless-templates.git",
|
|
74
69
|
ref: "main",
|
|
@@ -783,7 +778,7 @@ function detectPackageManager() {
|
|
|
783
778
|
// package.json
|
|
784
779
|
var package_default = {
|
|
785
780
|
name: "@drupal-canvas/create",
|
|
786
|
-
version: "1.
|
|
781
|
+
version: "1.9.0",
|
|
787
782
|
description: "CLI to scaffold a codebase for working with Drupal Canvas Code Components"};
|
|
788
783
|
|
|
789
784
|
// src/lib/meta-info.ts
|
|
@@ -1171,9 +1166,6 @@ program.name(getName()).description(getDescription()).version(getVersion()).argu
|
|
|
1171
1166
|
).option(
|
|
1172
1167
|
"-a, --agents <agents>",
|
|
1173
1168
|
'comma-separated list of additional agents to support, or "none" to skip compatibility symlinks'
|
|
1174
|
-
).option(
|
|
1175
|
-
"--experimental-headless",
|
|
1176
|
-
"enable experimental headless frontend templates"
|
|
1177
1169
|
).option(
|
|
1178
1170
|
"--site-name <name>",
|
|
1179
1171
|
"use slugified site name as the suggested project name"
|
|
@@ -1190,7 +1182,6 @@ program.name(getName()).description(getDescription()).version(getVersion()).argu
|
|
|
1190
1182
|
const selectedAgents = parseAgentSelection(options.agents);
|
|
1191
1183
|
const predefinedTemplates = templates_default;
|
|
1192
1184
|
assertUniqueTemplateIdentifiers(predefinedTemplates);
|
|
1193
|
-
const availableTemplates = options.experimentalHeadless ? predefinedTemplates : predefinedTemplates.filter((template2) => !template2.experimental);
|
|
1194
1185
|
if (options.template) {
|
|
1195
1186
|
const template2 = resolveTemplate(
|
|
1196
1187
|
predefinedTemplates,
|
|
@@ -1220,7 +1211,7 @@ program.name(getName()).description(getDescription()).version(getVersion()).argu
|
|
|
1220
1211
|
`Template "${options.template}" not found.
|
|
1221
1212
|
|
|
1222
1213
|
Available templates:
|
|
1223
|
-
${
|
|
1214
|
+
${predefinedTemplates.map((availableTemplate) => `- ${availableTemplate.id}`).join("\n")}`
|
|
1224
1215
|
);
|
|
1225
1216
|
process.exit(1);
|
|
1226
1217
|
}
|
|
@@ -1281,18 +1272,12 @@ ${availableTemplates.map((availableTemplate) => `- ${availableTemplate.id}`).joi
|
|
|
1281
1272
|
}
|
|
1282
1273
|
let templateId = options.template;
|
|
1283
1274
|
if (!templateId) {
|
|
1284
|
-
if (
|
|
1285
|
-
templateId =
|
|
1275
|
+
if (!interactive) {
|
|
1276
|
+
templateId = "default";
|
|
1286
1277
|
} else {
|
|
1287
|
-
if (!interactive) {
|
|
1288
|
-
p5.log.error(
|
|
1289
|
-
"Template is required in a non-interactive run. Use --template."
|
|
1290
|
-
);
|
|
1291
|
-
process.exit(1);
|
|
1292
|
-
}
|
|
1293
1278
|
const selected = await p5.select({
|
|
1294
1279
|
message: "Select a template",
|
|
1295
|
-
options:
|
|
1280
|
+
options: predefinedTemplates.map((template2) => ({
|
|
1296
1281
|
value: template2.id,
|
|
1297
1282
|
label: template2.label
|
|
1298
1283
|
}))
|
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,7 +38,6 @@
|
|
|
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",
|
|
@@ -51,7 +47,6 @@
|
|
|
51
47
|
{
|
|
52
48
|
"id": "angular",
|
|
53
49
|
"label": "Angular",
|
|
54
|
-
"experimental": true,
|
|
55
50
|
"repository": {
|
|
56
51
|
"url": "https://github.com/drupal-canvas/headless-templates.git",
|
|
57
52
|
"ref": "main",
|