@cimplify/cli 0.15.3 → 0.17.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/LICENSE +21 -0
- package/README.md +2 -2
- package/dist/add-C3DPTVH3.mjs +140 -0
- package/dist/{add-KRIIKAS4.mjs → add-JX2GXWXU.mjs} +4 -4
- package/dist/ai-HUZTVJIQ.mjs +17 -0
- package/dist/{assets-CWB72PZG.mjs → assets-MPESJSUV.mjs} +12 -7
- package/dist/{auth-step-up-Z6KOTTV7.mjs → auth-step-up-VJAFGSW6.mjs} +5 -5
- package/dist/build-E7RRQWVF.mjs +616 -0
- package/dist/{cancel-ZHVVILOU.mjs → cancel-UMKR274A.mjs} +4 -4
- package/dist/capture-TK4NIUYM.mjs +69 -0
- package/dist/chunk-25ZPFHLF.mjs +51 -0
- package/dist/{chunk-OLZKNUMK.mjs → chunk-3LJG22FS.mjs} +6 -6
- package/dist/chunk-454RQ6NR.mjs +10614 -0
- package/dist/{chunk-O2TO2J4I.mjs → chunk-6CQMRZ2W.mjs} +2 -2
- package/dist/chunk-6KKLF5KG.mjs +32 -0
- package/dist/chunk-74QZQSCL.mjs +84 -0
- package/dist/chunk-BGM7CH5G.mjs +81 -0
- package/dist/chunk-BTNVYAC4.mjs +5557 -0
- package/dist/{chunk-I2UP7YTG.mjs → chunk-ECGDRU56.mjs} +1 -1
- package/dist/{chunk-UTD34C2H.mjs → chunk-EOOOXVHR.mjs} +2 -4
- package/dist/chunk-EYEMPIMP.mjs +74 -0
- package/dist/{chunk-3RPR33MO.mjs → chunk-FV273ECI.mjs} +11 -7
- package/dist/{chunk-MLE4MVYC.mjs → chunk-GGPN4QYQ.mjs} +2 -2
- package/dist/chunk-HQPZQIWW.mjs +1456 -0
- package/dist/{chunk-3QUK5BPY.mjs → chunk-I7GEHLDD.mjs} +16 -1
- package/dist/chunk-ITDAICBY.mjs +363 -0
- package/dist/chunk-JKECUAAV.mjs +2169 -0
- package/dist/chunk-JNCEKW2Y.mjs +41 -0
- package/dist/chunk-JTYVGORV.mjs +101 -0
- package/dist/chunk-KQNZKV6E.mjs +535 -0
- package/dist/chunk-LJDIQ4PF.mjs +6463 -0
- package/dist/{chunk-2MKZKUVH.mjs → chunk-LLRUOIMU.mjs} +1 -2
- package/dist/chunk-MJMRIMR7.mjs +86 -0
- package/dist/chunk-N2WZJX5P.mjs +1989 -0
- package/dist/chunk-NEB372WD.mjs +1152 -0
- package/dist/chunk-OPX7KPOU.mjs +68 -0
- package/dist/chunk-PHUBMRAS.mjs +623 -0
- package/dist/chunk-PQBALZUH.mjs +1941 -0
- package/dist/chunk-PVW5D5AW.mjs +42 -0
- package/dist/{chunk-LZEG3FEY.mjs → chunk-QQWYQ2HS.mjs} +7 -7
- package/dist/chunk-QVR6V6QP.mjs +46 -0
- package/dist/chunk-SGT5IJVW.mjs +28 -0
- package/dist/chunk-SZXO6YSX.mjs +502 -0
- package/dist/chunk-THATLMEX.mjs +1227 -0
- package/dist/chunk-TYR4Q37L.mjs +391 -0
- package/dist/{chunk-DMLQBAGC.mjs → chunk-V3R2NYQR.mjs} +1 -1
- package/dist/chunk-VHK7WBO3.mjs +189 -0
- package/dist/{chunk-TH4XENKH.mjs → chunk-XASDB7YS.mjs} +1 -1
- package/dist/{chunk-NYXA6X56.mjs → chunk-XBQ4LO2N.mjs} +31 -11
- package/dist/chunk-XF3MGADK.mjs +2946 -0
- package/dist/{chunk-5KYR6WJB.mjs → chunk-XQAHREKO.mjs} +17 -1
- package/dist/chunk-XZG3DTXV.mjs +696 -0
- package/dist/chunk-Y4YGR2NY.mjs +52 -0
- package/dist/{chunk-LJEKKFC7.mjs → chunk-YS2JUNSQ.mjs} +19 -11
- package/dist/chunk-ZG7NJLXN.mjs +104 -0
- package/dist/create-3TGG7B3X.mjs +10 -0
- package/dist/credits-MEG7V5DI.mjs +33 -0
- package/dist/{deploy-STWZ3OSM.mjs → deploy-CNRORHJ7.mjs} +11 -11
- package/dist/dev-RXSBY7U4.mjs +8 -0
- package/dist/dev-YLYC6B7R.mjs +401 -0
- package/dist/dispatcher.mjs +131 -30
- package/dist/{doctor-3RW3OGZJ.mjs → doctor-XRTNG2IT.mjs} +13 -21
- package/dist/{domains-FTNK4IKY.mjs → domains-JIHFKDWR.mjs} +6 -6
- package/dist/engine-runtime-fetch-QVKJVC3W.mjs +10 -0
- package/dist/{env-TNCYUAMT.mjs → env-LJ3DCAA5.mjs} +7 -7
- package/dist/env-R72AHBT2.mjs +19 -0
- package/dist/explain-32RSXEXC.mjs +251 -0
- package/dist/inspect-PYLYN45K.mjs +86 -0
- package/dist/{inspect-X3M7WSTL.mjs → inspect-ZOLZHNSZ.mjs} +28 -13
- package/dist/introspect-27MMTACH.mjs +9 -0
- package/dist/kernel-IC4ZC54Z.mjs +662 -0
- package/dist/kernel-plugin.js +6862 -0
- package/dist/keys-WKOQ4KQE.mjs +71 -0
- package/dist/lines-I6ZB2IOU.mjs +56 -0
- package/dist/{link-76Z6V6CJ.mjs → link-TE2FUX74.mjs} +6 -6
- package/dist/{lint-DDZ7HUQN.mjs → lint-735IPMC6.mjs} +2 -2
- package/dist/{list-2MFOQKKQ.mjs → list-CHYY2P4T.mjs} +7 -11
- package/dist/lock-XVR3RRZ6.mjs +57 -0
- package/dist/{login-RLMDEWAL.mjs → login-LW7CHZDZ.mjs} +10 -8
- package/dist/{logout-Z57X6HPE.mjs → logout-6U6OP5DM.mjs} +2 -2
- package/dist/{logs-TNDM4RFE.mjs → logs-HKH4H6PT.mjs} +5 -5
- package/dist/logs-SCQC5HNO.mjs +44 -0
- package/dist/mcp-VRHQOEGG.mjs +1077 -0
- package/dist/{mock-EVER34IX.mjs → mock-5H3CVPHC.mjs} +2 -2
- package/dist/outdated-T7QW6F3Z.mjs +58 -0
- package/dist/port-24R7ZNP4.mjs +2408 -0
- package/dist/{projects-YL4T24VV.mjs → projects-HYITVEXS.mjs} +6 -6
- package/dist/publish-DZRR5A5X.mjs +20 -0
- package/dist/remix-4HVXRIEB.mjs +125 -0
- package/dist/repo-FG3CMZQS.mjs +9 -0
- package/dist/report-M7F4ZYP7.mjs +2 -0
- package/dist/rollback-H7Q4XYGX.mjs +43 -0
- package/dist/{rollback-47VQ4HJK.mjs → rollback-OM64O67F.mjs} +6 -6
- package/dist/scene-QTHT3ZPL.mjs +324 -0
- package/dist/{status-TWPOMWNA.mjs → status-5D4RR3MM.mjs} +5 -5
- package/dist/status-AKI6E3JK.mjs +18 -0
- package/dist/test-W6MURUGZ.mjs +233 -0
- package/dist/testers-EI32JB5F.mjs +49 -0
- package/dist/{unlink-H3BO3DOQ.mjs → unlink-BND47IWW.mjs} +2 -2
- package/dist/{update-FLY46XI3.mjs → update-XKKFREKH.mjs} +4 -4
- package/dist/{whoami-CQPPARRS.mjs → whoami-WHLGCVRC.mjs} +3 -3
- package/dist/workshop-F2T4IDOU.mjs +1703 -0
- package/package.json +11 -7
- package/templates/storefront-auto/app/products/[slug]/page.tsx +1 -1
- package/templates/storefront-auto/package.json +1 -1
- package/templates/storefront-bakery/package.json +1 -1
- package/templates/storefront-fashion/app/products/[slug]/page.tsx +1 -1
- package/templates/storefront-fashion/package.json +1 -1
- package/templates/storefront-grocery/package.json +1 -1
- package/templates/storefront-pharmacy/app/products/[slug]/page.tsx +1 -1
- package/templates/storefront-pharmacy/package.json +1 -1
- package/templates/storefront-restaurant/package.json +1 -1
- package/templates/storefront-retail/app/products/[slug]/page.tsx +1 -1
- package/templates/storefront-retail/package.json +1 -1
- package/templates/storefront-services/package.json +1 -1
- package/dist/chunk-ARIDYKLO.mjs +0 -6463
- package/dist/dev-7O65HY6C.mjs +0 -8
- package/dist/explain-DLRUUCNS.mjs +0 -251
- package/dist/introspect-RC265ACF.mjs +0 -9
- package/dist/repo-UUT3AZ3L.mjs +0 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { parseEnvFile } from './chunk-
|
|
3
|
-
import { parseArgs, flagString, flagBool } from './chunk-
|
|
4
|
-
import { CliError, CLI_ERROR_CODE, isJsonMode, result, info, bold, dim,
|
|
2
|
+
import { parseEnvFile } from './chunk-ECGDRU56.mjs';
|
|
3
|
+
import { parseArgs, flagString, flagBool } from './chunk-XQAHREKO.mjs';
|
|
4
|
+
import { CliError, CLI_ERROR_CODE, isJsonMode, result, info, bold, dim, orange, honey, green, red } from './chunk-I7GEHLDD.mjs';
|
|
5
5
|
import { promises } from 'fs';
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import { createCimplifyClient } from '@cimplify/sdk';
|
|
@@ -245,7 +245,15 @@ function computeGaps(products, collections, categories, collectionMembers) {
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
const empty_categories = categories.filter((c) => (productCountsByCategory.get(c.id) ?? 0) === 0).map((c) => ({ id: c.id, name: c.name }));
|
|
248
|
-
return {
|
|
248
|
+
return {
|
|
249
|
+
no_image,
|
|
250
|
+
no_description,
|
|
251
|
+
no_price,
|
|
252
|
+
no_collection,
|
|
253
|
+
no_tags,
|
|
254
|
+
empty_collections,
|
|
255
|
+
empty_categories
|
|
256
|
+
};
|
|
249
257
|
}
|
|
250
258
|
function buildCategoryTree(categories) {
|
|
251
259
|
const byParent = /* @__PURE__ */ new Map();
|
|
@@ -289,7 +297,8 @@ function shapeHints(d, source) {
|
|
|
289
297
|
if (d.gaps.empty_categories.length > 0) hints.push("has_empty_category");
|
|
290
298
|
const sampleSize = d.products.sample.length;
|
|
291
299
|
if (sampleSize > 0 && d.gaps.no_tags / sampleSize > 0.5) hints.push("untagged_majority");
|
|
292
|
-
if (sampleSize > 0 && d.gaps.no_collection / sampleSize > 0.5)
|
|
300
|
+
if (sampleSize > 0 && d.gaps.no_collection / sampleSize > 0.5)
|
|
301
|
+
hints.push("unmerchandised_majority");
|
|
293
302
|
if (d.gaps.no_image > 0) hints.push("has_image_gaps");
|
|
294
303
|
if (d.gaps.no_description > 0) hints.push("has_description_gaps");
|
|
295
304
|
if (d.gaps.no_price > 0) hints.push("has_price_gaps");
|
|
@@ -333,8 +342,12 @@ function renderHuman(d, m) {
|
|
|
333
342
|
);
|
|
334
343
|
info("");
|
|
335
344
|
info(` Products ${pad(d.totals.products, 5)} ${gapBadges(d.gaps)}`);
|
|
336
|
-
info(
|
|
337
|
-
|
|
345
|
+
info(
|
|
346
|
+
` Collections ${pad(d.totals.collections, 5)} ${emptyBadge(d.gaps.empty_collections, "empty")}`
|
|
347
|
+
);
|
|
348
|
+
info(
|
|
349
|
+
` Categories ${pad(d.totals.categories, 5)} ${emptyBadge(d.gaps.empty_categories, "empty")}`
|
|
350
|
+
);
|
|
338
351
|
info(` Tags ${pad(d.totals.distinct_tags, 5)} ${tagBadge(d.gaps.no_tags)}`);
|
|
339
352
|
info("");
|
|
340
353
|
if (d.tags.top.length > 0) {
|
|
@@ -344,8 +357,8 @@ function renderHuman(d, m) {
|
|
|
344
357
|
if (d.collections.length > 0) {
|
|
345
358
|
info(` ${dim("Collections")}`);
|
|
346
359
|
for (const c of d.collections.slice(0, 5)) {
|
|
347
|
-
const tag = c.product_count === 0 ? ` ${
|
|
348
|
-
info(` ${
|
|
360
|
+
const tag = c.product_count === 0 ? ` ${orange("\u26A0 empty")}` : "";
|
|
361
|
+
info(` ${honey("\u25B8")} ${c.name.padEnd(20)} ${dim(`${c.product_count} items`)}${tag}`);
|
|
349
362
|
}
|
|
350
363
|
if (d.collections.length > 5) info(` ${dim(`\u2026${d.collections.length - 5} more`)}`);
|
|
351
364
|
info("");
|
|
@@ -363,7 +376,9 @@ function renderHuman(d, m) {
|
|
|
363
376
|
info("");
|
|
364
377
|
}
|
|
365
378
|
if (m.sampled) {
|
|
366
|
-
info(
|
|
379
|
+
info(
|
|
380
|
+
` ${dim(`Gaps computed from first ${m.sample_size} products. Add --all for exact counts.`)}`
|
|
381
|
+
);
|
|
367
382
|
} else {
|
|
368
383
|
info(` ${dim("Gaps are exact (walked the full catalogue).")}`);
|
|
369
384
|
}
|
|
@@ -380,17 +395,17 @@ function gapBadges(g, _kind) {
|
|
|
380
395
|
if (g.no_description > 0) bits.push(`${g.no_description} no description`);
|
|
381
396
|
if (g.no_collection > 0) bits.push(`${g.no_collection} not in any collection`);
|
|
382
397
|
if (bits.length === 0) return dim("no gaps");
|
|
383
|
-
return
|
|
398
|
+
return orange(`\u26A0 ${bits.join(" \xB7 ")}`);
|
|
384
399
|
}
|
|
385
400
|
function emptyBadge(items, label) {
|
|
386
401
|
if (items.length === 0) return dim("no gaps");
|
|
387
402
|
const names = items.slice(0, 3).map((i) => i.name).join(", ");
|
|
388
403
|
const more = items.length > 3 ? `, \u2026${items.length - 3} more` : "";
|
|
389
|
-
return
|
|
404
|
+
return orange(`\u26A0 ${items.length} ${label} (${names}${more})`);
|
|
390
405
|
}
|
|
391
406
|
function tagBadge(untagged) {
|
|
392
407
|
if (untagged === 0) return dim("all tagged");
|
|
393
|
-
return
|
|
408
|
+
return orange(`\u26A0 ${untagged} products untagged`);
|
|
394
409
|
}
|
|
395
410
|
function pad(n, width) {
|
|
396
411
|
return String(n).padStart(width);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-YS2JUNSQ.mjs';
|
|
3
|
+
import './chunk-ECGDRU56.mjs';
|
|
4
|
+
import './chunk-FV273ECI.mjs';
|
|
5
|
+
import './chunk-EOOOXVHR.mjs';
|
|
6
|
+
import './chunk-LLRUOIMU.mjs';
|
|
7
|
+
import './chunk-XQAHREKO.mjs';
|
|
8
|
+
import './chunk-GGPN4QYQ.mjs';
|
|
9
|
+
import './chunk-I7GEHLDD.mjs';
|