@stacksjs/features 0.75.318 → 0.75.320

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -47,7 +47,7 @@ export declare function appModelClaimsTable(table: string, root?: string, templa
47
47
  * {
48
48
  * forms: [ 'app/Models/Forms/', ],
49
49
  * cms: [ 'app/Actions/Cms/', 'app/Actions/Dashboard/Content/', 'app/Actions/Dashboard/dashboard-response.ts', 'app/Models/Content/', 'app/Models/Tag.ts', 'app/Models/Comment.ts', 'resources/views/dashboard/content/', ],
50
- * commerce: [ 'app/Actions/Commerce/', 'app/Actions/Dashboard/Commerce/', 'app/Actions/Dashboard/dashboard-response.ts', 'app/Models/commerce/', 'app/Models/PaymentMethod.ts', 'app/Models/PaymentProduct.ts', 'app/Models/PaymentTransaction.ts', 'app/Models/Subscriber.ts', 'app/Models/SubscriberEmail.ts', 'app/Models/Subscription.ts', 'resources/components/Dashboard/Commerce/', 'resources/views/dashboard/commerce/', ],
50
+ * commerce: [ 'app/Actions/Commerce/', 'app/Actions/Dashboard/Commerce/', 'app/Actions/Dashboard/dashboard-response.ts', 'app/Models/commerce/', 'app/Models/PaymentMethod.ts', 'app/Models/PaymentProduct.ts', 'app/Models/PaymentTransaction.ts', 'app/Models/Subscription.ts', 'resources/components/Dashboard/Commerce/', 'resources/views/dashboard/commerce/', ],
51
51
  * dashboard: [ 'app/Actions/Dashboard/', 'app/Models/Board.ts', 'app/Models/BoardColumn.ts', 'app/Models/Card.ts', 'app/Models/CardAttachment.ts', 'app/Models/CardComment.ts', 'app/Models/FeedbackToken.ts', 'app/Models/Label.ts', 'app/Models/Log.ts', 'app/Models/Request.ts', 'resources/components/Dashboard/', 'resources/views/dashboard/', 'routes/dashboard.ts', 'routes/dashboard-api.ts', ],
52
52
  * marketing: [ 'app/Actions/Dashboard/Marketing/', 'app/Actions/Dashboard/dashboard-response.ts', 'app/Models/Campaign.ts', 'app/Models/CampaignSend.ts', 'app/Models/CampaignVariant.ts', 'app/Models/EmailList.ts', 'app/Models/EmailListSubscriber.ts', 'app/Models/MailPreference.ts', 'app/Models/SocialPost.ts', 'resources/components/Marketing/', 'resources/views/dashboard/marketing/', ],
53
53
  * monitoring: [ 'app/Actions/Monitoring/', 'app/Actions/TestErrorAction.ts', 'app/Models/Error.ts', 'functions/monitoring/', 'resources/views/dashboard/monitoring/', 'resources/views/dashboard/errors/', ],
@@ -81,7 +81,7 @@ export declare const FEATURE_FILES: Record<FeatureName, readonly string[]>;
81
81
  * {
82
82
  * forms: ['forms', 'form_fields', 'form_submissions'],
83
83
  * cms: [ 'posts', 'pages', 'comments', 'tags', 'authors', 'taggable_models', 'commentables', 'page_revisions', 'redirects', 'menus', 'menu_items', ],
84
- * commerce: [ 'categories', 'products', 'product_variants', 'product_units', 'manufacturers', 'orders', 'order_items', 'order_idempotency', 'carts', 'cart_items', 'payments', 'payment_methods', 'payment_products', 'payment_transactions', 'payment_webhook_events', 'customers', 'subscribers', 'subscriber_emails', 'subscriptions', 'gift_cards', 'coupons', 'transactions', 'reviews', 'couriers', 'courier_pings', 'delivery_routes', 'delivery_stops', 'digital_deliveries', 'shipping_methods', 'shipping_rates', 'shipping_zones', 'license_keys', 'loyalty_points', 'loyalty_rewards', 'print_devices', 'receipts', 'tax_rates', 'waitlist_products', 'waitlist_restaurants', 'auctions', 'auction_items', 'bids', 'pledges', ],
84
+ * commerce: [ 'categories', 'products', 'product_variants', 'product_units', 'manufacturers', 'orders', 'order_items', 'order_idempotency', 'carts', 'cart_items', 'payments', 'payment_methods', 'payment_products', 'payment_transactions', 'payment_webhook_events', 'customers', 'subscriptions', 'gift_cards', 'coupons', 'transactions', 'reviews', 'couriers', 'courier_pings', 'delivery_routes', 'delivery_stops', 'digital_deliveries', 'shipping_methods', 'shipping_rates', 'shipping_zones', 'license_keys', 'loyalty_points', 'loyalty_rewards', 'print_devices', 'receipts', 'tax_rates', 'waitlist_products', 'waitlist_restaurants', 'auctions', 'auction_items', 'bids', 'pledges', ],
85
85
  * dashboard: [ 'boards', 'board_columns', 'cards', 'card_labels', 'card_assignees', 'card_comments', 'labels', 'card_attachments', 'feedback_tokens', 'ci_run_states', 'ci_runner_samples', 'ci_runner_alert_states', 'requests', 'logs', ],
86
86
  * marketing: [ 'campaigns', 'campaign_sends', 'email_lists', 'email_list_subscribers', 'social_posts', 'mail_preferences', 'campaign_variants', ],
87
87
  * monitoring: ['errors'],
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{existsSync as c,readdirSync as u,readFileSync as i}from"fs";import{join as n}from"path";import{frameworkPath as b,projectPath as _}from"@stacksjs/path";var o=["dashboard","commerce","cms","forms","marketing","monitoring","realtime","queue"];var h={forms:["app/Models/Forms/"],cms:["app/Actions/Cms/","app/Actions/Dashboard/Content/","app/Actions/Dashboard/dashboard-response.ts","app/Models/Content/","app/Models/Tag.ts","app/Models/Comment.ts","resources/views/dashboard/content/"],commerce:["app/Actions/Commerce/","app/Actions/Dashboard/Commerce/","app/Actions/Dashboard/dashboard-response.ts","app/Models/commerce/","app/Models/PaymentMethod.ts","app/Models/PaymentProduct.ts","app/Models/PaymentTransaction.ts","app/Models/Subscriber.ts","app/Models/SubscriberEmail.ts","app/Models/Subscription.ts","resources/components/Dashboard/Commerce/","resources/views/dashboard/commerce/"],dashboard:["app/Actions/Dashboard/","app/Models/Board.ts","app/Models/BoardColumn.ts","app/Models/Card.ts","app/Models/CardAttachment.ts","app/Models/CardComment.ts","app/Models/FeedbackToken.ts","app/Models/Label.ts","app/Models/Log.ts","app/Models/Request.ts","resources/components/Dashboard/","resources/views/dashboard/","routes/dashboard.ts","routes/dashboard-api.ts"],marketing:["app/Actions/Dashboard/Marketing/","app/Actions/Dashboard/dashboard-response.ts","app/Models/Campaign.ts","app/Models/CampaignSend.ts","app/Models/CampaignVariant.ts","app/Models/EmailList.ts","app/Models/EmailListSubscriber.ts","app/Models/MailPreference.ts","app/Models/SocialPost.ts","resources/components/Marketing/","resources/views/dashboard/marketing/"],monitoring:["app/Actions/Monitoring/","app/Actions/TestErrorAction.ts","app/Models/Error.ts","functions/monitoring/","resources/views/dashboard/monitoring/","resources/views/dashboard/errors/"],realtime:["app/Actions/Realtime/","app/Actions/Dashboard/Realtime/","app/Actions/Dashboard/dashboard-response.ts","app/Models/realtime/","app/Broadcasts/","functions/realtime/","resources/views/dashboard/realtime/"],queue:["app/Actions/Queue/","app/Actions/Dashboard/Jobs/","app/Actions/Dashboard/dashboard-response.ts","app/Jobs/","app/Models/Job.ts","app/Models/FailedJob.ts","functions/jobs.ts","resources/views/dashboard/queue/","resources/views/dashboard/jobs/"]},f={forms:["forms","form_fields","form_submissions"],cms:["posts","pages","comments","tags","authors","taggable_models","commentables","page_revisions","redirects","menus","menu_items"],commerce:["categories","products","product_variants","product_units","manufacturers","orders","order_items","order_idempotency","carts","cart_items","payments","payment_methods","payment_products","payment_transactions","payment_webhook_events","customers","subscribers","subscriber_emails","subscriptions","gift_cards","coupons","transactions","reviews","couriers","courier_pings","delivery_routes","delivery_stops","digital_deliveries","shipping_methods","shipping_rates","shipping_zones","license_keys","loyalty_points","loyalty_rewards","print_devices","receipts","tax_rates","waitlist_products","waitlist_restaurants","auctions","auction_items","bids","pledges"],dashboard:["boards","board_columns","cards","card_labels","card_assignees","card_comments","labels","card_attachments","feedback_tokens","ci_run_states","ci_runner_samples","ci_runner_alert_states","requests","logs"],marketing:["campaigns","campaign_sends","email_lists","email_list_subscribers","social_posts","mail_preferences","campaign_variants"],monitoring:["errors"],realtime:["websockets"],queue:["jobs","failed_jobs"]};function g(a){let s=a.match(/-in-([a-z0-9_]+)\.sql$/i);if(s)return s[1]??null;let t=a.match(/-create-([a-z0-9_]+)-table\.sql$/i);if(t)return t[1]??null;let r=a.match(/-alter-([a-z0-9_]+)-/i);if(r)return r[1]??null;return null}function v(a){let s=g(a);if(!s)return null;for(let t of o)if(f[t].includes(s))return t;return null}function M(a,s){if(!c(s))return!1;try{return i(a).equals(i(s))}catch{return!1}}function C(a,s=_(),t=b("defaults")){let r=n(s,"app/Models");if(!c(r))return!1;let d=new Set(o.flatMap((e)=>h[e]).filter((e)=>e.startsWith("app/Models/")&&!e.endsWith("/"))),l=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),m=new RegExp(`\\btable\\s*:\\s*['"]${l}['"]`);for(let e of u(r,{withFileTypes:!0})){if(!e.isFile()||!/\.[cm]?[jt]s$/.test(e.name))continue;let p=`app/Models/${e.name}`;if(d.has(p)&&M(n(r,e.name),n(t,p)))continue;if(m.test(i(n(r,e.name),"utf8")))return!0}return!1}export{h as FEATURE_FILES,o as FEATURE_NAMES,f as FEATURE_TABLES,C as appModelClaimsTable,v as migrationFeature,g as migrationTable};
2
+ import{existsSync as c,readdirSync as u,readFileSync as i}from"fs";import{join as n}from"path";import{frameworkPath as b,projectPath as _}from"@stacksjs/path";var o=["dashboard","commerce","cms","forms","marketing","monitoring","realtime","queue"];var h={forms:["app/Models/Forms/"],cms:["app/Actions/Cms/","app/Actions/Dashboard/Content/","app/Actions/Dashboard/dashboard-response.ts","app/Models/Content/","app/Models/Tag.ts","app/Models/Comment.ts","resources/views/dashboard/content/"],commerce:["app/Actions/Commerce/","app/Actions/Dashboard/Commerce/","app/Actions/Dashboard/dashboard-response.ts","app/Models/commerce/","app/Models/PaymentMethod.ts","app/Models/PaymentProduct.ts","app/Models/PaymentTransaction.ts","app/Models/Subscription.ts","resources/components/Dashboard/Commerce/","resources/views/dashboard/commerce/"],dashboard:["app/Actions/Dashboard/","app/Models/Board.ts","app/Models/BoardColumn.ts","app/Models/Card.ts","app/Models/CardAttachment.ts","app/Models/CardComment.ts","app/Models/FeedbackToken.ts","app/Models/Label.ts","app/Models/Log.ts","app/Models/Request.ts","resources/components/Dashboard/","resources/views/dashboard/","routes/dashboard.ts","routes/dashboard-api.ts"],marketing:["app/Actions/Dashboard/Marketing/","app/Actions/Dashboard/dashboard-response.ts","app/Models/Campaign.ts","app/Models/CampaignSend.ts","app/Models/CampaignVariant.ts","app/Models/EmailList.ts","app/Models/EmailListSubscriber.ts","app/Models/MailPreference.ts","app/Models/SocialPost.ts","resources/components/Marketing/","resources/views/dashboard/marketing/"],monitoring:["app/Actions/Monitoring/","app/Actions/TestErrorAction.ts","app/Models/Error.ts","functions/monitoring/","resources/views/dashboard/monitoring/","resources/views/dashboard/errors/"],realtime:["app/Actions/Realtime/","app/Actions/Dashboard/Realtime/","app/Actions/Dashboard/dashboard-response.ts","app/Models/realtime/","app/Broadcasts/","functions/realtime/","resources/views/dashboard/realtime/"],queue:["app/Actions/Queue/","app/Actions/Dashboard/Jobs/","app/Actions/Dashboard/dashboard-response.ts","app/Jobs/","app/Models/Job.ts","app/Models/FailedJob.ts","functions/jobs.ts","resources/views/dashboard/queue/","resources/views/dashboard/jobs/"]},f={forms:["forms","form_fields","form_submissions"],cms:["posts","pages","comments","tags","authors","taggable_models","commentables","page_revisions","redirects","menus","menu_items"],commerce:["categories","products","product_variants","product_units","manufacturers","orders","order_items","order_idempotency","carts","cart_items","payments","payment_methods","payment_products","payment_transactions","payment_webhook_events","customers","subscriptions","gift_cards","coupons","transactions","reviews","couriers","courier_pings","delivery_routes","delivery_stops","digital_deliveries","shipping_methods","shipping_rates","shipping_zones","license_keys","loyalty_points","loyalty_rewards","print_devices","receipts","tax_rates","waitlist_products","waitlist_restaurants","auctions","auction_items","bids","pledges"],dashboard:["boards","board_columns","cards","card_labels","card_assignees","card_comments","labels","card_attachments","feedback_tokens","ci_run_states","ci_runner_samples","ci_runner_alert_states","requests","logs"],marketing:["campaigns","campaign_sends","email_lists","email_list_subscribers","social_posts","mail_preferences","campaign_variants"],monitoring:["errors"],realtime:["websockets"],queue:["jobs","failed_jobs"]};function g(a){let s=a.match(/-in-([a-z0-9_]+)\.sql$/i);if(s)return s[1]??null;let t=a.match(/-create-([a-z0-9_]+)-table\.sql$/i);if(t)return t[1]??null;let r=a.match(/-alter-([a-z0-9_]+)-/i);if(r)return r[1]??null;return null}function v(a){let s=g(a);if(!s)return null;for(let t of o)if(f[t].includes(s))return t;return null}function M(a,s){if(!c(s))return!1;try{return i(a).equals(i(s))}catch{return!1}}function C(a,s=_(),t=b("defaults")){let r=n(s,"app/Models");if(!c(r))return!1;let d=new Set(o.flatMap((e)=>h[e]).filter((e)=>e.startsWith("app/Models/")&&!e.endsWith("/"))),l=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),m=new RegExp(`\\btable\\s*:\\s*['"]${l}['"]`);for(let e of u(r,{withFileTypes:!0})){if(!e.isFile()||!/\.[cm]?[jt]s$/.test(e.name))continue;let p=`app/Models/${e.name}`;if(d.has(p)&&M(n(r,e.name),n(t,p)))continue;if(m.test(i(n(r,e.name),"utf8")))return!0}return!1}export{h as FEATURE_FILES,o as FEATURE_NAMES,f as FEATURE_TABLES,C as appModelClaimsTable,v as migrationFeature,g as migrationTable};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/features",
3
3
  "type": "module",
4
- "version": "0.75.318",
4
+ "version": "0.75.320",
5
5
  "description": "Which files and tables belong to which optional Stacks feature.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -50,6 +50,6 @@
50
50
  "typecheck": "bun --bun tsc --noEmit"
51
51
  },
52
52
  "dependencies": {
53
- "@stacksjs/path": "0.75.318"
53
+ "@stacksjs/path": "0.75.320"
54
54
  }
55
55
  }