@yolo-labs/yolo-cli 0.35.0 → 0.36.0
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/tileapp-personal.js +29 -1
- package/package.json +2 -2
package/dist/tileapp-personal.js
CHANGED
|
@@ -156,19 +156,47 @@ export function runTileAppInit(opts) {
|
|
|
156
156
|
|
|
157
157
|
const status = document.getElementById('status');
|
|
158
158
|
if (status) status.textContent = 'Ready — edit app.js to build your app.';
|
|
159
|
+
`;
|
|
160
|
+
// Store screenshots live in `media/`. Scaffolding the directory (with a
|
|
161
|
+
// README, since an empty dir wouldn't survive and a dotfile is skipped by
|
|
162
|
+
// both the collector and the server) is what makes the feature discoverable
|
|
163
|
+
// — an author who never learns the folder exists ships a listing with no
|
|
164
|
+
// preview and no idea one was possible.
|
|
165
|
+
const mediaReadme = `# Store screenshots
|
|
166
|
+
|
|
167
|
+
Drop screenshots here, then reference them from tileapp.json:
|
|
168
|
+
|
|
169
|
+
"screenshots": ["media/01-main.webp"]
|
|
170
|
+
|
|
171
|
+
\`yolo tileapp publish tileapp.json --personal\` walks this directory and
|
|
172
|
+
uploads whatever is in it; the platform serves each file at
|
|
173
|
+
/v1/tileapps/<appId>/media/<file>.
|
|
174
|
+
|
|
175
|
+
format 1280x800 (16:10) webp, <= 400 KB each, 1-6 images, first is the hero
|
|
176
|
+
capture render at 2x and downscale — the store card crops to ~320px wide
|
|
177
|
+
content show the app doing its job on realistic data; an empty state or a
|
|
178
|
+
permission prompt is a wasted slot
|
|
179
|
+
budget bundles cap at 100 files / 3 MB total
|
|
180
|
+
|
|
181
|
+
An absolute https:// URL works too, and is the ONLY option for a runtime app
|
|
182
|
+
(it publishes an image, not a bundle, so it has nowhere to put these).
|
|
183
|
+
|
|
184
|
+
Check refs before publishing: yolo tileapp validate tileapp.json --personal
|
|
159
185
|
`;
|
|
160
186
|
try {
|
|
161
187
|
fs.mkdirSync(dir, { recursive: false });
|
|
162
188
|
fs.writeFileSync(path.join(dir, 'tileapp.json'), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
163
189
|
fs.writeFileSync(path.join(dir, 'index.html'), indexHtml);
|
|
164
190
|
fs.writeFileSync(path.join(dir, 'app.js'), appJs);
|
|
191
|
+
fs.mkdirSync(path.join(dir, 'media'), { recursive: false });
|
|
192
|
+
fs.writeFileSync(path.join(dir, 'media', 'README.md'), mediaReadme);
|
|
165
193
|
}
|
|
166
194
|
catch (e) {
|
|
167
195
|
return { ok: false, kind: 'io', message: `scaffold failed: ${e.message}` };
|
|
168
196
|
}
|
|
169
197
|
return {
|
|
170
198
|
ok: true,
|
|
171
|
-
output: `Created ${name}/ (tileapp.json + index.html + app.js)\n note: bundle CSP is \`script-src 'self'\` — keep JS in app.js (no inline <script>, no eval, no network)\n next: cd ${name} && yolo tileapp publish tileapp.json --personal`,
|
|
199
|
+
output: `Created ${name}/ (tileapp.json + index.html + app.js + media/)\n note: bundle CSP is \`script-src 'self'\` — keep JS in app.js (no inline <script>, no eval, no network)\n note: drop a 1280x800 webp in media/ and add \`"screenshots": ["media/01-main.webp"]\` to get a store preview (see media/README.md)\n next: cd ${name} && yolo tileapp publish tileapp.json --personal`,
|
|
172
200
|
};
|
|
173
201
|
}
|
|
174
202
|
/** Recursively collect a bundle dir's files as upload entries. Skips VCS/dep
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-labs/yolo-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "YOLO Studio substrate CLI
|
|
3
|
+
"version": "0.36.0",
|
|
4
|
+
"description": "YOLO Studio substrate CLI \u2014 owns yolo plan/workspace/artifact substrate-tooling commands. Distinct from yolo-code (the agent CLI) and yolo-router (the LLM gateway client).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|