@calo-design/cli 0.4.2 → 0.4.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.
- package/bin/cli.js +195 -4
- package/bin/login.js +18 -2
- package/bin/share.js +11 -2
- package/bin/templates/gallery-assets/component-gallery/meal-photo.png +0 -0
- package/bin/templates/gallery-assets/component-gallery/smoothie-photo.png +0 -0
- package/bin/templates/gallery-assets/live-flows/active-subscriber-home/ingredient-penne.png +0 -0
- package/bin/templates/gallery-index.tsx +1678 -0
- package/bin/templates/gallery-suppress.ts +50 -0
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LogBox } from "react-native";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Known, non-actionable dev-only warnings that fire when @calo/design-system
|
|
5
|
+
* components render on react-native-web under React 19:
|
|
6
|
+
*
|
|
7
|
+
* - "cannot contain a nested" / "cannot be a descendant of": RNW renders every
|
|
8
|
+
* Pressable as a <button>, and DS cards nest a pressable action inside a
|
|
9
|
+
* pressable card (e.g. CaloCafeProductCard's "Add" button). Invalid DOM
|
|
10
|
+
* nesting on web only; correct on native.
|
|
11
|
+
* - "Invalid style property" (`direction`), "shadow*", "props.pointerEvents":
|
|
12
|
+
* RNW style-prop deprecations emitted from inside DS components.
|
|
13
|
+
*
|
|
14
|
+
* These are cosmetic — the gallery renders correctly. Silence them so the
|
|
15
|
+
* component showroom has a clean console/overlay. The real fix belongs in the
|
|
16
|
+
* design system (avoid nested Pressables / migrate deprecated style props).
|
|
17
|
+
*/
|
|
18
|
+
const IGNORED = [
|
|
19
|
+
"cannot contain a nested",
|
|
20
|
+
"cannot be a descendant of",
|
|
21
|
+
"Invalid style property",
|
|
22
|
+
"shadow*",
|
|
23
|
+
"props.pointerEvents is deprecated",
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
// Marker so we can confirm this module executed in a given runtime.
|
|
27
|
+
(globalThis as { __caloWarnSuppressed?: boolean }).__caloWarnSuppressed = true;
|
|
28
|
+
|
|
29
|
+
// Native: suppress the LogBox overlay.
|
|
30
|
+
LogBox?.ignoreLogs?.(IGNORED);
|
|
31
|
+
|
|
32
|
+
// Web: Expo's log-box overlay is driven by console.error / console.warn. This
|
|
33
|
+
// module loads after Expo installs its console middleware, so wrapping here sits
|
|
34
|
+
// outermost and drops these known messages before the overlay ever sees them.
|
|
35
|
+
const ignore = (args: unknown[]) => {
|
|
36
|
+
const message = typeof args[0] === "string" ? args[0] : "";
|
|
37
|
+
return IGNORED.some((pattern) => message.includes(pattern));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const originalConsoleError = console.error;
|
|
41
|
+
console.error = (...args: unknown[]) => {
|
|
42
|
+
if (ignore(args)) return;
|
|
43
|
+
originalConsoleError(...(args as Parameters<typeof console.error>));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const originalConsoleWarn = console.warn;
|
|
47
|
+
console.warn = (...args: unknown[]) => {
|
|
48
|
+
if (ignore(args)) return;
|
|
49
|
+
originalConsoleWarn(...(args as Parameters<typeof console.warn>));
|
|
50
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calo-design/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "One-line setup for Calo design tooling: logs in with your Calo email and installs the calo-design skill + design-system packages. No GitHub account needed.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"calo-design": "bin/cli.js"
|