@stacksjs/buddy 0.75.334 → 0.75.336
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/publish-stx.d.ts +0 -1
- package/dist/publish-stx.js +1 -1
- package/package.json +57 -57
package/dist/publish-stx.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ export declare const VIEW_TREES: StxTree[];
|
|
|
19
19
|
declare interface StxTree {
|
|
20
20
|
from: string
|
|
21
21
|
to: string
|
|
22
|
-
frameworkOnly?: Record<string, string>
|
|
23
22
|
}
|
|
24
23
|
export type StxResourceKind = 'component' | 'view';
|
|
25
24
|
export type StxLookup = | { ok: true, source: string, target: string }
|
package/dist/publish-stx.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync}from"node:fs";import{dirname,isAbsolute,join,relative,resolve}from"node:path";import{globSync}from"@stacksjs/storage";import{defaultsSpecifier}from"./scaffold-package-app";export const COMPONENT_TREE={from:"resources/components",to:"resources/components",
|
|
1
|
+
import{existsSync}from"node:fs";import{dirname,isAbsolute,join,relative,resolve}from"node:path";import{globSync}from"@stacksjs/storage";import{defaultsSpecifier}from"./scaffold-package-app";export const COMPONENT_TREE={from:"resources/components",to:"resources/components"},VIEW_TREES=[{from:"views/dashboard",to:"resources/views/dashboard"},{from:"views/system-tray",to:"resources/views/system-tray"},{from:"resources/views",to:"resources/views"}];function normalizeName(name){const cleaned=name.trim().replace(/\\/g,"/").replace(/^\/+/,"").replace(/\.stx$/,"");if(!cleaned||cleaned.split("/").includes(".."))return;return cleaned}function locateComponent(name,defaultsRoot,projectRoot){const tree=COMPONENT_TREE,base=join(defaultsRoot,tree.from),matches=existsSync(join(base,`${name}.stx`))?[`${name}.stx`]:name.includes("/")?[]:globSync([`**/${name}.stx`],{cwd:base}).sort();if(matches.length===0)return{ok:!1,message:`Could not find a default component named ${name}`,details:[`Looked under: ${base}`]};if(matches.length>1)return{ok:!1,message:`${matches.length} default components are named ${name}. Pass the one you mean by its path:`,details:matches.map((match)=>`buddy publish:component ${match.replace(/\.stx$/,"")}`)};const relativePath=matches[0];return{ok:!0,source:join(base,relativePath),target:join(projectRoot,tree.to,relativePath)}}function locateView(name,defaultsRoot,projectRoot){const looked=[];for(const tree of VIEW_TREES){const prefix=tree.to.slice(15).replace(/^\//,"");if(prefix&&name!==prefix&&!name.startsWith(`${prefix}/`))continue;const inTree=prefix?name.slice(prefix.length).replace(/^\//,""):name,base=join(defaultsRoot,tree.from);looked.push(base);const candidates=inTree?[`${inTree}.stx`,`${inTree}/index.stx`]:["index.stx"];for(const relativePath of candidates){if(!existsSync(join(base,relativePath)))continue;return{ok:!0,source:join(base,relativePath),target:join(projectRoot,tree.to,relativePath)}}}return{ok:!1,message:`Could not find a default view at ${name}`,details:looked.map((dir)=>`Looked under: ${dir}`)}}export function locateDefaultStx(kind,name,defaultsRoot,projectRoot){const normalized=normalizeName(name);if(!normalized)return{ok:!1,message:`Not a ${kind} name: ${name}`,details:[]};return kind==="component"?locateComponent(normalized,defaultsRoot,projectRoot):locateView(normalized,defaultsRoot,projectRoot)}const RELATIVE_IMPORT=/(\bfrom\s+|\bimport\s*\(\s*|^\s*import\s+)(['"])(\.{1,2}\/[^'"]+)\2/gm;export function pointImportsAtDefaults(source,sourcePath,defaultsRoot){let rewritten=0;return{code:source.replace(RELATIVE_IMPORT,(match,lead,quote,specifier)=>{const inTree=relative(defaultsRoot,resolve(dirname(sourcePath),specifier));if(!inTree||inTree.startsWith("..")||isAbsolute(inTree))return match;rewritten++;return`${lead}${quote}${defaultsSpecifier(inTree.replace(/\\/g,"/"))}${quote}`}),rewritten}}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/buddy",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.336",
|
|
6
6
|
"description": "Meet Buddy. The Stacks runtime.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -95,72 +95,72 @@
|
|
|
95
95
|
"prepublishOnly": "bun run build"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@stacksjs/actions": "0.75.
|
|
99
|
-
"@stacksjs/ai": "0.75.
|
|
100
|
-
"@stacksjs/alias": "0.75.
|
|
101
|
-
"@stacksjs/analytics": "0.75.
|
|
102
|
-
"@stacksjs/api": "0.75.
|
|
103
|
-
"@stacksjs/arrays": "0.75.
|
|
104
|
-
"@stacksjs/auth": "0.75.
|
|
105
|
-
"@stacksjs/browser-extension": "0.75.
|
|
106
|
-
"@stacksjs/build": "0.75.
|
|
98
|
+
"@stacksjs/actions": "0.75.336",
|
|
99
|
+
"@stacksjs/ai": "0.75.336",
|
|
100
|
+
"@stacksjs/alias": "0.75.336",
|
|
101
|
+
"@stacksjs/analytics": "0.75.336",
|
|
102
|
+
"@stacksjs/api": "0.75.336",
|
|
103
|
+
"@stacksjs/arrays": "0.75.336",
|
|
104
|
+
"@stacksjs/auth": "0.75.336",
|
|
105
|
+
"@stacksjs/browser-extension": "0.75.336",
|
|
106
|
+
"@stacksjs/build": "0.75.336",
|
|
107
107
|
"@stacksjs/bumpx": "^0.2.26",
|
|
108
|
-
"@stacksjs/cache": "0.75.
|
|
109
|
-
"@stacksjs/chat": "0.75.
|
|
108
|
+
"@stacksjs/cache": "0.75.336",
|
|
109
|
+
"@stacksjs/chat": "0.75.336",
|
|
110
110
|
"@stacksjs/clapp": "^0.2.16",
|
|
111
|
-
"@stacksjs/cli": "0.75.
|
|
112
|
-
"@stacksjs/cloud": "0.75.
|
|
113
|
-
"@stacksjs/cms": "0.75.
|
|
114
|
-
"@stacksjs/collections": "0.75.
|
|
115
|
-
"@stacksjs/commerce": "0.75.
|
|
116
|
-
"@stacksjs/config": "0.75.
|
|
117
|
-
"@stacksjs/database": "0.75.
|
|
118
|
-
"@stacksjs/desktop-build": "0.75.
|
|
119
|
-
"@stacksjs/dns": "0.75.
|
|
111
|
+
"@stacksjs/cli": "0.75.336",
|
|
112
|
+
"@stacksjs/cloud": "0.75.336",
|
|
113
|
+
"@stacksjs/cms": "0.75.336",
|
|
114
|
+
"@stacksjs/collections": "0.75.336",
|
|
115
|
+
"@stacksjs/commerce": "0.75.336",
|
|
116
|
+
"@stacksjs/config": "0.75.336",
|
|
117
|
+
"@stacksjs/database": "0.75.336",
|
|
118
|
+
"@stacksjs/desktop-build": "0.75.336",
|
|
119
|
+
"@stacksjs/dns": "0.75.336",
|
|
120
120
|
"@stacksjs/dnsx": "^0.2.3",
|
|
121
|
-
"@stacksjs/email": "0.75.
|
|
122
|
-
"@stacksjs/enums": "0.75.
|
|
123
|
-
"@stacksjs/env": "0.75.
|
|
124
|
-
"@stacksjs/error-handling": "0.75.
|
|
125
|
-
"@stacksjs/events": "0.75.
|
|
126
|
-
"@stacksjs/features": "0.75.
|
|
127
|
-
"@stacksjs/git": "0.75.
|
|
121
|
+
"@stacksjs/email": "0.75.336",
|
|
122
|
+
"@stacksjs/enums": "0.75.336",
|
|
123
|
+
"@stacksjs/env": "0.75.336",
|
|
124
|
+
"@stacksjs/error-handling": "0.75.336",
|
|
125
|
+
"@stacksjs/events": "0.75.336",
|
|
126
|
+
"@stacksjs/features": "0.75.336",
|
|
127
|
+
"@stacksjs/git": "0.75.336",
|
|
128
128
|
"@stacksjs/gitit": "^0.2.5",
|
|
129
|
-
"@stacksjs/health": "0.75.
|
|
129
|
+
"@stacksjs/health": "0.75.336",
|
|
130
130
|
"@stacksjs/httx": "^0.1.10",
|
|
131
|
-
"@stacksjs/image": "0.75.
|
|
132
|
-
"@stacksjs/lint": "0.75.
|
|
133
|
-
"@stacksjs/logging": "0.75.
|
|
134
|
-
"@stacksjs/notifications": "0.75.
|
|
135
|
-
"@stacksjs/objects": "0.75.
|
|
136
|
-
"@stacksjs/orm": "0.75.
|
|
137
|
-
"@stacksjs/path": "0.75.
|
|
138
|
-
"@stacksjs/payments": "0.75.
|
|
139
|
-
"@stacksjs/realtime": "0.75.
|
|
140
|
-
"@stacksjs/router": "0.75.
|
|
141
|
-
"@stacksjs/security": "0.75.
|
|
131
|
+
"@stacksjs/image": "0.75.336",
|
|
132
|
+
"@stacksjs/lint": "0.75.336",
|
|
133
|
+
"@stacksjs/logging": "0.75.336",
|
|
134
|
+
"@stacksjs/notifications": "0.75.336",
|
|
135
|
+
"@stacksjs/objects": "0.75.336",
|
|
136
|
+
"@stacksjs/orm": "0.75.336",
|
|
137
|
+
"@stacksjs/path": "0.75.336",
|
|
138
|
+
"@stacksjs/payments": "0.75.336",
|
|
139
|
+
"@stacksjs/realtime": "0.75.336",
|
|
140
|
+
"@stacksjs/router": "0.75.336",
|
|
141
|
+
"@stacksjs/security": "0.75.336",
|
|
142
142
|
"@stacksjs/rpx": "^0.11.54",
|
|
143
|
-
"@stacksjs/scheduler": "0.75.
|
|
144
|
-
"@stacksjs/search-engine": "0.75.
|
|
145
|
-
"@stacksjs/server": "0.75.
|
|
146
|
-
"@stacksjs/sites": "0.75.
|
|
147
|
-
"@stacksjs/skills": "0.75.
|
|
148
|
-
"@stacksjs/socials": "0.75.
|
|
149
|
-
"@stacksjs/storage": "0.75.
|
|
150
|
-
"@stacksjs/strings": "0.75.
|
|
151
|
-
"@stacksjs/stx": "0.2.
|
|
152
|
-
"@stacksjs/testing": "0.75.
|
|
153
|
-
"@stacksjs/tinker": "0.75.
|
|
143
|
+
"@stacksjs/scheduler": "0.75.336",
|
|
144
|
+
"@stacksjs/search-engine": "0.75.336",
|
|
145
|
+
"@stacksjs/server": "0.75.336",
|
|
146
|
+
"@stacksjs/sites": "0.75.336",
|
|
147
|
+
"@stacksjs/skills": "0.75.336",
|
|
148
|
+
"@stacksjs/socials": "0.75.336",
|
|
149
|
+
"@stacksjs/storage": "0.75.336",
|
|
150
|
+
"@stacksjs/strings": "0.75.336",
|
|
151
|
+
"@stacksjs/stx": "0.2.736",
|
|
152
|
+
"@stacksjs/testing": "0.75.336",
|
|
153
|
+
"@stacksjs/tinker": "0.75.336",
|
|
154
154
|
"@stacksjs/tlsx": "^0.13.19",
|
|
155
155
|
"@stacksjs/ts-cloud": "^0.16.69",
|
|
156
|
-
"@stacksjs/tunnel": "0.75.
|
|
157
|
-
"@stacksjs/types": "0.75.
|
|
158
|
-
"@stacksjs/ui": "0.75.
|
|
159
|
-
"@stacksjs/utils": "0.75.
|
|
160
|
-
"@stacksjs/validation": "0.75.
|
|
156
|
+
"@stacksjs/tunnel": "0.75.336",
|
|
157
|
+
"@stacksjs/types": "0.75.336",
|
|
158
|
+
"@stacksjs/ui": "0.75.336",
|
|
159
|
+
"@stacksjs/utils": "0.75.336",
|
|
160
|
+
"@stacksjs/validation": "0.75.336",
|
|
161
161
|
"ajv": "^8.20.0",
|
|
162
162
|
"ajv-formats": "^3.0.1",
|
|
163
|
-
"bun-plugin-stx": "0.2.
|
|
163
|
+
"bun-plugin-stx": "0.2.736",
|
|
164
164
|
"ts-pantry": "^0.11.138"
|
|
165
165
|
},
|
|
166
166
|
"devDependencies": {
|