@infuro/cms-core 1.0.44 → 1.0.46
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 +19 -2
- package/dist/admin.cjs +1413 -620
- package/dist/admin.d.cts +8 -2
- package/dist/admin.d.ts +8 -2
- package/dist/admin.js +1414 -621
- package/dist/api.cjs +40 -37
- package/dist/api.d.cts +3 -1
- package/dist/api.d.ts +3 -1
- package/dist/api.js +8 -5
- package/dist/auth.cjs +23 -23
- package/dist/auth.d.cts +1 -0
- package/dist/auth.d.ts +1 -0
- package/dist/auth.js +2 -2
- package/dist/chunk-2KUCQVAQ.js +936 -0
- package/dist/chunk-3K5AIEIZ.js +256 -0
- package/dist/{chunk-I6NH72MO.js → chunk-57O3HZPG.js} +9 -1
- package/dist/chunk-7PMHZRF3.cjs +872 -0
- package/dist/chunk-BXYZDMTZ.cjs +953 -0
- package/dist/chunk-CQHXW4TR.js +107 -0
- package/dist/{chunk-NNQBWDCI.js → chunk-CRYKVJTO.js} +55 -959
- package/dist/chunk-DBPSJYLZ.js +47 -0
- package/dist/{chunk-TAHX46EI.cjs → chunk-FBKDMRQL.cjs} +9 -1
- package/dist/chunk-GUSHM5HN.js +862 -0
- package/dist/chunk-HY3AXLOI.cjs +265 -0
- package/dist/chunk-L3525VXI.js +243 -0
- package/dist/{chunk-ZMRQ72F6.cjs → chunk-NBY4NVTY.cjs} +3 -3
- package/dist/chunk-OY2YTBMP.cjs +50 -0
- package/dist/{chunk-BLR6H5GL.js → chunk-SF2XKMCI.js} +3 -3
- package/dist/{chunk-22FFHLTO.cjs → chunk-TCSGFAWB.cjs} +56 -970
- package/dist/{chunk-P2IWWBJV.cjs → chunk-UDVLFVEC.cjs} +1314 -601
- package/dist/{chunk-SQGBHYJF.js → chunk-UKC3HYXI.js} +1245 -548
- package/dist/chunk-V25RDUOU.cjs +248 -0
- package/dist/chunk-XMRMZ6NQ.cjs +109 -0
- package/dist/cli.cjs +9 -4
- package/dist/cli.js +9 -4
- package/dist/{email-queue-TPZWLTIV.cjs → email-queue-6NJY6HNM.cjs} +7 -5
- package/dist/email-queue-OI2HSCGE.js +4 -0
- package/dist/erp-order-invoice-3GXDE443.js +3 -0
- package/dist/erp-order-invoice-EYYNR526.cjs +24 -0
- package/dist/index.cjs +426 -359
- package/dist/index.d.cts +308 -20
- package/dist/index.d.ts +308 -20
- package/dist/index.js +31 -110
- package/dist/migrations/1781800000000-CustomerPhoneNullable.ts +53 -0
- package/dist/migrations/1781810000000-OrderItemsVariantId.ts +44 -0
- package/dist/migrations/1781900000000-UserInviteStatusToken.ts +46 -0
- package/dist/migrations/1782000000000-ComboSlug.ts +58 -0
- package/dist/migrations/1782100000000-DiscountDeviceType.ts +20 -0
- package/dist/order-inventory-2MYRKEPC.cjs +39 -0
- package/dist/order-inventory-76V4XIGW.js +2 -0
- package/dist/order-notification-dispatcher-SBQAMM5V.cjs +21 -0
- package/dist/{order-notification-dispatcher-XWIJYDGA.js → order-notification-dispatcher-ZJZB2HUN.js} +5 -2
- package/dist/retire-soft-deleted-unique-5VXBA5XX.cjs +15 -0
- package/dist/retire-soft-deleted-unique-NXQIH4BC.js +2 -0
- package/dist/send-order-placed-emails-B5ZVJT7T.cjs +15 -0
- package/dist/send-order-placed-emails-WPI37KRZ.js +6 -0
- package/package.json +5 -4
- package/src/admin/admin.css +27 -24
- package/dist/chunk-5ELSW2UP.js +0 -150
- package/dist/chunk-PNOKNSG2.cjs +0 -222
- package/dist/chunk-WEMDMVHQ.js +0 -216
- package/dist/chunk-XW5ATPRW.cjs +0 -155
- package/dist/email-queue-CGZBVVAS.js +0 -2
- package/dist/erp-order-invoice-3YISSOWW.js +0 -3
- package/dist/erp-order-invoice-ZR5F2KTA.cjs +0 -12
- package/dist/order-notification-dispatcher-RU7BTGGX.cjs +0 -18
package/dist/index.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
export { sendOrderPlacedEmailsAfterConfirmation } from './chunk-CQHXW4TR.js';
|
|
1
2
|
export { emitOrderNotificationTrigger, fireOrderNotificationTrigger } from './chunk-X47PBV4I.js';
|
|
2
|
-
import { checkMultiVendorEnabled, loadUserVendorContext, getPublicSettingsGroup, BlogGeneratorService } from './chunk-
|
|
3
|
-
export { Address, Attendee, Attribute, BLOG_GENERATOR_AGENT_NAME, BLOG_GENERATOR_DEFAULT_SYSTEM_INSTRUCTION, BLOG_GENERATOR_DEFAULT_VALIDATION_RULES, BLOG_GENERATOR_LLM_AGENT_SLUG, BLOG_GENERATOR_MARKDOWN_ARTICLE_SEPARATOR, BLOG_METADATA_ENRICHER_AGENT_NAME, BLOG_METADATA_ENRICHER_DEFAULT_SYSTEM_INSTRUCTION, BLOG_METADATA_ENRICHER_DEFAULT_VALIDATION_RULES, BLOG_METADATA_ENRICHER_LLM_AGENT_SLUG, Blog, BlogGeneratorService, Brand, CMS_ENTITY_MAP, Cart, CartItem, Category, ChatConversation, ChatMessage, Collection, Combo, ComboItem, Comment, Config, Contact, Currency, CurrencyExchange, Customer, Customer_Contacts, Discount, DiscountRules, Event, EventProduct, Form, FormField, FormSubmission, JobSchedule, JobScheduleRun, KnowledgeBaseChunk, KnowledgeBaseDocument, LlmAgent, Media, MessageTemplate, Order, OrderAddresses, OrderDiscounts, OrderItem, OrderNotificationBinding, OrderNotificationTrigger, OtpChallenge, Page, PasswordResetToken, Payment, Permission, Product, ProductAttribute, ProductCategory, ProductConfig, ProductVariant, RefundPolicy, RefundRequest, RssArticle, RssFeed, Seo, Tag, Tax, User, UserGroup, Vendor, VendorCustomer, VendorRole, VendorRolePermission, VendorUser, Wishlist, WishlistItem, ZIP_MIME_TYPES, applyApprovalStatusSideEffects, applyEventApprovalStatusSideEffects, applyRotatingVendorInvite, applyVendorCustomersContactFilter, applyVendorEventCreateApproval, applyVendorProductCreateApproval, assertCaptchaOk, assertContactAllowedForVendorOrder, assertEventApprovalUpdate, assertProductApprovalUpdate, buildBlogMetadataUserPrompt, buildCronFromSchedule, buildRssUserPromptFromFeeds, buildVendorInviteLink, calculateOrderRefundPreview, calculateRefundFromPolicy, checkEventsEnabled, checkMultiVendorEnabled, contactIsVendorCustomer, countRecentOtpSends, createAnalyticsHandlers, createBlogBySlugHandler, createChangePasswordHandler, createCmsApiHandler, createCmsApp, createCmsAppWithMessaging, createCrudByIdHandler, createCrudHandler, createDashboardStatsHandler, createEcommerceAnalyticsHandler, createEventOrderMessageTemplateHandlers, createForgotPasswordHandler, createFormBySlugHandler, createInviteAcceptHandler, createJobScheduleHandlers, createLlmAgentKnowledgeHandlers, createMediaZipExtractHandler, createMessageTemplateRowLoader, createOtpChallenge, createSetPasswordHandler, createSettingsApiHandlers, createSocialMediaHandlers, createStorefrontApiHandler, createUploadHandler, createUserAuthApiRouter, createUserAvatarHandler, createUserProfileHandler, createUsersApiHandlers, createVendorDashboardHandler, createVendorOnboardHandlers, customerPhoneForUser, daysBeforeEventStart, describeEventTierPolicy, ensureCustomerForUser, ensureMessagingPluginsOnCms, ensureScheduleQueueWorker, ensureVendorCustomerForOrderContact, findActiveRefundPolicyForVendor, findVendorByInviteToken, formatTierRange, generateNumericOtp, getPublicSettingsGroup, getRequireEventApproval, getRequireProductApproval, getRssArticleSummaryFromItem, getVendorCatalogCreateFlags, hashOtpCode, hydrateVendorSessionUser, invalidateEventsCache, invalidateMultiVendorCache, invalidateRequireEventApprovalCache, invalidateRequireProductApprovalCache, invalidateVendorCatalogCreateFlagsCache, isCustomerTypeContact, isZipMedia, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, loadSettingsGroupFromDb, loadUserVendorContext, mergeGuardrailsIntoSystemPrompt, messagingPlugins, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, normalizePhoneE164, normalizeRefundTiers, overlayCmsPlugins, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseLlmAgentValidationRules, pgBossScheduleNameForId, queueErpCreateContactIfEnabled, queueJobScheduleNow, queuePlugin, queueSms, registerJobRunnerWorker, registerMessagingQueueProcessors, registerSmsQueueProcessor, relativePathFromMediaParentId, resolveBlogCategoryIdByName, resolveSettingsEncryptionKey, resolveVendorIdForContactCheck, sanitizeMediaFolderPath, sanitizeStorageSegment, sendVendorOnboardEmails, simpleDecrypt, simpleEncrypt, syncJobScheduleToPgBoss, validateRefundTiers, validateScheduleInput, validateUserMessageAgainstAgentRules, validateUserMessageAgainstStructuredRules, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, whatsappPlugin, wrapGetCmsWithMessaging } from './chunk-
|
|
4
|
-
|
|
5
|
-
export {
|
|
3
|
+
import { checkMultiVendorEnabled, loadUserVendorContext, getPublicSettingsGroup, BlogGeneratorService } from './chunk-UKC3HYXI.js';
|
|
4
|
+
export { Address, Attendee, Attribute, BLOG_GENERATOR_AGENT_NAME, BLOG_GENERATOR_DEFAULT_SYSTEM_INSTRUCTION, BLOG_GENERATOR_DEFAULT_VALIDATION_RULES, BLOG_GENERATOR_LLM_AGENT_SLUG, BLOG_GENERATOR_MARKDOWN_ARTICLE_SEPARATOR, BLOG_METADATA_ENRICHER_AGENT_NAME, BLOG_METADATA_ENRICHER_DEFAULT_SYSTEM_INSTRUCTION, BLOG_METADATA_ENRICHER_DEFAULT_VALIDATION_RULES, BLOG_METADATA_ENRICHER_LLM_AGENT_SLUG, Blog, BlogGeneratorService, Brand, CMS_ENTITY_MAP, Cart, CartItem, Category, ChatConversation, ChatMessage, Collection, Combo, ComboItem, Comment, Config, Contact, Currency, CurrencyExchange, Customer, Customer_Contacts, Discount, DiscountRules, Event, EventProduct, Form, FormField, FormSubmission, JobSchedule, JobScheduleRun, KnowledgeBaseChunk, KnowledgeBaseDocument, LlmAgent, Media, MessageTemplate, Order, OrderAddresses, OrderDiscounts, OrderItem, OrderNotificationBinding, OrderNotificationTrigger, OtpChallenge, Page, PasswordResetToken, Payment, Permission, Product, ProductAttribute, ProductCategory, ProductConfig, ProductVariant, RefundPolicy, RefundRequest, RssArticle, RssFeed, Seo, Tag, Tax, User, UserGroup, Vendor, VendorCustomer, VendorRole, VendorRolePermission, VendorUser, Wishlist, WishlistItem, ZIP_MIME_TYPES, applyApprovalStatusSideEffects, applyEventApprovalStatusSideEffects, applyRotatingVendorInvite, applyVendorCustomersContactFilter, applyVendorEventCreateApproval, applyVendorProductCreateApproval, assertCaptchaOk, assertContactAllowedForVendorOrder, assertEventApprovalUpdate, assertProductApprovalUpdate, buildBlogMetadataUserPrompt, buildCronFromSchedule, buildRssUserPromptFromFeeds, buildUserInviteLink, buildVendorInviteLink, calculateOrderRefundPreview, calculateRefundFromPolicy, checkAndIncrementDiscountUsage, checkEventsEnabled, checkMultiVendorEnabled, completeUserInviteAccept, consumeAppliedDiscountUsages, contactIsVendorCustomer, countDiscountOrdersForContact, countRecentOtpSends, createAnalyticsHandlers, createBlogBySlugHandler, createChangePasswordHandler, createCmsApiHandler, createCmsApp, createCmsAppWithMessaging, createCrudByIdHandler, createCrudHandler, createDashboardStatsHandler, createEcommerceAnalyticsHandler, createEventOrderMessageTemplateHandlers, createForgotPasswordHandler, createFormBySlugHandler, createInviteAcceptHandler, createJobScheduleHandlers, createLlmAgentKnowledgeHandlers, createMediaZipExtractHandler, createMessageTemplateRowLoader, createOtpChallenge, createSetPasswordHandler, createSettingsApiHandlers, createSocialMediaHandlers, createStorefrontApiHandler, createUploadHandler, createUserAuthApiRouter, createUserAvatarHandler, createUserProfileHandler, createUsersApiHandlers, createVendorDashboardHandler, createVendorOnboardHandlers, customerPhoneForEmail, customerPhoneForUser, daysBeforeEventStart, decrementDiscountUsage, describeEventTierPolicy, ensureCustomerForUser, ensureCustomerRecord, ensureMessagingPluginsOnCms, ensureScheduleQueueWorker, ensureVendorCustomerForOrderContact, ensureVendorCustomersForOrder, findActiveRefundPolicyForVendor, findUserByInviteToken, findVendorByInviteToken, formatTierRange, generateNumericOtp, getPublicSettingsGroup, getRequireEventApproval, getRequireProductApproval, getRssArticleSummaryFromItem, getVendorCatalogCreateFlags, hashOtpCode, hydrateVendorSessionUser, invalidateEventsCache, invalidateMultiVendorCache, invalidateRequireEventApprovalCache, invalidateRequireProductApprovalCache, invalidateVendorCatalogCreateFlagsCache, isCustomerTypeContact, isMaxPerUserUsageReached, isMaxTotalUsageReached, isSyntheticCustomerPhone, isZipMedia, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, loadSettingsGroupFromDb, loadUserVendorContext, mergeGuardrailsIntoSystemPrompt, messagingPlugins, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, newUserInviteToken, normalizeCustomerPhone, normalizePhoneE164, normalizeRefundTiers, overlayCmsPlugins, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseLlmAgentValidationRules, pgBossScheduleNameForId, queueErpCreateContactIfEnabled, queueJobScheduleNow, queuePlugin, queueSms, recordDiscountUsage, registerJobRunnerWorker, registerMessagingQueueProcessors, registerSmsQueueProcessor, relativePathFromMediaParentId, resolveBlogCategoryIdByName, resolveSettingsEncryptionKey, resolveVendorIdForContactCheck, sanitizeMediaFolderPath, sanitizeStorageSegment, sendVendorOnboardEmails, simpleDecrypt, simpleEncrypt, syncJobScheduleToPgBoss, validateRefundTiers, validateScheduleInput, validateUserMessageAgainstAgentRules, validateUserMessageAgainstStructuredRules, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, whatsappPlugin, wrapGetCmsWithMessaging } from './chunk-UKC3HYXI.js';
|
|
5
|
+
export { deductInventoryForConfirmedOrder, mergeInventoryLines, orderInventorySnapshotFromRow, orderStatusHoldsStock, reconcileOrderInventoryBetweenSnapshots, restoreInventoryForCancelledOrder, validateInventoryForConfirmedOrderLines, validateInventoryForOrderBecomingConfirmed } from './chunk-3K5AIEIZ.js';
|
|
6
|
+
export { activeUniqueValueExists, retireSoftDeletedUniqueValue } from './chunk-DBPSJYLZ.js';
|
|
7
|
+
export { buildEventOrderTemplateVariables, initWhatsappTriggerDispatcher, queueWhatsApp, registerWhatsAppQueueProcessor, resendOrderNotification } from './chunk-GUSHM5HN.js';
|
|
8
|
+
export { EmailService, emailPlugin, emailTemplates, joinRecipientsForSend, parseEmailRecipientsFromConfig, renderEmail, renderLayout, serializeEmailRecipients } from './chunk-CRYKVJTO.js';
|
|
6
9
|
export { KNOWN_NOTIFICATION_TRIGGERS, notificationTriggerEmitter } from './chunk-HCIRL37O.js';
|
|
7
10
|
import './chunk-JXF23MPG.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export { queueEmail, queueOrderPlacedEmails, queueVendorOnboardEmails, registerEmailQueueProcessor } from './chunk-5ELSW2UP.js';
|
|
11
|
+
export { queueEmail, queueOrderPlacedEmails, queueVendorOnboardEmails, registerEmailQueueProcessor } from './chunk-L3525VXI.js';
|
|
12
|
+
export { INVOICE_TEMPLATE_IDS, INVOICE_TEMPLATE_OPTIONS, buildLocalInvoicePdfForOrder, generateLocalInvoicePdf, getCompanyDetailsFromSettings, isOrderEligibleForInvoiceEmail, mergeEmailLayoutCompanyDetails, normalizeInvoiceTemplateId, resolveInvoiceAssetUrl, resolveOrderInvoicePdfBytes, streamOrderInvoicePdf } from './chunk-2KUCQVAQ.js';
|
|
11
13
|
import './chunk-MQBT33IV.js';
|
|
12
14
|
import './chunk-CRFV5WJK.js';
|
|
13
15
|
export { EVENT_ORDER_MESSAGE_TEMPLATE_DEFAULTS, EVENT_ORDER_TEMPLATE_KEY, EVENT_ORDER_TEMPLATE_VARIABLES, resolveEventOrderTemplate } from './chunk-KFFB6EMZ.js';
|
|
14
16
|
import { PgBossService } from './chunk-GO7PPYNU.js';
|
|
15
17
|
export { JOB_RUNNER_QUEUE, PgBossService } from './chunk-GO7PPYNU.js';
|
|
16
|
-
export { createCmsMiddleware, defaultPublicApiMethods, getNextAuthOptions, getStorefrontNextAuthOptions, isAuthDebugClientEnabled, isAuthDebugEnabled, logAuth, logAuthClient, nextAuthCookieDebugInfo, seedAdministratorPermissions, summarizeSessionUserForLog } from './chunk-
|
|
17
|
-
export { OPEN_ENDPOINTS, PERMISSION_REQUIRED_ENDPOINTS, RBAC_ADMIN_ONLY_ENTITIES, canManageRoles, createAuthHelpers, createCmsAuthBundle, getRequiredPermission, isOpenEndpoint, isPublicMethod, sessionHasEntityAccess } from './chunk-
|
|
18
|
+
export { createCmsMiddleware, defaultPublicApiMethods, getNextAuthOptions, getStorefrontNextAuthOptions, isAuthDebugClientEnabled, isAuthDebugEnabled, logAuth, logAuthClient, nextAuthCookieDebugInfo, seedAdministratorPermissions, summarizeSessionUserForLog } from './chunk-57O3HZPG.js';
|
|
19
|
+
export { OPEN_ENDPOINTS, PERMISSION_REQUIRED_ENDPOINTS, RBAC_ADMIN_ONLY_ENTITIES, canManageRoles, createAuthHelpers, createCmsAuthBundle, getRequiredPermission, isOpenEndpoint, isPublicMethod, sessionHasEntityAccess } from './chunk-SF2XKMCI.js';
|
|
18
20
|
import { isSuperAdmin, isVendorGroupName } from './chunk-DN65KDIA.js';
|
|
19
21
|
export { ADMIN_GROUP_NAME, SUPER_ADMIN_GROUP_ID, VENDOR_ADMIN_GROUP_ID, VENDOR_OWNER_GROUP_NAME, VENDOR_SCOPED_STORE_ENTITIES, VENDOR_STORE_RBAC_ENTITIES, canManageVendorRoles, canManageVendorTeam, canOnboardVendors, explainSessionEntityAccess, getPermissionableEntityKeys, hasEntityPermission, isPlatformAdministrator, isRbacDebugEnabled, isSuperAdmin, isSuperAdminGroupName, isVendorAdmin, isVendorGroupName, isVendorOwner, isVendorPortalUser, isVendorStaff, logEntityAccessDecision, logRbac, permissionRowsToRecord, resolveVendorScopeFromSessionUser, summarizeEntityPerms, vendorPortalFlagsFromUser } from './chunk-DN65KDIA.js';
|
|
20
22
|
export { queueErpPaidOrderForOrderId } from './chunk-TDV6EJHV.js';
|
|
@@ -29,6 +31,7 @@ import { clsx } from 'clsx';
|
|
|
29
31
|
import { twMerge } from 'tailwind-merge';
|
|
30
32
|
import { NextResponse } from 'next/server';
|
|
31
33
|
import 'reflect-metadata';
|
|
34
|
+
import pg from 'pg';
|
|
32
35
|
import { DataSource } from 'typeorm';
|
|
33
36
|
import bcrypt from 'bcryptjs';
|
|
34
37
|
|
|
@@ -2175,106 +2178,6 @@ async function rateLimitCheckoutPost(req) {
|
|
|
2175
2178
|
}
|
|
2176
2179
|
__name(rateLimitCheckoutPost, "rateLimitCheckoutPost");
|
|
2177
2180
|
|
|
2178
|
-
// src/lib/send-order-placed-emails.ts
|
|
2179
|
-
async function getSettingsGroup(deps, group) {
|
|
2180
|
-
const ds = await deps.getDataSource();
|
|
2181
|
-
const rows = await ds.getRepository(deps.entityMap.configs).find({
|
|
2182
|
-
where: {
|
|
2183
|
-
settings: group,
|
|
2184
|
-
deleted: false
|
|
2185
|
-
}
|
|
2186
|
-
});
|
|
2187
|
-
return Object.fromEntries(rows.map((r) => [
|
|
2188
|
-
r.key,
|
|
2189
|
-
r.value
|
|
2190
|
-
]));
|
|
2191
|
-
}
|
|
2192
|
-
__name(getSettingsGroup, "getSettingsGroup");
|
|
2193
|
-
async function sendOrderPlacedEmailsAfterConfirmation(orderId, deps) {
|
|
2194
|
-
try {
|
|
2195
|
-
let addrToRecord2 = function(a) {
|
|
2196
|
-
if (!a) return void 0;
|
|
2197
|
-
const out = {};
|
|
2198
|
-
const set = /* @__PURE__ */ __name((k, v) => {
|
|
2199
|
-
const t = v != null ? String(v).trim() : "";
|
|
2200
|
-
if (t) out[k] = t;
|
|
2201
|
-
}, "set");
|
|
2202
|
-
set("line1", a.line1);
|
|
2203
|
-
set("line2", a.line2);
|
|
2204
|
-
set("city", a.city);
|
|
2205
|
-
set("state", a.state);
|
|
2206
|
-
set("postalCode", a.postalCode);
|
|
2207
|
-
set("country", a.country);
|
|
2208
|
-
return Object.keys(out).length ? out : void 0;
|
|
2209
|
-
};
|
|
2210
|
-
var addrToRecord = addrToRecord2;
|
|
2211
|
-
__name(addrToRecord2, "addrToRecord");
|
|
2212
|
-
const ds = await deps.getDataSource();
|
|
2213
|
-
const order = await ds.getRepository(deps.entityMap.orders).findOne({
|
|
2214
|
-
where: {
|
|
2215
|
-
id: orderId
|
|
2216
|
-
},
|
|
2217
|
-
relations: [
|
|
2218
|
-
"contact",
|
|
2219
|
-
"billingAddress",
|
|
2220
|
-
"shippingAddress"
|
|
2221
|
-
]
|
|
2222
|
-
});
|
|
2223
|
-
if (!order) return;
|
|
2224
|
-
const o = order;
|
|
2225
|
-
const contact = o.contact;
|
|
2226
|
-
const customerEmail = contact?.email?.trim() || null;
|
|
2227
|
-
const customerName = contact?.name?.trim() || void 0;
|
|
2228
|
-
const itemRows = await ds.getRepository(deps.entityMap.order_items).find({
|
|
2229
|
-
where: {
|
|
2230
|
-
orderId
|
|
2231
|
-
},
|
|
2232
|
-
relations: [
|
|
2233
|
-
"product"
|
|
2234
|
-
],
|
|
2235
|
-
order: {
|
|
2236
|
-
id: "ASC"
|
|
2237
|
-
}
|
|
2238
|
-
});
|
|
2239
|
-
const lineItems = itemRows.map((row) => {
|
|
2240
|
-
const r = row;
|
|
2241
|
-
const name = r.product?.name && String(r.product.name).trim() || `Product #${r.productId}`;
|
|
2242
|
-
return {
|
|
2243
|
-
productName: name,
|
|
2244
|
-
quantity: Math.max(0, Math.floor(Number(r.quantity) || 0)),
|
|
2245
|
-
unitPrice: r.unitPrice,
|
|
2246
|
-
lineTotal: r.total,
|
|
2247
|
-
sku: r.product?.sku && String(r.product.sku).trim() ? r.product.sku : void 0,
|
|
2248
|
-
tax: r.tax != null && Number(r.tax) !== 0 ? r.tax : void 0,
|
|
2249
|
-
hsn: r.hsn && String(r.hsn).trim() ? r.hsn : void 0
|
|
2250
|
-
};
|
|
2251
|
-
});
|
|
2252
|
-
const [branding, emailSettings] = await Promise.all([
|
|
2253
|
-
getSettingsGroup(deps, "branding"),
|
|
2254
|
-
getSettingsGroup(deps, "email")
|
|
2255
|
-
]);
|
|
2256
|
-
const companyDetails = mergeEmailLayoutCompanyDetails(branding, emailSettings);
|
|
2257
|
-
const salesTeamEmails = parseEmailRecipientsFromConfig(emailSettings.salesTeamEmails ?? emailSettings.salesTeamEmail);
|
|
2258
|
-
const cms = await deps.getCms();
|
|
2259
|
-
await queueOrderPlacedEmails(cms, {
|
|
2260
|
-
orderNumber: o.orderNumber,
|
|
2261
|
-
total: o.total,
|
|
2262
|
-
subtotal: o.subtotal,
|
|
2263
|
-
tax: o.tax,
|
|
2264
|
-
currency: o.currency,
|
|
2265
|
-
customerName,
|
|
2266
|
-
customerEmail,
|
|
2267
|
-
salesTeamEmails,
|
|
2268
|
-
companyDetails,
|
|
2269
|
-
lineItems,
|
|
2270
|
-
billingAddress: addrToRecord2(o.billingAddress),
|
|
2271
|
-
shippingAddress: addrToRecord2(o.shippingAddress)
|
|
2272
|
-
});
|
|
2273
|
-
} catch {
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
__name(sendOrderPlacedEmailsAfterConfirmation, "sendOrderPlacedEmailsAfterConfirmation");
|
|
2277
|
-
|
|
2278
2181
|
// src/lib/order-notification-trigger-seeds.ts
|
|
2279
2182
|
var DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS = [
|
|
2280
2183
|
{
|
|
@@ -2304,10 +2207,27 @@ var ORDER_NOTIFICATION_TRIGGERS = [
|
|
|
2304
2207
|
label: "Order cancelled"
|
|
2305
2208
|
}
|
|
2306
2209
|
];
|
|
2210
|
+
function disablePgNative() {
|
|
2211
|
+
try {
|
|
2212
|
+
Object.defineProperty(pg, "native", {
|
|
2213
|
+
configurable: true,
|
|
2214
|
+
enumerable: false,
|
|
2215
|
+
get: /* @__PURE__ */ __name(() => null, "get")
|
|
2216
|
+
});
|
|
2217
|
+
} catch {
|
|
2218
|
+
try {
|
|
2219
|
+
delete pg.native;
|
|
2220
|
+
} catch {
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
return pg;
|
|
2224
|
+
}
|
|
2225
|
+
__name(disablePgNative, "disablePgNative");
|
|
2307
2226
|
function createDataSourceManager(entityMap, options) {
|
|
2308
2227
|
const entities = Object.values(entityMap);
|
|
2309
2228
|
const databaseUrl = options?.databaseUrl ?? process.env.DATABASE_URL;
|
|
2310
2229
|
const idleTimeoutMillis = options?.idleTimeoutMillis ?? 6e4;
|
|
2230
|
+
const postgresDriver = disablePgNative();
|
|
2311
2231
|
let dataSource = null;
|
|
2312
2232
|
const onResetCallbacks = [];
|
|
2313
2233
|
function registerOnReset(cb) {
|
|
@@ -2332,6 +2252,7 @@ function createDataSourceManager(entityMap, options) {
|
|
|
2332
2252
|
url: databaseUrl,
|
|
2333
2253
|
entities,
|
|
2334
2254
|
synchronize: false,
|
|
2255
|
+
driver: postgresDriver,
|
|
2335
2256
|
extra: {
|
|
2336
2257
|
idleTimeoutMillis
|
|
2337
2258
|
},
|
|
@@ -2835,4 +2756,4 @@ var DEFAULT_ADMIN_NAV = [
|
|
|
2835
2756
|
// src/index.ts
|
|
2836
2757
|
console.log("\u{1F525}USING LOCAL CMS CORE \u{1F525}");
|
|
2837
2758
|
|
|
2838
|
-
export { CaptchaService, DEFAULT_ADMIN_NAV, DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS, ERPSubmissionService, LlmService, ORDER_NOTIFICATION_TRIGGERS, allowRateLimit, analyticsPlugin, blogGeneratorPlugin, buildCaptchaPublicConfig, cachePlugin, captchaPlugin, cn, createDataSourceManager, enrichUserWithVendorContext, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateSlug, llmPlugin, loadPublicThemeSettings, localStoragePlugin, mergeSeoBySlug, parseHfInferenceEmbeddingBody, paymentPlugin, pgBossPlugin, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, resolvePublicMetadata, s3StoragePlugin, seedDefaultAdmin,
|
|
2759
|
+
export { CaptchaService, DEFAULT_ADMIN_NAV, DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS, ERPSubmissionService, LlmService, ORDER_NOTIFICATION_TRIGGERS, allowRateLimit, analyticsPlugin, blogGeneratorPlugin, buildCaptchaPublicConfig, cachePlugin, captchaPlugin, cn, createDataSourceManager, enrichUserWithVendorContext, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateSlug, llmPlugin, loadPublicThemeSettings, localStoragePlugin, mergeSeoBySlug, parseHfInferenceEmbeddingBody, paymentPlugin, pgBossPlugin, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, resolvePublicMetadata, s3StoragePlugin, seedDefaultAdmin, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, truncateText, validateSlug, withAdminRlsContext, withVendorRlsContext };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `customer.phone` was NOT NULL + UNIQUE, so seeds invented placeholders like
|
|
5
|
+
* `e-{email-slug}` / `u-{userId}` when Shopify had no phone. Allow null and clear
|
|
6
|
+
* those synthetic / email-like values.
|
|
7
|
+
*/
|
|
8
|
+
export class CustomerPhoneNullable1781800000000 implements MigrationInterface {
|
|
9
|
+
name = 'CustomerPhoneNullable1781800000000';
|
|
10
|
+
|
|
11
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`
|
|
13
|
+
ALTER TABLE "customer"
|
|
14
|
+
ALTER COLUMN "phone" DROP NOT NULL
|
|
15
|
+
`);
|
|
16
|
+
|
|
17
|
+
await queryRunner.query(`
|
|
18
|
+
UPDATE "customer"
|
|
19
|
+
SET "phone" = NULL
|
|
20
|
+
WHERE "phone" IS NOT NULL
|
|
21
|
+
AND (
|
|
22
|
+
"phone" LIKE 'e-%'
|
|
23
|
+
OR "phone" LIKE 'u-%'
|
|
24
|
+
OR "phone" LIKE '%@%'
|
|
25
|
+
)
|
|
26
|
+
`);
|
|
27
|
+
|
|
28
|
+
// Contacts may have the same synthetic placeholders from older paths.
|
|
29
|
+
await queryRunner.query(`
|
|
30
|
+
UPDATE "contacts"
|
|
31
|
+
SET "phone" = NULL
|
|
32
|
+
WHERE "phone" IS NOT NULL
|
|
33
|
+
AND (
|
|
34
|
+
"phone" LIKE 'e-%'
|
|
35
|
+
OR "phone" LIKE 'u-%'
|
|
36
|
+
OR "phone" LIKE '%@%'
|
|
37
|
+
)
|
|
38
|
+
`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
42
|
+
// Restore NOT NULL requires filling nulls; use a unique synthetic value per row.
|
|
43
|
+
await queryRunner.query(`
|
|
44
|
+
UPDATE "customer"
|
|
45
|
+
SET "phone" = 'e-migrated-' || id::text
|
|
46
|
+
WHERE "phone" IS NULL
|
|
47
|
+
`);
|
|
48
|
+
await queryRunner.query(`
|
|
49
|
+
ALTER TABLE "customer"
|
|
50
|
+
ALTER COLUMN "phone" SET NOT NULL
|
|
51
|
+
`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
export class OrderItemsVariantId1781810000000 implements MigrationInterface {
|
|
4
|
+
name = 'OrderItemsVariantId1781810000000';
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`
|
|
8
|
+
ALTER TABLE "order_items"
|
|
9
|
+
ADD COLUMN IF NOT EXISTS "variantId" integer
|
|
10
|
+
`);
|
|
11
|
+
await queryRunner.query(`
|
|
12
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_items_variantId"
|
|
13
|
+
ON "order_items" ("variantId")
|
|
14
|
+
`);
|
|
15
|
+
// Best-effort FK when product_variants exists
|
|
16
|
+
await queryRunner.query(`
|
|
17
|
+
DO $$
|
|
18
|
+
BEGIN
|
|
19
|
+
IF EXISTS (
|
|
20
|
+
SELECT 1 FROM information_schema.tables
|
|
21
|
+
WHERE table_name = 'product_variants'
|
|
22
|
+
) AND NOT EXISTS (
|
|
23
|
+
SELECT 1 FROM information_schema.table_constraints
|
|
24
|
+
WHERE constraint_name = 'FK_order_items_variant'
|
|
25
|
+
) THEN
|
|
26
|
+
ALTER TABLE "order_items"
|
|
27
|
+
ADD CONSTRAINT "FK_order_items_variant"
|
|
28
|
+
FOREIGN KEY ("variantId") REFERENCES "product_variants"("id")
|
|
29
|
+
ON DELETE SET NULL ON UPDATE NO ACTION;
|
|
30
|
+
END IF;
|
|
31
|
+
END $$;
|
|
32
|
+
`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
36
|
+
await queryRunner.query(`
|
|
37
|
+
ALTER TABLE "order_items" DROP CONSTRAINT IF EXISTS "FK_order_items_variant"
|
|
38
|
+
`);
|
|
39
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_order_items_variantId"`);
|
|
40
|
+
await queryRunner.query(`
|
|
41
|
+
ALTER TABLE "order_items" DROP COLUMN IF EXISTS "variantId"
|
|
42
|
+
`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
export class UserInviteStatusToken1781900000000 implements MigrationInterface {
|
|
4
|
+
name = 'UserInviteStatusToken1781900000000';
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`
|
|
8
|
+
DO $$ BEGIN
|
|
9
|
+
CREATE TYPE "users_invitestatus_enum" AS ENUM ('pending', 'active');
|
|
10
|
+
EXCEPTION WHEN duplicate_object THEN NULL;
|
|
11
|
+
END $$
|
|
12
|
+
`);
|
|
13
|
+
|
|
14
|
+
await queryRunner.query(`
|
|
15
|
+
ALTER TABLE "users"
|
|
16
|
+
ADD COLUMN IF NOT EXISTS "inviteStatus" "users_invitestatus_enum" NOT NULL DEFAULT 'active'
|
|
17
|
+
`);
|
|
18
|
+
await queryRunner.query(`
|
|
19
|
+
ALTER TABLE "users"
|
|
20
|
+
ADD COLUMN IF NOT EXISTS "inviteToken" character varying
|
|
21
|
+
`);
|
|
22
|
+
|
|
23
|
+
// Existing users with a password are active; password-less users are pending invites.
|
|
24
|
+
await queryRunner.query(`
|
|
25
|
+
UPDATE "users"
|
|
26
|
+
SET "inviteStatus" = CASE
|
|
27
|
+
WHEN "password" IS NOT NULL AND TRIM("password") <> '' THEN 'active'::"users_invitestatus_enum"
|
|
28
|
+
ELSE 'pending'::"users_invitestatus_enum"
|
|
29
|
+
END
|
|
30
|
+
WHERE "deleted" = false
|
|
31
|
+
`);
|
|
32
|
+
|
|
33
|
+
await queryRunner.query(`
|
|
34
|
+
CREATE INDEX IF NOT EXISTS "IDX_users_inviteToken"
|
|
35
|
+
ON "users" ("inviteToken")
|
|
36
|
+
WHERE "inviteToken" IS NOT NULL
|
|
37
|
+
`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
41
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_users_inviteToken"`);
|
|
42
|
+
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN IF EXISTS "inviteToken"`);
|
|
43
|
+
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN IF EXISTS "inviteStatus"`);
|
|
44
|
+
await queryRunner.query(`DROP TYPE IF EXISTS "users_invitestatus_enum"`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Add combos.slug (unique per vendor), backfill from name.
|
|
5
|
+
*/
|
|
6
|
+
export class ComboSlug1782000000000 implements MigrationInterface {
|
|
7
|
+
name = 'ComboSlug1782000000000';
|
|
8
|
+
|
|
9
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
10
|
+
await queryRunner.query(`
|
|
11
|
+
ALTER TABLE "combos"
|
|
12
|
+
ADD COLUMN IF NOT EXISTS "slug" character varying
|
|
13
|
+
`);
|
|
14
|
+
|
|
15
|
+
// Slugify name; empty → combo-{id}
|
|
16
|
+
await queryRunner.query(`
|
|
17
|
+
UPDATE "combos"
|
|
18
|
+
SET "slug" = CASE
|
|
19
|
+
WHEN NULLIF(TRIM(BOTH '-' FROM LOWER(REGEXP_REPLACE(COALESCE(TRIM("name"), ''), '[^a-zA-Z0-9]+', '-', 'g'))), '') IS NULL
|
|
20
|
+
THEN 'combo-' || "id"::text
|
|
21
|
+
ELSE TRIM(BOTH '-' FROM LOWER(REGEXP_REPLACE(COALESCE(TRIM("name"), ''), '[^a-zA-Z0-9]+', '-', 'g')))
|
|
22
|
+
END
|
|
23
|
+
WHERE "slug" IS NULL OR TRIM("slug") = ''
|
|
24
|
+
`);
|
|
25
|
+
|
|
26
|
+
// Deduplicate within vendor (append -id when collisions remain)
|
|
27
|
+
await queryRunner.query(`
|
|
28
|
+
WITH ranked AS (
|
|
29
|
+
SELECT
|
|
30
|
+
id,
|
|
31
|
+
"vendorId",
|
|
32
|
+
slug,
|
|
33
|
+
ROW_NUMBER() OVER (PARTITION BY "vendorId", slug ORDER BY id) AS rn
|
|
34
|
+
FROM "combos"
|
|
35
|
+
WHERE deleted = false OR deleted IS NULL
|
|
36
|
+
)
|
|
37
|
+
UPDATE "combos" c
|
|
38
|
+
SET slug = c.slug || '-' || c.id::text
|
|
39
|
+
FROM ranked r
|
|
40
|
+
WHERE c.id = r.id AND r.rn > 1
|
|
41
|
+
`);
|
|
42
|
+
|
|
43
|
+
await queryRunner.query(`
|
|
44
|
+
ALTER TABLE "combos"
|
|
45
|
+
ALTER COLUMN "slug" SET NOT NULL
|
|
46
|
+
`);
|
|
47
|
+
|
|
48
|
+
await queryRunner.query(`
|
|
49
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "UQ_combos_vendor_slug"
|
|
50
|
+
ON "combos" ("vendorId", "slug")
|
|
51
|
+
`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
55
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "UQ_combos_vendor_slug"`);
|
|
56
|
+
await queryRunner.query(`ALTER TABLE "combos" DROP COLUMN IF EXISTS "slug"`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Add discount_rules.type value `deviceType` (Web / Mobile condition; admin-only for now).
|
|
5
|
+
*/
|
|
6
|
+
export class DiscountDeviceType1782100000000 implements MigrationInterface {
|
|
7
|
+
name = 'DiscountDeviceType1782100000000';
|
|
8
|
+
|
|
9
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
10
|
+
await queryRunner.query(`
|
|
11
|
+
ALTER TYPE "public"."discount_rules_type_enum"
|
|
12
|
+
ADD VALUE IF NOT EXISTS 'deviceType'
|
|
13
|
+
`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
17
|
+
// Postgres cannot easily remove a single enum value; leave as no-op.
|
|
18
|
+
void queryRunner;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHY3AXLOI_cjs = require('./chunk-HY3AXLOI.cjs');
|
|
4
|
+
require('./chunk-USNT2KNT.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "deductInventoryForConfirmedOrder", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkHY3AXLOI_cjs.deductInventoryForConfirmedOrder; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "mergeInventoryLines", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkHY3AXLOI_cjs.mergeInventoryLines; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "orderInventorySnapshotFromRow", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkHY3AXLOI_cjs.orderInventorySnapshotFromRow; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "orderStatusHoldsStock", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkHY3AXLOI_cjs.orderStatusHoldsStock; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "reconcileOrderInventoryBetweenSnapshots", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkHY3AXLOI_cjs.reconcileOrderInventoryBetweenSnapshots; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "restoreInventoryForCancelledOrder", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkHY3AXLOI_cjs.restoreInventoryForCancelledOrder; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "validateInventoryForConfirmedOrderLines", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkHY3AXLOI_cjs.validateInventoryForConfirmedOrderLines; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "validateInventoryForOrderBecomingConfirmed", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkHY3AXLOI_cjs.validateInventoryForOrderBecomingConfirmed; }
|
|
39
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { deductInventoryForConfirmedOrder, mergeInventoryLines, orderInventorySnapshotFromRow, orderStatusHoldsStock, reconcileOrderInventoryBetweenSnapshots, restoreInventoryForCancelledOrder, validateInventoryForConfirmedOrderLines, validateInventoryForOrderBecomingConfirmed } from './chunk-3K5AIEIZ.js';
|
|
2
|
+
import './chunk-SHUYVCID.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk7PMHZRF3_cjs = require('./chunk-7PMHZRF3.cjs');
|
|
4
|
+
require('./chunk-TCSGFAWB.cjs');
|
|
5
|
+
require('./chunk-UCKN4BBY.cjs');
|
|
6
|
+
require('./chunk-V25RDUOU.cjs');
|
|
7
|
+
require('./chunk-BXYZDMTZ.cjs');
|
|
8
|
+
require('./chunk-OOTLNH63.cjs');
|
|
9
|
+
require('./chunk-UPLVMVRX.cjs');
|
|
10
|
+
require('./chunk-USNT2KNT.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Object.defineProperty(exports, "initWhatsappTriggerDispatcher", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunk7PMHZRF3_cjs.initWhatsappTriggerDispatcher; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "resendOrderNotification", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunk7PMHZRF3_cjs.resendOrderNotification; }
|
|
21
|
+
});
|
package/dist/{order-notification-dispatcher-XWIJYDGA.js → order-notification-dispatcher-ZJZB2HUN.js}
RENAMED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export { initWhatsappTriggerDispatcher, resendOrderNotification } from './chunk-
|
|
1
|
+
export { initWhatsappTriggerDispatcher, resendOrderNotification } from './chunk-GUSHM5HN.js';
|
|
2
|
+
import './chunk-CRYKVJTO.js';
|
|
2
3
|
import './chunk-HCIRL37O.js';
|
|
3
|
-
import './chunk-
|
|
4
|
+
import './chunk-L3525VXI.js';
|
|
5
|
+
import './chunk-2KUCQVAQ.js';
|
|
4
6
|
import './chunk-CRFV5WJK.js';
|
|
7
|
+
import './chunk-JC6DLWTE.js';
|
|
5
8
|
import './chunk-SHUYVCID.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkOY2YTBMP_cjs = require('./chunk-OY2YTBMP.cjs');
|
|
4
|
+
require('./chunk-USNT2KNT.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "activeUniqueValueExists", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkOY2YTBMP_cjs.activeUniqueValueExists; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "retireSoftDeletedUniqueValue", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkOY2YTBMP_cjs.retireSoftDeletedUniqueValue; }
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXMRMZ6NQ_cjs = require('./chunk-XMRMZ6NQ.cjs');
|
|
4
|
+
require('./chunk-TCSGFAWB.cjs');
|
|
5
|
+
require('./chunk-V25RDUOU.cjs');
|
|
6
|
+
require('./chunk-BXYZDMTZ.cjs');
|
|
7
|
+
require('./chunk-UPLVMVRX.cjs');
|
|
8
|
+
require('./chunk-USNT2KNT.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, "sendOrderPlacedEmailsAfterConfirmation", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkXMRMZ6NQ_cjs.sendOrderPlacedEmailsAfterConfirmation; }
|
|
15
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infuro/cms-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.46",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"./admin.css": "./src/admin/admin.css"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
|
-
"build": "npm run build:js &&
|
|
53
|
-
"build:js": "cross-env NODE_OPTIONS=--max-old-space-size=8192 FAST_BUILD=1 DTS=false tsup && node scripts/prepend-admin-use-client.mjs",
|
|
52
|
+
"build": "npm run build:js && npm run build:types",
|
|
53
|
+
"build:js": "cross-env NODE_OPTIONS=--max-old-space-size=8192 FAST_BUILD=1 DTS=false tsup && node scripts/prepend-admin-use-client.mjs && shx mkdir -p dist/migrations && shx cp -r src/migrations/. dist/migrations/",
|
|
54
54
|
"build:types": "node scripts/build-types-parallel.mjs",
|
|
55
55
|
"build:release": "cross-env NODE_OPTIONS=--max-old-space-size=8192 DTS=false tsup && node scripts/prepend-admin-use-client.mjs && shx mkdir -p dist/migrations && shx cp -r src/migrations/. dist/migrations/ && npm run build:types",
|
|
56
|
-
"build:fast": "npm run build",
|
|
56
|
+
"build:fast": "npm run build:js",
|
|
57
57
|
"dev": "cross-env NODE_OPTIONS=--max-old-space-size=8192 FAST_BUILD=1 DTS=false tsup --watch",
|
|
58
58
|
"link": "npm run build:release && npm link",
|
|
59
59
|
"prepublishOnly": "npm run build:release",
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
"next-themes": "^0.2.1",
|
|
132
132
|
"nodemailer": "^7.0.7",
|
|
133
133
|
"papaparse": "^5.4.1",
|
|
134
|
+
"pdf-lib": "^1.17.1",
|
|
134
135
|
"pdf-parse": "^1.1.1",
|
|
135
136
|
"pg": "^8.20.0",
|
|
136
137
|
"pg-boss": ">=10.0.0",
|
package/src/admin/admin.css
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/* Admin only: design tokens (sidebar, UI). No public-site tokens. */
|
|
1
|
+
/* Admin only: design tokens (sidebar, UI). No public-site tokens. Light mode only. */
|
|
2
2
|
|
|
3
3
|
@layer base {
|
|
4
4
|
:root {
|
|
5
|
+
color-scheme: light;
|
|
5
6
|
--background: 0 0% 100%;
|
|
6
7
|
--foreground: 0 0% 3.9%;
|
|
7
8
|
--card: 0 0% 100%;
|
|
@@ -31,33 +32,35 @@
|
|
|
31
32
|
--sidebar-border: 220 13% 91%;
|
|
32
33
|
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
33
34
|
}
|
|
35
|
+
/* Dark mode disabled: mirror light tokens so host .dark does not flip admin CSS vars */
|
|
34
36
|
.dark {
|
|
35
|
-
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--card
|
|
39
|
-
--
|
|
40
|
-
--popover
|
|
37
|
+
color-scheme: light;
|
|
38
|
+
--background: 0 0% 100%;
|
|
39
|
+
--foreground: 0 0% 3.9%;
|
|
40
|
+
--card: 0 0% 100%;
|
|
41
|
+
--card-foreground: 0 0% 3.9%;
|
|
42
|
+
--popover: 0 0% 100%;
|
|
43
|
+
--popover-foreground: 0 0% 3.9%;
|
|
41
44
|
--primary: 220 70% 50%;
|
|
42
45
|
--primary-foreground: 0 0% 100%;
|
|
43
|
-
--secondary: 0 0%
|
|
44
|
-
--secondary-foreground: 0 0%
|
|
45
|
-
--muted: 0 0%
|
|
46
|
-
--muted-foreground: 0 0%
|
|
47
|
-
--accent: 0 0%
|
|
48
|
-
--accent-foreground: 0 0%
|
|
49
|
-
--destructive: 0
|
|
46
|
+
--secondary: 0 0% 96.1%;
|
|
47
|
+
--secondary-foreground: 0 0% 9%;
|
|
48
|
+
--muted: 0 0% 96.1%;
|
|
49
|
+
--muted-foreground: 0 0% 45.1%;
|
|
50
|
+
--accent: 0 0% 96.1%;
|
|
51
|
+
--accent-foreground: 0 0% 9%;
|
|
52
|
+
--destructive: 0 84.2% 60.2%;
|
|
50
53
|
--destructive-foreground: 0 0% 98%;
|
|
51
|
-
--border: 0 0%
|
|
52
|
-
--input: 0 0%
|
|
53
|
-
--ring: 0 0%
|
|
54
|
-
--sidebar-background:
|
|
55
|
-
--sidebar-foreground: 240
|
|
56
|
-
--sidebar-primary:
|
|
57
|
-
--sidebar-primary-foreground: 0 0%
|
|
58
|
-
--sidebar-accent: 240
|
|
59
|
-
--sidebar-accent-foreground: 240
|
|
60
|
-
--sidebar-border:
|
|
54
|
+
--border: 0 0% 89.8%;
|
|
55
|
+
--input: 0 0% 89.8%;
|
|
56
|
+
--ring: 0 0% 3.9%;
|
|
57
|
+
--sidebar-background: 0 0% 98%;
|
|
58
|
+
--sidebar-foreground: 240 5.3% 26.1%;
|
|
59
|
+
--sidebar-primary: 240 5.9% 10%;
|
|
60
|
+
--sidebar-primary-foreground: 0 0% 98%;
|
|
61
|
+
--sidebar-accent: 240 4.8% 95.9%;
|
|
62
|
+
--sidebar-accent-foreground: 240 5.9% 10%;
|
|
63
|
+
--sidebar-border: 220 13% 91%;
|
|
61
64
|
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
62
65
|
}
|
|
63
66
|
|