@stacksjs/features 0.74.42 → 0.74.43

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
@@ -55,7 +55,7 @@ export declare const FEATURE_NAMES: readonly ['dashboard', 'commerce', 'cms', 'f
55
55
  * 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/', ],
56
56
  * commerce: [ 'app/Actions/Commerce/', 'app/Actions/Dashboard/Commerce/', 'app/Actions/Dashboard/dashboard-response.ts', 'app/Models/commerce/', 'resources/components/Dashboard/Commerce/', 'resources/views/dashboard/commerce/', ],
57
57
  * dashboard: [ 'app/Actions/Dashboard/', 'resources/components/Dashboard/', 'resources/views/dashboard/', 'routes/dashboard.ts', 'routes/dashboard-api.ts', ],
58
- * marketing: [ 'app/Actions/Dashboard/Marketing/', 'app/Actions/Dashboard/dashboard-response.ts', 'app/Models/Campaign.ts', 'app/Models/CampaignSend.ts', 'app/Models/EmailList.ts', 'app/Models/EmailListSubscriber.ts', 'app/Models/SocialPost.ts', 'resources/components/Marketing/', 'resources/views/dashboard/marketing/', ],
58
+ * 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/SocialPost.ts', 'resources/components/Marketing/', 'resources/views/dashboard/marketing/', ],
59
59
  * monitoring: [ 'app/Actions/Monitoring/', 'app/Actions/TestErrorAction.ts', 'app/Models/Error.ts', 'functions/monitoring/', 'resources/views/dashboard/monitoring/', 'resources/views/dashboard/errors/', ],
60
60
  * 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/', ],
61
61
  * 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/', ]
@@ -86,10 +86,10 @@ export declare const FEATURE_FILES: Record<FeatureName, readonly string[]>;
86
86
  * ```ts
87
87
  * {
88
88
  * forms: ['forms', 'form_fields', 'form_submissions'],
89
- * cms: [ 'posts', 'pages', 'comments', 'tags', 'authors', 'categories', 'taggable_models', 'categorizable_models', 'commentables', 'page_revisions', 'redirects', 'menus', 'menu_items', ],
90
- * commerce: [ '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', ],
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', ],
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
- * marketing: [ 'campaigns', 'campaign_sends', 'email_lists', 'email_list_subscribers', 'social_posts', 'mail_preferences', ],
92
+ * marketing: [ 'campaigns', 'campaign_sends', 'email_lists', 'email_list_subscribers', 'social_posts', 'mail_preferences', 'campaign_variants', ],
93
93
  * monitoring: ['errors'],
94
94
  * realtime: ['websockets'],
95
95
  * queue: ['jobs', 'failed_jobs']
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{existsSync as p,readdirSync as d,readFileSync as m}from"fs";import{join as t}from"path";import{projectPath as l}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/","resources/components/Dashboard/Commerce/","resources/views/dashboard/commerce/"],dashboard:["app/Actions/Dashboard/","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/EmailList.ts","app/Models/EmailListSubscriber.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","categories","taggable_models","categorizable_models","commentables","page_revisions","redirects","menus","menu_items"],commerce:["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"],monitoring:["errors"],realtime:["websockets"],queue:["jobs","failed_jobs"]};function _(r){let o=r.match(/-in-([a-z0-9_]+)\.sql$/i);if(o)return o[1]??null;let s=r.match(/-create-([a-z0-9_]+)-table\.sql$/i);if(s)return s[1]??null;let a=r.match(/-alter-([a-z0-9_]+)-/i);if(a)return a[1]??null;return null}function M(r){let o=_(r);if(!o)return null;for(let s of i)if(b[s].includes(o))return s;return null}function A(r,o=l()){let s=t(o,"app/Models");if(!p(s))return!1;let a=new Set(i.flatMap((e)=>u[e]).filter((e)=>e.startsWith("app/Models/")&&!e.endsWith("/"))),n=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=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(a.has(`app/Models/${e.name}`))continue;if(c.test(m(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,M as migrationFeature,_ as migrationTable};
2
+ import{existsSync as p,readdirSync as d,readFileSync as m}from"fs";import{join as t}from"path";import{projectPath as l}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/","resources/components/Dashboard/Commerce/","resources/views/dashboard/commerce/"],dashboard:["app/Actions/Dashboard/","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/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 _(r){let a=r.match(/-in-([a-z0-9_]+)\.sql$/i);if(a)return a[1]??null;let s=r.match(/-create-([a-z0-9_]+)-table\.sql$/i);if(s)return s[1]??null;let o=r.match(/-alter-([a-z0-9_]+)-/i);if(o)return o[1]??null;return null}function M(r){let a=_(r);if(!a)return null;for(let s of i)if(b[s].includes(a))return s;return null}function A(r,a=l()){let s=t(a,"app/Models");if(!p(s))return!1;let o=new Set(i.flatMap((e)=>u[e]).filter((e)=>e.startsWith("app/Models/")&&!e.endsWith("/"))),n=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=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(c.test(m(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,M 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.74.42",
4
+ "version": "0.74.43",
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.74.42"
48
+ "@stacksjs/path": "0.74.43"
49
49
  }
50
50
  }