gbs-add-block 2.1.0 → 2.3.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.
Files changed (129) hide show
  1. package/.gbs/skills/gbs-components/SKILL.md +190 -134
  2. package/.gbs/skills/gbs-components/references/install.md +25 -3
  3. package/.gbs/skills/gbs-components/references/styling.md +246 -207
  4. package/CHANGELOG.md +74 -0
  5. package/README.md +154 -23
  6. package/index.cjs +212 -3
  7. package/package.json +41 -10
  8. package/schema/passport-v1.schema.json +204 -0
  9. package/source/beta-components/accordion/passport.json +259 -0
  10. package/source/beta-components/accordion/styles.css +207 -208
  11. package/source/beta-components/alert/passport.json +250 -0
  12. package/source/beta-components/alert/styles.css +154 -155
  13. package/source/beta-components/avatar/passport.json +294 -0
  14. package/source/beta-components/avatar/styles.css +225 -226
  15. package/source/beta-components/badge/passport.json +332 -0
  16. package/source/beta-components/badge/styles.css +203 -204
  17. package/source/beta-components/breadcrumb/passport.json +243 -0
  18. package/source/beta-components/breadcrumb/styles.css +138 -140
  19. package/source/beta-components/button/passport.json +402 -0
  20. package/source/beta-components/button/passport.manual.json +31 -0
  21. package/source/beta-components/button/styles.css +232 -234
  22. package/source/beta-components/card/passport.json +337 -0
  23. package/source/beta-components/card/styles.css +230 -232
  24. package/source/beta-components/checkbox/passport.json +456 -0
  25. package/source/beta-components/checkbox/styles.css +211 -213
  26. package/source/beta-components/combobox/passport.json +456 -0
  27. package/source/beta-components/combobox/styles.css +419 -417
  28. package/source/beta-components/data-grid/agent/coerce.ts +368 -0
  29. package/source/beta-components/data-grid/agent/contract.ts +410 -0
  30. package/source/beta-components/data-grid/agent/dataset.ts +92 -0
  31. package/source/beta-components/data-grid/agent/engine.ts +470 -0
  32. package/source/beta-components/data-grid/agent/executors.ts +155 -0
  33. package/source/beta-components/data-grid/agent/index.ts +79 -0
  34. package/source/beta-components/data-grid/agent/intent.ts +324 -0
  35. package/source/beta-components/data-grid/agent/operations.ts +335 -0
  36. package/source/beta-components/data-grid/agent/validate.ts +630 -0
  37. package/source/beta-components/data-grid/agent/webmcp.ts +107 -0
  38. package/source/beta-components/data-grid/index.ts +14 -7
  39. package/source/beta-components/data-grid/passport.json +1051 -0
  40. package/source/beta-components/data-grid/passport.manual.json +255 -0
  41. package/source/beta-components/data-grid/react/AskGrid.tsx +164 -0
  42. package/source/beta-components/data-grid/react/DataGrid.tsx +39 -0
  43. package/source/beta-components/data-grid/styles.css +874 -716
  44. package/source/beta-components/date-picker/passport.json +407 -0
  45. package/source/beta-components/date-picker/styles.css +445 -446
  46. package/source/beta-components/dialog/passport.json +344 -0
  47. package/source/beta-components/dialog/styles.css +280 -279
  48. package/source/beta-components/file-uploader/passport.json +518 -0
  49. package/source/beta-components/file-uploader/styles.css +394 -396
  50. package/source/beta-components/input/passport.json +536 -0
  51. package/source/beta-components/input/styles.css +295 -297
  52. package/source/beta-components/menu/passport.json +322 -0
  53. package/source/beta-components/menu/styles.css +224 -223
  54. package/source/beta-components/modal/passport.json +289 -0
  55. package/source/beta-components/modal/styles.css +241 -240
  56. package/source/beta-components/number-input/passport.json +541 -0
  57. package/source/beta-components/number-input/styles.css +230 -231
  58. package/source/beta-components/popover/passport.json +238 -0
  59. package/source/beta-components/popover/styles.css +148 -147
  60. package/source/beta-components/progress/passport.json +270 -0
  61. package/source/beta-components/progress/styles.css +200 -201
  62. package/source/beta-components/radio-group/passport.json +477 -0
  63. package/source/beta-components/radio-group/styles.css +269 -270
  64. package/source/beta-components/shared/core/agent/adapter.ts +65 -0
  65. package/source/beta-components/shared/core/agent/history.ts +120 -0
  66. package/source/beta-components/shared/core/agent/index.ts +46 -0
  67. package/source/beta-components/shared/core/agent/numbers.ts +217 -0
  68. package/source/beta-components/shared/core/agent/schema.ts +180 -0
  69. package/source/beta-components/shared/core/agent/types.ts +169 -0
  70. package/source/beta-components/shared/core/agent/webmcp.ts +328 -0
  71. package/source/beta-components/shared/index.ts +9 -0
  72. package/source/beta-components/shared/react/GramproAIProvider.tsx +50 -0
  73. package/source/beta-components/shared/react/useAskAgent.ts +217 -0
  74. package/source/beta-components/shared/styles.css +79 -0
  75. package/source/beta-components/shared/version.json +4 -4
  76. package/source/beta-components/shared/version.ts +6 -6
  77. package/source/beta-components/skeleton/passport.json +251 -0
  78. package/source/beta-components/skeleton/styles.css +185 -187
  79. package/source/beta-components/spinner/passport.json +245 -0
  80. package/source/beta-components/spinner/styles.css +173 -174
  81. package/source/beta-components/switch/passport.json +421 -0
  82. package/source/beta-components/switch/styles.css +227 -229
  83. package/source/beta-components/tabs/passport.json +315 -0
  84. package/source/beta-components/tabs/styles.css +263 -264
  85. package/source/beta-components/textarea/passport.json +382 -0
  86. package/source/beta-components/textarea/styles.css +158 -160
  87. package/source/beta-components/toaster/passport.json +221 -0
  88. package/source/beta-components/toaster/styles.css +282 -282
  89. package/source/beta-components/tooltip/passport.json +170 -0
  90. package/source/beta-components/tooltip/styles.css +71 -73
  91. package/tools/env.cjs +61 -0
  92. package/tools/passport/cli.cjs +79 -0
  93. package/tools/passport/extract.cjs +493 -0
  94. package/tools/passport/index.cjs +185 -0
  95. package/tools/passport/merge.cjs +131 -0
  96. package/tools/passport/policy.cjs +65 -0
  97. package/tools/passport/validate.cjs +277 -0
  98. package/tools/ts-require.cjs +79 -0
  99. package/source/beta-components/accordion/__tests__/core.test.ts +0 -58
  100. package/source/beta-components/alert/__tests__/core.test.ts +0 -17
  101. package/source/beta-components/avatar/__tests__/core.test.ts +0 -88
  102. package/source/beta-components/badge/__tests__/core.test.ts +0 -46
  103. package/source/beta-components/breadcrumb/__tests__/core.test.ts +0 -58
  104. package/source/beta-components/button/__tests__/core.test.ts +0 -31
  105. package/source/beta-components/card/__tests__/core.test.ts +0 -57
  106. package/source/beta-components/checkbox/__tests__/core.test.ts +0 -40
  107. package/source/beta-components/combobox/__tests__/core.test.ts +0 -134
  108. package/source/beta-components/data-grid/__tests__/core.test.ts +0 -356
  109. package/source/beta-components/data-grid/__tests__/export.test.ts +0 -70
  110. package/source/beta-components/data-grid/__tests__/pdf.test.ts +0 -209
  111. package/source/beta-components/date-picker/__tests__/core.test.ts +0 -273
  112. package/source/beta-components/dialog/__tests__/core.test.ts +0 -86
  113. package/source/beta-components/file-uploader/__tests__/core.test.ts +0 -395
  114. package/source/beta-components/input/__tests__/core.test.ts +0 -75
  115. package/source/beta-components/menu/__tests__/core.test.ts +0 -120
  116. package/source/beta-components/modal/__tests__/core.test.ts +0 -55
  117. package/source/beta-components/number-input/__tests__/core.test.ts +0 -151
  118. package/source/beta-components/progress/__tests__/core.test.ts +0 -56
  119. package/source/beta-components/radio-group/__tests__/core.test.ts +0 -64
  120. package/source/beta-components/shared/__tests__/boundaries.test.ts +0 -95
  121. package/source/beta-components/shared/__tests__/core.test.ts +0 -55
  122. package/source/beta-components/shared/__tests__/position.test.ts +0 -143
  123. package/source/beta-components/skeleton/__tests__/core.test.ts +0 -41
  124. package/source/beta-components/spinner/__tests__/core.test.ts +0 -48
  125. package/source/beta-components/switch/__tests__/core.test.ts +0 -64
  126. package/source/beta-components/tabs/__tests__/core.test.ts +0 -51
  127. package/source/beta-components/textarea/__tests__/core.test.ts +0 -38
  128. package/source/beta-components/toaster/__tests__/core.test.ts +0 -256
  129. package/source/beta-components/tooltip/__tests__/core.test.ts +0 -42
@@ -0,0 +1,170 @@
1
+ {
2
+ "passportVersion": "1.0.0",
3
+ "identity": {
4
+ "component": "Tooltip",
5
+ "folder": "tooltip",
6
+ "exports": [
7
+ "Tooltip"
8
+ ]
9
+ },
10
+ "source": {
11
+ "libraryVersion": "2.3.0",
12
+ "files": [
13
+ "core/index.ts",
14
+ "core/types.ts",
15
+ "core/visibility.ts",
16
+ "index.ts",
17
+ "react/Tooltip.tsx",
18
+ "react/props.ts"
19
+ ],
20
+ "sourceHash": "sha256:8e0de012f56b518fd5c68d2ee98a73f4d1435cb9d61e59f277cc377d609dd17f"
21
+ },
22
+ "props": [
23
+ {
24
+ "name": "align",
25
+ "type": "enum",
26
+ "values": [
27
+ "center",
28
+ "end",
29
+ "start"
30
+ ],
31
+ "typeText": "TooltipAlign | undefined",
32
+ "required": false,
33
+ "default": "center",
34
+ "origin": "derived",
35
+ "description": "Default `center`, which is only meaningful with `side` top or bottom.",
36
+ "descriptionOrigin": "jsdoc"
37
+ },
38
+ {
39
+ "name": "children",
40
+ "type": "other",
41
+ "typeText": "ReactElement<{ [attribute: string]: unknown; }, string | import(\"react\").JSXElementConstructor<any>>",
42
+ "required": true,
43
+ "origin": "derived",
44
+ "description": "The control it describes: a single element, cloned with a ref, the pointer\r\nand focus handlers, and `aria-describedby`.",
45
+ "descriptionOrigin": "jsdoc"
46
+ },
47
+ {
48
+ "name": "className",
49
+ "type": "string",
50
+ "typeText": "string | undefined",
51
+ "required": false,
52
+ "origin": "derived"
53
+ },
54
+ {
55
+ "name": "classNames",
56
+ "type": "other",
57
+ "typeText": "Partial<Record<TooltipSlot, string>> | undefined",
58
+ "required": false,
59
+ "origin": "derived"
60
+ },
61
+ {
62
+ "name": "closeDelay",
63
+ "type": "number",
64
+ "typeText": "number | undefined",
65
+ "required": false,
66
+ "default": 120,
67
+ "origin": "derived",
68
+ "description": "Wait before hiding, in ms. Default 120, so crossing a gap does not flicker.",
69
+ "descriptionOrigin": "jsdoc"
70
+ },
71
+ {
72
+ "name": "content",
73
+ "type": "other",
74
+ "typeText": "ReactNode",
75
+ "required": true,
76
+ "origin": "derived",
77
+ "description": "The short label. Keep it to a few words.",
78
+ "descriptionOrigin": "jsdoc"
79
+ },
80
+ {
81
+ "name": "delay",
82
+ "type": "number",
83
+ "typeText": "number | undefined",
84
+ "required": false,
85
+ "default": 400,
86
+ "origin": "derived",
87
+ "description": "Wait before showing on hover, in ms. Default 400. Focus never waits.",
88
+ "descriptionOrigin": "jsdoc"
89
+ },
90
+ {
91
+ "name": "disabled",
92
+ "type": "boolean",
93
+ "typeText": "boolean | undefined",
94
+ "required": false,
95
+ "default": false,
96
+ "origin": "derived"
97
+ },
98
+ {
99
+ "name": "gap",
100
+ "type": "number",
101
+ "typeText": "number | undefined",
102
+ "required": false,
103
+ "default": 6,
104
+ "origin": "derived",
105
+ "description": "Distance from the control. Default 6.",
106
+ "descriptionOrigin": "jsdoc"
107
+ },
108
+ {
109
+ "name": "id",
110
+ "type": "string",
111
+ "typeText": "string | undefined",
112
+ "required": false,
113
+ "origin": "derived"
114
+ },
115
+ {
116
+ "name": "side",
117
+ "type": "enum",
118
+ "values": [
119
+ "bottom",
120
+ "left",
121
+ "right",
122
+ "top"
123
+ ],
124
+ "typeText": "TooltipSide | undefined",
125
+ "required": false,
126
+ "default": "top",
127
+ "origin": "derived",
128
+ "description": "Default `top`.",
129
+ "descriptionOrigin": "jsdoc"
130
+ },
131
+ {
132
+ "name": "style",
133
+ "type": "other",
134
+ "typeText": "CSSProperties | undefined",
135
+ "required": false,
136
+ "origin": "derived"
137
+ }
138
+ ],
139
+ "events": [],
140
+ "slots": [
141
+ "root",
142
+ "content"
143
+ ],
144
+ "states": [
145
+ {
146
+ "attr": "data-theme",
147
+ "values": [
148
+ "dark",
149
+ "light"
150
+ ]
151
+ }
152
+ ],
153
+ "accessibility": {
154
+ "supplied": [],
155
+ "required": []
156
+ },
157
+ "composition": {},
158
+ "operations": {},
159
+ "intentDomains": [],
160
+ "safeMutations": {},
161
+ "examples": [],
162
+ "coverage": {
163
+ "propsTotal": 12,
164
+ "propsDescribed": 7,
165
+ "describedPct": 58,
166
+ "authoredSections": [
167
+ "accessibility"
168
+ ]
169
+ }
170
+ }
@@ -1,73 +1,71 @@
1
- /*
2
- * Tooltip styles.
3
- *
4
- * Tokens read the shared --gbs-* variables when they are set on an ancestor
5
- * (set them on :root to theme every component at once) and fall back to the
6
- * same default palette otherwise. Rules live in the `gbs` layer. Declare
7
- * where that sits in your global CSS — e.g. `@layer reset, gbs, app,
8
- * utilities;` — and anything in a later layer, Tailwind utilities included,
9
- * overrides them.
10
- */
11
-
12
- @layer gbs {
13
- .tt-root {
14
- /* Inverted against the page, the way a tooltip is expected to read. */
15
- --tt-bg: var(--gbs-tooltip-bg, light-dark(#18181b, #f4f4f5));
16
- --tt-fg: var(--gbs-tooltip-fg, light-dark(#fafafa, #18181b));
17
- --tt-radius: var(--gbs-radius, var(--dg-radius, 8px));
18
- --tt-font-size: calc(var(--gbs-font-size, var(--dg-font-size, 13px)) - 1px);
19
- --tt-max-width: 240px;
20
- --tt-duration: 120ms;
21
-
22
- position: fixed;
23
- inset: auto;
24
- z-index: 70;
25
- width: max-content;
26
- max-width: min(var(--tt-max-width), calc(100vw - 16px));
27
- margin: 0;
28
- padding: 0;
29
- border: 0;
30
- border-radius: var(--tt-radius);
31
- background: var(--tt-bg);
32
- color: var(--tt-fg);
33
- color-scheme: inherit;
34
- font-size: var(--tt-font-size);
35
- line-height: 1.4;
36
- /* It follows the pointer's business, never takes it. */
37
- pointer-events: none;
38
- }
39
-
40
- :where(.dark, [data-theme="dark"]) .tt-root {
41
- color-scheme: dark;
42
- }
43
- :where(.light, [data-theme="light"]) .tt-root {
44
- color-scheme: light;
45
- }
46
-
47
- .tt-root:popover-open {
48
- animation: tt-in var(--tt-duration) ease;
49
- }
50
- @keyframes tt-in {
51
- from {
52
- opacity: 0;
53
- scale: 0.97;
54
- }
55
- }
56
-
57
- .tt-content {
58
- padding: 5px 8px;
59
- text-wrap: pretty;
60
- }
61
-
62
- @media (prefers-reduced-motion: reduce) {
63
- .tt-root:popover-open {
64
- animation: none;
65
- }
66
- }
67
-
68
- @media (forced-colors: active) {
69
- .tt-root {
70
- border: 1px solid CanvasText;
71
- }
72
- }
73
- }
1
+ /*
2
+ * Tooltip styles.
3
+ *
4
+ * Tokens read the shared --gbs-* variables when they are set on an ancestor
5
+ * (set them on :root to theme every component at once) and fall back to the
6
+ * same default palette otherwise. Rules are unlayered: they beat a framework
7
+ * reset on specificity, and lose to anything you pass through `className`.
8
+ * With Tailwind v4, import this file after the framework and inside its
9
+ * components layer - see the README.
10
+ */
11
+
12
+ .tt-root {
13
+ /* Inverted against the page, the way a tooltip is expected to read. */
14
+ --tt-bg: var(--gbs-tooltip-bg, light-dark(#18181b, #f4f4f5));
15
+ --tt-fg: var(--gbs-tooltip-fg, light-dark(#fafafa, #18181b));
16
+ --tt-radius: var(--gbs-radius, var(--dg-radius, 8px));
17
+ --tt-font-size: calc(var(--gbs-font-size, var(--dg-font-size, 13px)) - 1px);
18
+ --tt-max-width: 240px;
19
+ --tt-duration: 120ms;
20
+
21
+ position: fixed;
22
+ inset: auto;
23
+ z-index: 70;
24
+ width: max-content;
25
+ max-width: min(var(--tt-max-width), calc(100vw - 16px));
26
+ margin: 0;
27
+ padding: 0;
28
+ border: 0;
29
+ border-radius: var(--tt-radius);
30
+ background: var(--tt-bg);
31
+ color: var(--tt-fg);
32
+ color-scheme: inherit;
33
+ font-size: var(--tt-font-size);
34
+ line-height: 1.4;
35
+ /* It follows the pointer's business, never takes it. */
36
+ pointer-events: none;
37
+ }
38
+
39
+ :where(.dark, [data-theme="dark"]) .tt-root {
40
+ color-scheme: dark;
41
+ }
42
+ :where(.light, [data-theme="light"]) .tt-root {
43
+ color-scheme: light;
44
+ }
45
+
46
+ .tt-root:popover-open {
47
+ animation: tt-in var(--tt-duration) ease;
48
+ }
49
+ @keyframes tt-in {
50
+ from {
51
+ opacity: 0;
52
+ scale: 0.97;
53
+ }
54
+ }
55
+
56
+ .tt-content {
57
+ padding: 5px 8px;
58
+ text-wrap: pretty;
59
+ }
60
+
61
+ @media (prefers-reduced-motion: reduce) {
62
+ .tt-root:popover-open {
63
+ animation: none;
64
+ }
65
+ }
66
+
67
+ @media (forced-colors: active) {
68
+ .tt-root {
69
+ border: 1px solid CanvasText;
70
+ }
71
+ }
package/tools/env.cjs ADDED
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Reads `.env` at the repository root, so a key can live in a file instead of
3
+ * being re-exported into every new shell.
4
+ *
5
+ * Written rather than installed for the same reason as everything else here:
6
+ * this is twenty lines, and `dotenv` would be a dependency the published
7
+ * package has to carry for a dev-only tool.
8
+ *
9
+ * A real environment variable always wins. That ordering matters — CI sets
10
+ * secrets in the environment, and a stale `.env` on someone's laptop silently
11
+ * overriding them would be a genuinely confusing afternoon.
12
+ */
13
+
14
+ const fs = require("fs");
15
+ const path = require("path");
16
+
17
+ /** Parses the `KEY=value` subset: comments, blank lines, optional quotes. */
18
+ function parse(text) {
19
+ const out = {};
20
+ for (const line of text.split(/\r?\n/)) {
21
+ const trimmed = line.trim();
22
+ if (trimmed === "" || trimmed.startsWith("#")) continue;
23
+
24
+ const equals = trimmed.indexOf("=");
25
+ if (equals === -1) continue;
26
+
27
+ const key = trimmed.slice(0, equals).trim().replace(/^export\s+/, "");
28
+ let value = trimmed.slice(equals + 1).trim();
29
+
30
+ if (
31
+ (value.startsWith('"') && value.endsWith('"') && value.length > 1) ||
32
+ (value.startsWith("'") && value.endsWith("'") && value.length > 1)
33
+ ) {
34
+ value = value.slice(1, -1);
35
+ }
36
+ if (key) out[key] = value;
37
+ }
38
+ return out;
39
+ }
40
+
41
+ /**
42
+ * Fills in anything the environment does not already define.
43
+ *
44
+ * @returns the names loaded — never the values, which should not be logged.
45
+ */
46
+ function load(root = process.cwd()) {
47
+ const file = path.join(root, ".env");
48
+ if (!fs.existsSync(file)) return [];
49
+
50
+ const loaded = [];
51
+ for (const [key, value] of Object.entries(parse(fs.readFileSync(file, "utf8")))) {
52
+ if (process.env[key] !== undefined) continue;
53
+ process.env[key] = value;
54
+ // A blank line in `.env.example` that nobody filled in is not a key, and
55
+ // reporting it as one implies a credential that is not there.
56
+ if (value !== "") loaded.push(key);
57
+ }
58
+ return loaded;
59
+ }
60
+
61
+ module.exports = { load, parse };
@@ -0,0 +1,79 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * Passport CLI used inside this repository.
4
+ *
5
+ * node tools/passport/cli.cjs generate / refresh passport.json
6
+ * node tools/passport/cli.cjs --check CI gate; writes nothing, exits 1 on drift
7
+ *
8
+ * The consumer-facing entry point is `gbs-add-block --passport`, which calls the
9
+ * same functions against the copied component-lib folder.
10
+ */
11
+
12
+ const path = require("path");
13
+ const fs = require("fs");
14
+ const { generate, check } = require("./index.cjs");
15
+
16
+ const REPO = path.resolve(__dirname, "..", "..");
17
+ const LIB = path.join(REPO, "source", "beta-components");
18
+ const COVERAGE_THRESHOLD = 40; // ratchet upward over time
19
+
20
+ const args = process.argv.slice(2);
21
+ const wantCheck = args.includes("--check");
22
+ const quiet = args.includes("--quiet");
23
+ const libraryVersion = JSON.parse(fs.readFileSync(path.join(REPO, "package.json"), "utf8")).version;
24
+
25
+ const opts = {
26
+ libRoot: LIB,
27
+ repoRoot: REPO,
28
+ libraryVersion,
29
+ includeLocal: false,
30
+ coverageThreshold: COVERAGE_THRESHOLD,
31
+ };
32
+
33
+ function main() {
34
+ if (wantCheck) {
35
+ const { report, errors, warnings } = check(opts);
36
+ for (const row of report) {
37
+ if (row.ok && row.problems.length === 0) {
38
+ if (!quiet) console.log(` ${row.component}: OK`);
39
+ continue;
40
+ }
41
+ for (const p of row.problems) {
42
+ const mark = p.level === "error" ? "✗" : "!";
43
+ console.log(` ${mark} ${p.component}: ${p.message}`);
44
+ }
45
+ }
46
+ console.log(
47
+ `\n${report.length} components · ${errors} error(s) · ${warnings} warning(s)`,
48
+ );
49
+ if (errors > 0) {
50
+ console.error("\nPassports are out of date. Run `npm run passport` and commit the result.");
51
+ process.exit(1);
52
+ }
53
+ return;
54
+ }
55
+
56
+ const { results, written } = generate(opts);
57
+ const errors = results.flatMap((r) => r.issues.filter((i) => i.level === "error"));
58
+ const warns = results.flatMap((r) => r.issues.filter((i) => i.level === "warn"));
59
+
60
+ for (const e of errors) console.error(` ✗ ${e.component}: ${e.message}`);
61
+ if (!quiet) for (const w of warns) console.log(` ! ${w.component}: ${w.message}`);
62
+
63
+ console.log(
64
+ `\n${results.length} passports generated · ${written.length} file(s) changed · ` +
65
+ `${errors.length} error(s) · ${warns.length} warning(s)`,
66
+ );
67
+ if (written.length && !quiet) for (const f of written) console.log(` ${f}`);
68
+ if (errors.length > 0) process.exit(1);
69
+ }
70
+
71
+ try {
72
+ main();
73
+ } catch (error) {
74
+ if (error.code === "ETYPESCRIPT_MISSING" || error.code === "EBADJSON") {
75
+ console.error(error.message);
76
+ process.exit(1);
77
+ }
78
+ throw error;
79
+ }