@velastack/patterns 0.4.3 → 0.6.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/README.md +22 -2
- package/dist/chunks/{_page-e_I-fdSR.js → _page-DoPdZgZv.js} +2 -2
- package/dist/chunks/_page-DoPdZgZv.js.map +1 -0
- package/dist/chunks/collections-B_DisSfA.js +203 -0
- package/dist/chunks/collections-B_DisSfA.js.map +1 -0
- package/dist/chunks/{constants-Rq8SCXwH.js → constants-iej3WkEa.js} +3 -3
- package/dist/chunks/constants-iej3WkEa.js.map +1 -0
- package/dist/chunks/dispatch-BIvOwbKN.js +6 -0
- package/dist/chunks/dispatch-BIvOwbKN.js.map +1 -0
- package/dist/chunks/{env-vars-CcE6ODqC.js → env-vars-cqQU0ECK.js} +32 -20
- package/dist/chunks/env-vars-cqQU0ECK.js.map +1 -0
- package/dist/chunks/generate-8FS2ROOJ.js +170 -0
- package/dist/chunks/generate-8FS2ROOJ.js.map +1 -0
- package/dist/chunks/{generate-CFqpRi9D.js → generate-Bm_jOMtF.js} +4 -4
- package/dist/chunks/{generate-CFqpRi9D.js.map → generate-Bm_jOMtF.js.map} +1 -1
- package/dist/chunks/{generate-Bg0E3eWm.js → generate-CXoQPz7n.js} +4 -4
- package/dist/chunks/{generate-Bg0E3eWm.js.map → generate-CXoQPz7n.js.map} +1 -1
- package/dist/chunks/{generate-B6Odfk5f.js → generate-Cqwa8kD9.js} +2 -2
- package/dist/chunks/{generate-B6Odfk5f.js.map → generate-Cqwa8kD9.js.map} +1 -1
- package/dist/chunks/{generate-CZGHByV3.js → generate-D3mSFPdT.js} +7 -7
- package/dist/chunks/{generate-CZGHByV3.js.map → generate-D3mSFPdT.js.map} +1 -1
- package/dist/chunks/{generate-DetW_gbr.js → generate-DyV5R8NP.js} +7 -7
- package/dist/chunks/{generate-DetW_gbr.js.map → generate-DyV5R8NP.js.map} +1 -1
- package/dist/chunks/generate-jx5Iuq5w.js +75 -0
- package/dist/chunks/generate-jx5Iuq5w.js.map +1 -0
- package/dist/chunks/{generate.runtime-Djas9UNy.js → generate.runtime-B2r11K7S.js} +4 -4
- package/dist/chunks/{generate.runtime-Djas9UNy.js.map → generate.runtime-B2r11K7S.js.map} +1 -1
- package/dist/chunks/{generate.runtime-Bcrht4M9.js → generate.runtime-B4u9C2YH.js} +9 -9
- package/dist/chunks/{generate.runtime-Bcrht4M9.js.map → generate.runtime-B4u9C2YH.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DVB7uuht.js → generate.runtime-BRCzUO94.js} +3 -3
- package/dist/chunks/{generate.runtime-DVB7uuht.js.map → generate.runtime-BRCzUO94.js.map} +1 -1
- package/dist/chunks/{generate.runtime-IWEhGhWY.js → generate.runtime-BVavIXtX.js} +6 -6
- package/dist/chunks/{generate.runtime-IWEhGhWY.js.map → generate.runtime-BVavIXtX.js.map} +1 -1
- package/dist/chunks/generate.runtime-Bh9Z2cRN.js +82 -0
- package/dist/chunks/generate.runtime-Bh9Z2cRN.js.map +1 -0
- package/dist/chunks/{generate.runtime-DJHUBL4Z.js → generate.runtime-BxDUtkpT.js} +12 -12
- package/dist/chunks/{generate.runtime-DJHUBL4Z.js.map → generate.runtime-BxDUtkpT.js.map} +1 -1
- package/dist/chunks/{generate.runtime-hTKzxH2M.js → generate.runtime-BxUGDXIK.js} +7 -7
- package/dist/chunks/{generate.runtime-hTKzxH2M.js.map → generate.runtime-BxUGDXIK.js.map} +1 -1
- package/dist/chunks/{generate.runtime-5rIc-RNL.js → generate.runtime-CHb4znYx.js} +66 -66
- package/dist/chunks/{generate.runtime-5rIc-RNL.js.map → generate.runtime-CHb4znYx.js.map} +1 -1
- package/dist/chunks/{generate.runtime-E-zoeSKW.js → generate.runtime-CRhD98rs.js} +7 -7
- package/dist/chunks/{generate.runtime-E-zoeSKW.js.map → generate.runtime-CRhD98rs.js.map} +1 -1
- package/dist/chunks/{generate.runtime-BpMN5Uq-.js → generate.runtime-CWnIiXwV.js} +3 -3
- package/dist/chunks/{generate.runtime-BpMN5Uq-.js.map → generate.runtime-CWnIiXwV.js.map} +1 -1
- package/dist/chunks/{generate.runtime-kciwaXxh.js → generate.runtime-CYBs0JgY.js} +4 -4
- package/dist/chunks/{generate.runtime-kciwaXxh.js.map → generate.runtime-CYBs0JgY.js.map} +1 -1
- package/dist/chunks/{generate.runtime-CAn1qIQ_.js → generate.runtime-CkmledBw.js} +3 -3
- package/dist/chunks/{generate.runtime-CAn1qIQ_.js.map → generate.runtime-CkmledBw.js.map} +1 -1
- package/dist/chunks/generate.runtime-CyGR8VTx.js +48 -0
- package/dist/chunks/generate.runtime-CyGR8VTx.js.map +1 -0
- package/dist/chunks/{generate.runtime-a3R4hqFy.js → generate.runtime-DCqf7nYM.js} +12 -12
- package/dist/chunks/{generate.runtime-a3R4hqFy.js.map → generate.runtime-DCqf7nYM.js.map} +1 -1
- package/dist/chunks/{generate.runtime-uLUiPgqx.js → generate.runtime-DUo-pLRr.js} +6 -6
- package/dist/chunks/{generate.runtime-uLUiPgqx.js.map → generate.runtime-DUo-pLRr.js.map} +1 -1
- package/dist/chunks/{generate.runtime-CpMKXBkn.js → generate.runtime-DY5vQ3aZ.js} +7 -7
- package/dist/chunks/{generate.runtime-CpMKXBkn.js.map → generate.runtime-DY5vQ3aZ.js.map} +1 -1
- package/dist/chunks/{generate.runtime-CEqLgLT9.js → generate.runtime-DYdkrHJ1.js} +70 -70
- package/dist/chunks/{generate.runtime-CEqLgLT9.js.map → generate.runtime-DYdkrHJ1.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DHHlYfTD.js → generate.runtime-DdcVnK8J.js} +3 -3
- package/dist/chunks/{generate.runtime-DHHlYfTD.js.map → generate.runtime-DdcVnK8J.js.map} +1 -1
- package/dist/chunks/{generate.runtime-koQxLywh.js → generate.runtime-DeniHg8L.js} +48 -48
- package/dist/chunks/{generate.runtime-koQxLywh.js.map → generate.runtime-DeniHg8L.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DoZJHtZh.js → generate.runtime-Dmob2wFf.js} +6 -6
- package/dist/chunks/{generate.runtime-DoZJHtZh.js.map → generate.runtime-Dmob2wFf.js.map} +1 -1
- package/dist/chunks/{generate.runtime-Db0HZyj3.js → generate.runtime-Du4uf98c.js} +2 -2
- package/dist/chunks/{generate.runtime-Db0HZyj3.js.map → generate.runtime-Du4uf98c.js.map} +1 -1
- package/dist/chunks/{generate.runtime-axm9wcQv.js → generate.runtime-Dug2UIhV.js} +4 -4
- package/dist/chunks/{generate.runtime-axm9wcQv.js.map → generate.runtime-Dug2UIhV.js.map} +1 -1
- package/dist/chunks/{generate.runtime-rs1ZOIET.js → generate.runtime-FGYc365Q.js} +15 -15
- package/dist/chunks/{generate.runtime-rs1ZOIET.js.map → generate.runtime-FGYc365Q.js.map} +1 -1
- package/dist/chunks/{generate.runtime-BK3mR0Rj.js → generate.runtime-N1KtAG8C.js} +169 -129
- package/dist/chunks/generate.runtime-N1KtAG8C.js.map +1 -0
- package/dist/chunks/{generate.runtime-CbE9RHcf.js → generate.runtime-_c7daMAw.js} +5 -5
- package/dist/chunks/generate.runtime-_c7daMAw.js.map +1 -0
- package/dist/chunks/generate.runtime-aN5QWygO.js +106 -0
- package/dist/chunks/generate.runtime-aN5QWygO.js.map +1 -0
- package/dist/chunks/{generate.runtime-CZ46nkSL.js → generate.runtime-bpH3DB0t.js} +2 -2
- package/dist/chunks/{generate.runtime-CZ46nkSL.js.map → generate.runtime-bpH3DB0t.js.map} +1 -1
- package/dist/chunks/{generate.runtime-CqncBFNg.js → generate.runtime-gFr2Gsjz.js} +4 -4
- package/dist/chunks/{generate.runtime-CqncBFNg.js.map → generate.runtime-gFr2Gsjz.js.map} +1 -1
- package/dist/chunks/{generate.runtime-CK10Mum5.js → generate.runtime-kpqW3dVO.js} +25 -25
- package/dist/chunks/{generate.runtime-CK10Mum5.js.map → generate.runtime-kpqW3dVO.js.map} +1 -1
- package/dist/chunks/{generate.runtime-Dl6OQ7pe.js → generate.runtime-wGRE1zwZ.js} +4 -4
- package/dist/chunks/{generate.runtime-Dl6OQ7pe.js.map → generate.runtime-wGRE1zwZ.js.map} +1 -1
- package/dist/chunks/{generate.runtime-aQnBmH8D.js → generate.runtime-wziCW3ct.js} +69 -69
- package/dist/chunks/{generate.runtime-aQnBmH8D.js.map → generate.runtime-wziCW3ct.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DJ9MVVPC.js → generate.runtime-x-o4LS8d.js} +123 -110
- package/dist/chunks/generate.runtime-x-o4LS8d.js.map +1 -0
- package/dist/chunks/modify-file-289rStJ2.js +53 -0
- package/dist/chunks/modify-file-289rStJ2.js.map +1 -0
- package/dist/chunks/{modify-nav-user-BLyrW2sK.js → modify-nav-user-B8h8WTrM.js} +2 -2
- package/dist/chunks/{modify-nav-user-BLyrW2sK.js.map → modify-nav-user-B8h8WTrM.js.map} +1 -1
- package/dist/chunks/{pocketbase-CgwbH1gI.js → pocketbase-B017Cqjq.js} +2 -2
- package/dist/chunks/{pocketbase-CgwbH1gI.js.map → pocketbase-B017Cqjq.js.map} +1 -1
- package/dist/chunks/providers-CL9kQ4hp.js +98 -0
- package/dist/chunks/providers-CL9kQ4hp.js.map +1 -0
- package/dist/chunks/providers-CN5J5_fY.js +38 -0
- package/dist/chunks/providers-CN5J5_fY.js.map +1 -0
- package/dist/chunks/{shared-Cc_ns5-y.js → shared-BPlAVf-T.js} +2 -2
- package/dist/chunks/{shared-Cc_ns5-y.js.map → shared-BPlAVf-T.js.map} +1 -1
- package/dist/chunks/shopify-page-D-VFwGxI.js +11 -0
- package/dist/chunks/shopify-page-D-VFwGxI.js.map +1 -0
- package/dist/chunks/site-DkU1-VRq.js +108 -0
- package/dist/chunks/site-DkU1-VRq.js.map +1 -0
- package/dist/chunks/stripe-customer-B3tP8gtD.js +6 -0
- package/dist/chunks/stripe-customer-B3tP8gtD.js.map +1 -0
- package/dist/chunks/{svelte-file-B3RfgVdt.js → svelte-file-Dv5-bl79.js} +37 -2
- package/dist/chunks/svelte-file-Dv5-bl79.js.map +1 -0
- package/dist/chunks/{table-core-DhDqT03G.js → table-core-vXEjJDYP.js} +2 -2
- package/dist/chunks/{table-core-DhDqT03G.js.map → table-core-vXEjJDYP.js.map} +1 -1
- package/dist/chunks/{test-setup-B9fQ5L_-.js → test-setup-CAfgVlwc.js} +3 -3
- package/dist/chunks/{test-setup-B9fQ5L_-.js.map → test-setup-CAfgVlwc.js.map} +1 -1
- package/dist/chunks/{ui-CuCsupFq.js → ui-CTdsenEv.js} +3 -3
- package/dist/chunks/{ui-CuCsupFq.js.map → ui-CTdsenEv.js.map} +1 -1
- package/dist/chunks/{whatsapp-CguKGTtw.js → whatsapp-5qJ_xCV1.js} +2 -2
- package/dist/chunks/{whatsapp-CguKGTtw.js.map → whatsapp-5qJ_xCV1.js.map} +1 -1
- package/dist/chunks/{write-result-DiZsCS_y.js → write-result-0HYIr5a6.js} +4 -4
- package/dist/chunks/write-result-0HYIr5a6.js.map +1 -0
- package/dist/index.d.ts +283 -22
- package/dist/index.js +2233 -2031
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/_page-e_I-fdSR.js.map +0 -1
- package/dist/chunks/collections-zzZ_HQxB.js +0 -192
- package/dist/chunks/collections-zzZ_HQxB.js.map +0 -1
- package/dist/chunks/constants-Rq8SCXwH.js.map +0 -1
- package/dist/chunks/dispatch-D4TN9pdW.js +0 -6
- package/dist/chunks/dispatch-D4TN9pdW.js.map +0 -1
- package/dist/chunks/env-vars-CcE6ODqC.js.map +0 -1
- package/dist/chunks/env-vars-De0Xs0L2.js +0 -20
- package/dist/chunks/env-vars-De0Xs0L2.js.map +0 -1
- package/dist/chunks/generate.runtime-BK3mR0Rj.js.map +0 -1
- package/dist/chunks/generate.runtime-CbE9RHcf.js.map +0 -1
- package/dist/chunks/generate.runtime-DJ9MVVPC.js.map +0 -1
- package/dist/chunks/generate.runtime-EQnytCFL.js +0 -122
- package/dist/chunks/generate.runtime-EQnytCFL.js.map +0 -1
- package/dist/chunks/modify-file-DK-tCH9k.js +0 -46
- package/dist/chunks/modify-file-DK-tCH9k.js.map +0 -1
- package/dist/chunks/providers-BHR6-XZ7.js +0 -76
- package/dist/chunks/providers-BHR6-XZ7.js.map +0 -1
- package/dist/chunks/site-lj0CDdQ1.js +0 -55
- package/dist/chunks/site-lj0CDdQ1.js.map +0 -1
- package/dist/chunks/svelte-file-B3RfgVdt.js.map +0 -1
- package/dist/chunks/write-result-DiZsCS_y.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare interface ApplyThemeOptions {
|
|
|
31
31
|
theme: string;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export declare const byCategory: Record<"auth" | "content" | "
|
|
34
|
+
export declare const byCategory: Record<"auth" | "content" | "api" | "backend" | "i18n" | "payments" | "generators" | "ai" | "analytics", ({
|
|
35
35
|
version: string;
|
|
36
36
|
slug: "generate-form";
|
|
37
37
|
source: string;
|
|
@@ -481,7 +481,7 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
481
481
|
summary: string;
|
|
482
482
|
requires: {
|
|
483
483
|
auth: true;
|
|
484
|
-
api:
|
|
484
|
+
api: false;
|
|
485
485
|
apiKeys: false;
|
|
486
486
|
backend: true;
|
|
487
487
|
i18n: false;
|
|
@@ -706,14 +706,49 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
706
706
|
auth: false;
|
|
707
707
|
api: false;
|
|
708
708
|
apiKeys: false;
|
|
709
|
-
backend:
|
|
709
|
+
backend: false;
|
|
710
710
|
i18n: false;
|
|
711
711
|
teams: false;
|
|
712
712
|
payments: false;
|
|
713
713
|
blog: false;
|
|
714
714
|
contentNegotiation: false;
|
|
715
715
|
cms: false;
|
|
716
|
-
|
|
716
|
+
ui: "shadcn";
|
|
717
|
+
};
|
|
718
|
+
category: "payments";
|
|
719
|
+
tags: string[];
|
|
720
|
+
command: {
|
|
721
|
+
raw: string;
|
|
722
|
+
base: string;
|
|
723
|
+
argv: never[];
|
|
724
|
+
};
|
|
725
|
+
examples: {
|
|
726
|
+
command: string;
|
|
727
|
+
description: string;
|
|
728
|
+
}[];
|
|
729
|
+
tests: number;
|
|
730
|
+
baseline: "velastack";
|
|
731
|
+
providers: Provider[];
|
|
732
|
+
generate: typeof generate;
|
|
733
|
+
} | {
|
|
734
|
+
version: string;
|
|
735
|
+
slug: "enable-ecommerce";
|
|
736
|
+
source: string;
|
|
737
|
+
docs: string;
|
|
738
|
+
plan: "pro";
|
|
739
|
+
title: string;
|
|
740
|
+
summary: string;
|
|
741
|
+
requires: {
|
|
742
|
+
auth: false;
|
|
743
|
+
api: false;
|
|
744
|
+
apiKeys: false;
|
|
745
|
+
backend: false;
|
|
746
|
+
i18n: false;
|
|
747
|
+
teams: false;
|
|
748
|
+
payments: true;
|
|
749
|
+
blog: false;
|
|
750
|
+
contentNegotiation: false;
|
|
751
|
+
cms: false;
|
|
717
752
|
ui: "shadcn";
|
|
718
753
|
};
|
|
719
754
|
category: "payments";
|
|
@@ -726,6 +761,8 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
726
761
|
examples: never[];
|
|
727
762
|
tests: number;
|
|
728
763
|
baseline: "velastack";
|
|
764
|
+
providers: Provider[];
|
|
765
|
+
inheritsProvider: string;
|
|
729
766
|
generate: typeof generate;
|
|
730
767
|
} | {
|
|
731
768
|
version: string;
|
|
@@ -748,6 +785,9 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
748
785
|
cms: false;
|
|
749
786
|
workflows: true;
|
|
750
787
|
ui: "shadcn";
|
|
788
|
+
providers: {
|
|
789
|
+
payments: string[];
|
|
790
|
+
};
|
|
751
791
|
};
|
|
752
792
|
category: "payments";
|
|
753
793
|
tags: string[];
|
|
@@ -1093,8 +1133,8 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
1093
1133
|
title: string;
|
|
1094
1134
|
summary: string;
|
|
1095
1135
|
requires: {
|
|
1096
|
-
auth:
|
|
1097
|
-
api:
|
|
1136
|
+
auth: false;
|
|
1137
|
+
api: false;
|
|
1098
1138
|
apiKeys: true;
|
|
1099
1139
|
backend: true;
|
|
1100
1140
|
i18n: false;
|
|
@@ -1248,7 +1288,7 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
1248
1288
|
title: string;
|
|
1249
1289
|
summary: string;
|
|
1250
1290
|
requires: {
|
|
1251
|
-
auth:
|
|
1291
|
+
auth: false;
|
|
1252
1292
|
api: false;
|
|
1253
1293
|
apiKeys: false;
|
|
1254
1294
|
backend: true;
|
|
@@ -1279,7 +1319,7 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
1279
1319
|
title: string;
|
|
1280
1320
|
summary: string;
|
|
1281
1321
|
requires: {
|
|
1282
|
-
auth:
|
|
1322
|
+
auth: false;
|
|
1283
1323
|
api: false;
|
|
1284
1324
|
apiKeys: false;
|
|
1285
1325
|
backend: true;
|
|
@@ -1313,7 +1353,7 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
1313
1353
|
auth: false;
|
|
1314
1354
|
api: false;
|
|
1315
1355
|
apiKeys: false;
|
|
1316
|
-
backend:
|
|
1356
|
+
backend: false;
|
|
1317
1357
|
i18n: false;
|
|
1318
1358
|
teams: false;
|
|
1319
1359
|
payments: true;
|
|
@@ -1332,6 +1372,37 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
1332
1372
|
tests: number;
|
|
1333
1373
|
baseline: "velastack";
|
|
1334
1374
|
generate: typeof generate;
|
|
1375
|
+
} | {
|
|
1376
|
+
version: string;
|
|
1377
|
+
slug: "disable-ecommerce";
|
|
1378
|
+
source: string;
|
|
1379
|
+
docs: string;
|
|
1380
|
+
plan: "pro";
|
|
1381
|
+
title: string;
|
|
1382
|
+
summary: string;
|
|
1383
|
+
requires: {
|
|
1384
|
+
auth: false;
|
|
1385
|
+
api: false;
|
|
1386
|
+
apiKeys: false;
|
|
1387
|
+
backend: false;
|
|
1388
|
+
i18n: false;
|
|
1389
|
+
teams: false;
|
|
1390
|
+
payments: false;
|
|
1391
|
+
blog: false;
|
|
1392
|
+
contentNegotiation: false;
|
|
1393
|
+
cms: false;
|
|
1394
|
+
};
|
|
1395
|
+
category: "payments";
|
|
1396
|
+
tags: string[];
|
|
1397
|
+
command: {
|
|
1398
|
+
raw: string;
|
|
1399
|
+
base: string;
|
|
1400
|
+
argv: never[];
|
|
1401
|
+
};
|
|
1402
|
+
examples: never[];
|
|
1403
|
+
tests: number;
|
|
1404
|
+
baseline: "velastack";
|
|
1405
|
+
generate: typeof generate;
|
|
1335
1406
|
} | {
|
|
1336
1407
|
version: string;
|
|
1337
1408
|
slug: "disable-subscriptions";
|
|
@@ -1341,7 +1412,7 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
1341
1412
|
title: string;
|
|
1342
1413
|
summary: string;
|
|
1343
1414
|
requires: {
|
|
1344
|
-
auth:
|
|
1415
|
+
auth: false;
|
|
1345
1416
|
api: false;
|
|
1346
1417
|
apiKeys: false;
|
|
1347
1418
|
backend: true;
|
|
@@ -1351,6 +1422,9 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
1351
1422
|
blog: false;
|
|
1352
1423
|
contentNegotiation: false;
|
|
1353
1424
|
cms: false;
|
|
1425
|
+
providers: {
|
|
1426
|
+
payments: string[];
|
|
1427
|
+
};
|
|
1354
1428
|
};
|
|
1355
1429
|
category: "payments";
|
|
1356
1430
|
tags: string[];
|
|
@@ -1398,6 +1472,9 @@ export declare const byCategory: Record<"auth" | "content" | "generators" | "ai"
|
|
|
1398
1472
|
|
|
1399
1473
|
export declare const bySlug: Record<Slug, PatternEntry>;
|
|
1400
1474
|
|
|
1475
|
+
/** `analytics` for `enable-analytics`: how the capability is named to users. */
|
|
1476
|
+
export declare function capabilityName(slug: string): string;
|
|
1477
|
+
|
|
1401
1478
|
export declare type Category = PatternEntry["category"];
|
|
1402
1479
|
|
|
1403
1480
|
declare interface Collection {
|
|
@@ -1462,6 +1539,24 @@ declare interface CollectionSpec {
|
|
|
1462
1539
|
|
|
1463
1540
|
export declare type Component = string;
|
|
1464
1541
|
|
|
1542
|
+
/** The providers `detectProviders` found in a project, by capability. */
|
|
1543
|
+
export declare interface DetectedProviders {
|
|
1544
|
+
/** `{ payments: "stripe", analytics: "plausible" }` */
|
|
1545
|
+
providers: Record<string, string>;
|
|
1546
|
+
/** Capabilities where more than one provider's markers are present. */
|
|
1547
|
+
ambiguous: {
|
|
1548
|
+
capability: string;
|
|
1549
|
+
ids: string[];
|
|
1550
|
+
}[];
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
/**
|
|
1554
|
+
* The provider in use for each capability (`{ payments: "stripe" }`), read
|
|
1555
|
+
* from what each registered provider leaves in the project. Node-only, loaded
|
|
1556
|
+
* on first call like `installComponents`.
|
|
1557
|
+
*/
|
|
1558
|
+
export declare function detectProviders(root: string): Promise<DetectedProviders>;
|
|
1559
|
+
|
|
1465
1560
|
/** Add missing package.json `imports` entries; never overwrites a different value. */
|
|
1466
1561
|
export declare function ensurePackageImports(root: string, entries: Record<string, string>): Promise<PackageJsonEditResult>;
|
|
1467
1562
|
|
|
@@ -1793,6 +1888,12 @@ export declare interface Options {
|
|
|
1793
1888
|
* the chosen provider's `env` keys, written to `.env` by the pattern.
|
|
1794
1889
|
*/
|
|
1795
1890
|
input: Record<string, any>;
|
|
1891
|
+
/**
|
|
1892
|
+
* The provider in use per capability (`{ payments: "stripe" }`), as
|
|
1893
|
+
* `detectProviders` reads it from the project. Detected by the caller;
|
|
1894
|
+
* absent in preview and in callers that predate it.
|
|
1895
|
+
*/
|
|
1896
|
+
providers?: Partial<Record<string, string>>;
|
|
1796
1897
|
logger?: Logger;
|
|
1797
1898
|
}
|
|
1798
1899
|
|
|
@@ -1831,7 +1932,7 @@ export declare interface Pattern {
|
|
|
1831
1932
|
/** The pattern's docs page as a path under velastack.dev/docs, e.g. `/enable/auth`. */
|
|
1832
1933
|
docs: string;
|
|
1833
1934
|
summary: string;
|
|
1834
|
-
requires:
|
|
1935
|
+
requires: Requires;
|
|
1835
1936
|
category: string;
|
|
1836
1937
|
tags: string[];
|
|
1837
1938
|
command: {
|
|
@@ -1844,6 +1945,7 @@ export declare interface Pattern {
|
|
|
1844
1945
|
baseline: "sv" | "velastack" | "velastack-auth";
|
|
1845
1946
|
variants?: string[];
|
|
1846
1947
|
providers?: Provider[];
|
|
1948
|
+
inheritsProvider?: string;
|
|
1847
1949
|
generate: (options: Options) => Promise<Result>;
|
|
1848
1950
|
}
|
|
1849
1951
|
|
|
@@ -2299,7 +2401,7 @@ export declare const patterns: ({
|
|
|
2299
2401
|
summary: string;
|
|
2300
2402
|
requires: {
|
|
2301
2403
|
auth: true;
|
|
2302
|
-
api:
|
|
2404
|
+
api: false;
|
|
2303
2405
|
apiKeys: false;
|
|
2304
2406
|
backend: true;
|
|
2305
2407
|
i18n: false;
|
|
@@ -2524,14 +2626,49 @@ export declare const patterns: ({
|
|
|
2524
2626
|
auth: false;
|
|
2525
2627
|
api: false;
|
|
2526
2628
|
apiKeys: false;
|
|
2527
|
-
backend:
|
|
2629
|
+
backend: false;
|
|
2528
2630
|
i18n: false;
|
|
2529
2631
|
teams: false;
|
|
2530
2632
|
payments: false;
|
|
2531
2633
|
blog: false;
|
|
2532
2634
|
contentNegotiation: false;
|
|
2533
2635
|
cms: false;
|
|
2534
|
-
|
|
2636
|
+
ui: "shadcn";
|
|
2637
|
+
};
|
|
2638
|
+
category: "payments";
|
|
2639
|
+
tags: string[];
|
|
2640
|
+
command: {
|
|
2641
|
+
raw: string;
|
|
2642
|
+
base: string;
|
|
2643
|
+
argv: never[];
|
|
2644
|
+
};
|
|
2645
|
+
examples: {
|
|
2646
|
+
command: string;
|
|
2647
|
+
description: string;
|
|
2648
|
+
}[];
|
|
2649
|
+
tests: number;
|
|
2650
|
+
baseline: "velastack";
|
|
2651
|
+
providers: Provider[];
|
|
2652
|
+
generate: typeof generate;
|
|
2653
|
+
} | {
|
|
2654
|
+
version: string;
|
|
2655
|
+
slug: "enable-ecommerce";
|
|
2656
|
+
source: string;
|
|
2657
|
+
docs: string;
|
|
2658
|
+
plan: "pro";
|
|
2659
|
+
title: string;
|
|
2660
|
+
summary: string;
|
|
2661
|
+
requires: {
|
|
2662
|
+
auth: false;
|
|
2663
|
+
api: false;
|
|
2664
|
+
apiKeys: false;
|
|
2665
|
+
backend: false;
|
|
2666
|
+
i18n: false;
|
|
2667
|
+
teams: false;
|
|
2668
|
+
payments: true;
|
|
2669
|
+
blog: false;
|
|
2670
|
+
contentNegotiation: false;
|
|
2671
|
+
cms: false;
|
|
2535
2672
|
ui: "shadcn";
|
|
2536
2673
|
};
|
|
2537
2674
|
category: "payments";
|
|
@@ -2544,6 +2681,8 @@ export declare const patterns: ({
|
|
|
2544
2681
|
examples: never[];
|
|
2545
2682
|
tests: number;
|
|
2546
2683
|
baseline: "velastack";
|
|
2684
|
+
providers: Provider[];
|
|
2685
|
+
inheritsProvider: string;
|
|
2547
2686
|
generate: typeof generate;
|
|
2548
2687
|
} | {
|
|
2549
2688
|
version: string;
|
|
@@ -2566,6 +2705,9 @@ export declare const patterns: ({
|
|
|
2566
2705
|
cms: false;
|
|
2567
2706
|
workflows: true;
|
|
2568
2707
|
ui: "shadcn";
|
|
2708
|
+
providers: {
|
|
2709
|
+
payments: string[];
|
|
2710
|
+
};
|
|
2569
2711
|
};
|
|
2570
2712
|
category: "payments";
|
|
2571
2713
|
tags: string[];
|
|
@@ -2911,8 +3053,8 @@ export declare const patterns: ({
|
|
|
2911
3053
|
title: string;
|
|
2912
3054
|
summary: string;
|
|
2913
3055
|
requires: {
|
|
2914
|
-
auth:
|
|
2915
|
-
api:
|
|
3056
|
+
auth: false;
|
|
3057
|
+
api: false;
|
|
2916
3058
|
apiKeys: true;
|
|
2917
3059
|
backend: true;
|
|
2918
3060
|
i18n: false;
|
|
@@ -3066,7 +3208,7 @@ export declare const patterns: ({
|
|
|
3066
3208
|
title: string;
|
|
3067
3209
|
summary: string;
|
|
3068
3210
|
requires: {
|
|
3069
|
-
auth:
|
|
3211
|
+
auth: false;
|
|
3070
3212
|
api: false;
|
|
3071
3213
|
apiKeys: false;
|
|
3072
3214
|
backend: true;
|
|
@@ -3097,7 +3239,7 @@ export declare const patterns: ({
|
|
|
3097
3239
|
title: string;
|
|
3098
3240
|
summary: string;
|
|
3099
3241
|
requires: {
|
|
3100
|
-
auth:
|
|
3242
|
+
auth: false;
|
|
3101
3243
|
api: false;
|
|
3102
3244
|
apiKeys: false;
|
|
3103
3245
|
backend: true;
|
|
@@ -3131,7 +3273,7 @@ export declare const patterns: ({
|
|
|
3131
3273
|
auth: false;
|
|
3132
3274
|
api: false;
|
|
3133
3275
|
apiKeys: false;
|
|
3134
|
-
backend:
|
|
3276
|
+
backend: false;
|
|
3135
3277
|
i18n: false;
|
|
3136
3278
|
teams: false;
|
|
3137
3279
|
payments: true;
|
|
@@ -3150,6 +3292,37 @@ export declare const patterns: ({
|
|
|
3150
3292
|
tests: number;
|
|
3151
3293
|
baseline: "velastack";
|
|
3152
3294
|
generate: typeof generate;
|
|
3295
|
+
} | {
|
|
3296
|
+
version: string;
|
|
3297
|
+
slug: "disable-ecommerce";
|
|
3298
|
+
source: string;
|
|
3299
|
+
docs: string;
|
|
3300
|
+
plan: "pro";
|
|
3301
|
+
title: string;
|
|
3302
|
+
summary: string;
|
|
3303
|
+
requires: {
|
|
3304
|
+
auth: false;
|
|
3305
|
+
api: false;
|
|
3306
|
+
apiKeys: false;
|
|
3307
|
+
backend: false;
|
|
3308
|
+
i18n: false;
|
|
3309
|
+
teams: false;
|
|
3310
|
+
payments: false;
|
|
3311
|
+
blog: false;
|
|
3312
|
+
contentNegotiation: false;
|
|
3313
|
+
cms: false;
|
|
3314
|
+
};
|
|
3315
|
+
category: "payments";
|
|
3316
|
+
tags: string[];
|
|
3317
|
+
command: {
|
|
3318
|
+
raw: string;
|
|
3319
|
+
base: string;
|
|
3320
|
+
argv: never[];
|
|
3321
|
+
};
|
|
3322
|
+
examples: never[];
|
|
3323
|
+
tests: number;
|
|
3324
|
+
baseline: "velastack";
|
|
3325
|
+
generate: typeof generate;
|
|
3153
3326
|
} | {
|
|
3154
3327
|
version: string;
|
|
3155
3328
|
slug: "disable-subscriptions";
|
|
@@ -3159,7 +3332,7 @@ export declare const patterns: ({
|
|
|
3159
3332
|
title: string;
|
|
3160
3333
|
summary: string;
|
|
3161
3334
|
requires: {
|
|
3162
|
-
auth:
|
|
3335
|
+
auth: false;
|
|
3163
3336
|
api: false;
|
|
3164
3337
|
apiKeys: false;
|
|
3165
3338
|
backend: true;
|
|
@@ -3169,6 +3342,9 @@ export declare const patterns: ({
|
|
|
3169
3342
|
blog: false;
|
|
3170
3343
|
contentNegotiation: false;
|
|
3171
3344
|
cms: false;
|
|
3345
|
+
providers: {
|
|
3346
|
+
payments: string[];
|
|
3347
|
+
};
|
|
3172
3348
|
};
|
|
3173
3349
|
category: "payments";
|
|
3174
3350
|
tags: string[];
|
|
@@ -3223,6 +3399,13 @@ export declare interface Provider {
|
|
|
3223
3399
|
id: string;
|
|
3224
3400
|
label: string;
|
|
3225
3401
|
env?: ProviderEnvVar[];
|
|
3402
|
+
/**
|
|
3403
|
+
* Any one present means this provider is in use. Defaults to the first
|
|
3404
|
+
* `env` key's declaration in `src/env.ts`.
|
|
3405
|
+
*/
|
|
3406
|
+
markers?: ProviderMarker[];
|
|
3407
|
+
/** Prerequisites when this provider is chosen, on top of the pattern's own. */
|
|
3408
|
+
requires?: Partial<Requires>;
|
|
3226
3409
|
}
|
|
3227
3410
|
|
|
3228
3411
|
/** One `.env` key a provider needs; the CLI prompts for it and the pattern writes it. */
|
|
@@ -3231,6 +3414,8 @@ export declare interface ProviderEnvVar {
|
|
|
3231
3414
|
key: string;
|
|
3232
3415
|
/** Prompt label shown by the CLI. */
|
|
3233
3416
|
label: string;
|
|
3417
|
+
/** What `src/env.ts` says the variable is for; the label when absent. */
|
|
3418
|
+
description?: string;
|
|
3234
3419
|
/** Prompt hint only; never written to `.env`. */
|
|
3235
3420
|
placeholder?: string;
|
|
3236
3421
|
/** Written to `.env` when the user supplies nothing. */
|
|
@@ -3246,6 +3431,11 @@ export declare interface ProviderEnvVar {
|
|
|
3246
3431
|
* not by a `PUBLIC_` prefix.
|
|
3247
3432
|
*/
|
|
3248
3433
|
public?: boolean;
|
|
3434
|
+
/**
|
|
3435
|
+
* The CLI refuses a blank value for it. The pattern still writes whatever
|
|
3436
|
+
* it is handed.
|
|
3437
|
+
*/
|
|
3438
|
+
required?: boolean;
|
|
3249
3439
|
}
|
|
3250
3440
|
|
|
3251
3441
|
/**
|
|
@@ -3257,7 +3447,27 @@ export declare function providerEnvVars(provider: Provider): EnvVarSpec[];
|
|
|
3257
3447
|
/** `--provider <id>` or `--provider=<id>`, for callers that hand flags through in argv. */
|
|
3258
3448
|
export declare function providerFromArgv(argv: string[]): string | undefined;
|
|
3259
3449
|
|
|
3260
|
-
|
|
3450
|
+
/**
|
|
3451
|
+
* Something only one provider leaves in a project, so the provider in use can
|
|
3452
|
+
* be read back from disk instead of being recorded anywhere: a name declared
|
|
3453
|
+
* in `src/env.ts`, an app-relative path, or a `package.json` dependency.
|
|
3454
|
+
*/
|
|
3455
|
+
export declare type ProviderMarker = {
|
|
3456
|
+
env: string;
|
|
3457
|
+
} | {
|
|
3458
|
+
path: string;
|
|
3459
|
+
} | {
|
|
3460
|
+
dependency: string;
|
|
3461
|
+
};
|
|
3462
|
+
|
|
3463
|
+
/**
|
|
3464
|
+
* What `detectProviders` looks for: the declared markers, else the first env
|
|
3465
|
+
* key's declaration in `src/env.ts`. Empty for a provider with neither, which
|
|
3466
|
+
* can't be detected.
|
|
3467
|
+
*/
|
|
3468
|
+
export declare function providerMarkers(provider: Provider): ProviderMarker[];
|
|
3469
|
+
|
|
3470
|
+
declare type ProviderPattern = Pick<Pattern, "slug" | "providers" | "inheritsProvider">;
|
|
3261
3471
|
|
|
3262
3472
|
/** One entry of a style's registry index (`/registry/styles/<style>/index.json`). */
|
|
3263
3473
|
export declare interface RegistryItem {
|
|
@@ -3283,6 +3493,24 @@ export declare class RegistryUnavailableError extends Error {
|
|
|
3283
3493
|
*/
|
|
3284
3494
|
export declare function removePackageImports(root: string, keys: string[], expected?: Record<string, string>): Promise<PackageJsonEditResult>;
|
|
3285
3495
|
|
|
3496
|
+
export declare interface RequirementsContext {
|
|
3497
|
+
features: Features;
|
|
3498
|
+
detected: DetectedProviders;
|
|
3499
|
+
/** The provider chosen for this run, when the caller already knows it. */
|
|
3500
|
+
provider?: string;
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
/**
|
|
3504
|
+
* What a pattern needs before it can run. A `true` feature is required;
|
|
3505
|
+
* `false` only means "not required". `providers` narrows a capability to the
|
|
3506
|
+
* providers the pattern supports: `{ payments: ["stripe"] }`.
|
|
3507
|
+
*/
|
|
3508
|
+
export declare interface Requires extends Features {
|
|
3509
|
+
providers?: Partial<Record<string, string[]>>;
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
declare type RequiresPattern = Pick<Pattern, "requires" | "providers" | "inheritsProvider">;
|
|
3513
|
+
|
|
3286
3514
|
/**
|
|
3287
3515
|
* The provider a generate call should produce, from `input.provider` or
|
|
3288
3516
|
* `--provider` in argv.
|
|
@@ -3291,8 +3519,11 @@ export declare function removePackageImports(root: string, keys: string[], expec
|
|
|
3291
3519
|
* all, a runtime call is rejected too: the CLI always supplies one, so this
|
|
3292
3520
|
* is a caller bug. A preview call falls back to the first declared provider,
|
|
3293
3521
|
* because the website loads patterns with argv only.
|
|
3522
|
+
*
|
|
3523
|
+
* A pattern with `inheritsProvider` takes the provider detected for that
|
|
3524
|
+
* capability instead; see `resolveInheritedProvider`.
|
|
3294
3525
|
*/
|
|
3295
|
-
export declare function resolveProvider(pattern: ProviderPattern, options: Pick<Options, "input" | "argv" | "env">): Provider;
|
|
3526
|
+
export declare function resolveProvider(pattern: ProviderPattern, options: Pick<Options, "input" | "argv" | "env" | "providers">): Provider;
|
|
3296
3527
|
|
|
3297
3528
|
declare interface Result {
|
|
3298
3529
|
creates: File_2[];
|
|
@@ -3374,6 +3605,36 @@ export declare interface SwitchStyleResult {
|
|
|
3374
3605
|
|
|
3375
3606
|
export declare function unknownProviderMessage(name: string, raw: string, providers: Provider[]): string;
|
|
3376
3607
|
|
|
3608
|
+
/** One prerequisite a project is missing for a pattern. */
|
|
3609
|
+
export declare type Unmet = {
|
|
3610
|
+
kind: "feature";
|
|
3611
|
+
feature: keyof Features;
|
|
3612
|
+
} | {
|
|
3613
|
+
kind: "provider";
|
|
3614
|
+
capability: string;
|
|
3615
|
+
/** Provider ids that would satisfy the pattern. */
|
|
3616
|
+
want: string[];
|
|
3617
|
+
/** What the project has, `null` for none. */
|
|
3618
|
+
have: string | null;
|
|
3619
|
+
} | {
|
|
3620
|
+
kind: "ambiguous";
|
|
3621
|
+
capability: string;
|
|
3622
|
+
ids: string[];
|
|
3623
|
+
};
|
|
3624
|
+
|
|
3625
|
+
/**
|
|
3626
|
+
* What `pattern` needs that the project doesn't have, in a stable order:
|
|
3627
|
+
* missing features, then providers, then ambiguous detections. Empty means
|
|
3628
|
+
* the pattern can run.
|
|
3629
|
+
*
|
|
3630
|
+
* Only `true` flags are requirements. `false` means "not required", never
|
|
3631
|
+
* "must be absent", and `ui` is left to its own check, since it is a value
|
|
3632
|
+
* rather than a flag. The chosen provider's own `requires` is added to the
|
|
3633
|
+
* pattern's; for a pattern with `inheritsProvider`, the chosen provider is the
|
|
3634
|
+
* detected one.
|
|
3635
|
+
*/
|
|
3636
|
+
export declare function unmetRequirements(pattern: RequiresPattern, context: RequirementsContext): Unmet[];
|
|
3637
|
+
|
|
3377
3638
|
/**
|
|
3378
3639
|
* Remove the declarations of `names` from `src/env.ts`. `deleted` means only
|
|
3379
3640
|
* the import and an empty `variables` are left (the emptied file is saved;
|