@cimplify/cli 0.13.2 → 0.13.4

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.
Files changed (96) hide show
  1. package/README.md +11 -8
  2. package/dist/{add-F7GKDXAD.mjs → add-542NLKYG.mjs} +4 -5
  3. package/dist/{assets-Y4JE6MSG.mjs → assets-OEY6FHHZ.mjs} +4 -5
  4. package/dist/{auth-step-up-EHL5PM2L.mjs → auth-step-up-ALEUQUCE.mjs} +5 -6
  5. package/dist/{cancel-QSZE2XC2.mjs → cancel-FD66LTTS.mjs} +4 -5
  6. package/dist/chunk-4O4G2CDE.mjs +162 -0
  7. package/dist/{chunk-C4M3DXKC.mjs → chunk-5KYR6WJB.mjs} +10 -2
  8. package/dist/{chunk-4YIFBYBV.mjs → chunk-5ZQURRIM.mjs} +1 -2
  9. package/dist/{chunk-QA36VSLX.mjs → chunk-6CHBU7O4.mjs} +1 -1
  10. package/dist/{chunk-QKRGKFHE.mjs → chunk-7NUSJVN3.mjs} +3 -2
  11. package/dist/{chunk-D7DVYTVI.mjs → chunk-HJQ6PF5N.mjs} +6 -6
  12. package/dist/{chunk-UP7N53C4.mjs → chunk-IK6NQHTG.mjs} +1 -1
  13. package/dist/{chunk-OVHZV57L.mjs → chunk-MLVBE5V2.mjs} +1 -1
  14. package/dist/{chunk-RR4NOZGY.mjs → chunk-OE7YRDLH.mjs} +5 -6
  15. package/dist/{chunk-VJJDGHZC.mjs → chunk-PDGKBATF.mjs} +1 -2
  16. package/dist/{chunk-5U5OXOPN.mjs → chunk-RU53TQLZ.mjs} +1 -1
  17. package/dist/{chunk-JPXK5BLA.mjs → chunk-TOQGLBWF.mjs} +1 -1
  18. package/dist/{chunk-SVJPU4K7.mjs → chunk-VCDGYXFU.mjs} +51 -43
  19. package/dist/{deploy-UTAYLZOM.mjs → deploy-SLRFPGTH.mjs} +8 -9
  20. package/dist/{dev-3U6WW5D7.mjs → dev-L3W6UXYN.mjs} +19 -26
  21. package/dist/dispatcher.mjs +41 -33
  22. package/dist/{doctor-6NYHQ7YE.mjs → doctor-E6JH4VSN.mjs} +8 -9
  23. package/dist/{domains-OS3DXSDN.mjs → domains-7D7WJAMC.mjs} +5 -6
  24. package/dist/{env-UVO4OIEO.mjs → env-PAENNABF.mjs} +6 -7
  25. package/dist/{explain-O363MCQ2.mjs → explain-SZPLL5MP.mjs} +3 -4
  26. package/dist/{inspect-ULWQHT7J.mjs → inspect-MGVG4Z44.mjs} +3 -4
  27. package/dist/introspect-SDHD3PVX.mjs +8 -0
  28. package/dist/{link-VQN2WPZO.mjs → link-KGNQWCSZ.mjs} +4 -5
  29. package/dist/lint-NM3APP7L.mjs +1327 -0
  30. package/dist/{list-DZTPWNU3.mjs → list-W5JABY7B.mjs} +3 -4
  31. package/dist/{login-UZ5Y7GIO.mjs → login-NCO4P5G5.mjs} +5 -6
  32. package/dist/{logout-XYWZR6QJ.mjs → logout-MF6SOLPE.mjs} +2 -3
  33. package/dist/{logs-YNXDXAF7.mjs → logs-76TCJBIQ.mjs} +4 -5
  34. package/dist/{mock-HFVAAYK2.mjs → mock-CAWNXSGC.mjs} +2 -3
  35. package/dist/{projects-RJ44DJKZ.mjs → projects-U75DOOR7.mjs} +4 -5
  36. package/dist/repo-IE5IOLR5.mjs +8 -0
  37. package/dist/{rollback-Z2PRL7FS.mjs → rollback-ZL3V7SYH.mjs} +5 -6
  38. package/dist/{status-RR3GGTVU.mjs → status-52HG63FE.mjs} +4 -5
  39. package/dist/{unlink-JBVZYOA3.mjs → unlink-TCG3NBAR.mjs} +2 -3
  40. package/dist/{update-QA5WJ6YL.mjs → update-447FR363.mjs} +4 -5
  41. package/dist/{whoami-5G32NNEP.mjs → whoami-B5Y5KSOZ.mjs} +3 -4
  42. package/package.json +3 -2
  43. package/templates/storefront-auto/app/categories/[slug]/page.tsx +1 -0
  44. package/templates/storefront-auto/app/collections/[slug]/page.tsx +1 -0
  45. package/templates/storefront-auto/app/page.tsx +4 -1
  46. package/templates/storefront-auto/app/products/[slug]/page.tsx +1 -0
  47. package/templates/storefront-auto/components/auth-error-toast.tsx +2 -2
  48. package/templates/storefront-auto/package.json +1 -1
  49. package/templates/storefront-bakery/app/categories/[slug]/page.tsx +1 -0
  50. package/templates/storefront-bakery/app/collections/[slug]/page.tsx +1 -0
  51. package/templates/storefront-bakery/app/page.tsx +1 -1
  52. package/templates/storefront-bakery/components/auth-error-toast.tsx +2 -2
  53. package/templates/storefront-bakery/package.json +1 -1
  54. package/templates/storefront-fashion/app/categories/[slug]/page.tsx +1 -0
  55. package/templates/storefront-fashion/app/collections/[slug]/page.tsx +1 -0
  56. package/templates/storefront-fashion/app/page.tsx +1 -1
  57. package/templates/storefront-fashion/app/products/[slug]/page.tsx +1 -0
  58. package/templates/storefront-fashion/components/auth-error-toast.tsx +2 -2
  59. package/templates/storefront-fashion/package.json +1 -1
  60. package/templates/storefront-grocery/app/categories/[slug]/page.tsx +1 -0
  61. package/templates/storefront-grocery/app/collections/[slug]/page.tsx +1 -0
  62. package/templates/storefront-grocery/app/page.tsx +1 -1
  63. package/templates/storefront-grocery/components/auth-error-toast.tsx +2 -2
  64. package/templates/storefront-grocery/package.json +1 -1
  65. package/templates/storefront-pharmacy/app/categories/[slug]/page.tsx +1 -0
  66. package/templates/storefront-pharmacy/app/collections/[slug]/page.tsx +1 -0
  67. package/templates/storefront-pharmacy/app/globals.css +11 -3
  68. package/templates/storefront-pharmacy/app/page.tsx +4 -1
  69. package/templates/storefront-pharmacy/app/products/[slug]/page.tsx +1 -0
  70. package/templates/storefront-pharmacy/components/auth-error-toast.tsx +2 -2
  71. package/templates/storefront-pharmacy/components/pharmacy-hero.tsx +10 -3
  72. package/templates/storefront-pharmacy/components/urgent-ctas.tsx +30 -5
  73. package/templates/storefront-pharmacy/package.json +1 -1
  74. package/templates/storefront-restaurant/app/categories/[slug]/page.tsx +1 -0
  75. package/templates/storefront-restaurant/app/collections/[slug]/page.tsx +1 -0
  76. package/templates/storefront-restaurant/app/page.tsx +1 -1
  77. package/templates/storefront-restaurant/components/auth-error-toast.tsx +2 -2
  78. package/templates/storefront-restaurant/package.json +1 -1
  79. package/templates/storefront-retail/app/categories/[slug]/page.tsx +1 -0
  80. package/templates/storefront-retail/app/collections/[slug]/page.tsx +1 -0
  81. package/templates/storefront-retail/app/page.tsx +1 -1
  82. package/templates/storefront-retail/app/products/[slug]/page.tsx +1 -0
  83. package/templates/storefront-retail/components/auth-error-toast.tsx +2 -2
  84. package/templates/storefront-retail/package.json +1 -1
  85. package/templates/storefront-services/app/book/book-client.tsx +3 -5
  86. package/templates/storefront-services/app/categories/[slug]/page.tsx +1 -0
  87. package/templates/storefront-services/app/collections/[slug]/page.tsx +1 -0
  88. package/templates/storefront-services/app/page.tsx +1 -1
  89. package/templates/storefront-services/components/auth-error-toast.tsx +2 -2
  90. package/templates/storefront-services/package.json +1 -1
  91. package/dist/agent-24IISIOQ.mjs +0 -25
  92. package/dist/chunk-YPC4VU65.mjs +0 -76
  93. package/dist/chunk-YTZ233XM.mjs +0 -2046
  94. package/dist/chunk-ZPVN6UXL.mjs +0 -74
  95. package/dist/introspect-UKSR3JBF.mjs +0 -9
  96. package/dist/repo-OK6CVG3G.mjs +0 -9
@@ -17,7 +17,7 @@
17
17
  "check": "bun run typecheck && bun run test:run"
18
18
  },
19
19
  "dependencies": {
20
- "@cimplify/sdk": "^0.99.2",
20
+ "@cimplify/sdk": "^0.100.4",
21
21
  "next": "^16.2.6",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0"
@@ -42,6 +42,7 @@ async function getCategory(slug: string): Promise<CategoryResult> {
42
42
  cacheOptions: {
43
43
  revalidate: 3600,
44
44
  tags: [
45
+ tags.products(),
45
46
  tags.category(catRes.value.id),
46
47
  tags.categoryProducts(catRes.value.id),
47
48
  ],
@@ -42,6 +42,7 @@ async function getCollection(slug: string): Promise<CollectionResult> {
42
42
  cacheOptions: {
43
43
  revalidate: 3600,
44
44
  tags: [
45
+ tags.products(),
45
46
  tags.collection(colRes.value.id),
46
47
  tags.collectionProducts(colRes.value.id),
47
48
  ],
@@ -34,7 +34,7 @@ async function getHomeData() {
34
34
  {
35
35
  cacheOptions: {
36
36
  revalidate: 3600,
37
- tags: [tags.collectionProducts(col.id)],
37
+ tags: [tags.products(), tags.collectionProducts(col.id)],
38
38
  },
39
39
  },
40
40
  );
@@ -30,14 +30,14 @@ export function AuthErrorToast() {
30
30
  <div
31
31
  role="status"
32
32
  aria-live="polite"
33
- className="fixed bottom-4 left-1/2 -translate-x-1/2 z-50 max-w-sm rounded-lg bg-zinc-900 text-white px-4 py-3 text-sm shadow-lg flex items-center gap-3"
33
+ className="fixed bottom-4 left-1/2 -translate-x-1/2 z-50 max-w-sm rounded-lg bg-foreground text-background px-4 py-3 text-sm shadow-lg flex items-center gap-3"
34
34
  >
35
35
  <span>{message}</span>
36
36
  <button
37
37
  type="button"
38
38
  onClick={() => setMessage(null)}
39
39
  aria-label="Dismiss"
40
- className="text-zinc-400 hover:text-white transition-colors text-base leading-none"
40
+ className="text-background/60 hover:text-background transition-colors text-base leading-none"
41
41
  >
42
42
  ×
43
43
  </button>
@@ -17,7 +17,7 @@
17
17
  "check": "bun run typecheck && bun run test:run"
18
18
  },
19
19
  "dependencies": {
20
- "@cimplify/sdk": "^0.99.2",
20
+ "@cimplify/sdk": "^0.100.4",
21
21
  "next": "^16.2.6",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0"
@@ -42,6 +42,7 @@ async function getCategory(slug: string): Promise<CategoryResult> {
42
42
  cacheOptions: {
43
43
  revalidate: 3600,
44
44
  tags: [
45
+ tags.products(),
45
46
  tags.category(catRes.value.id),
46
47
  tags.categoryProducts(catRes.value.id),
47
48
  ],
@@ -42,6 +42,7 @@ async function getCollection(slug: string): Promise<CollectionResult> {
42
42
  cacheOptions: {
43
43
  revalidate: 3600,
44
44
  tags: [
45
+ tags.products(),
45
46
  tags.collection(colRes.value.id),
46
47
  tags.collectionProducts(colRes.value.id),
47
48
  ],
@@ -51,7 +51,7 @@ async function getHomeData() {
51
51
  {
52
52
  cacheOptions: {
53
53
  revalidate: 3600,
54
- tags: [tags.collectionProducts(col.id)],
54
+ tags: [tags.products(), tags.collectionProducts(col.id)],
55
55
  },
56
56
  },
57
57
  );
@@ -73,6 +73,7 @@ async function getProduct(slug: string): Promise<ProductResult> {
73
73
  cacheOptions: {
74
74
  revalidate: 3600,
75
75
  tags: [
76
+ tags.products(),
76
77
  tags.product(product.id),
77
78
  tags.categoryProducts(product.category_id),
78
79
  ],
@@ -30,14 +30,14 @@ export function AuthErrorToast() {
30
30
  <div
31
31
  role="status"
32
32
  aria-live="polite"
33
- className="fixed bottom-4 left-1/2 -translate-x-1/2 z-50 max-w-sm rounded-lg bg-zinc-900 text-white px-4 py-3 text-sm shadow-lg flex items-center gap-3"
33
+ className="fixed bottom-4 left-1/2 -translate-x-1/2 z-50 max-w-sm rounded-lg bg-foreground text-background px-4 py-3 text-sm shadow-lg flex items-center gap-3"
34
34
  >
35
35
  <span>{message}</span>
36
36
  <button
37
37
  type="button"
38
38
  onClick={() => setMessage(null)}
39
39
  aria-label="Dismiss"
40
- className="text-zinc-400 hover:text-white transition-colors text-base leading-none"
40
+ className="text-background/60 hover:text-background transition-colors text-base leading-none"
41
41
  >
42
42
  ×
43
43
  </button>
@@ -17,7 +17,7 @@
17
17
  "check": "bun run typecheck && bun run test:run"
18
18
  },
19
19
  "dependencies": {
20
- "@cimplify/sdk": "^0.99.2",
20
+ "@cimplify/sdk": "^0.100.4",
21
21
  "next": "^16.2.6",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0"
@@ -4,7 +4,7 @@ import { useState } from "react";
4
4
  import { useRouter } from "next/navigation";
5
5
  import type { Product } from "@cimplify/sdk";
6
6
  import type { AvailableSlot } from "@cimplify/sdk";
7
- import { useCart, DateSlotPicker } from "@cimplify/sdk/react";
7
+ import { DateSlotPicker, Price, useCart } from "@cimplify/sdk/react";
8
8
  import { brand } from "@/lib/brand";
9
9
 
10
10
  /**
@@ -19,9 +19,7 @@ import { brand } from "@/lib/brand";
19
19
  export function BookClient({ treatments }: { treatments: Product[] }) {
20
20
  const router = useRouter();
21
21
  const { addItem } = useCart();
22
- const [selectedTreatment, setSelectedTreatment] = useState<Product | undefined>(
23
- treatments[0],
24
- );
22
+ const [selectedTreatment, setSelectedTreatment] = useState<Product | undefined>(treatments[0]);
25
23
  const [selectedSlot, setSelectedSlot] = useState<AvailableSlot | null>(null);
26
24
  const [submitting, setSubmitting] = useState(false);
27
25
 
@@ -83,7 +81,7 @@ export function BookClient({ treatments }: { treatments: Product[] }) {
83
81
  <p className="font-semibold text-sm m-0 truncate">{t.name}</p>
84
82
  <p className="text-xs text-muted-foreground m-0">
85
83
  {t.duration_minutes ? `${t.duration_minutes} min · ` : ""}
86
- {brand.currency} {t.default_price}
84
+ <Price amount={t.default_price} />
87
85
  </p>
88
86
  </div>
89
87
  {active && (
@@ -42,6 +42,7 @@ async function getCategory(slug: string): Promise<CategoryResult> {
42
42
  cacheOptions: {
43
43
  revalidate: 3600,
44
44
  tags: [
45
+ tags.products(),
45
46
  tags.category(catRes.value.id),
46
47
  tags.categoryProducts(catRes.value.id),
47
48
  ],
@@ -42,6 +42,7 @@ async function getCollection(slug: string): Promise<CollectionResult> {
42
42
  cacheOptions: {
43
43
  revalidate: 3600,
44
44
  tags: [
45
+ tags.products(),
45
46
  tags.collection(colRes.value.id),
46
47
  tags.collectionProducts(colRes.value.id),
47
48
  ],
@@ -34,7 +34,7 @@ async function getHomeData() {
34
34
  {
35
35
  cacheOptions: {
36
36
  revalidate: 3600,
37
- tags: [tags.collectionProducts(col.id)],
37
+ tags: [tags.products(), tags.collectionProducts(col.id)],
38
38
  },
39
39
  },
40
40
  );
@@ -30,14 +30,14 @@ export function AuthErrorToast() {
30
30
  <div
31
31
  role="status"
32
32
  aria-live="polite"
33
- className="fixed bottom-4 left-1/2 -translate-x-1/2 z-50 max-w-sm rounded-lg bg-zinc-900 text-white px-4 py-3 text-sm shadow-lg flex items-center gap-3"
33
+ className="fixed bottom-4 left-1/2 -translate-x-1/2 z-50 max-w-sm rounded-lg bg-foreground text-background px-4 py-3 text-sm shadow-lg flex items-center gap-3"
34
34
  >
35
35
  <span>{message}</span>
36
36
  <button
37
37
  type="button"
38
38
  onClick={() => setMessage(null)}
39
39
  aria-label="Dismiss"
40
- className="text-zinc-400 hover:text-white transition-colors text-base leading-none"
40
+ className="text-background/60 hover:text-background transition-colors text-base leading-none"
41
41
  >
42
42
  ×
43
43
  </button>
@@ -17,7 +17,7 @@
17
17
  "check": "bun run typecheck && bun run test:run"
18
18
  },
19
19
  "dependencies": {
20
- "@cimplify/sdk": "^0.99.2",
20
+ "@cimplify/sdk": "^0.100.4",
21
21
  "next": "^16.2.6",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0"
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env node
2
- import { startTunnelRuntime } from './chunk-YTZ233XM.mjs';
3
- import { info } from './chunk-ZPVN6UXL.mjs';
4
-
5
- // src/commands/agent.ts
6
- var FLAG_CHECK = "--check";
7
- async function run(argv) {
8
- if (argv.includes(FLAG_CHECK)) {
9
- info("ok");
10
- return;
11
- }
12
- const cwd = process.cwd();
13
- info("cimplify agent: supervising the preview tunnel");
14
- const stop = startTunnelRuntime(cwd);
15
- await new Promise((resolve) => {
16
- const shutdown = () => {
17
- stop();
18
- resolve();
19
- };
20
- process.once("SIGINT", shutdown);
21
- process.once("SIGTERM", shutdown);
22
- });
23
- }
24
-
25
- export { run as default };
@@ -1,76 +0,0 @@
1
- #!/usr/bin/env node
2
- // src/errors.ts
3
- var CLI_ERROR_CODE = {
4
- NOT_LOGGED_IN: "NOT_LOGGED_IN",
5
- NOT_LINKED: "NOT_LINKED",
6
- NETWORK_ERROR: "NETWORK_ERROR",
7
- AUTH_FAILED: "AUTH_FAILED",
8
- PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND",
9
- GIT_ERROR: "GIT_ERROR",
10
- INVALID_INPUT: "INVALID_INPUT",
11
- ALREADY_LINKED: "ALREADY_LINKED",
12
- SERVER_ERROR: "SERVER_ERROR",
13
- ABORTED: "ABORTED",
14
- UNAUTHORIZED: "UNAUTHORIZED",
15
- TIMEOUT: "TIMEOUT",
16
- /** Operation needs interactive confirmation and the shell is non-interactive. */
17
- INTERACTIVE_REQUIRED: "INTERACTIVE_REQUIRED",
18
- /** Generic resource-not-found (e.g. unknown registry component, missing local fixture). */
19
- NOT_FOUND: "NOT_FOUND",
20
- /** Destructive op needs a fresh user re-auth — run `cimplify auth step-up`. */
21
- STEP_UP_REQUIRED: "STEP_UP_REQUIRED"
22
- };
23
- var EXIT_CODE = {
24
- OK: 0,
25
- ERROR: 1,
26
- SUPERSEDED: 2,
27
- ABORTED: 3,
28
- NOT_LINKED: 4,
29
- ALREADY_LINKED: 5,
30
- GIT_ERROR: 6,
31
- INTERACTIVE_REQUIRED: 7,
32
- PROJECT_NOT_FOUND: 8,
33
- NOT_FOUND: 9,
34
- NETWORK_ERROR: 10,
35
- SERVER_ERROR: 11,
36
- TIMEOUT: 12,
37
- NOT_LOGGED_IN: 20,
38
- AUTH_FAILED: 21,
39
- UNAUTHORIZED: 22,
40
- STEP_UP_REQUIRED: 23,
41
- INVALID_INPUT: 30
42
- };
43
- var EXIT_CODE_FOR = {
44
- NOT_LOGGED_IN: EXIT_CODE.NOT_LOGGED_IN,
45
- NOT_LINKED: EXIT_CODE.NOT_LINKED,
46
- NETWORK_ERROR: EXIT_CODE.NETWORK_ERROR,
47
- AUTH_FAILED: EXIT_CODE.AUTH_FAILED,
48
- PROJECT_NOT_FOUND: EXIT_CODE.PROJECT_NOT_FOUND,
49
- GIT_ERROR: EXIT_CODE.GIT_ERROR,
50
- INVALID_INPUT: EXIT_CODE.INVALID_INPUT,
51
- ALREADY_LINKED: EXIT_CODE.ALREADY_LINKED,
52
- SERVER_ERROR: EXIT_CODE.SERVER_ERROR,
53
- ABORTED: EXIT_CODE.ABORTED,
54
- UNAUTHORIZED: EXIT_CODE.UNAUTHORIZED,
55
- TIMEOUT: EXIT_CODE.TIMEOUT,
56
- INTERACTIVE_REQUIRED: EXIT_CODE.INTERACTIVE_REQUIRED,
57
- NOT_FOUND: EXIT_CODE.NOT_FOUND,
58
- STEP_UP_REQUIRED: EXIT_CODE.STEP_UP_REQUIRED
59
- };
60
- var CliError = class extends Error {
61
- code;
62
- exitCode;
63
- remediation;
64
- constructor(code, message, options = {}) {
65
- super(message);
66
- this.name = "CliError";
67
- this.code = code;
68
- this.exitCode = options.exitCode ?? EXIT_CODE_FOR[code];
69
- this.remediation = options.remediation;
70
- }
71
- };
72
- function isCliError(err) {
73
- return err instanceof CliError || typeof err === "object" && err !== null && err.name === "CliError" && typeof err.code === "string" && typeof err.exitCode === "number";
74
- }
75
-
76
- export { CLI_ERROR_CODE, CliError, EXIT_CODE, isCliError };