@stacksjs/features 0.75.492 → 0.75.494
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 +3 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export declare function migrationTable(filename: string): string | null;
|
|
|
19
19
|
* always runs). Used by the migration runner's gating pass.
|
|
20
20
|
*/
|
|
21
21
|
export declare function migrationFeature(filename: string): FeatureName | null;
|
|
22
|
+
/** Application model files, excluding byte-identical optional feature scaffolding. */
|
|
23
|
+
export declare function appModelFiles(root?: string, templateRoot?: string): string[];
|
|
24
|
+
/** Static declaration lookup. Migrations load the exported definitions instead. */
|
|
22
25
|
export declare function appModelClaimsTable(table: string, root?: string, templateRoot?: string): boolean;
|
|
23
26
|
/**
|
|
24
27
|
* Per-feature stamped file/directory manifest. Paths are relative to the
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{existsSync as
|
|
2
|
+
import{existsSync as b,readdirSync as g,readFileSync as u}from"fs";import{join as m}from"path";import{frameworkPath as _,projectPath as h}from"@stacksjs/path";var c=["dashboard","commerce","cms","forms","marketing","monitoring","realtime","queue"];var M={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","app/Models/QueueWorker.ts","functions/jobs.ts","resources/views/dashboard/queue/","resources/views/dashboard/jobs/"]},A={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:["queue_workers","jobs","failed_jobs"]};function y(e){let s=e.match(/-in-([a-z0-9_]+)\.sql$/i);if(s)return s[1]??null;let t=e.match(/-create-([a-z0-9_]+)-table\.sql$/i);if(t)return t[1]??null;let o=e.match(/-alter-([a-z0-9_]+)-/i);if(o)return o[1]??null;return null}function x(e){let s=y(e);if(!s)return null;for(let t of c)if(A[t].includes(s))return t;return null}function E(e,s){if(!b(s))return!1;try{return u(e).equals(u(s))}catch{return!1}}function F(e=h(),s=_("defaults")){let t=m(e,"app/Models");if(!b(t))return[];let o=c.flatMap((r)=>M[r]).filter((r)=>r.startsWith("app/Models/")),n=[],i=(r,f)=>{for(let a of g(r,{withFileTypes:!0})){if(a.name.startsWith(".")||a.name.startsWith("index"))continue;let d=m(r,a.name),p=`${f}/${a.name}`;if(a.isDirectory()){i(d,p);continue}if(!a.isFile()||!/\.[cm]?[jt]s$/.test(a.name))continue;if(o.some((l)=>l.endsWith("/")?p.startsWith(l):p===l)&&E(d,m(s,p)))continue;n.push(d)}};return i(t,"app/Models"),n.sort()}function S(e,s=h(),t=_("defaults")){let o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`\\btable\\s*:\\s*['"]${o}['"]`);return F(s,t).some((i)=>n.test(u(i,"utf8")))}export{M as FEATURE_FILES,c as FEATURE_NAMES,A as FEATURE_TABLES,S as appModelClaimsTable,F as appModelFiles,x as migrationFeature,y 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.
|
|
4
|
+
"version": "0.75.494",
|
|
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.
|
|
53
|
+
"@stacksjs/path": "0.75.494"
|
|
54
54
|
}
|
|
55
55
|
}
|