shopify-accelerate-app 1.0.10 → 1.0.12
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/@types/shopify.ts +5 -269
- package/package.json +1 -1
- package/src/esbuild/esbuild.ts +3 -1
package/@types/shopify.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { _Article_metafields, _Blog_metafields, _Collection_metafields, _Page_metafields, _Product_metafields, _Shop_metafields, _Variant_metafields } from "./metafields";
|
|
2
|
-
import { Sections } from "./sections";
|
|
3
|
-
import { SettingsSchema } from "./settings";
|
|
4
|
-
|
|
5
1
|
export type ShopifyHeader = {
|
|
6
2
|
content: string;
|
|
7
3
|
type: "header";
|
|
@@ -481,19 +477,6 @@ export type ShopifySectionPreset<T = unknown> = {
|
|
|
481
477
|
: { [T: string]: string | number | boolean } | undefined;
|
|
482
478
|
};
|
|
483
479
|
|
|
484
|
-
export type PresetSchema<T = never> = {
|
|
485
|
-
type: T extends { type: string } ? T["type"] : Sections["type"];
|
|
486
|
-
name: string;
|
|
487
|
-
presets: {
|
|
488
|
-
enabled_on?: string[];
|
|
489
|
-
settings?: ShopifySectionPreset<T>["settings"];
|
|
490
|
-
blocks?: /* @ts-ignore */
|
|
491
|
-
Record<string, ShopifySectionPreset<T>["blocks"][number]> | ShopifySectionPreset<T>["blocks"];
|
|
492
|
-
block_order?: string[];
|
|
493
|
-
custom_css?: string[];
|
|
494
|
-
}[];
|
|
495
|
-
};
|
|
496
|
-
|
|
497
480
|
export type ShopifySectionBlock =
|
|
498
481
|
| {
|
|
499
482
|
name: string;
|
|
@@ -568,17 +551,6 @@ export type ShopifySection<T = never> = {
|
|
|
568
551
|
}
|
|
569
552
|
);
|
|
570
553
|
|
|
571
|
-
export type HeadlessSection<T = never> = {
|
|
572
|
-
name: string;
|
|
573
|
-
blocks?: HeadlessSectionBlock[];
|
|
574
|
-
default?: ShopifySectionDefault<T>;
|
|
575
|
-
disabled?: boolean;
|
|
576
|
-
limit?: number;
|
|
577
|
-
max_blocks?: number;
|
|
578
|
-
presets?: ShopifySectionPreset<T>[];
|
|
579
|
-
settings?: (HeadlessSettingsInput | ShopifyHeader | ShopifyParagraph)[];
|
|
580
|
-
};
|
|
581
|
-
|
|
582
554
|
export type ShopifyBlock<T = never> = {
|
|
583
555
|
name: string;
|
|
584
556
|
blocks?: ShopifySectionBlock[];
|
|
@@ -589,16 +561,6 @@ export type ShopifyBlock<T = never> = {
|
|
|
589
561
|
tag?: "article" | "aside" | "div" | "footer" | "header" | "section" | null;
|
|
590
562
|
};
|
|
591
563
|
|
|
592
|
-
export type HeadlessBlock<T = never> = {
|
|
593
|
-
name: string;
|
|
594
|
-
blocks?: HeadlessSectionBlock[];
|
|
595
|
-
class?: string;
|
|
596
|
-
disabled?: boolean;
|
|
597
|
-
presets?: ShopifySectionPreset<T>[];
|
|
598
|
-
settings?: (HeadlessSettingsInput | ShopifyHeader | ShopifyParagraph)[];
|
|
599
|
-
tag?: "article" | "aside" | "div" | "footer" | "header" | "section" | null;
|
|
600
|
-
};
|
|
601
|
-
|
|
602
564
|
type ShopifyAppBlockDefault<T = never> = {
|
|
603
565
|
settings?: T extends never
|
|
604
566
|
? { [T: string]: string | number | boolean } | undefined
|
|
@@ -670,7 +632,7 @@ export type _Page_liquid = {
|
|
|
670
632
|
content: string;
|
|
671
633
|
handle: string;
|
|
672
634
|
id: number;
|
|
673
|
-
|
|
635
|
+
|
|
674
636
|
published_at: string;
|
|
675
637
|
template_suffix: string;
|
|
676
638
|
title: string;
|
|
@@ -684,7 +646,6 @@ export type _Blog_liquid = {
|
|
|
684
646
|
articles_count: number;
|
|
685
647
|
handle: string;
|
|
686
648
|
id: number;
|
|
687
|
-
metafields: _Blog_metafields;
|
|
688
649
|
tags: any[];
|
|
689
650
|
title: string;
|
|
690
651
|
url: string;
|
|
@@ -704,7 +665,7 @@ export type _Article_liquid = {
|
|
|
704
665
|
featured_media: Omit<_Media_liquid, "media_type" | "position" | "preview_image">;
|
|
705
666
|
handle: string;
|
|
706
667
|
id: number;
|
|
707
|
-
|
|
668
|
+
|
|
708
669
|
published_at: string;
|
|
709
670
|
tags: any[];
|
|
710
671
|
title: string;
|
|
@@ -724,59 +685,6 @@ export type _Article_liquid = {
|
|
|
724
685
|
moderated?: any;
|
|
725
686
|
};
|
|
726
687
|
|
|
727
|
-
export type _Product_liquid_json = {
|
|
728
|
-
available: boolean;
|
|
729
|
-
compare_at_price: number;
|
|
730
|
-
compare_at_price_max: number;
|
|
731
|
-
compare_at_price_min: number;
|
|
732
|
-
compare_at_price_varies: boolean;
|
|
733
|
-
content: string;
|
|
734
|
-
created_at: string;
|
|
735
|
-
description: string;
|
|
736
|
-
featured_image: string;
|
|
737
|
-
handle: string;
|
|
738
|
-
id: number;
|
|
739
|
-
images: string[];
|
|
740
|
-
media: _Media_liquid[];
|
|
741
|
-
options: string[];
|
|
742
|
-
price: number;
|
|
743
|
-
price_max: number;
|
|
744
|
-
price_min: number;
|
|
745
|
-
price_varies: boolean;
|
|
746
|
-
published_at: string;
|
|
747
|
-
requires_selling_plan: boolean;
|
|
748
|
-
selling_plan_groups: _Product_Selling_plan_groups_json[];
|
|
749
|
-
tags: string[];
|
|
750
|
-
title: string;
|
|
751
|
-
type: string;
|
|
752
|
-
variants: _Variant_liquid_json[];
|
|
753
|
-
vendor: string;
|
|
754
|
-
};
|
|
755
|
-
export type NewProductVariantsFeatured_image = {
|
|
756
|
-
created_at: string;
|
|
757
|
-
height: number;
|
|
758
|
-
id: number;
|
|
759
|
-
position: number;
|
|
760
|
-
product_id: number;
|
|
761
|
-
src: string;
|
|
762
|
-
updated_at: string;
|
|
763
|
-
variant_ids: number[];
|
|
764
|
-
width: number;
|
|
765
|
-
alt?: any;
|
|
766
|
-
};
|
|
767
|
-
export type NewProductVariantsFeatured_mediaPreview_image = {
|
|
768
|
-
aspect_ratio: number;
|
|
769
|
-
height: number;
|
|
770
|
-
src: string;
|
|
771
|
-
width: number;
|
|
772
|
-
};
|
|
773
|
-
export type NewProductVariantsFeatured_media = {
|
|
774
|
-
id: number;
|
|
775
|
-
position: number;
|
|
776
|
-
preview_image: NewProductVariantsFeatured_mediaPreview_image;
|
|
777
|
-
alt?: any;
|
|
778
|
-
};
|
|
779
|
-
|
|
780
688
|
export type _Variant_liquid_json = {
|
|
781
689
|
available: boolean;
|
|
782
690
|
barcode: string;
|
|
@@ -816,38 +724,6 @@ export type _Variant_liquid_json = {
|
|
|
816
724
|
option3?: any;
|
|
817
725
|
};
|
|
818
726
|
|
|
819
|
-
export type _Product_Selling_plan_groups_json = {
|
|
820
|
-
id: string;
|
|
821
|
-
name: string;
|
|
822
|
-
options: {
|
|
823
|
-
name: string;
|
|
824
|
-
position: number;
|
|
825
|
-
values: string[];
|
|
826
|
-
}[];
|
|
827
|
-
selling_plans: {
|
|
828
|
-
checkout_charge: {
|
|
829
|
-
value: number;
|
|
830
|
-
value_type: string;
|
|
831
|
-
};
|
|
832
|
-
id: number;
|
|
833
|
-
name: string;
|
|
834
|
-
options: {
|
|
835
|
-
name: string;
|
|
836
|
-
position: number;
|
|
837
|
-
value: string;
|
|
838
|
-
}[];
|
|
839
|
-
price_adjustments: {
|
|
840
|
-
position: number;
|
|
841
|
-
value: number;
|
|
842
|
-
value_type: string;
|
|
843
|
-
order_count?: any;
|
|
844
|
-
}[];
|
|
845
|
-
recurring_deliveries: boolean;
|
|
846
|
-
description?: any;
|
|
847
|
-
}[];
|
|
848
|
-
app_id?: any;
|
|
849
|
-
};
|
|
850
|
-
|
|
851
727
|
export type _Metafield_liquid_product_reference = {
|
|
852
728
|
type: "product_reference";
|
|
853
729
|
value?: Omit<_Product_liquid, "metafields">;
|
|
@@ -919,15 +795,6 @@ export type _Metafield_liquid_list_file_reference = {
|
|
|
919
795
|
value?: (_Metafield_liquid_file_reference_generic | _Metafield_liquid_file_reference_image)[];
|
|
920
796
|
};
|
|
921
797
|
|
|
922
|
-
export type _Metafield_liquid_file_reference_force_generic = {
|
|
923
|
-
type: "file_reference";
|
|
924
|
-
value?: _Metafield_liquid_file_reference_generic;
|
|
925
|
-
};
|
|
926
|
-
export type _Metafield_liquid_file_reference_force_image = {
|
|
927
|
-
type: "file_reference";
|
|
928
|
-
value?: _Metafield_liquid_file_reference_image;
|
|
929
|
-
};
|
|
930
|
-
|
|
931
798
|
export type _Metafield_liquid =
|
|
932
799
|
| {
|
|
933
800
|
type:
|
|
@@ -1024,7 +891,7 @@ export type _Variant_liquid = {
|
|
|
1024
891
|
id: number;
|
|
1025
892
|
inventory_policy: string;
|
|
1026
893
|
inventory_quantity: number;
|
|
1027
|
-
|
|
894
|
+
|
|
1028
895
|
option1: string;
|
|
1029
896
|
options: string[];
|
|
1030
897
|
price: number;
|
|
@@ -1096,7 +963,7 @@ export type _Product_liquid = {
|
|
|
1096
963
|
id: number;
|
|
1097
964
|
images: any[];
|
|
1098
965
|
media: _Media_liquid[];
|
|
1099
|
-
|
|
966
|
+
|
|
1100
967
|
options: string[];
|
|
1101
968
|
options_with_values: { name: string; position: 1 | 2 | 3; values: string[] }[];
|
|
1102
969
|
page_description: string;
|
|
@@ -1241,7 +1108,7 @@ export type _Collection_liquid = {
|
|
|
1241
1108
|
filters: _Collection_filter[];
|
|
1242
1109
|
handle: string;
|
|
1243
1110
|
id: number;
|
|
1244
|
-
|
|
1111
|
+
|
|
1245
1112
|
products: _Product_liquid[];
|
|
1246
1113
|
products_count: number;
|
|
1247
1114
|
published_at: string;
|
|
@@ -1392,8 +1259,6 @@ export type _Font_liquid = {
|
|
|
1392
1259
|
system?: any;
|
|
1393
1260
|
};
|
|
1394
1261
|
|
|
1395
|
-
export type _LinkLists_liquid = _Linklist_liquid[];
|
|
1396
|
-
|
|
1397
1262
|
export type _Image_liquid = {
|
|
1398
1263
|
alt: string;
|
|
1399
1264
|
aspect_ratio: number;
|
|
@@ -1426,114 +1291,6 @@ export type _Video_liquid = {
|
|
|
1426
1291
|
}[];
|
|
1427
1292
|
};
|
|
1428
1293
|
|
|
1429
|
-
export type _Shop_liquid_json = {
|
|
1430
|
-
address: {
|
|
1431
|
-
address1: string;
|
|
1432
|
-
address2: string;
|
|
1433
|
-
city: string;
|
|
1434
|
-
company: string;
|
|
1435
|
-
country: string;
|
|
1436
|
-
country_code: string;
|
|
1437
|
-
name: string;
|
|
1438
|
-
phone: string;
|
|
1439
|
-
province: string;
|
|
1440
|
-
province_code: string;
|
|
1441
|
-
zip: string;
|
|
1442
|
-
first_name?: any;
|
|
1443
|
-
last_name?: any;
|
|
1444
|
-
latitude?: any;
|
|
1445
|
-
longitude?: any;
|
|
1446
|
-
};
|
|
1447
|
-
address_city: string;
|
|
1448
|
-
address_company: string;
|
|
1449
|
-
address_country: string;
|
|
1450
|
-
address_country_upper: string;
|
|
1451
|
-
address_province: string;
|
|
1452
|
-
address_province_code: string;
|
|
1453
|
-
address_street: string;
|
|
1454
|
-
address_summary: string;
|
|
1455
|
-
address_zip: string;
|
|
1456
|
-
"checkout.guest_login": boolean;
|
|
1457
|
-
collections_count: number;
|
|
1458
|
-
currency: string;
|
|
1459
|
-
customer_accounts_enabled: boolean;
|
|
1460
|
-
customer_accounts_optional: boolean;
|
|
1461
|
-
description: string;
|
|
1462
|
-
domain: string;
|
|
1463
|
-
email: string;
|
|
1464
|
-
enabled_payment_types: string[];
|
|
1465
|
-
id: number;
|
|
1466
|
-
metafields: _Shop_metafields;
|
|
1467
|
-
money_format: string;
|
|
1468
|
-
money_with_currency_format: string;
|
|
1469
|
-
name: string;
|
|
1470
|
-
password_message: string;
|
|
1471
|
-
permanent_domain: string;
|
|
1472
|
-
phone: string;
|
|
1473
|
-
policies: any[];
|
|
1474
|
-
products_count: number;
|
|
1475
|
-
published_locales: {
|
|
1476
|
-
shop_locale: {
|
|
1477
|
-
enabled: boolean;
|
|
1478
|
-
locale: string;
|
|
1479
|
-
primary: boolean;
|
|
1480
|
-
published: boolean;
|
|
1481
|
-
};
|
|
1482
|
-
}[];
|
|
1483
|
-
secure_url: string;
|
|
1484
|
-
types: string[];
|
|
1485
|
-
url: string;
|
|
1486
|
-
vendors: string[];
|
|
1487
|
-
privacy_policy?: any;
|
|
1488
|
-
refund_policy?: any;
|
|
1489
|
-
shipping_policy?: any;
|
|
1490
|
-
subscription_policy?: any;
|
|
1491
|
-
terms_of_service?: any;
|
|
1492
|
-
};
|
|
1493
|
-
|
|
1494
|
-
export type _Request_liquid = {
|
|
1495
|
-
design_mode: boolean;
|
|
1496
|
-
host: string;
|
|
1497
|
-
locale: {
|
|
1498
|
-
shop_locale: {
|
|
1499
|
-
enabled: boolean;
|
|
1500
|
-
locale: string;
|
|
1501
|
-
primary: boolean;
|
|
1502
|
-
published: boolean;
|
|
1503
|
-
};
|
|
1504
|
-
};
|
|
1505
|
-
origin: string;
|
|
1506
|
-
page_type: string;
|
|
1507
|
-
path: string;
|
|
1508
|
-
};
|
|
1509
|
-
|
|
1510
|
-
export type _Routes_liquid = {
|
|
1511
|
-
account_addresses_url: string;
|
|
1512
|
-
account_login_url: string;
|
|
1513
|
-
account_logout_url: string;
|
|
1514
|
-
account_recover_url: string;
|
|
1515
|
-
account_register_url: string;
|
|
1516
|
-
account_url: string;
|
|
1517
|
-
all_products_collection_url: string;
|
|
1518
|
-
cart_add_url: string;
|
|
1519
|
-
cart_change_url: string;
|
|
1520
|
-
cart_clear_url: string;
|
|
1521
|
-
cart_update_url: string;
|
|
1522
|
-
cart_url: string;
|
|
1523
|
-
collections_url: string;
|
|
1524
|
-
predictive_search_url: string;
|
|
1525
|
-
product_recommendations_url: string;
|
|
1526
|
-
root_url: string;
|
|
1527
|
-
search_url: string;
|
|
1528
|
-
host?: string;
|
|
1529
|
-
};
|
|
1530
|
-
|
|
1531
|
-
export type _Recommendations_liquid = {
|
|
1532
|
-
performed: boolean;
|
|
1533
|
-
products: _Product_liquid[];
|
|
1534
|
-
products_count: number;
|
|
1535
|
-
};
|
|
1536
|
-
|
|
1537
1294
|
export type RichtextSchema =
|
|
1538
1295
|
| {
|
|
1539
1296
|
type: "root";
|
|
@@ -1581,27 +1338,6 @@ export type RichtextSchema_Text = {
|
|
|
1581
1338
|
italic?: boolean;
|
|
1582
1339
|
};
|
|
1583
1340
|
|
|
1584
|
-
export type GlobalSettings = {
|
|
1585
|
-
title: string;
|
|
1586
|
-
request: _Request_liquid | null;
|
|
1587
|
-
article: _Article_liquid | null;
|
|
1588
|
-
blog: _Blog_liquid | null;
|
|
1589
|
-
collection: _Collection_liquid | null;
|
|
1590
|
-
description: string;
|
|
1591
|
-
handle: string | null;
|
|
1592
|
-
page: _Page_liquid_json | null;
|
|
1593
|
-
product: _Product_liquid | null;
|
|
1594
|
-
file_url: string;
|
|
1595
|
-
asset_url: string;
|
|
1596
|
-
pathname: string;
|
|
1597
|
-
template: string;
|
|
1598
|
-
money_format: string;
|
|
1599
|
-
theme_id: string;
|
|
1600
|
-
theme_role: string;
|
|
1601
|
-
settings: SettingsSchema | null;
|
|
1602
|
-
shop: _Shop_liquid_json | null;
|
|
1603
|
-
};
|
|
1604
|
-
|
|
1605
1341
|
export type _Font_options =
|
|
1606
1342
|
| "mono"
|
|
1607
1343
|
| "sans-serif"
|
package/package.json
CHANGED
package/src/esbuild/esbuild.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import path from "path";
|
|
3
|
+
import { delay } from "src/utils/delay";
|
|
3
4
|
import { require } from "../../require";
|
|
4
5
|
import { config, root_dir } from "../../shopify-accelerate-app";
|
|
5
6
|
import { isBlockTs } from "../scaffold-theme/parse-files";
|
|
@@ -141,9 +142,10 @@ const runBlockJsEsbuild = async (entryFile, folder) => {
|
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
try {
|
|
145
|
+
await delay(20);
|
|
144
146
|
fs.unlinkSync(outPath);
|
|
145
147
|
} catch (err) {
|
|
146
|
-
console.log(err);
|
|
148
|
+
// console.log(err);
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
console.log(
|