tiendu 0.2.2 → 0.2.3
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/lib/dev.mjs +3 -3
- package/lib/preview.mjs +0 -6
- package/package.json +1 -1
package/lib/dev.mjs
CHANGED
|
@@ -138,7 +138,7 @@ export const dev = async () => {
|
|
|
138
138
|
spinner.stop(`Preview: ${previewUrl}`);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
p.log.message("Watching for changes — press Ctrl+C to stop
|
|
141
|
+
p.log.message("Watching for changes — press Ctrl+C to stop.");
|
|
142
142
|
|
|
143
143
|
// ── File watcher ──────────────────────────────────────────────────────────
|
|
144
144
|
/** @type {Map<string, NodeJS.Timeout>} */
|
|
@@ -162,7 +162,7 @@ export const dev = async () => {
|
|
|
162
162
|
|
|
163
163
|
if (!fileStat || !fileStat.isFile()) {
|
|
164
164
|
if (!fileStat) {
|
|
165
|
-
|
|
165
|
+
console.log(`✕ ${relativePath}`);
|
|
166
166
|
const result = await deletePreviewFile(
|
|
167
167
|
apiBaseUrl,
|
|
168
168
|
apiKey,
|
|
@@ -177,7 +177,7 @@ export const dev = async () => {
|
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
console.log(`↑ ${relativePath}`);
|
|
181
181
|
const content = await readFile(absolutePath);
|
|
182
182
|
const result = await uploadPreviewFileMultipart(
|
|
183
183
|
apiBaseUrl,
|
package/lib/preview.mjs
CHANGED
|
@@ -245,9 +245,6 @@ const formatRelativeDate = (value) => {
|
|
|
245
245
|
export const previewShow = async () => {
|
|
246
246
|
const { config, credentials } = await loadConfigOrFail();
|
|
247
247
|
|
|
248
|
-
const spinner = p.spinner();
|
|
249
|
-
spinner.start("Fetching preview details...");
|
|
250
|
-
|
|
251
248
|
const result = await listPreviews(
|
|
252
249
|
config.apiBaseUrl,
|
|
253
250
|
credentials.apiKey,
|
|
@@ -255,14 +252,12 @@ export const previewShow = async () => {
|
|
|
255
252
|
);
|
|
256
253
|
|
|
257
254
|
if (!result.ok) {
|
|
258
|
-
spinner.stop("Failed to fetch previews.", 1);
|
|
259
255
|
p.log.error(result.error);
|
|
260
256
|
process.exit(1);
|
|
261
257
|
}
|
|
262
258
|
|
|
263
259
|
const preview = resolveActivePreview(result.data, config.previewKey);
|
|
264
260
|
if (!preview) {
|
|
265
|
-
spinner.stop("Could not determine the active preview.", 1);
|
|
266
261
|
p.log.error(
|
|
267
262
|
result.data.length === 0
|
|
268
263
|
? "No previews found for this store."
|
|
@@ -272,7 +267,6 @@ export const previewShow = async () => {
|
|
|
272
267
|
}
|
|
273
268
|
|
|
274
269
|
const url = buildPreviewUrl(config.apiBaseUrl, preview.previewHostname);
|
|
275
|
-
spinner.stop("Preview details loaded.");
|
|
276
270
|
|
|
277
271
|
p.note(
|
|
278
272
|
[
|