@pantoken/scaffold 1.0.1 → 1.2.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/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as scaffoldProject, n as isScaffoldPlatform, o as validateThemeMode, r as resolveScaffoldPlatform, s as validateThemeVariant, t as SCAFFOLD_PLATFORMS } from "./src-DSGZRyeb.mjs";
1
+ import { c as SUPPORTED_LOCALES, d as validateLocaleTag, i as scaffoldProject, l as createLocaleLookup, n as isScaffoldPlatform, o as validateThemeMode, r as resolveScaffoldPlatform, s as validateThemeVariant, t as SCAFFOLD_PLATFORMS, u as detectLocale } from "./src-DxBSPAO9.mjs";
2
2
  import { readFileSync } from "node:fs";
3
3
  import { basename, join } from "node:path";
4
4
  import { CDN_PROVIDERS } from "@pantoken/canvas-theme-editor";
@@ -6,47 +6,7 @@ import { Argument, Command, CommanderError, InvalidArgumentError } from "command
6
6
  import { cancel, isCancel, select, spinner, text } from "@clack/prompts";
7
7
  import tab from "@bomb.sh/tab/commander";
8
8
  import { homedir } from "node:os";
9
- //#region src/locale.ts
10
- /**
11
- * Resolves the active locale: --lang flag \> LC_ALL/LANG env \> Intl \> "en".
12
- *
13
- * @param options - Detection options. `langFlag` is an optional --lang flag value; `env` is
14
- * environment variables (defaults to process.env); `intl` is an optional injected
15
- * Intl.DateTimeFormat locale function (for testing).
16
- * @returns The resolved locale tag
17
- */
18
- function detectLocale(options) {
19
- if (options.langFlag) return options.langFlag;
20
- const env = options.env ?? process.env;
21
- const locale = env.LC_ALL ?? env.LANG ?? "";
22
- if (locale) return locale.split(".")[0].split("_")[0] || "en";
23
- try {
24
- const tag = (options.intl ?? (() => Intl.DateTimeFormat().resolvedOptions().locale))();
25
- if (tag) return tag.split("-")[0] || "en";
26
- } catch {}
27
- return "en";
28
- }
29
- /**
30
- * Builds a lookup over the given locale bundles, falling back to `bundles[fallback]`
31
- * for any key missing in the resolved locale.
32
- *
33
- * @param bundles - Record mapping locale tags to string bundles
34
- * @param resolvedLocale - The locale to use (typically from detectLocale)
35
- * @param fallback - The fallback locale when a key is missing (default "en")
36
- * @returns A LocaleLookup object with a `t` function
37
- */
38
- function createLocaleLookup(bundles, resolvedLocale, fallback = "en") {
39
- const resolved = bundles[resolvedLocale] ?? bundles[fallback] ?? {};
40
- const fallbackBundle = bundles[fallback] ?? {};
41
- return {
42
- locale: resolvedLocale,
43
- t: (key, params) => {
44
- let value = resolved[key] ?? fallbackBundle[key] ?? key;
45
- if (params) for (const [param, val] of Object.entries(params)) value = value.replace(new RegExp(`\\{\\{${param}\\}\\}`, "g"), val);
46
- return value;
47
- }
48
- };
49
- }
9
+ import { execFileSync } from "node:child_process";
50
10
  //#endregion
51
11
  //#region generated/locales/index.ts
52
12
  const MESSAGES = {
@@ -60,6 +20,10 @@ const MESSAGES = {
60
20
  "nextStepsNav": "cd {{dir}}",
61
21
  "nextStepsInstall": "تثبيت التبعيات: {{command}}",
62
22
  "nextStepsDevServer": "شغّل خادم التطوير (إذا كان القالب يحتوي واحدًا)",
23
+ "getStartedHeading": "الخطوات التالية:",
24
+ "installSpinnerStart": "تثبيت التبعيات: {{command}}",
25
+ "installSpinnerStop": "تم تثبيت التبعيات.",
26
+ "installSpinnerFailed": "تثبيت التبعيات: {{command}}",
63
27
  "notesHeading": "ملاحظة:",
64
28
  "caveatsHeading": "تنبيه:",
65
29
  "errorMissingPlatform": "الوسيط المطلوب \"platform\" مفقود. متوقع أحد القيم: {{platforms}}",
@@ -114,6 +78,10 @@ const MESSAGES = {
114
78
  "nextStepsNav": "cd {{dir}}",
115
79
  "nextStepsInstall": "Տեղադրել կախվածությունները՝ {{command}}",
116
80
  "nextStepsDevServer": "Ստարտ վարել dev սերվերը (եթե ձեր տեմպլեյթը ունի մեկը)",
81
+ "getStartedHeading": "Հաջորդ քայլերը:",
82
+ "installSpinnerStart": "Տեղադրել կախվածությունները՝ {{command}}",
83
+ "installSpinnerStop": "Կախվածությունները տեղադրված են.",
84
+ "installSpinnerFailed": "Տեղադրել կախվածությունները՝ {{command}}",
117
85
  "notesHeading": "Նշում:",
118
86
  "caveatsHeading": "Ուշադրություն:",
119
87
  "errorMissingPlatform": "Բացակայում է պարտադիր արգումենտը \"platform\". Ապահովված լիներ այս մեկը՝ {{platforms}}",
@@ -168,6 +136,10 @@ const MESSAGES = {
168
136
  "nextStepsNav": "cd {{dir}}",
169
137
  "nextStepsInstall": "Instal·la les dependències: {{command}}",
170
138
  "nextStepsDevServer": "Inicia el servidor de desenvolupament (si la plantilla en té un)",
139
+ "getStartedHeading": "Passos següents:",
140
+ "installSpinnerStart": "Instal·la les dependències: {{command}}",
141
+ "installSpinnerStop": "Dependències instal·lades.",
142
+ "installSpinnerFailed": "Instal·la les dependències: {{command}}",
171
143
  "notesHeading": "Nota:",
172
144
  "caveatsHeading": "Advertència:",
173
145
  "errorMissingPlatform": "Falta l'argument obligatori \"platform\". S'esperava un de: {{platforms}}",
@@ -222,6 +194,10 @@ const MESSAGES = {
222
194
  "nextStepsNav": "cd {{dir}}",
223
195
  "nextStepsInstall": "Installer afhængigheder: {{command}}",
224
196
  "nextStepsDevServer": "Start dev-serveren (hvis din skabelon har en)",
197
+ "getStartedHeading": "Næste skridt:",
198
+ "installSpinnerStart": "Installer afhængigheder: {{command}}",
199
+ "installSpinnerStop": "Afhængigheder installeret.",
200
+ "installSpinnerFailed": "Installer afhængigheder: {{command}}",
225
201
  "notesHeading": "Bemærk:",
226
202
  "caveatsHeading": "Forbehold:",
227
203
  "errorMissingPlatform": "Mangler krævet argument \"platform\". Forventet en af: {{platforms}}",
@@ -276,6 +252,10 @@ const MESSAGES = {
276
252
  "nextStepsNav": "cd {{dir}}",
277
253
  "nextStepsInstall": "Installeer afhankelijkheden: {{command}}",
278
254
  "nextStepsDevServer": "Start de dev-server (als je template er één heeft)",
255
+ "getStartedHeading": "Volgende stappen:",
256
+ "installSpinnerStart": "Installeer afhankelijkheden: {{command}}",
257
+ "installSpinnerStop": "Afhankelijkheden geïnstalleerd.",
258
+ "installSpinnerFailed": "Installeer afhankelijkheden: {{command}}",
279
259
  "notesHeading": "Opmerking:",
280
260
  "caveatsHeading": "Opmerking / waarschuwing:",
281
261
  "errorMissingPlatform": "Ontbrekend verplicht argument \"platform\". Verwacht één van: {{platforms}}",
@@ -330,6 +310,10 @@ const MESSAGES = {
330
310
  "nextStepsNav": "cd {{dir}}",
331
311
  "nextStepsInstall": "Install dependencies: {{command}}",
332
312
  "nextStepsDevServer": "Start the dev server (if your template has one)",
313
+ "getStartedHeading": "Next steps:",
314
+ "installSpinnerStart": "Install dependencies: {{command}}",
315
+ "installSpinnerStop": "Dependencies installed.",
316
+ "installSpinnerFailed": "Install dependencies: {{command}}",
333
317
  "notesHeading": "Note:",
334
318
  "caveatsHeading": "Caveat:",
335
319
  "errorMissingPlatform": "Missing required argument \"platform\". Expected one of: {{platforms}}",
@@ -384,6 +368,10 @@ const MESSAGES = {
384
368
  "nextStepsNav": "cd {{dir}}",
385
369
  "nextStepsInstall": "Install dependencies: {{command}}",
386
370
  "nextStepsDevServer": "Start the dev server (if your template has one)",
371
+ "getStartedHeading": "Next steps:",
372
+ "installSpinnerStart": "Install dependencies: {{command}}",
373
+ "installSpinnerStop": "Dependencies installed.",
374
+ "installSpinnerFailed": "Install dependencies: {{command}}",
387
375
  "notesHeading": "Note:",
388
376
  "caveatsHeading": "Caveat:",
389
377
  "errorMissingPlatform": "Missing required argument \"platform\". Expected one of: {{platforms}}",
@@ -438,6 +426,10 @@ const MESSAGES = {
438
426
  "nextStepsNav": "cd {{dir}}",
439
427
  "nextStepsInstall": "Install dependencies: {{command}}",
440
428
  "nextStepsDevServer": "Start the dev server (if your template has one)",
429
+ "getStartedHeading": "Next steps:",
430
+ "installSpinnerStart": "Install dependencies: {{command}}",
431
+ "installSpinnerStop": "Dependencies installed.",
432
+ "installSpinnerFailed": "Install dependencies: {{command}}",
441
433
  "notesHeading": "Note:",
442
434
  "caveatsHeading": "Caveat:",
443
435
  "errorMissingPlatform": "Missing required argument \"platform\". Expected one of: {{platforms}}",
@@ -492,6 +484,10 @@ const MESSAGES = {
492
484
  "nextStepsNav": "cd {{dir}}",
493
485
  "nextStepsInstall": "Install dependencies: {{command}}",
494
486
  "nextStepsDevServer": "Start the dev server (if your template has one)",
487
+ "getStartedHeading": "Next steps:",
488
+ "installSpinnerStart": "2. Installing dependencies",
489
+ "installSpinnerStop": "Dependencies installed.",
490
+ "installSpinnerFailed": "2. Installing dependencies",
495
491
  "notesHeading": "Note:",
496
492
  "caveatsHeading": "Caveat:",
497
493
  "errorMissingPlatform": "Missing required argument \"platform\". Expected one of: {{platforms}}",
@@ -546,6 +542,10 @@ const MESSAGES = {
546
542
  "nextStepsNav": "cd {{dir}}",
547
543
  "nextStepsInstall": "Asenna riippuvuudet: {{command}}",
548
544
  "nextStepsDevServer": "Käynnistä kehityspalvelin (jos mallissasi on)",
545
+ "getStartedHeading": "Seuraavat vaiheet:",
546
+ "installSpinnerStart": "Asenna riippuvuudet: {{command}}",
547
+ "installSpinnerStop": "Riippuvuudet asennettu.",
548
+ "installSpinnerFailed": "Asenna riippuvuudet: {{command}}",
549
549
  "notesHeading": "Huom:",
550
550
  "caveatsHeading": "Varoitus:",
551
551
  "errorMissingPlatform": "Puuttuu vaadittu argumentti \"platform\". Odotettu yksi seuraavista: {{platforms}}",
@@ -600,6 +600,10 @@ const MESSAGES = {
600
600
  "nextStepsNav": "cd {{dir}}",
601
601
  "nextStepsInstall": "Installer les dépendances : {{command}}",
602
602
  "nextStepsDevServer": "Démarrer le serveur de développement (si votre modèle en propose un)",
603
+ "getStartedHeading": "Étapes suivantes :",
604
+ "installSpinnerStart": "Installer les dépendances : {{command}}",
605
+ "installSpinnerStop": "Dépendances installées.",
606
+ "installSpinnerFailed": "Installer les dépendances : {{command}}",
603
607
  "notesHeading": "Remarque :",
604
608
  "caveatsHeading": "Précaution :",
605
609
  "errorMissingPlatform": "Argument requis manquant \"platform\". Attendu : l'un des suivants : {{platforms}}",
@@ -654,6 +658,10 @@ const MESSAGES = {
654
658
  "nextStepsNav": "cd {{dir}}",
655
659
  "nextStepsInstall": "Installer les dépendances : {{command}}",
656
660
  "nextStepsDevServer": "Démarrer le serveur de développement (si votre modèle en fournit un)",
661
+ "getStartedHeading": "Étapes suivantes :",
662
+ "installSpinnerStart": "Installer les dépendances : {{command}}",
663
+ "installSpinnerStop": "Dépendances installées.",
664
+ "installSpinnerFailed": "Installer les dépendances : {{command}}",
657
665
  "notesHeading": "Remarque :",
658
666
  "caveatsHeading": "Précaution :",
659
667
  "errorMissingPlatform": "Argument requis manquant \"platform\". Attendu : l'un de : {{platforms}}",
@@ -708,6 +716,10 @@ const MESSAGES = {
708
716
  "nextStepsNav": "cd {{dir}}",
709
717
  "nextStepsInstall": "Suiteáil spleáchais: {{command}}",
710
718
  "nextStepsDevServer": "Tosaigh an freastalaí forbartha (má tá ceann sa téama agat)",
719
+ "getStartedHeading": "Céimeanna eile:",
720
+ "installSpinnerStart": "Suiteáil spleáchais: {{command}}",
721
+ "installSpinnerStop": "Spleáchais suiteáilte.",
722
+ "installSpinnerFailed": "Suiteáil spleáchais: {{command}}",
711
723
  "notesHeading": "Nóta:",
712
724
  "caveatsHeading": "Rabhadh:",
713
725
  "errorMissingPlatform": "Easpa argóint riachtanach \"platform\". Bhíothas ag súil le ceann de: {{platforms}}",
@@ -762,6 +774,10 @@ const MESSAGES = {
762
774
  "nextStepsNav": "cd {{dir}}",
763
775
  "nextStepsInstall": "Abhängigkeiten installieren: {{command}}",
764
776
  "nextStepsDevServer": "Entwicklungsserver starten (falls die Vorlage einen enthält)",
777
+ "getStartedHeading": "Nächste Schritte:",
778
+ "installSpinnerStart": "Abhängigkeiten installieren: {{command}}",
779
+ "installSpinnerStop": "Abhängigkeiten installiert.",
780
+ "installSpinnerFailed": "Abhängigkeiten installieren: {{command}}",
765
781
  "notesHeading": "Hinweis:",
766
782
  "caveatsHeading": "Einschränkung:",
767
783
  "errorMissingPlatform": "Fehlendes erforderliches Argument \"platform\". Erwartet eines von: {{platforms}}",
@@ -816,6 +832,10 @@ const MESSAGES = {
816
832
  "nextStepsNav": "cd {{dir}}",
817
833
  "nextStepsInstall": "Εγκατάσταση εξαρτήσεων: {{command}}",
818
834
  "nextStepsDevServer": "Εκκίνηση του dev server (αν το πρότυπό σας έχει έναν)",
835
+ "getStartedHeading": "Επόμενα βήματα:",
836
+ "installSpinnerStart": "Εγκατάσταση εξαρτήσεων: {{command}}",
837
+ "installSpinnerStop": "Εγκαταστάθηκαν οι εξαρτήσεις.",
838
+ "installSpinnerFailed": "Εγκατάσταση εξαρτήσεων: {{command}}",
819
839
  "notesHeading": "Σημείωση:",
820
840
  "caveatsHeading": "Προειδοποίηση:",
821
841
  "errorMissingPlatform": "Λείπει η απαιτούμενη παράμετρος \"platform\". Αναμένονται μία από: {{platforms}}",
@@ -870,6 +890,10 @@ const MESSAGES = {
870
890
  "nextStepsNav": "cd {{dir}}",
871
891
  "nextStepsInstall": "Enstale depandans: {{command}}",
872
892
  "nextStepsDevServer": "Kòmanse sèvè dev (si modèl ou a gen youn)",
893
+ "getStartedHeading": "Pwochèn etap:",
894
+ "installSpinnerStart": "Enstale depandans: {{command}}",
895
+ "installSpinnerStop": "Depandans enstale.",
896
+ "installSpinnerFailed": "Enstale depandans: {{command}}",
873
897
  "notesHeading": "Remak:",
874
898
  "caveatsHeading": "Avètisman:",
875
899
  "errorMissingPlatform": "Agiman obligatwa \"platform\" manke. Atann youn nan: {{platforms}}",
@@ -924,6 +948,10 @@ const MESSAGES = {
924
948
  "nextStepsNav": "cd {{dir}}",
925
949
  "nextStepsInstall": "התקן תלותים: {{command}}",
926
950
  "nextStepsDevServer": "הפעל את שרת הפיתוח (אם התבנית שלך כוללת אחד)",
951
+ "getStartedHeading": "שלבים הבאים:",
952
+ "installSpinnerStart": "התקן תלותים: {{command}}",
953
+ "installSpinnerStop": "התלויות הותקנו.",
954
+ "installSpinnerFailed": "התקן תלותים: {{command}}",
927
955
  "notesHeading": "הערה:",
928
956
  "caveatsHeading": "אזהרה:",
929
957
  "errorMissingPlatform": "חסר ארגומנט דרוש \"platform\". צפוי אחד מ: {{platforms}}",
@@ -978,6 +1006,10 @@ const MESSAGES = {
978
1006
  "nextStepsNav": "cd {{dir}}",
979
1007
  "nextStepsInstall": "निर्भरता स्थापित करें: {{command}}",
980
1008
  "nextStepsDevServer": "डेव सर्वर शुरू करें (यदि आपके टेम्पलेट में है)",
1009
+ "getStartedHeading": "अगले चरण:",
1010
+ "installSpinnerStart": "निर्भरता स्थापित करें: {{command}}",
1011
+ "installSpinnerStop": "निर्भरता स्थापित की गईं.",
1012
+ "installSpinnerFailed": "निर्भरता स्थापित करें: {{command}}",
981
1013
  "notesHeading": "नोट:",
982
1014
  "caveatsHeading": "ध्यान दें:",
983
1015
  "errorMissingPlatform": "आवश्यक तर्क \"platform\" गायब है। अपेक्षित में से एक: {{platforms}}",
@@ -1032,6 +1064,10 @@ const MESSAGES = {
1032
1064
  "nextStepsNav": "cd {{dir}}",
1033
1065
  "nextStepsInstall": "Függőségek telepítése: {{command}}",
1034
1066
  "nextStepsDevServer": "Indítsd el a fejlesztői szervert (ha a sablonod tartalmaz ilyet)",
1067
+ "getStartedHeading": "Következő lépések:",
1068
+ "installSpinnerStart": "Függőségek telepítése: {{command}}",
1069
+ "installSpinnerStop": "Függőségek telepítve.",
1070
+ "installSpinnerFailed": "Függőségek telepítése: {{command}}",
1035
1071
  "notesHeading": "Megjegyzés:",
1036
1072
  "caveatsHeading": "Figyelmeztetés:",
1037
1073
  "errorMissingPlatform": "Hiányzó kötelező argumentum \"platform\". Egyik várható: {{platforms}}",
@@ -1086,6 +1122,10 @@ const MESSAGES = {
1086
1122
  "nextStepsNav": "cd {{dir}}",
1087
1123
  "nextStepsInstall": "Settu upp háður: {{command}}",
1088
1124
  "nextStepsDevServer": "Ræstu þróunarþjóninn (ef sniðmátið inniheldur einn)",
1125
+ "getStartedHeading": "Næstu skref:",
1126
+ "installSpinnerStart": "Settu upp háður: {{command}}",
1127
+ "installSpinnerStop": "Háðir pakkar uppsettir.",
1128
+ "installSpinnerFailed": "Settu upp háður: {{command}}",
1089
1129
  "notesHeading": "Athugið:",
1090
1130
  "caveatsHeading": "Ábending:",
1091
1131
  "errorMissingPlatform": "Vantar nauðsynlegt rök \"platform\". Búist var við einu af: {{platforms}}",
@@ -1140,6 +1180,10 @@ const MESSAGES = {
1140
1180
  "nextStepsNav": "cd {{dir}}",
1141
1181
  "nextStepsInstall": "Pasang dependensi: {{command}}",
1142
1182
  "nextStepsDevServer": "Jalankan server pengembangan (jika template Anda memilikinya)",
1183
+ "getStartedHeading": "Langkah selanjutnya:",
1184
+ "installSpinnerStart": "Pasang dependensi: {{command}}",
1185
+ "installSpinnerStop": "Dependensi terpasang.",
1186
+ "installSpinnerFailed": "Pasang dependensi: {{command}}",
1143
1187
  "notesHeading": "Catatan:",
1144
1188
  "caveatsHeading": "Peringatan:",
1145
1189
  "errorMissingPlatform": "Argumen wajib \"platform\" hilang. Diharapkan salah satu: {{platforms}}",
@@ -1194,6 +1238,10 @@ const MESSAGES = {
1194
1238
  "nextStepsNav": "cd {{dir}}",
1195
1239
  "nextStepsInstall": "Installa le dipendenze: {{command}}",
1196
1240
  "nextStepsDevServer": "Avvia il server di sviluppo (se il template ne prevede uno)",
1241
+ "getStartedHeading": "Prossimi passi:",
1242
+ "installSpinnerStart": "Installa le dipendenze: {{command}}",
1243
+ "installSpinnerStop": "Dipendenze installate.",
1244
+ "installSpinnerFailed": "Installa le dipendenze: {{command}}",
1197
1245
  "notesHeading": "Nota:",
1198
1246
  "caveatsHeading": "Avvertenza:",
1199
1247
  "errorMissingPlatform": "Argomento obbligatorio mancante \"platform\". Atteso uno dei seguenti: {{platforms}}",
@@ -1248,6 +1296,10 @@ const MESSAGES = {
1248
1296
  "nextStepsNav": "cd {{dir}}",
1249
1297
  "nextStepsInstall": "依存関係をインストール: {{command}}",
1250
1298
  "nextStepsDevServer": "開発サーバーを起動(テンプレートにある場合)",
1299
+ "getStartedHeading": "次の手順:",
1300
+ "installSpinnerStart": "依存関係をインストール: {{command}}",
1301
+ "installSpinnerStop": "依存関係がインストールされました。",
1302
+ "installSpinnerFailed": "依存関係をインストール: {{command}}",
1251
1303
  "notesHeading": "注意:",
1252
1304
  "caveatsHeading": "留意事項:",
1253
1305
  "errorMissingPlatform": "必須引数 \"platform\" がありません。予期される値: {{platforms}}",
@@ -1302,6 +1354,10 @@ const MESSAGES = {
1302
1354
  "nextStepsNav": "cd {{dir}}",
1303
1355
  "nextStepsInstall": "의존성 설치: {{command}}",
1304
1356
  "nextStepsDevServer": "개발 서버 시작 (템플릿에 해당 기능이 있는 경우)",
1357
+ "getStartedHeading": "다음 단계:",
1358
+ "installSpinnerStart": "의존성 설치: {{command}}",
1359
+ "installSpinnerStop": "종속성이 설치되었습니다.",
1360
+ "installSpinnerFailed": "의존성 설치: {{command}}",
1305
1361
  "notesHeading": "참고:",
1306
1362
  "caveatsHeading": "주의:",
1307
1363
  "errorMissingPlatform": "필수 인수 \"platform\" 누락. 다음 중 하나여야 합니다: {{platforms}}",
@@ -1356,6 +1412,10 @@ const MESSAGES = {
1356
1412
  "nextStepsNav": "cd {{dir}}",
1357
1413
  "nextStepsInstall": "Tāuta ngā whakawhirinaki: {{command}}",
1358
1414
  "nextStepsDevServer": "Tīmatahia te tūmau whakawhanake (mēnā kei tō tauira)",
1415
+ "getStartedHeading": "Hipanga e whai ake:",
1416
+ "installSpinnerStart": "Tāuta ngā whakawhirinaki: {{command}}",
1417
+ "installSpinnerStop": "Kua tāuta ngā whakawhirinaki.",
1418
+ "installSpinnerFailed": "Tāuta ngā whakawhirinaki: {{command}}",
1359
1419
  "notesHeading": "Tuhipoka:",
1360
1420
  "caveatsHeading": "Whakatūpato:",
1361
1421
  "errorMissingPlatform": "Kua ngaro te kupu whakahau hiahia \"platform\". Me kotahi o ēnei: {{platforms}}",
@@ -1410,6 +1470,10 @@ const MESSAGES = {
1410
1470
  "nextStepsNav": "cd {{dir}}",
1411
1471
  "nextStepsInstall": "Pasang kebergantungan: {{command}}",
1412
1472
  "nextStepsDevServer": "Mulakan pelayan pembangunan (jika templat anda mempunyainya)",
1473
+ "getStartedHeading": "Langkah seterusnya:",
1474
+ "installSpinnerStart": "Pasang kebergantungan: {{command}}",
1475
+ "installSpinnerStop": "Kebergantungan dipasang.",
1476
+ "installSpinnerFailed": "Pasang kebergantungan: {{command}}",
1413
1477
  "notesHeading": "Nota:",
1414
1478
  "caveatsHeading": "Amaran:",
1415
1479
  "errorMissingPlatform": "Argumen diperlukan \"platform\" hilang. Dijangka salah satu: {{platforms}}",
@@ -1464,6 +1528,10 @@ const MESSAGES = {
1464
1528
  "nextStepsNav": "cd {{dir}}",
1465
1529
  "nextStepsInstall": "Installera beroenden: {{command}}",
1466
1530
  "nextStepsDevServer": "Starta dev-servern (om din mall har en)",
1531
+ "getStartedHeading": "Nästa steg:",
1532
+ "installSpinnerStart": "Installera beroenden: {{command}}",
1533
+ "installSpinnerStop": "Dependencies installed.",
1534
+ "installSpinnerFailed": "Installera beroenden: {{command}}",
1467
1535
  "notesHeading": "Notering:",
1468
1536
  "caveatsHeading": "Varning:",
1469
1537
  "errorMissingPlatform": "Saknad obligatorisk argument \"platform\". Förväntat ett av: {{platforms}}",
@@ -1518,6 +1586,10 @@ const MESSAGES = {
1518
1586
  "nextStepsNav": "cd {{dir}}",
1519
1587
  "nextStepsInstall": "Installer avhengigheter: {{command}}",
1520
1588
  "nextStepsDevServer": "Start utviklingsserveren (hvis malen din har en)",
1589
+ "getStartedHeading": "Neste steg:",
1590
+ "installSpinnerStart": "Installer avhengigheter: {{command}}",
1591
+ "installSpinnerStop": "Avhengigheter installert.",
1592
+ "installSpinnerFailed": "Installer avhengigheter: {{command}}",
1521
1593
  "notesHeading": "Merk:",
1522
1594
  "caveatsHeading": "Forbehold:",
1523
1595
  "errorMissingPlatform": "Mangler påkrevd argument \"platform\". Forventet en av: {{platforms}}",
@@ -1572,6 +1644,10 @@ const MESSAGES = {
1572
1644
  "nextStepsNav": "cd {{dir}}",
1573
1645
  "nextStepsInstall": "Installer avhengigheiter: {{command}}",
1574
1646
  "nextStepsDevServer": "Start utviklarserveren (om malen har ein)",
1647
+ "getStartedHeading": "Neste steg:",
1648
+ "installSpinnerStart": "Installer avhengigheiter: {{command}}",
1649
+ "installSpinnerStop": "Avhengigheiter installert.",
1650
+ "installSpinnerFailed": "Installer avhengigheiter: {{command}}",
1575
1651
  "notesHeading": "Merk:",
1576
1652
  "caveatsHeading": "Forbehald:",
1577
1653
  "errorMissingPlatform": "Manglande påkravd argument \"platform\". Forventa éin av: {{platforms}}",
@@ -1626,6 +1702,10 @@ const MESSAGES = {
1626
1702
  "nextStepsNav": "cd {{dir}}",
1627
1703
  "nextStepsInstall": "نصب وابستگی‌ها: {{command}}",
1628
1704
  "nextStepsDevServer": "راه‌اندازی سرور توسعه (در صورت وجود در قالب شما)",
1705
+ "getStartedHeading": "گام‌های بعدی:",
1706
+ "installSpinnerStart": "نصب وابستگی‌ها: {{command}}",
1707
+ "installSpinnerStop": "وابستگی‌ها نصب شدند.",
1708
+ "installSpinnerFailed": "نصب وابستگی‌ها: {{command}}",
1629
1709
  "notesHeading": "توجه:",
1630
1710
  "caveatsHeading": "ملاحظات:",
1631
1711
  "errorMissingPlatform": "آرگومان اجباری \"platform\" مفقود است. انتظار یکی از موارد: {{platforms}}",
@@ -1680,6 +1760,10 @@ const MESSAGES = {
1680
1760
  "nextStepsNav": "cd {{dir}}",
1681
1761
  "nextStepsInstall": "Zainstaluj zależności: {{command}}",
1682
1762
  "nextStepsDevServer": "Uruchom serwer deweloperski (jeśli szablon go zawiera)",
1763
+ "getStartedHeading": "Kolejne kroki:",
1764
+ "installSpinnerStart": "Zainstaluj zależności: {{command}}",
1765
+ "installSpinnerStop": "Zależności zainstalowane.",
1766
+ "installSpinnerFailed": "Zainstaluj zależności: {{command}}",
1683
1767
  "notesHeading": "Uwaga:",
1684
1768
  "caveatsHeading": "Ograniczenie:",
1685
1769
  "errorMissingPlatform": "Brakuje wymaganego argumentu \"platform\". Oczekiwano jednego z: {{platforms}}",
@@ -1734,6 +1818,10 @@ const MESSAGES = {
1734
1818
  "nextStepsNav": "cd {{dir}}",
1735
1819
  "nextStepsInstall": "Instalar dependências: {{command}}",
1736
1820
  "nextStepsDevServer": "Inicie o servidor de desenvolvimento (se o seu template tiver um)",
1821
+ "getStartedHeading": "Próximos passos:",
1822
+ "installSpinnerStart": "Instalar dependências: {{command}}",
1823
+ "installSpinnerStop": "Dependências instaladas.",
1824
+ "installSpinnerFailed": "Instalar dependências: {{command}}",
1737
1825
  "notesHeading": "Observação:",
1738
1826
  "caveatsHeading": "Atenção:",
1739
1827
  "errorMissingPlatform": "Argumento obrigatório \"platform\" ausente. Esperado um dos: {{platforms}}",
@@ -1788,6 +1876,10 @@ const MESSAGES = {
1788
1876
  "nextStepsNav": "cd {{dir}}",
1789
1877
  "nextStepsInstall": "Instalar dependências: {{command}}",
1790
1878
  "nextStepsDevServer": "Iniciar o servidor de desenvolvimento (se o template tiver um)",
1879
+ "getStartedHeading": "Próximos passos:",
1880
+ "installSpinnerStart": "Instalar dependências: {{command}}",
1881
+ "installSpinnerStop": "Dependências instaladas.",
1882
+ "installSpinnerFailed": "Instalar dependências: {{command}}",
1791
1883
  "notesHeading": "Observação:",
1792
1884
  "caveatsHeading": "Atenção:",
1793
1885
  "errorMissingPlatform": "Argumento obrigatório \"platform\" ausente. Esperado um de: {{platforms}}",
@@ -1842,6 +1934,10 @@ const MESSAGES = {
1842
1934
  "nextStepsNav": "cd {{dir}}",
1843
1935
  "nextStepsInstall": "Установите зависимости: {{command}}",
1844
1936
  "nextStepsDevServer": "Запустите dev-сервер (если он есть в шаблоне)",
1937
+ "getStartedHeading": "Дальше:",
1938
+ "installSpinnerStart": "Установите зависимости: {{command}}",
1939
+ "installSpinnerStop": "Зависимости установлены.",
1940
+ "installSpinnerFailed": "Установите зависимости: {{command}}",
1845
1941
  "notesHeading": "Примечание:",
1846
1942
  "caveatsHeading": "Ограничения:",
1847
1943
  "errorMissingPlatform": "Отсутствует обязательный аргумент \"platform\". Ожидалось одно из: {{platforms}}",
@@ -1896,6 +1992,10 @@ const MESSAGES = {
1896
1992
  "nextStepsNav": "cd {{dir}}",
1897
1993
  "nextStepsInstall": "安装依赖:{{command}}",
1898
1994
  "nextStepsDevServer": "启动开发服务器(如果你的模板提供)",
1995
+ "getStartedHeading": "后续步骤:",
1996
+ "installSpinnerStart": "安装依赖:{{command}}",
1997
+ "installSpinnerStop": "依赖已安装。",
1998
+ "installSpinnerFailed": "安装依赖:{{command}}",
1899
1999
  "notesHeading": "注意:",
1900
2000
  "caveatsHeading": "注意事项:",
1901
2001
  "errorMissingPlatform": "缺少必需参数 \"platform\"。期望其中之一:{{platforms}}",
@@ -1950,6 +2050,10 @@ const MESSAGES = {
1950
2050
  "nextStepsNav": "cd {{dir}}",
1951
2051
  "nextStepsInstall": "Namestite odvisnosti: {{command}}",
1952
2052
  "nextStepsDevServer": "Zaženite razvojni strežnik (če ga ima predloga)",
2053
+ "getStartedHeading": "Naslednji koraki:",
2054
+ "installSpinnerStart": "Namestite odvisnosti: {{command}}",
2055
+ "installSpinnerStop": "Odvisnosti nameščene.",
2056
+ "installSpinnerFailed": "Namestite odvisnosti: {{command}}",
1953
2057
  "notesHeading": "Opomba:",
1954
2058
  "caveatsHeading": "Opozorilo:",
1955
2059
  "errorMissingPlatform": "Manjka zahtevan argument \"platform\". Pričakovana ena od: {{platforms}}",
@@ -2004,6 +2108,10 @@ const MESSAGES = {
2004
2108
  "nextStepsNav": "cd {{dir}}",
2005
2109
  "nextStepsInstall": "Instalar dependencias: {{command}}",
2006
2110
  "nextStepsDevServer": "Iniciar el servidor de desarrollo (si la plantilla tiene uno)",
2111
+ "getStartedHeading": "Siguientes pasos:",
2112
+ "installSpinnerStart": "Instalar dependencias: {{command}}",
2113
+ "installSpinnerStop": "Dependencias instaladas.",
2114
+ "installSpinnerFailed": "Instalar dependencias: {{command}}",
2007
2115
  "notesHeading": "Nota:",
2008
2116
  "caveatsHeading": "Precaución:",
2009
2117
  "errorMissingPlatform": "Falta el argumento requerido \"platform\". Se esperaba uno de: {{platforms}}",
@@ -2058,6 +2166,10 @@ const MESSAGES = {
2058
2166
  "nextStepsNav": "cd {{dir}}",
2059
2167
  "nextStepsInstall": "Installera beroenden: {{command}}",
2060
2168
  "nextStepsDevServer": "Starta dev-servern (om din mall har en)",
2169
+ "getStartedHeading": "Nästa steg:",
2170
+ "installSpinnerStart": "Installera beroenden: {{command}}",
2171
+ "installSpinnerStop": "Beroenden installerade.",
2172
+ "installSpinnerFailed": "Installera beroenden: {{command}}",
2061
2173
  "notesHeading": "Notera:",
2062
2174
  "caveatsHeading": "Varning:",
2063
2175
  "errorMissingPlatform": "Saknas obligatoriskt argument \"platform\". Förväntat ett av: {{platforms}}",
@@ -2112,6 +2224,10 @@ const MESSAGES = {
2112
2224
  "nextStepsNav": "cd {{dir}}",
2113
2225
  "nextStepsInstall": "ติดตั้ง dependencies: {{command}}",
2114
2226
  "nextStepsDevServer": "เริ่มเซิร์ฟเวอร์สำหรับพัฒนา (ถ้าเทมเพลตมี)",
2227
+ "getStartedHeading": "ขั้นตอนถัดไป:",
2228
+ "installSpinnerStart": "ติดตั้ง dependencies: {{command}}",
2229
+ "installSpinnerStop": "ติดตั้งการพึ่งพาเรียบร้อยแล้ว.",
2230
+ "installSpinnerFailed": "ติดตั้ง dependencies: {{command}}",
2115
2231
  "notesHeading": "หมายเหตุ:",
2116
2232
  "caveatsHeading": "ข้อควรระวัง:",
2117
2233
  "errorMissingPlatform": "ขาดอาร์กิวเมนต์ที่จำเป็น \"platform\". คาดหวังหนึ่งใน: {{platforms}}",
@@ -2166,6 +2282,10 @@ const MESSAGES = {
2166
2282
  "nextStepsNav": "cd {{dir}}",
2167
2283
  "nextStepsInstall": "安裝相依套件:{{command}}",
2168
2284
  "nextStepsDevServer": "啟動開發伺服器(若範本有提供)",
2285
+ "getStartedHeading": "下一步:",
2286
+ "installSpinnerStart": "安裝相依套件:{{command}}",
2287
+ "installSpinnerStop": "已安裝相依套件。",
2288
+ "installSpinnerFailed": "安裝相依套件:{{command}}",
2169
2289
  "notesHeading": "注意:",
2170
2290
  "caveatsHeading": "注意事項:",
2171
2291
  "errorMissingPlatform": "遺漏必要參數 \"platform\"。預期其中一項:{{platforms}}",
@@ -2220,6 +2340,10 @@ const MESSAGES = {
2220
2340
  "nextStepsNav": "cd {{dir}}",
2221
2341
  "nextStepsInstall": "Bağımlılıkları kurun: {{command}}",
2222
2342
  "nextStepsDevServer": "Geliştirme sunucusunu başlatın (şablonunuzda varsa)",
2343
+ "getStartedHeading": "Sonraki adımlar:",
2344
+ "installSpinnerStart": "Bağımlılıkları kurun: {{command}}",
2345
+ "installSpinnerStop": "Bağımlılıklar yüklendi.",
2346
+ "installSpinnerFailed": "Bağımlılıkları kurun: {{command}}",
2223
2347
  "notesHeading": "Not:",
2224
2348
  "caveatsHeading": "Uyarı:",
2225
2349
  "errorMissingPlatform": "Gerekli argüman \"platform\" eksik. Beklenenler: {{platforms}}",
@@ -2274,6 +2398,10 @@ const MESSAGES = {
2274
2398
  "nextStepsNav": "cd {{dir}}",
2275
2399
  "nextStepsInstall": "Встановити залежності: {{command}}",
2276
2400
  "nextStepsDevServer": "Запустити dev‑сервер (якщо шаблон його має)",
2401
+ "getStartedHeading": "Наступні кроки:",
2402
+ "installSpinnerStart": "Встановити залежності: {{command}}",
2403
+ "installSpinnerStop": "Залежності встановлено.",
2404
+ "installSpinnerFailed": "Встановити залежності: {{command}}",
2277
2405
  "notesHeading": "Примітка:",
2278
2406
  "caveatsHeading": "Попередження:",
2279
2407
  "errorMissingPlatform": "Відсутній обовʼязковий аргумент \"platform\". Очікується один з: {{platforms}}",
@@ -2328,6 +2456,10 @@ const MESSAGES = {
2328
2456
  "nextStepsNav": "cd {{dir}}",
2329
2457
  "nextStepsInstall": "Cài đặt phụ thuộc: {{command}}",
2330
2458
  "nextStepsDevServer": "Khởi động máy chủ dev (nếu mẫu có)",
2459
+ "getStartedHeading": "Bước tiếp theo:",
2460
+ "installSpinnerStart": "Cài đặt phụ thuộc: {{command}}",
2461
+ "installSpinnerStop": "Đã cài đặt các phụ thuộc.",
2462
+ "installSpinnerFailed": "Cài đặt phụ thuộc: {{command}}",
2331
2463
  "notesHeading": "Lưu ý:",
2332
2464
  "caveatsHeading": "Cảnh báo:",
2333
2465
  "errorMissingPlatform": "Thiếu tham số bắt buộc \"platform\". Mong đợi một trong: {{platforms}}",
@@ -2382,6 +2514,10 @@ const MESSAGES = {
2382
2514
  "nextStepsNav": "cd {{dir}}",
2383
2515
  "nextStepsInstall": "Gosod dibyniaethau: {{command}}",
2384
2516
  "nextStepsDevServer": "Cychwyn y gweinydd datblyg (os oes gan eich templed un)",
2517
+ "getStartedHeading": "Camau nesaf:",
2518
+ "installSpinnerStart": "Gosod dibyniaethau: {{command}}",
2519
+ "installSpinnerStop": "Dibyniaethau wedi'u gosod.",
2520
+ "installSpinnerFailed": "Gosod dibyniaethau: {{command}}",
2385
2521
  "notesHeading": "Nodyn:",
2386
2522
  "caveatsHeading": "Rhybudd:",
2387
2523
  "errorMissingPlatform": "Diffyg y dadleuon gofynnol \"platform\". Disgwylir un o: {{platforms}}",
@@ -2488,6 +2624,23 @@ function expandHome(dir) {
2488
2624
  return dir === "~" ? home : join(home, dir.slice(2));
2489
2625
  }
2490
2626
  /**
2627
+ * Human-readable labels for the interactive platform picker — canonical `SCAFFOLD_PLATFORMS` keys
2628
+ * are lowercase/hyphenated for CLI-arg use, not meant for display as-is.
2629
+ */
2630
+ const PLATFORM_DISPLAY_LABELS = {
2631
+ components: "HTML",
2632
+ "web-components": "Web components",
2633
+ react: "React",
2634
+ vue: "Vue",
2635
+ angular: "Angular",
2636
+ svelte: "Svelte",
2637
+ "canvas-theme-editor": "Canvas theme editor"
2638
+ };
2639
+ /** Display label for a platform key, falling back to the raw key if unmapped. */
2640
+ function platformDisplayLabel(platform) {
2641
+ return PLATFORM_DISPLAY_LABELS[platform] ?? platform;
2642
+ }
2643
+ /**
2491
2644
  * Resolves the platform: uses `platformArg` when given, otherwise prompts via clack `select()`
2492
2645
  * on a TTY (not --yes), otherwise throws a localized `ScaffoldCliError`.
2493
2646
  *
@@ -2503,10 +2656,10 @@ async function resolvePlatform(platformArg, opts) {
2503
2656
  })) throw new ScaffoldCliError(t("errorMissingPlatform", { platforms: SCAFFOLD_PLATFORMS.join(", ") }));
2504
2657
  const result = await select({
2505
2658
  message: t("promptPlatform"),
2506
- options: SCAFFOLD_PLATFORMS.map((p) => ({
2659
+ options: [...SCAFFOLD_PLATFORMS].map((p) => ({
2507
2660
  value: p,
2508
- label: p
2509
- }))
2661
+ label: platformDisplayLabel(p)
2662
+ })).sort((a, b) => a.label.localeCompare(b.label))
2510
2663
  });
2511
2664
  if (isCancel(result)) {
2512
2665
  cancel(t("cancelled"));
@@ -2575,7 +2728,7 @@ async function resolveScaffoldTarget(options) {
2575
2728
  * @param platform - The scaffold platform
2576
2729
  * @param dir - The target directory
2577
2730
  * @param t - Localized string lookup
2578
- * @param options - `theme`/`mode`/`cdn` forwarded to {@link scaffoldProject}
2731
+ * @param options - `theme`/`mode`/`cdn`/`locale` forwarded to {@link scaffoldProject}
2579
2732
  * @returns The paths written by scaffoldProject
2580
2733
  */
2581
2734
  async function scaffoldWithSpinner(platform, dir, t, options) {
@@ -2645,6 +2798,50 @@ const PM_COMMANDS = {
2645
2798
  function pmCommands(pm) {
2646
2799
  return PM_COMMANDS[pm ?? "npm"];
2647
2800
  }
2801
+ /** Per-package-manager invocation for `create-pantoken-app`'s own usage/help text. */
2802
+ const CREATE_USAGE_COMMANDS = {
2803
+ npm: "npm create pantoken-app --",
2804
+ pnpm: "pnpm create pantoken-app --",
2805
+ yarn: "yarn create pantoken-app --",
2806
+ bun: "bunx create-pantoken-app --",
2807
+ deno: "deno run -A npm:create-pantoken-app --",
2808
+ vp: "vpx create-pantoken-app --"
2809
+ };
2810
+ /**
2811
+ * The invocation string `create-pantoken-app`'s bin shim shows in `--help`/usage, matching
2812
+ * whichever package manager actually invoked it (falls back to the npm form when undetected).
2813
+ *
2814
+ * @param pm - The detected package manager (defaults to `detectPackageManager()`'s result)
2815
+ */
2816
+ function buildCreateUsageCommand(pm) {
2817
+ return CREATE_USAGE_COMMANDS[pm ?? detectPackageManager() ?? "npm"];
2818
+ }
2819
+ /**
2820
+ * Runs the detected package manager's install command in `dir`, wrapped in a clack spinner.
2821
+ * Failures are reported but non-fatal — the project is still usable, just not installed — so the
2822
+ * caller decides how `printNextSteps` should reflect the outcome via the returned boolean.
2823
+ *
2824
+ * @param dir - The scaffold directory to install into
2825
+ * @param pm - The detected package manager (defaults to npm's command when undefined)
2826
+ * @param t - Localized string lookup
2827
+ * @returns Whether the install command exited successfully
2828
+ */
2829
+ function installWithSpinner(dir, pm, t) {
2830
+ const [command, ...args] = pmCommands(pm).install.split(" ");
2831
+ const s = spinner();
2832
+ s.start(t("installSpinnerStart"));
2833
+ try {
2834
+ execFileSync(command, args, {
2835
+ cwd: dir,
2836
+ stdio: "ignore"
2837
+ });
2838
+ s.stop(t("installSpinnerStop"));
2839
+ return true;
2840
+ } catch (err) {
2841
+ s.stop(`${t("installSpinnerFailed")} ${err instanceof Error ? err.message : String(err)}`);
2842
+ return false;
2843
+ }
2844
+ }
2648
2845
  /**
2649
2846
  * Finds the scaffolded `package.json` among `written` and returns its preferred run script name
2650
2847
  * (`dev`, else `preview`), or `undefined` if no such file/script exists (or can't be read).
@@ -2665,20 +2862,27 @@ function detectRunScript(written) {
2665
2862
  function substituteVars(text, vars) {
2666
2863
  return text.replace(/\{\{(\w+)\}\}/g, (match, name) => vars[name] ?? match);
2667
2864
  }
2865
+ /** The one remaining manual step after an automatic install: `cd <dir> && <dev>`, or just `<dev>` when `dir` is `.`. */
2866
+ function buildDevStep(dir, dev) {
2867
+ return dir === "." ? dev : `cd ${dir} && ${dev}`;
2868
+ }
2668
2869
  /**
2669
2870
  * Prints the post-scaffold "Next steps" block (plus any template-authored notes/caveats).
2670
2871
  *
2671
- * When `platform` has a `scaffold.json`-derived entry in `SCAFFOLD_METADATA`, next steps/notes/
2672
- * caveats are rendered from its (localized, `{{var}}`-substituted) authored strings. Otherwise a
2673
- * generic cd/install/run-script fallback is used, with the run script itself detected from the
2674
- * scaffolded `package.json` (`dev`, else `preview`).
2872
+ * When `installed` is true (dependencies were already installed automatically), the block collapses
2873
+ * to the single remaining manual action — starting the dev server, prefixed with `cd <dir>` when
2874
+ * needed — regardless of platform. Otherwise, when `platform` has a `scaffold.json`-derived entry in
2875
+ * `SCAFFOLD_METADATA`, next steps/notes/caveats are rendered from its (localized, `{{var}}`-
2876
+ * substituted) authored strings; failing that, a generic cd/install/run-script fallback is used,
2877
+ * with the run script itself detected from the scaffolded `package.json` (`dev`, else `preview`).
2675
2878
  *
2676
2879
  * @param dir - The scaffold directory
2677
2880
  * @param written - The paths written by scaffoldProject
2678
2881
  * @param t - Localized string lookup
2679
2882
  * @param platform - The resolved (alias-free) scaffold platform, used to look up `scaffold.json` metadata
2883
+ * @param installed - Whether dependencies were already installed automatically
2680
2884
  */
2681
- function printNextSteps(dir, written, t, platform) {
2885
+ function printNextSteps(dir, written, t, platform, installed) {
2682
2886
  const pm = detectPackageManager();
2683
2887
  const { install, run } = pmCommands(pm);
2684
2888
  const script = detectRunScript(written);
@@ -2692,13 +2896,13 @@ function printNextSteps(dir, written, t, platform) {
2692
2896
  dev
2693
2897
  };
2694
2898
  const meta = platform ? SCAFFOLD_METADATA[platform] : void 0;
2695
- const steps = meta?.nextStepsKeys.length ? meta.nextStepsKeys.map((key) => substituteVars(t(key), vars)) : [
2899
+ const steps = installed ? [buildDevStep(dir, dev)] : meta?.nextStepsKeys.length ? meta.nextStepsKeys.map((key) => substituteVars(t(key), vars)) : [
2696
2900
  t("nextStepsNav", { dir }),
2697
2901
  t("nextStepsInstall", { command: install }),
2698
2902
  dev
2699
2903
  ];
2700
2904
  console.log();
2701
- console.log(t("nextStepsHeading"));
2905
+ console.log(installed ? t("getStartedHeading") : t("nextStepsHeading"));
2702
2906
  steps.forEach((step, i) => console.log(`${i + 1}. ${step}`));
2703
2907
  if (meta?.notesKey) console.log(`\n${t("notesHeading")} ${substituteVars(t(meta.notesKey), vars)}`);
2704
2908
  if (meta?.caveatsKey) console.log(`${t("caveatsHeading")} ${substituteVars(t(meta.caveatsKey), vars)}`);
@@ -2736,7 +2940,7 @@ function createScaffoldCommand(options) {
2736
2940
  const program = new Command(programName).exitOverride().configureOutput({
2737
2941
  writeOut: (s) => process.stdout.write(s),
2738
2942
  writeErr: (s) => process.stderr.write(s)
2739
- }).addArgument(new Argument("[platform]", `Platform to scaffold (${SCAFFOLD_PLATFORMS.join("|")}; "html" is an alias for "components")`).argParser(validateScaffoldPlatform)).option("-d, --dir <path>", "Target directory (prompts interactively on a TTY if omitted)").option("-y, --yes", "Never prompt; error instead of prompting for a missing platform/directory", false).option("-l, --lang <tag>", "Override the auto-detected display language (e.g. \"hu\")").option("--theme <name>", "Token theme: rebrand (default), canvas, canvasHighContrast", validateThemeVariant).option("--theme-mode <mode>", "Rebrand token mode: light (default) or adaptive; ignored outside the rebrand theme", validateThemeMode).option("--cdn <provider>", "CDN provider for canvas-theme-editor's theme.css/theme.js: jsdelivr (default), unpkg, esmsh", validateCdnProviderId);
2943
+ }).addArgument(new Argument("[platform]", `Platform to scaffold (${SCAFFOLD_PLATFORMS.join("|")}; "html" is an alias for "components")`).argParser(validateScaffoldPlatform)).option("-d, --dir <path>", "Target directory (prompts interactively on a TTY if omitted)").option("-y, --yes", "Never prompt; error instead of prompting for a missing platform/directory", false).option("-l, --lang <tag>", "Language for the CLI and the scaffolded project (e.g. \"hu\"); auto-detected by default", validateLocaleTag).option("--theme <name>", "Token theme: rebrand (default), canvas, canvasHighContrast", validateThemeVariant).option("--theme-mode <mode>", "Rebrand token mode: light (default) or adaptive; ignored outside the rebrand theme", validateThemeMode).option("--cdn <provider>", "CDN provider for canvas-theme-editor's theme.css/theme.js: jsdelivr (default), unpkg, esmsh", validateCdnProviderId).option("--no-install", "Skip automatically installing dependencies after scaffolding");
2740
2944
  if (options?.version) program.version(options.version, "-v, --version");
2741
2945
  program.action(async (platformArg, opts) => {
2742
2946
  const locale = detectLocale({ langFlag: opts.lang });
@@ -2752,10 +2956,17 @@ function createScaffoldCommand(options) {
2752
2956
  const written = await scaffoldWithSpinner(platform, expandedDir, t, {
2753
2957
  theme: opts.theme,
2754
2958
  mode: opts.themeMode,
2755
- cdn: opts.cdn
2959
+ cdn: opts.cdn,
2960
+ locale
2756
2961
  });
2757
2962
  for (const path of written) console.log(t("wroteFile", { path }));
2758
- printNextSteps(expandedDir, written, t, resolveScaffoldPlatform(platform));
2963
+ let printDir = expandedDir;
2964
+ if (expandedDir !== ".") try {
2965
+ process.chdir(expandedDir);
2966
+ printDir = ".";
2967
+ } catch {}
2968
+ const installed = opts.install !== false && installWithSpinner(expandedDir, detectPackageManager(), t);
2969
+ printNextSteps(printDir, written, t, resolveScaffoldPlatform(platform), installed);
2759
2970
  } catch (err) {
2760
2971
  if (err instanceof ScaffoldCliError) throw err;
2761
2972
  throw err;
@@ -2793,4 +3004,4 @@ async function runScaffoldCli(argv, options) {
2793
3004
  }
2794
3005
  }
2795
3006
  //#endregion
2796
- export { MESSAGES, SCAFFOLD_PLATFORMS, ScaffoldCliError, createLocaleLookup, createScaffoldCommand, detectLocale, detectPackageManager, expandHome, isScaffoldPlatform, printNextSteps, resolveScaffoldPlatform, resolveScaffoldTarget, runScaffoldCli, scaffoldProject, scaffoldWithSpinner, shouldPrompt, validateCdnProviderId, validateScaffoldPlatform };
3007
+ export { MESSAGES, SCAFFOLD_PLATFORMS, SUPPORTED_LOCALES, ScaffoldCliError, buildCreateUsageCommand, createLocaleLookup, createScaffoldCommand, detectLocale, detectPackageManager, expandHome, installWithSpinner, isScaffoldPlatform, printNextSteps, resolveScaffoldPlatform, resolveScaffoldTarget, runScaffoldCli, scaffoldProject, scaffoldWithSpinner, shouldPrompt, validateCdnProviderId, validateLocaleTag, validateScaffoldPlatform };