@fayz-ai/sdk 0.6.7 → 0.8.1
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 +2 -0
- package/dist/{chunk-RCX43OHW.cjs → chunk-3UTEZ2QL.cjs} +77 -60
- package/dist/chunk-3UTEZ2QL.cjs.map +1 -0
- package/dist/chunk-6OWKU36M.cjs +140 -0
- package/dist/chunk-6OWKU36M.cjs.map +1 -0
- package/dist/{chunk-6JDIFOJG.js → chunk-PRCW5CVJ.js} +77 -60
- package/dist/chunk-PRCW5CVJ.js.map +1 -0
- package/dist/chunk-ZTJ2BJ3I.js +135 -0
- package/dist/chunk-ZTJ2BJ3I.js.map +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.js +2 -2
- package/dist/release-channels.cjs +5 -5
- package/dist/release-channels.js +1 -1
- package/dist/shop.cjs +3 -3
- package/dist/shop.d.ts +146 -1
- package/dist/shop.d.ts.map +1 -1
- package/dist/shop.js +1 -1
- package/package.json +4 -1
- package/src/client.test.ts +2 -2
- package/src/release-channels.json +93 -84
- package/src/shop.test.ts +3 -3
- package/src/shop.ts +90 -64
- package/dist/chunk-2RUJSGT6.cjs +0 -131
- package/dist/chunk-2RUJSGT6.cjs.map +0 -1
- package/dist/chunk-5J5U54ON.js +0 -126
- package/dist/chunk-5J5U54ON.js.map +0 -1
- package/dist/chunk-6JDIFOJG.js.map +0 -1
- package/dist/chunk-RCX43OHW.cjs.map +0 -1
package/src/shop.ts
CHANGED
|
@@ -464,20 +464,24 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
464
464
|
return {
|
|
465
465
|
async listProducts(options?: FayzShopListProductsOptions) {
|
|
466
466
|
const query = tenantQuery()
|
|
467
|
-
query.set('select', '*,images:
|
|
467
|
+
query.set('select', '*,images:plg_shop_product_images(*),category:plg_shop_categories(name)')
|
|
468
468
|
if (options?.status) query.set('status', `eq.${options.status}`)
|
|
469
469
|
if (options?.slug) query.set('slug', `eq.${options.slug}`)
|
|
470
470
|
if (options?.search) query.set('name', `ilike.*${options.search}*`)
|
|
471
471
|
query.set('order', `${options?.orderBy ?? 'sort_order'}.${options?.order ?? 'asc'}`)
|
|
472
472
|
if (options?.limit) query.set('limit', String(options.limit))
|
|
473
473
|
if (options?.offset) query.set('offset', String(options.offset))
|
|
474
|
-
const products = (await request<ProductRow[]>('
|
|
474
|
+
const products = (await request<ProductRow[]>('plg_shop_products', { query })).map((row) => rowToProduct(row, productMetadataOverlay))
|
|
475
475
|
return options?.categoryId ? products.filter((product) => product.categoryId === options.categoryId) : products
|
|
476
476
|
},
|
|
477
477
|
async getProduct(id: string) {
|
|
478
|
+
// Cart lines can carry non-uuid ids (mock catalog, or a cart persisted in
|
|
479
|
+
// an earlier mock-mode session). PostgREST would 400 on `id=eq.p-05`
|
|
480
|
+
// (invalid uuid), so treat any non-uuid id as "not found" instead.
|
|
481
|
+
if (!asUuid(id)) return null
|
|
478
482
|
const query = singleById(id)
|
|
479
|
-
query.set('select', '*,images:
|
|
480
|
-
const rows = await request<ProductRow[]>('
|
|
483
|
+
query.set('select', '*,images:plg_shop_product_images(*),category:plg_shop_categories(name)')
|
|
484
|
+
const rows = await request<ProductRow[]>('plg_shop_products', { query })
|
|
481
485
|
return rows[0] ? rowToProduct(rows[0], productMetadataOverlay) : null
|
|
482
486
|
},
|
|
483
487
|
async createProduct() {
|
|
@@ -499,14 +503,14 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
499
503
|
const productQuery = tenantQuery()
|
|
500
504
|
productQuery.set('select', 'metadata')
|
|
501
505
|
productQuery.set('order', 'sort_order.asc')
|
|
502
|
-
const products = await request<ProductRow[]>('
|
|
506
|
+
const products = await request<ProductRow[]>('plg_shop_products', { query: productQuery })
|
|
503
507
|
const storeCategories = deriveStoreCategories(products, storeId)
|
|
504
508
|
if (storeCategories.length > 0) return storeCategories
|
|
505
509
|
|
|
506
510
|
const query = new URLSearchParams()
|
|
507
511
|
query.set('select', '*')
|
|
508
512
|
query.set('order', 'sort_order.asc')
|
|
509
|
-
return (await request<CategoryRow[]>('
|
|
513
|
+
return (await request<CategoryRow[]>('plg_shop_categories', { query })).map(rowToCategory)
|
|
510
514
|
},
|
|
511
515
|
async createCategory() {
|
|
512
516
|
throw new FayzShopError('Category writes require the Fayz admin/broker API.', 501)
|
|
@@ -519,7 +523,7 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
519
523
|
},
|
|
520
524
|
async listOrders(options?: FayzShopListOrdersOptions) {
|
|
521
525
|
const query = tenantQuery()
|
|
522
|
-
query.set('select', '*,items:
|
|
526
|
+
query.set('select', '*,items:plg_shop_order_items(*)')
|
|
523
527
|
if (options?.status) query.set('status', `eq.${options.status}`)
|
|
524
528
|
if (options?.financialStatus) query.set('financial_status', `eq.${options.financialStatus}`)
|
|
525
529
|
if (options?.fulfillmentStatus) query.set('fulfillment_status', `eq.${options.fulfillmentStatus}`)
|
|
@@ -529,13 +533,42 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
529
533
|
query.set('order', 'created_at.desc')
|
|
530
534
|
if (options?.limit) query.set('limit', String(options.limit))
|
|
531
535
|
if (options?.offset) query.set('offset', String(options.offset))
|
|
532
|
-
return (await request<OrderRow[]>('
|
|
536
|
+
return (await request<OrderRow[]>('plg_shop_orders', { query })).map(rowToOrder)
|
|
533
537
|
},
|
|
534
538
|
async getOrder(id: string) {
|
|
535
539
|
const query = singleById(id)
|
|
536
|
-
query.set('select', '*,items:
|
|
537
|
-
|
|
538
|
-
|
|
540
|
+
query.set('select', '*,items:plg_shop_order_items(*)')
|
|
541
|
+
// Anon storefronts have no table grant at all — the direct read throws
|
|
542
|
+
// (401) rather than returning empty, so it must not short-circuit the
|
|
543
|
+
// RPC fallback below.
|
|
544
|
+
let rows: OrderRow[] = []
|
|
545
|
+
try {
|
|
546
|
+
rows = await request<OrderRow[]>('plg_shop_orders', { query })
|
|
547
|
+
} catch {
|
|
548
|
+
/* fall through to shop_get_order */
|
|
549
|
+
}
|
|
550
|
+
if (rows[0]) return rowToOrder(rows[0])
|
|
551
|
+
// Anon storefronts can't SELECT plg_shop_orders (RLS); the order uuid acts
|
|
552
|
+
// as the read capability through the whitelisted RPC.
|
|
553
|
+
try {
|
|
554
|
+
const row = await request<OrderRow | null>('rpc/shop_get_order', {
|
|
555
|
+
method: 'POST',
|
|
556
|
+
body: JSON.stringify({ p_order_id: id }),
|
|
557
|
+
})
|
|
558
|
+
return row ? rowToOrder(row) : null
|
|
559
|
+
} catch {
|
|
560
|
+
return null
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
async confirmPayment(id: string, reference?: string) {
|
|
564
|
+
// Mock/dev payment seam: anon has no UPDATE grant on plg_shop_orders,
|
|
565
|
+
// so the pending->paid transition goes through the whitelisted RPC
|
|
566
|
+
// (order uuid = capability, same contract as shop_get_order).
|
|
567
|
+
const row = await request<OrderRow | null>('rpc/shop_confirm_payment', {
|
|
568
|
+
method: 'POST',
|
|
569
|
+
body: JSON.stringify({ p_order_id: id, p_reference: reference ?? null }),
|
|
570
|
+
})
|
|
571
|
+
return row ? rowToOrder(row) : null
|
|
539
572
|
},
|
|
540
573
|
async createOrder(input: {
|
|
541
574
|
customerId?: string
|
|
@@ -552,7 +585,7 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
552
585
|
const discountTotal = input.discountTotal ?? 0
|
|
553
586
|
const shippingTotal = input.shippingTotal ?? 0
|
|
554
587
|
const total = Math.round((subtotal - discountTotal + shippingTotal) * 100) / 100
|
|
555
|
-
const [order] = await request<OrderRow[]>('
|
|
588
|
+
const [order] = await request<OrderRow[]>('plg_shop_orders', {
|
|
556
589
|
method: 'POST',
|
|
557
590
|
body: JSON.stringify({
|
|
558
591
|
tenant_id: storeId,
|
|
@@ -573,7 +606,7 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
573
606
|
})
|
|
574
607
|
if (!order) throw new FayzShopError('Order insert did not return a row.', 500)
|
|
575
608
|
if (input.items.length) {
|
|
576
|
-
await request<OrderItemRow[]>('
|
|
609
|
+
await request<OrderItemRow[]>('plg_shop_order_items', {
|
|
577
610
|
method: 'POST',
|
|
578
611
|
body: JSON.stringify(input.items.map((item) => ({
|
|
579
612
|
order_id: order.id,
|
|
@@ -590,7 +623,7 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
590
623
|
return this.getOrder(order.id)
|
|
591
624
|
},
|
|
592
625
|
async updateOrder(id: string, input: Parameters<typeof updateOrderPayload>[0]) {
|
|
593
|
-
await request<OrderRow[]>('
|
|
626
|
+
await request<OrderRow[]>('plg_shop_orders', {
|
|
594
627
|
method: 'PATCH',
|
|
595
628
|
query: singleById(id),
|
|
596
629
|
body: JSON.stringify(updateOrderPayload(input)),
|
|
@@ -607,50 +640,30 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
607
640
|
shippingTotal?: number
|
|
608
641
|
items: Array<{ productId: string; quantity: number; optionsLabel?: string }>
|
|
609
642
|
}) {
|
|
610
|
-
// Trusted placement
|
|
611
|
-
//
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
const ts = nowIso()
|
|
631
|
-
const valid = !!discount && discount.status === 'active' && discount.startsAt <= ts
|
|
632
|
-
&& (!discount.endsAt || discount.endsAt >= ts)
|
|
633
|
-
&& (discount.usageLimit == null || discount.timesUsed < discount.usageLimit)
|
|
634
|
-
if (valid && discount) {
|
|
635
|
-
appliedCode = discount.code ?? undefined
|
|
636
|
-
if (discount.type === 'percentage') discountTotal = Math.round(subtotal * discount.value) / 100
|
|
637
|
-
else if (discount.type === 'fixed_amount') discountTotal = Math.min(discount.value, subtotal)
|
|
638
|
-
else if (discount.type === 'free_shipping') shippingTotal = 0
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
discountTotal = Math.round(Math.min(Math.max(discountTotal, 0), subtotal) * 100) / 100
|
|
642
|
-
|
|
643
|
-
return this.createOrder({
|
|
644
|
-
customerId: input.customerId,
|
|
645
|
-
customerName: input.customer?.name,
|
|
646
|
-
customerEmail: input.customer?.email,
|
|
647
|
-
currency: input.currency,
|
|
648
|
-
notes: input.notes,
|
|
649
|
-
discountCode: appliedCode,
|
|
650
|
-
discountTotal,
|
|
651
|
-
shippingTotal,
|
|
652
|
-
items: orderItems,
|
|
643
|
+
// Trusted placement: the shop_place_order SECURITY DEFINER RPC re-reads
|
|
644
|
+
// prices, validates discount/stock and writes order+items atomically.
|
|
645
|
+
// Direct INSERTs are blocked for anon by RLS on the shared FayzApi.
|
|
646
|
+
const orderId = await request<string>('rpc/shop_place_order', {
|
|
647
|
+
method: 'POST',
|
|
648
|
+
body: JSON.stringify({
|
|
649
|
+
p_tenant_id: input.tenantId ?? storeId,
|
|
650
|
+
p_items: input.items.map((line) => ({
|
|
651
|
+
product_id: line.productId,
|
|
652
|
+
quantity: line.quantity,
|
|
653
|
+
options_label: line.optionsLabel ?? null,
|
|
654
|
+
})),
|
|
655
|
+
p_customer_id: asUuid(input.customerId ?? undefined),
|
|
656
|
+
p_customer_name: input.customer?.name ?? null,
|
|
657
|
+
p_customer_email: input.customer?.email ?? null,
|
|
658
|
+
p_currency: input.currency ?? 'BRL',
|
|
659
|
+
p_discount_code: input.discountCode ?? null,
|
|
660
|
+
p_shipping_total: input.shippingTotal ?? 0,
|
|
661
|
+
p_notes: input.notes ?? null,
|
|
662
|
+
}),
|
|
653
663
|
})
|
|
664
|
+
const order = await this.getOrder(orderId)
|
|
665
|
+
if (!order) throw new FayzShopError('Order was placed but could not be read back.', 500)
|
|
666
|
+
return order
|
|
654
667
|
},
|
|
655
668
|
async listCustomers(options?: FayzShopListCustomersOptions) {
|
|
656
669
|
const query = tenantQuery()
|
|
@@ -659,14 +672,27 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
659
672
|
if (options?.search) query.set('or', `(first_name.ilike.*${options.search}*,last_name.ilike.*${options.search}*,email.ilike.*${options.search}*)`)
|
|
660
673
|
if (options?.limit) query.set('limit', String(options.limit))
|
|
661
674
|
if (options?.offset) query.set('offset', String(options.offset))
|
|
662
|
-
return (await request<CustomerRow[]>('
|
|
675
|
+
return (await request<CustomerRow[]>('plg_shop_customers', { query })).map(rowToCustomer)
|
|
663
676
|
},
|
|
664
677
|
async getCustomer(id: string) {
|
|
665
|
-
const rows = await request<CustomerRow[]>('
|
|
678
|
+
const rows = await request<CustomerRow[]>('plg_shop_customers', { query: singleById(id) })
|
|
666
679
|
return rows[0] ? rowToCustomer(rows[0]) : null
|
|
667
680
|
},
|
|
681
|
+
async resolveCustomer(input: { email: string; name?: string }) {
|
|
682
|
+
const row = await request<CustomerRow | CustomerRow[]>('rpc/shop_resolve_customer', {
|
|
683
|
+
method: 'POST',
|
|
684
|
+
body: JSON.stringify({
|
|
685
|
+
p_tenant_id: storeId,
|
|
686
|
+
p_email: input.email,
|
|
687
|
+
p_name: input.name ?? null,
|
|
688
|
+
}),
|
|
689
|
+
})
|
|
690
|
+
const customer = Array.isArray(row) ? row[0] : row
|
|
691
|
+
if (!customer) throw new FayzShopError('shop_resolve_customer returned no row.', 500)
|
|
692
|
+
return rowToCustomer(customer)
|
|
693
|
+
},
|
|
668
694
|
async createCustomer(input: { firstName: string; lastName?: string; email?: string; phone?: string; notes?: string }) {
|
|
669
|
-
const [customer] = await request<CustomerRow[]>('
|
|
695
|
+
const [customer] = await request<CustomerRow[]>('plg_shop_customers', {
|
|
670
696
|
method: 'POST',
|
|
671
697
|
body: JSON.stringify({
|
|
672
698
|
tenant_id: storeId,
|
|
@@ -687,7 +713,7 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
687
713
|
if (input.email !== undefined) updates.email = input.email
|
|
688
714
|
if (input.phone !== undefined) updates.phone = input.phone
|
|
689
715
|
if (input.notes !== undefined) updates.notes = input.notes
|
|
690
|
-
const [customer] = await request<CustomerRow[]>('
|
|
716
|
+
const [customer] = await request<CustomerRow[]>('plg_shop_customers', {
|
|
691
717
|
method: 'PATCH',
|
|
692
718
|
query: singleById(id),
|
|
693
719
|
body: JSON.stringify(updates),
|
|
@@ -696,7 +722,7 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
696
722
|
return rowToCustomer(customer)
|
|
697
723
|
},
|
|
698
724
|
async deleteCustomer(id: string) {
|
|
699
|
-
await request<unknown>('
|
|
725
|
+
await request<unknown>('plg_shop_customers', { method: 'DELETE', query: singleById(id) })
|
|
700
726
|
},
|
|
701
727
|
async listDiscounts(options?: FayzShopListDiscountsOptions) {
|
|
702
728
|
const query = tenantQuery()
|
|
@@ -707,10 +733,10 @@ export function createFayzShopProvider(options: FayzShopProviderOptions) {
|
|
|
707
733
|
if (options?.search) query.set('title', `ilike.*${options.search}*`)
|
|
708
734
|
if (options?.limit) query.set('limit', String(options.limit))
|
|
709
735
|
if (options?.offset) query.set('offset', String(options.offset))
|
|
710
|
-
return (await request<DiscountRow[]>('
|
|
736
|
+
return (await request<DiscountRow[]>('plg_shop_discounts', { query })).map(rowToDiscount)
|
|
711
737
|
},
|
|
712
738
|
async getDiscount(id: string) {
|
|
713
|
-
const rows = await request<DiscountRow[]>('
|
|
739
|
+
const rows = await request<DiscountRow[]>('plg_shop_discounts', { query: singleById(id) })
|
|
714
740
|
return rows[0] ? rowToDiscount(rows[0]) : null
|
|
715
741
|
},
|
|
716
742
|
async createDiscount() {
|
package/dist/chunk-2RUJSGT6.cjs
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// src/release-channels.json
|
|
4
|
-
var release_channels_default = {
|
|
5
|
-
channels: {
|
|
6
|
-
stable: {
|
|
7
|
-
"@fayz-ai/sdk": "^0.6.6",
|
|
8
|
-
"@fayz-ai/core": "^0.7.0",
|
|
9
|
-
"@fayz-ai/auth": "^0.7.0",
|
|
10
|
-
"@fayz-ai/ui": "^0.7.0",
|
|
11
|
-
"@fayz-ai/saas": "^0.7.0",
|
|
12
|
-
"@fayz-ai/shop": "^0.7.0",
|
|
13
|
-
"@fayz-ai/storefront": "^0.7.0",
|
|
14
|
-
"@fayz-ai/portal": "^0.7.0",
|
|
15
|
-
"@fayz-ai/courses": "^0.7.0",
|
|
16
|
-
"@fayz-ai/db": "^0.1.2",
|
|
17
|
-
"@fayz-ai/plugin-agenda": "^0.2.0",
|
|
18
|
-
"@fayz-ai/plugin-automations": "^0.2.3",
|
|
19
|
-
"@fayz-ai/plugin-conversations": "^0.2.4",
|
|
20
|
-
"@fayz-ai/plugin-courses": "^0.2.3",
|
|
21
|
-
"@fayz-ai/plugin-crm": "^0.3.0",
|
|
22
|
-
"@fayz-ai/plugin-dashboard": "^0.1.6",
|
|
23
|
-
"@fayz-ai/plugin-financial": "^0.2.0",
|
|
24
|
-
"@fayz-ai/plugin-forms": "^0.2.0",
|
|
25
|
-
"@fayz-ai/plugin-inventory": "^0.1.7",
|
|
26
|
-
"@fayz-ai/plugin-marketing": "^0.2.1",
|
|
27
|
-
"@fayz-ai/plugin-menu": "^0.3.0",
|
|
28
|
-
"@fayz-ai/plugin-orders": "^0.3.0",
|
|
29
|
-
"@fayz-ai/plugin-reports": "^0.2.0",
|
|
30
|
-
"@fayz-ai/plugin-reputation": "^0.2.3",
|
|
31
|
-
"@fayz-ai/plugin-shop": "^0.2.5",
|
|
32
|
-
"@fayz-ai/plugin-sites": "^0.2.3",
|
|
33
|
-
"@fayz-ai/plugin-tables": "^0.3.0",
|
|
34
|
-
"@fayz-ai/plugin-tasks": "^0.1.7"
|
|
35
|
-
},
|
|
36
|
-
latest: {
|
|
37
|
-
"@fayz-ai/sdk": "^0.6.6",
|
|
38
|
-
"@fayz-ai/core": "^0.7.0",
|
|
39
|
-
"@fayz-ai/auth": "^0.7.0",
|
|
40
|
-
"@fayz-ai/ui": "^0.7.0",
|
|
41
|
-
"@fayz-ai/saas": "^0.7.0",
|
|
42
|
-
"@fayz-ai/shop": "^0.7.0",
|
|
43
|
-
"@fayz-ai/storefront": "^0.7.0",
|
|
44
|
-
"@fayz-ai/portal": "^0.7.0",
|
|
45
|
-
"@fayz-ai/courses": "^0.7.0",
|
|
46
|
-
"@fayz-ai/db": "^0.1.2",
|
|
47
|
-
"@fayz-ai/plugin-agenda": "^0.2.0",
|
|
48
|
-
"@fayz-ai/plugin-automations": "^0.2.3",
|
|
49
|
-
"@fayz-ai/plugin-conversations": "^0.2.4",
|
|
50
|
-
"@fayz-ai/plugin-courses": "^0.2.3",
|
|
51
|
-
"@fayz-ai/plugin-crm": "^0.3.0",
|
|
52
|
-
"@fayz-ai/plugin-dashboard": "^0.1.6",
|
|
53
|
-
"@fayz-ai/plugin-financial": "^0.2.0",
|
|
54
|
-
"@fayz-ai/plugin-forms": "^0.2.0",
|
|
55
|
-
"@fayz-ai/plugin-inventory": "^0.1.7",
|
|
56
|
-
"@fayz-ai/plugin-marketing": "^0.2.1",
|
|
57
|
-
"@fayz-ai/plugin-menu": "^0.3.0",
|
|
58
|
-
"@fayz-ai/plugin-orders": "^0.3.0",
|
|
59
|
-
"@fayz-ai/plugin-reports": "^0.2.0",
|
|
60
|
-
"@fayz-ai/plugin-reputation": "^0.2.3",
|
|
61
|
-
"@fayz-ai/plugin-shop": "^0.2.5",
|
|
62
|
-
"@fayz-ai/plugin-sites": "^0.2.3",
|
|
63
|
-
"@fayz-ai/plugin-tables": "^0.3.0",
|
|
64
|
-
"@fayz-ai/plugin-tasks": "^0.1.7"
|
|
65
|
-
},
|
|
66
|
-
preview: {
|
|
67
|
-
"@fayz-ai/sdk": "^0.6.6",
|
|
68
|
-
"@fayz-ai/core": "^0.7.0",
|
|
69
|
-
"@fayz-ai/auth": "^0.7.0",
|
|
70
|
-
"@fayz-ai/ui": "^0.7.0",
|
|
71
|
-
"@fayz-ai/saas": "^0.7.0",
|
|
72
|
-
"@fayz-ai/shop": "^0.7.0",
|
|
73
|
-
"@fayz-ai/storefront": "^0.7.0",
|
|
74
|
-
"@fayz-ai/portal": "^0.7.0",
|
|
75
|
-
"@fayz-ai/courses": "^0.7.0",
|
|
76
|
-
"@fayz-ai/db": "^0.1.2",
|
|
77
|
-
"@fayz-ai/plugin-agenda": "^0.2.0",
|
|
78
|
-
"@fayz-ai/plugin-automations": "^0.2.3",
|
|
79
|
-
"@fayz-ai/plugin-conversations": "^0.2.4",
|
|
80
|
-
"@fayz-ai/plugin-courses": "^0.2.3",
|
|
81
|
-
"@fayz-ai/plugin-crm": "^0.3.0",
|
|
82
|
-
"@fayz-ai/plugin-dashboard": "^0.1.6",
|
|
83
|
-
"@fayz-ai/plugin-financial": "^0.2.0",
|
|
84
|
-
"@fayz-ai/plugin-forms": "^0.2.0",
|
|
85
|
-
"@fayz-ai/plugin-inventory": "^0.1.7",
|
|
86
|
-
"@fayz-ai/plugin-marketing": "^0.2.1",
|
|
87
|
-
"@fayz-ai/plugin-menu": "^0.3.0",
|
|
88
|
-
"@fayz-ai/plugin-orders": "^0.3.0",
|
|
89
|
-
"@fayz-ai/plugin-reports": "^0.2.0",
|
|
90
|
-
"@fayz-ai/plugin-reputation": "^0.2.3",
|
|
91
|
-
"@fayz-ai/plugin-shop": "^0.2.5",
|
|
92
|
-
"@fayz-ai/plugin-sites": "^0.2.3",
|
|
93
|
-
"@fayz-ai/plugin-tables": "^0.3.0",
|
|
94
|
-
"@fayz-ai/plugin-tasks": "^0.1.7"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// src/release-channels.ts
|
|
100
|
-
var releaseChannelPackages = release_channels_default.channels;
|
|
101
|
-
function buildVersionSet(channel) {
|
|
102
|
-
return {
|
|
103
|
-
channel,
|
|
104
|
-
packages: { ...releaseChannelPackages[channel] }
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
var fayzPackageVersionSets = {
|
|
108
|
-
stable: buildVersionSet("stable"),
|
|
109
|
-
latest: buildVersionSet("latest"),
|
|
110
|
-
preview: buildVersionSet("preview")
|
|
111
|
-
};
|
|
112
|
-
function resolveFayzPackageVersions(channel = "stable") {
|
|
113
|
-
return fayzPackageVersionSets[channel];
|
|
114
|
-
}
|
|
115
|
-
function resolveFayzPackageDependencies(channel = "stable") {
|
|
116
|
-
return { ...resolveFayzPackageVersions(channel).packages };
|
|
117
|
-
}
|
|
118
|
-
function resolveFayzPackageVersion(packageName, channel = "stable") {
|
|
119
|
-
const version = resolveFayzPackageVersions(channel).packages[packageName];
|
|
120
|
-
if (!version) {
|
|
121
|
-
throw new Error(`No Fayz package version configured for ${packageName} in ${channel} channel`);
|
|
122
|
-
}
|
|
123
|
-
return version;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
exports.fayzPackageVersionSets = fayzPackageVersionSets;
|
|
127
|
-
exports.resolveFayzPackageDependencies = resolveFayzPackageDependencies;
|
|
128
|
-
exports.resolveFayzPackageVersion = resolveFayzPackageVersion;
|
|
129
|
-
exports.resolveFayzPackageVersions = resolveFayzPackageVersions;
|
|
130
|
-
//# sourceMappingURL=chunk-2RUJSGT6.cjs.map
|
|
131
|
-
//# sourceMappingURL=chunk-2RUJSGT6.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/release-channels.json","../src/release-channels.ts"],"names":[],"mappings":";;;AAAA,IAAA,wBAAA,GAAA;AAAA,EACE,QAAA,EAAY;AAAA,IACV,MAAA,EAAU;AAAA,MACR,cAAA,EAAgB,QAAA;AAAA,MAChB,eAAA,EAAiB,QAAA;AAAA,MACjB,eAAA,EAAiB,QAAA;AAAA,MACjB,aAAA,EAAe,QAAA;AAAA,MACf,eAAA,EAAiB,QAAA;AAAA,MACjB,eAAA,EAAiB,QAAA;AAAA,MACjB,qBAAA,EAAuB,QAAA;AA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\": \"^0.7.0\",\n \"@fayz-ai/shop\": \"^0.7.0\",\n \"@fayz-ai/storefront\": \"^0.7.0\",\n \"@fayz-ai/portal\": \"^0.7.0\",\n \"@fayz-ai/courses\": \"^0.7.0\",\n \"@fayz-ai/db\": \"^0.1.2\",\n \"@fayz-ai/plugin-agenda\": \"^0.2.0\",\n \"@fayz-ai/plugin-automations\": \"^0.2.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.2.4\",\n \"@fayz-ai/plugin-courses\": \"^0.2.3\",\n \"@fayz-ai/plugin-crm\": \"^0.3.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.1.6\",\n \"@fayz-ai/plugin-financial\": \"^0.2.0\",\n \"@fayz-ai/plugin-forms\": \"^0.2.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.1.7\",\n \"@fayz-ai/plugin-marketing\": \"^0.2.1\",\n \"@fayz-ai/plugin-menu\": \"^0.3.0\",\n \"@fayz-ai/plugin-orders\": \"^0.3.0\",\n \"@fayz-ai/plugin-reports\": \"^0.2.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.2.3\",\n \"@fayz-ai/plugin-shop\": \"^0.2.5\",\n \"@fayz-ai/plugin-sites\": \"^0.2.3\",\n \"@fayz-ai/plugin-tables\": \"^0.3.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.1.7\"\n },\n \"latest\": {\n \"@fayz-ai/sdk\": \"^0.6.6\",\n \"@fayz-ai/core\": \"^0.7.0\",\n \"@fayz-ai/auth\": \"^0.7.0\",\n \"@fayz-ai/ui\": \"^0.7.0\",\n \"@fayz-ai/saas\": \"^0.7.0\",\n \"@fayz-ai/shop\": \"^0.7.0\",\n \"@fayz-ai/storefront\": \"^0.7.0\",\n \"@fayz-ai/portal\": \"^0.7.0\",\n \"@fayz-ai/courses\": \"^0.7.0\",\n \"@fayz-ai/db\": \"^0.1.2\",\n \"@fayz-ai/plugin-agenda\": \"^0.2.0\",\n \"@fayz-ai/plugin-automations\": \"^0.2.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.2.4\",\n \"@fayz-ai/plugin-courses\": \"^0.2.3\",\n \"@fayz-ai/plugin-crm\": \"^0.3.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.1.6\",\n \"@fayz-ai/plugin-financial\": \"^0.2.0\",\n \"@fayz-ai/plugin-forms\": \"^0.2.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.1.7\",\n \"@fayz-ai/plugin-marketing\": \"^0.2.1\",\n \"@fayz-ai/plugin-menu\": \"^0.3.0\",\n \"@fayz-ai/plugin-orders\": \"^0.3.0\",\n \"@fayz-ai/plugin-reports\": \"^0.2.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.2.3\",\n \"@fayz-ai/plugin-shop\": \"^0.2.5\",\n \"@fayz-ai/plugin-sites\": \"^0.2.3\",\n \"@fayz-ai/plugin-tables\": \"^0.3.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.1.7\"\n },\n \"preview\": {\n \"@fayz-ai/sdk\": \"^0.6.6\",\n \"@fayz-ai/core\": \"^0.7.0\",\n \"@fayz-ai/auth\": \"^0.7.0\",\n \"@fayz-ai/ui\": \"^0.7.0\",\n \"@fayz-ai/saas\": \"^0.7.0\",\n \"@fayz-ai/shop\": \"^0.7.0\",\n \"@fayz-ai/storefront\": \"^0.7.0\",\n \"@fayz-ai/portal\": \"^0.7.0\",\n \"@fayz-ai/courses\": \"^0.7.0\",\n \"@fayz-ai/db\": \"^0.1.2\",\n \"@fayz-ai/plugin-agenda\": \"^0.2.0\",\n \"@fayz-ai/plugin-automations\": \"^0.2.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.2.4\",\n \"@fayz-ai/plugin-courses\": \"^0.2.3\",\n \"@fayz-ai/plugin-crm\": \"^0.3.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.1.6\",\n \"@fayz-ai/plugin-financial\": \"^0.2.0\",\n \"@fayz-ai/plugin-forms\": \"^0.2.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.1.7\",\n \"@fayz-ai/plugin-marketing\": \"^0.2.1\",\n \"@fayz-ai/plugin-menu\": \"^0.3.0\",\n \"@fayz-ai/plugin-orders\": \"^0.3.0\",\n \"@fayz-ai/plugin-reports\": \"^0.2.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.2.3\",\n \"@fayz-ai/plugin-shop\": \"^0.2.5\",\n \"@fayz-ai/plugin-sites\": \"^0.2.3\",\n \"@fayz-ai/plugin-tables\": \"^0.3.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.1.7\"\n }\n }\n}\n","import releaseChannels from './release-channels.json'\n\nexport type FayzPackageChannel = 'stable' | 'latest' | 'preview'\n\nexport interface FayzPackageVersionSet {\n channel: FayzPackageChannel\n packages: Record<string, string>\n}\n\nconst releaseChannelPackages = releaseChannels.channels as Record<FayzPackageChannel, Record<string, string>>\n\nfunction buildVersionSet(channel: FayzPackageChannel): FayzPackageVersionSet {\n return {\n channel,\n packages: { ...releaseChannelPackages[channel] },\n }\n}\n\nexport const fayzPackageVersionSets: Record<FayzPackageChannel, FayzPackageVersionSet> = {\n stable: buildVersionSet('stable'),\n latest: buildVersionSet('latest'),\n preview: buildVersionSet('preview'),\n}\n\nexport function resolveFayzPackageVersions(channel: FayzPackageChannel = 'stable'): FayzPackageVersionSet {\n return fayzPackageVersionSets[channel]\n}\n\nexport function resolveFayzPackageDependencies(channel: FayzPackageChannel = 'stable'): Record<string, string> {\n return { ...resolveFayzPackageVersions(channel).packages }\n}\n\nexport function resolveFayzPackageVersion(packageName: string, channel: FayzPackageChannel = 'stable'): string {\n const version = resolveFayzPackageVersions(channel).packages[packageName]\n\n if (!version) {\n throw new Error(`No Fayz package version configured for ${packageName} in ${channel} channel`)\n }\n\n return version\n}\n"]}
|
package/dist/chunk-5J5U54ON.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
// src/release-channels.json
|
|
2
|
-
var release_channels_default = {
|
|
3
|
-
channels: {
|
|
4
|
-
stable: {
|
|
5
|
-
"@fayz-ai/sdk": "^0.6.6",
|
|
6
|
-
"@fayz-ai/core": "^0.7.0",
|
|
7
|
-
"@fayz-ai/auth": "^0.7.0",
|
|
8
|
-
"@fayz-ai/ui": "^0.7.0",
|
|
9
|
-
"@fayz-ai/saas": "^0.7.0",
|
|
10
|
-
"@fayz-ai/shop": "^0.7.0",
|
|
11
|
-
"@fayz-ai/storefront": "^0.7.0",
|
|
12
|
-
"@fayz-ai/portal": "^0.7.0",
|
|
13
|
-
"@fayz-ai/courses": "^0.7.0",
|
|
14
|
-
"@fayz-ai/db": "^0.1.2",
|
|
15
|
-
"@fayz-ai/plugin-agenda": "^0.2.0",
|
|
16
|
-
"@fayz-ai/plugin-automations": "^0.2.3",
|
|
17
|
-
"@fayz-ai/plugin-conversations": "^0.2.4",
|
|
18
|
-
"@fayz-ai/plugin-courses": "^0.2.3",
|
|
19
|
-
"@fayz-ai/plugin-crm": "^0.3.0",
|
|
20
|
-
"@fayz-ai/plugin-dashboard": "^0.1.6",
|
|
21
|
-
"@fayz-ai/plugin-financial": "^0.2.0",
|
|
22
|
-
"@fayz-ai/plugin-forms": "^0.2.0",
|
|
23
|
-
"@fayz-ai/plugin-inventory": "^0.1.7",
|
|
24
|
-
"@fayz-ai/plugin-marketing": "^0.2.1",
|
|
25
|
-
"@fayz-ai/plugin-menu": "^0.3.0",
|
|
26
|
-
"@fayz-ai/plugin-orders": "^0.3.0",
|
|
27
|
-
"@fayz-ai/plugin-reports": "^0.2.0",
|
|
28
|
-
"@fayz-ai/plugin-reputation": "^0.2.3",
|
|
29
|
-
"@fayz-ai/plugin-shop": "^0.2.5",
|
|
30
|
-
"@fayz-ai/plugin-sites": "^0.2.3",
|
|
31
|
-
"@fayz-ai/plugin-tables": "^0.3.0",
|
|
32
|
-
"@fayz-ai/plugin-tasks": "^0.1.7"
|
|
33
|
-
},
|
|
34
|
-
latest: {
|
|
35
|
-
"@fayz-ai/sdk": "^0.6.6",
|
|
36
|
-
"@fayz-ai/core": "^0.7.0",
|
|
37
|
-
"@fayz-ai/auth": "^0.7.0",
|
|
38
|
-
"@fayz-ai/ui": "^0.7.0",
|
|
39
|
-
"@fayz-ai/saas": "^0.7.0",
|
|
40
|
-
"@fayz-ai/shop": "^0.7.0",
|
|
41
|
-
"@fayz-ai/storefront": "^0.7.0",
|
|
42
|
-
"@fayz-ai/portal": "^0.7.0",
|
|
43
|
-
"@fayz-ai/courses": "^0.7.0",
|
|
44
|
-
"@fayz-ai/db": "^0.1.2",
|
|
45
|
-
"@fayz-ai/plugin-agenda": "^0.2.0",
|
|
46
|
-
"@fayz-ai/plugin-automations": "^0.2.3",
|
|
47
|
-
"@fayz-ai/plugin-conversations": "^0.2.4",
|
|
48
|
-
"@fayz-ai/plugin-courses": "^0.2.3",
|
|
49
|
-
"@fayz-ai/plugin-crm": "^0.3.0",
|
|
50
|
-
"@fayz-ai/plugin-dashboard": "^0.1.6",
|
|
51
|
-
"@fayz-ai/plugin-financial": "^0.2.0",
|
|
52
|
-
"@fayz-ai/plugin-forms": "^0.2.0",
|
|
53
|
-
"@fayz-ai/plugin-inventory": "^0.1.7",
|
|
54
|
-
"@fayz-ai/plugin-marketing": "^0.2.1",
|
|
55
|
-
"@fayz-ai/plugin-menu": "^0.3.0",
|
|
56
|
-
"@fayz-ai/plugin-orders": "^0.3.0",
|
|
57
|
-
"@fayz-ai/plugin-reports": "^0.2.0",
|
|
58
|
-
"@fayz-ai/plugin-reputation": "^0.2.3",
|
|
59
|
-
"@fayz-ai/plugin-shop": "^0.2.5",
|
|
60
|
-
"@fayz-ai/plugin-sites": "^0.2.3",
|
|
61
|
-
"@fayz-ai/plugin-tables": "^0.3.0",
|
|
62
|
-
"@fayz-ai/plugin-tasks": "^0.1.7"
|
|
63
|
-
},
|
|
64
|
-
preview: {
|
|
65
|
-
"@fayz-ai/sdk": "^0.6.6",
|
|
66
|
-
"@fayz-ai/core": "^0.7.0",
|
|
67
|
-
"@fayz-ai/auth": "^0.7.0",
|
|
68
|
-
"@fayz-ai/ui": "^0.7.0",
|
|
69
|
-
"@fayz-ai/saas": "^0.7.0",
|
|
70
|
-
"@fayz-ai/shop": "^0.7.0",
|
|
71
|
-
"@fayz-ai/storefront": "^0.7.0",
|
|
72
|
-
"@fayz-ai/portal": "^0.7.0",
|
|
73
|
-
"@fayz-ai/courses": "^0.7.0",
|
|
74
|
-
"@fayz-ai/db": "^0.1.2",
|
|
75
|
-
"@fayz-ai/plugin-agenda": "^0.2.0",
|
|
76
|
-
"@fayz-ai/plugin-automations": "^0.2.3",
|
|
77
|
-
"@fayz-ai/plugin-conversations": "^0.2.4",
|
|
78
|
-
"@fayz-ai/plugin-courses": "^0.2.3",
|
|
79
|
-
"@fayz-ai/plugin-crm": "^0.3.0",
|
|
80
|
-
"@fayz-ai/plugin-dashboard": "^0.1.6",
|
|
81
|
-
"@fayz-ai/plugin-financial": "^0.2.0",
|
|
82
|
-
"@fayz-ai/plugin-forms": "^0.2.0",
|
|
83
|
-
"@fayz-ai/plugin-inventory": "^0.1.7",
|
|
84
|
-
"@fayz-ai/plugin-marketing": "^0.2.1",
|
|
85
|
-
"@fayz-ai/plugin-menu": "^0.3.0",
|
|
86
|
-
"@fayz-ai/plugin-orders": "^0.3.0",
|
|
87
|
-
"@fayz-ai/plugin-reports": "^0.2.0",
|
|
88
|
-
"@fayz-ai/plugin-reputation": "^0.2.3",
|
|
89
|
-
"@fayz-ai/plugin-shop": "^0.2.5",
|
|
90
|
-
"@fayz-ai/plugin-sites": "^0.2.3",
|
|
91
|
-
"@fayz-ai/plugin-tables": "^0.3.0",
|
|
92
|
-
"@fayz-ai/plugin-tasks": "^0.1.7"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
// src/release-channels.ts
|
|
98
|
-
var releaseChannelPackages = release_channels_default.channels;
|
|
99
|
-
function buildVersionSet(channel) {
|
|
100
|
-
return {
|
|
101
|
-
channel,
|
|
102
|
-
packages: { ...releaseChannelPackages[channel] }
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
var fayzPackageVersionSets = {
|
|
106
|
-
stable: buildVersionSet("stable"),
|
|
107
|
-
latest: buildVersionSet("latest"),
|
|
108
|
-
preview: buildVersionSet("preview")
|
|
109
|
-
};
|
|
110
|
-
function resolveFayzPackageVersions(channel = "stable") {
|
|
111
|
-
return fayzPackageVersionSets[channel];
|
|
112
|
-
}
|
|
113
|
-
function resolveFayzPackageDependencies(channel = "stable") {
|
|
114
|
-
return { ...resolveFayzPackageVersions(channel).packages };
|
|
115
|
-
}
|
|
116
|
-
function resolveFayzPackageVersion(packageName, channel = "stable") {
|
|
117
|
-
const version = resolveFayzPackageVersions(channel).packages[packageName];
|
|
118
|
-
if (!version) {
|
|
119
|
-
throw new Error(`No Fayz package version configured for ${packageName} in ${channel} channel`);
|
|
120
|
-
}
|
|
121
|
-
return version;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export { fayzPackageVersionSets, resolveFayzPackageDependencies, resolveFayzPackageVersion, resolveFayzPackageVersions };
|
|
125
|
-
//# sourceMappingURL=chunk-5J5U54ON.js.map
|
|
126
|
-
//# sourceMappingURL=chunk-5J5U54ON.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/release-channels.json","../src/release-channels.ts"],"names":[],"mappings":";AAAA,IAAA,wBAAA,GAAA;AAAA,EACE,QAAA,EAAY;AAAA,IACV,MAAA,EAAU;AAAA,MACR,cAAA,EAAgB,QAAA;AAAA,MAChB,eAAA,EAAiB,QAAA;AAAA,MACjB,eAAA,EAAiB,QAAA;AAAA,MACjB,aAAA,EAAe,QAAA;AAAA,MACf,eAAA,EAAiB,QAAA;AAAA,MACjB,eAAA,EAAiB,QAAA;AAAA,MACjB,qBAAA,EAAuB,QAAA;AAAA,MACvB,iBAAA,EAAmB,QAAA;AAAA,MACnB,kBAAA,EAAoB,QAAA;AAAA,MACpB,aAAA,EAAe,QAAA;AAAA,MACf,wBAAA,EAA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,CAAA;;;ACpFA,IAAM,yBAAyB,wBAAA,CAAgB,QAAA;AAE/C,SAAS,gBAAgB,OAAA,EAAoD;AAC3E,EAAA,OAAO;AAAA,IACL,OAAA;AAAA,IACA,QAAA,EAAU,EAAE,GAAG,sBAAA,CAAuB,OAAO,CAAA;AAAE,GACjD;AACF;AAEO,IAAM,sBAAA,GAA4E;AAAA,EACvF,MAAA,EAAQ,gBAAgB,QAAQ,CAAA;AAAA,EAChC,MAAA,EAAQ,gBAAgB,QAAQ,CAAA;AAAA,EAChC,OAAA,EAAS,gBAAgB,SAAS;AACpC;AAEO,SAAS,0BAAA,CAA2B,UAA8B,QAAA,EAAiC;AACxG,EAAA,OAAO,uBAAuB,OAAO,CAAA;AACvC;AAEO,SAAS,8BAAA,CAA+B,UAA8B,QAAA,EAAkC;AAC7G,EAAA,OAAO,EAAE,GAAG,0BAAA,CAA2B,OAAO,EAAE,QAAA,EAAS;AAC3D;AAEO,SAAS,yBAAA,CAA0B,WAAA,EAAqB,OAAA,GAA8B,QAAA,EAAkB;AAC7G,EAAA,MAAM,OAAA,GAAU,0BAAA,CAA2B,OAAO,CAAA,CAAE,SAAS,WAAW,CAAA;AAExE,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,uCAAA,EAA0C,WAAW,CAAA,IAAA,EAAO,OAAO,CAAA,QAAA,CAAU,CAAA;AAAA,EAC/F;AAEA,EAAA,OAAO,OAAA;AACT","file":"chunk-5J5U54ON.js","sourcesContent":["{\n \"channels\": {\n \"stable\": {\n \"@fayz-ai/sdk\": \"^0.6.6\",\n \"@fayz-ai/core\": \"^0.7.0\",\n \"@fayz-ai/auth\": \"^0.7.0\",\n \"@fayz-ai/ui\": \"^0.7.0\",\n \"@fayz-ai/saas\": \"^0.7.0\",\n \"@fayz-ai/shop\": \"^0.7.0\",\n \"@fayz-ai/storefront\": \"^0.7.0\",\n \"@fayz-ai/portal\": \"^0.7.0\",\n \"@fayz-ai/courses\": \"^0.7.0\",\n \"@fayz-ai/db\": \"^0.1.2\",\n \"@fayz-ai/plugin-agenda\": \"^0.2.0\",\n \"@fayz-ai/plugin-automations\": \"^0.2.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.2.4\",\n \"@fayz-ai/plugin-courses\": \"^0.2.3\",\n \"@fayz-ai/plugin-crm\": \"^0.3.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.1.6\",\n \"@fayz-ai/plugin-financial\": \"^0.2.0\",\n \"@fayz-ai/plugin-forms\": \"^0.2.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.1.7\",\n \"@fayz-ai/plugin-marketing\": \"^0.2.1\",\n \"@fayz-ai/plugin-menu\": \"^0.3.0\",\n \"@fayz-ai/plugin-orders\": \"^0.3.0\",\n \"@fayz-ai/plugin-reports\": \"^0.2.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.2.3\",\n \"@fayz-ai/plugin-shop\": \"^0.2.5\",\n \"@fayz-ai/plugin-sites\": \"^0.2.3\",\n \"@fayz-ai/plugin-tables\": \"^0.3.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.1.7\"\n },\n \"latest\": {\n \"@fayz-ai/sdk\": \"^0.6.6\",\n \"@fayz-ai/core\": \"^0.7.0\",\n \"@fayz-ai/auth\": \"^0.7.0\",\n \"@fayz-ai/ui\": \"^0.7.0\",\n \"@fayz-ai/saas\": \"^0.7.0\",\n \"@fayz-ai/shop\": \"^0.7.0\",\n \"@fayz-ai/storefront\": \"^0.7.0\",\n \"@fayz-ai/portal\": \"^0.7.0\",\n \"@fayz-ai/courses\": \"^0.7.0\",\n \"@fayz-ai/db\": \"^0.1.2\",\n \"@fayz-ai/plugin-agenda\": \"^0.2.0\",\n \"@fayz-ai/plugin-automations\": \"^0.2.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.2.4\",\n \"@fayz-ai/plugin-courses\": \"^0.2.3\",\n \"@fayz-ai/plugin-crm\": \"^0.3.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.1.6\",\n \"@fayz-ai/plugin-financial\": \"^0.2.0\",\n \"@fayz-ai/plugin-forms\": \"^0.2.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.1.7\",\n \"@fayz-ai/plugin-marketing\": \"^0.2.1\",\n \"@fayz-ai/plugin-menu\": \"^0.3.0\",\n \"@fayz-ai/plugin-orders\": \"^0.3.0\",\n \"@fayz-ai/plugin-reports\": \"^0.2.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.2.3\",\n \"@fayz-ai/plugin-shop\": \"^0.2.5\",\n \"@fayz-ai/plugin-sites\": \"^0.2.3\",\n \"@fayz-ai/plugin-tables\": \"^0.3.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.1.7\"\n },\n \"preview\": {\n \"@fayz-ai/sdk\": \"^0.6.6\",\n \"@fayz-ai/core\": \"^0.7.0\",\n \"@fayz-ai/auth\": \"^0.7.0\",\n \"@fayz-ai/ui\": \"^0.7.0\",\n \"@fayz-ai/saas\": \"^0.7.0\",\n \"@fayz-ai/shop\": \"^0.7.0\",\n \"@fayz-ai/storefront\": \"^0.7.0\",\n \"@fayz-ai/portal\": \"^0.7.0\",\n \"@fayz-ai/courses\": \"^0.7.0\",\n \"@fayz-ai/db\": \"^0.1.2\",\n \"@fayz-ai/plugin-agenda\": \"^0.2.0\",\n \"@fayz-ai/plugin-automations\": \"^0.2.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.2.4\",\n \"@fayz-ai/plugin-courses\": \"^0.2.3\",\n \"@fayz-ai/plugin-crm\": \"^0.3.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.1.6\",\n \"@fayz-ai/plugin-financial\": \"^0.2.0\",\n \"@fayz-ai/plugin-forms\": \"^0.2.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.1.7\",\n \"@fayz-ai/plugin-marketing\": \"^0.2.1\",\n \"@fayz-ai/plugin-menu\": \"^0.3.0\",\n \"@fayz-ai/plugin-orders\": \"^0.3.0\",\n \"@fayz-ai/plugin-reports\": \"^0.2.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.2.3\",\n \"@fayz-ai/plugin-shop\": \"^0.2.5\",\n \"@fayz-ai/plugin-sites\": \"^0.2.3\",\n \"@fayz-ai/plugin-tables\": \"^0.3.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.1.7\"\n }\n }\n}\n","import releaseChannels from './release-channels.json'\n\nexport type FayzPackageChannel = 'stable' | 'latest' | 'preview'\n\nexport interface FayzPackageVersionSet {\n channel: FayzPackageChannel\n packages: Record<string, string>\n}\n\nconst releaseChannelPackages = releaseChannels.channels as Record<FayzPackageChannel, Record<string, string>>\n\nfunction buildVersionSet(channel: FayzPackageChannel): FayzPackageVersionSet {\n return {\n channel,\n packages: { ...releaseChannelPackages[channel] },\n }\n}\n\nexport const fayzPackageVersionSets: Record<FayzPackageChannel, FayzPackageVersionSet> = {\n stable: buildVersionSet('stable'),\n latest: buildVersionSet('latest'),\n preview: buildVersionSet('preview'),\n}\n\nexport function resolveFayzPackageVersions(channel: FayzPackageChannel = 'stable'): FayzPackageVersionSet {\n return fayzPackageVersionSets[channel]\n}\n\nexport function resolveFayzPackageDependencies(channel: FayzPackageChannel = 'stable'): Record<string, string> {\n return { ...resolveFayzPackageVersions(channel).packages }\n}\n\nexport function resolveFayzPackageVersion(packageName: string, channel: FayzPackageChannel = 'stable'): string {\n const version = resolveFayzPackageVersions(channel).packages[packageName]\n\n if (!version) {\n throw new Error(`No Fayz package version configured for ${packageName} in ${channel} channel`)\n }\n\n return version\n}\n"]}
|