@stacksjs/features 0.75.76 → 0.75.78

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
@@ -87,7 +87,7 @@ export declare const FEATURE_FILES: Record<FeatureName, readonly string[]>;
87
87
  * {
88
88
  * forms: ['forms', 'form_fields', 'form_submissions'],
89
89
  * cms: [ 'posts', 'pages', 'comments', 'tags', 'authors', 'taggable_models', 'commentables', 'page_revisions', 'redirects', 'menus', 'menu_items', ],
90
- * commerce: [ 'categories', 'products', 'product_variants', 'product_units', 'manufacturers', 'orders', 'order_items', 'order_idempotency', 'carts', 'cart_items', 'payments', 'payment_methods', 'payment_products', 'payment_transactions', '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', ],
90
+ * 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', ],
91
91
  * dashboard: [ 'boards', 'board_columns', 'cards', 'card_labels', 'card_assignees', 'card_comments', 'labels', 'ci_run_states', 'ci_runner_samples', 'ci_runner_alert_states', 'requests', 'logs', ],
92
92
  * marketing: [ 'campaigns', 'campaign_sends', 'email_lists', 'email_list_subscribers', 'social_posts', 'mail_preferences', 'campaign_variants', ],
93
93
  * monitoring: ['errors'],
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{existsSync as c,readdirSync as d,readFileSync as l}from"fs";import{join as t}from"path";import{projectPath as m}from"@stacksjs/path";var i=["dashboard","commerce","cms","forms","marketing","monitoring","realtime","queue"],u={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/CardComment.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/"]},b={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","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","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 _(a){let r=a.match(/-in-([a-z0-9_]+)\.sql$/i);if(r)return r[1]??null;let s=a.match(/-create-([a-z0-9_]+)-table\.sql$/i);if(s)return s[1]??null;let o=a.match(/-alter-([a-z0-9_]+)-/i);if(o)return o[1]??null;return null}function f(a){let r=_(a);if(!r)return null;for(let s of i)if(b[s].includes(r))return s;return null}function A(a,r=m()){let s=t(r,"app/Models");if(!c(s))return!1;let o=new Set(i.flatMap((e)=>u[e]).filter((e)=>e.startsWith("app/Models/")&&!e.endsWith("/"))),n=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),p=new RegExp(`\\btable\\s*:\\s*['"]${n}['"]`);for(let e of d(s,{withFileTypes:!0})){if(!e.isFile()||!/\.[cm]?[jt]s$/.test(e.name))continue;if(o.has(`app/Models/${e.name}`))continue;if(p.test(l(t(s,e.name),"utf8")))return!0}return!1}export{u as FEATURE_FILES,i as FEATURE_NAMES,b as FEATURE_TABLES,A as appModelClaimsTable,f as migrationFeature,_ as migrationTable};
2
+ import{existsSync as c,readdirSync as d,readFileSync as l}from"fs";import{join as t}from"path";import{projectPath as m}from"@stacksjs/path";var n=["dashboard","commerce","cms","forms","marketing","monitoring","realtime","queue"],u={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/CardComment.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/"]},b={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","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 _(a){let o=a.match(/-in-([a-z0-9_]+)\.sql$/i);if(o)return o[1]??null;let s=a.match(/-create-([a-z0-9_]+)-table\.sql$/i);if(s)return s[1]??null;let r=a.match(/-alter-([a-z0-9_]+)-/i);if(r)return r[1]??null;return null}function f(a){let o=_(a);if(!o)return null;for(let s of n)if(b[s].includes(o))return s;return null}function y(a,o=m()){let s=t(o,"app/Models");if(!c(s))return!1;let r=new Set(n.flatMap((e)=>u[e]).filter((e)=>e.startsWith("app/Models/")&&!e.endsWith("/"))),i=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),p=new RegExp(`\\btable\\s*:\\s*['"]${i}['"]`);for(let e of d(s,{withFileTypes:!0})){if(!e.isFile()||!/\.[cm]?[jt]s$/.test(e.name))continue;if(r.has(`app/Models/${e.name}`))continue;if(p.test(l(t(s,e.name),"utf8")))return!0}return!1}export{u as FEATURE_FILES,n as FEATURE_NAMES,b as FEATURE_TABLES,y as appModelClaimsTable,f as migrationFeature,_ 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.76",
4
+ "version": "0.75.78",
5
5
  "description": "Which files and tables belong to which optional Stacks feature.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -45,6 +45,6 @@
45
45
  "typecheck": "bun --bun tsc --noEmit"
46
46
  },
47
47
  "dependencies": {
48
- "@stacksjs/path": "0.75.76"
48
+ "@stacksjs/path": "0.75.78"
49
49
  }
50
50
  }