@calibrate-ds/cli 0.1.86 → 0.1.88
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 +108 -200
- package/NOTICE +19 -0
- package/README.md +1 -1
- package/dist/commands/telemetry.js +7 -1
- package/dist/mcp/tools/action-tools.js +11 -3
- package/dist/mcp/tools/info-tools.js +14 -0
- package/dist/utils/telemetry.d.ts +7 -0
- package/dist/utils/telemetry.js +28 -3
- package/package.json +11 -8
- package/dist/__tests__/component-slug.test.d.ts +0 -2
- package/dist/__tests__/component-slug.test.d.ts.map +0 -1
- package/dist/__tests__/component-slug.test.js +0 -54
- package/dist/__tests__/component-slug.test.js.map +0 -1
- package/dist/__tests__/lock-changes.test.d.ts +0 -2
- package/dist/__tests__/lock-changes.test.d.ts.map +0 -1
- package/dist/__tests__/lock-changes.test.js +0 -81
- package/dist/__tests__/lock-changes.test.js.map +0 -1
- package/dist/__tests__/permissions.test.d.ts +0 -2
- package/dist/__tests__/permissions.test.d.ts.map +0 -1
- package/dist/__tests__/permissions.test.js +0 -67
- package/dist/__tests__/permissions.test.js.map +0 -1
- package/dist/__tests__/stamp-in-lock.test.d.ts +0 -2
- package/dist/__tests__/stamp-in-lock.test.d.ts.map +0 -1
- package/dist/__tests__/stamp-in-lock.test.js +0 -102
- package/dist/__tests__/stamp-in-lock.test.js.map +0 -1
- package/dist/__tests__/status-logic.test.d.ts +0 -2
- package/dist/__tests__/status-logic.test.d.ts.map +0 -1
- package/dist/__tests__/status-logic.test.js +0 -74
- package/dist/__tests__/status-logic.test.js.map +0 -1
- package/dist/__tests__/team-roster.test.d.ts +0 -2
- package/dist/__tests__/team-roster.test.d.ts.map +0 -1
- package/dist/__tests__/team-roster.test.js +0 -97
- package/dist/__tests__/team-roster.test.js.map +0 -1
- package/dist/__tests__/verify-args.test.d.ts +0 -2
- package/dist/__tests__/verify-args.test.d.ts.map +0 -1
- package/dist/__tests__/verify-args.test.js +0 -34
- package/dist/__tests__/verify-args.test.js.map +0 -1
- package/dist/ai/claude-provider.d.ts +0 -13
- package/dist/ai/claude-provider.d.ts.map +0 -1
- package/dist/ai/claude-provider.js.map +0 -1
- package/dist/ai/enhance-doc.d.ts +0 -24
- package/dist/ai/enhance-doc.d.ts.map +0 -1
- package/dist/ai/enhance-doc.js.map +0 -1
- package/dist/ai/openai-provider.d.ts +0 -13
- package/dist/ai/openai-provider.d.ts.map +0 -1
- package/dist/ai/openai-provider.js.map +0 -1
- package/dist/ai/prompt-utils.d.ts +0 -23
- package/dist/ai/prompt-utils.d.ts.map +0 -1
- package/dist/ai/prompt-utils.js.map +0 -1
- package/dist/commands/ai.d.ts +0 -8
- package/dist/commands/ai.d.ts.map +0 -1
- package/dist/commands/ai.js.map +0 -1
- package/dist/commands/apply.d.ts +0 -4
- package/dist/commands/apply.d.ts.map +0 -1
- package/dist/commands/apply.js.map +0 -1
- package/dist/commands/assign.d.ts +0 -5
- package/dist/commands/assign.d.ts.map +0 -1
- package/dist/commands/assign.js.map +0 -1
- package/dist/commands/bridge.d.ts +0 -3
- package/dist/commands/bridge.d.ts.map +0 -1
- package/dist/commands/bridge.js.map +0 -1
- package/dist/commands/ci.d.ts +0 -4
- package/dist/commands/ci.d.ts.map +0 -1
- package/dist/commands/ci.js.map +0 -1
- package/dist/commands/context.d.ts +0 -19
- package/dist/commands/context.d.ts.map +0 -1
- package/dist/commands/context.js.map +0 -1
- package/dist/commands/dev.d.ts +0 -4
- package/dist/commands/dev.d.ts.map +0 -1
- package/dist/commands/dev.js.map +0 -1
- package/dist/commands/diff.d.ts +0 -8
- package/dist/commands/diff.d.ts.map +0 -1
- package/dist/commands/diff.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -6
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/document-system.d.ts +0 -5
- package/dist/commands/document-system.d.ts.map +0 -1
- package/dist/commands/document-system.js.map +0 -1
- package/dist/commands/document.d.ts +0 -6
- package/dist/commands/document.d.ts.map +0 -1
- package/dist/commands/document.js.map +0 -1
- package/dist/commands/export.d.ts +0 -11
- package/dist/commands/export.d.ts.map +0 -1
- package/dist/commands/export.js.map +0 -1
- package/dist/commands/generate-components.d.ts +0 -4
- package/dist/commands/generate-components.d.ts.map +0 -1
- package/dist/commands/generate-components.js.map +0 -1
- package/dist/commands/generate-composites.d.ts +0 -2
- package/dist/commands/generate-composites.d.ts.map +0 -1
- package/dist/commands/generate-composites.js +0 -31
- package/dist/commands/generate-composites.js.map +0 -1
- package/dist/commands/generate-tokens.d.ts +0 -2
- package/dist/commands/generate-tokens.d.ts.map +0 -1
- package/dist/commands/generate-tokens.js.map +0 -1
- package/dist/commands/help-topics.d.ts +0 -2
- package/dist/commands/help-topics.d.ts.map +0 -1
- package/dist/commands/help-topics.js.map +0 -1
- package/dist/commands/implement.d.ts +0 -6
- package/dist/commands/implement.d.ts.map +0 -1
- package/dist/commands/implement.js.map +0 -1
- package/dist/commands/import-tokens.d.ts +0 -2
- package/dist/commands/import-tokens.d.ts.map +0 -1
- package/dist/commands/import-tokens.js.map +0 -1
- package/dist/commands/init.d.ts +0 -6
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/inspect-component.d.ts +0 -2
- package/dist/commands/inspect-component.d.ts.map +0 -1
- package/dist/commands/inspect-component.js.map +0 -1
- package/dist/commands/log.d.ts +0 -4
- package/dist/commands/log.d.ts.map +0 -1
- package/dist/commands/log.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -5
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/migrate.d.ts +0 -15
- package/dist/commands/migrate.d.ts.map +0 -1
- package/dist/commands/migrate.js.map +0 -1
- package/dist/commands/onboarding.d.ts +0 -9
- package/dist/commands/onboarding.d.ts.map +0 -1
- package/dist/commands/onboarding.js.map +0 -1
- package/dist/commands/plan.d.ts +0 -3
- package/dist/commands/plan.d.ts.map +0 -1
- package/dist/commands/plan.js.map +0 -1
- package/dist/commands/prompt.d.ts +0 -5
- package/dist/commands/prompt.d.ts.map +0 -1
- package/dist/commands/prompt.js.map +0 -1
- package/dist/commands/prune.d.ts +0 -2
- package/dist/commands/prune.d.ts.map +0 -1
- package/dist/commands/prune.js.map +0 -1
- package/dist/commands/query.d.ts +0 -13
- package/dist/commands/query.d.ts.map +0 -1
- package/dist/commands/query.js.map +0 -1
- package/dist/commands/remove.d.ts +0 -2
- package/dist/commands/remove.d.ts.map +0 -1
- package/dist/commands/remove.js.map +0 -1
- package/dist/commands/scaffold.d.ts +0 -2
- package/dist/commands/scaffold.d.ts.map +0 -1
- package/dist/commands/scaffold.js +0 -47
- package/dist/commands/scaffold.js.map +0 -1
- package/dist/commands/scan.d.ts +0 -2
- package/dist/commands/scan.d.ts.map +0 -1
- package/dist/commands/scan.js.map +0 -1
- package/dist/commands/stamp.d.ts +0 -11
- package/dist/commands/stamp.d.ts.map +0 -1
- package/dist/commands/stamp.js.map +0 -1
- package/dist/commands/status.d.ts +0 -8
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/team.d.ts +0 -7
- package/dist/commands/team.d.ts.map +0 -1
- package/dist/commands/team.js.map +0 -1
- package/dist/commands/telemetry.d.ts +0 -2
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/telemetry.js.map +0 -1
- package/dist/commands/token.d.ts +0 -35
- package/dist/commands/token.d.ts.map +0 -1
- package/dist/commands/token.js.map +0 -1
- package/dist/commands/verify.d.ts +0 -8
- package/dist/commands/verify.d.ts.map +0 -1
- package/dist/commands/verify.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp/registry.d.ts +0 -20
- package/dist/mcp/registry.d.ts.map +0 -1
- package/dist/mcp/registry.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -5
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/tools/action-tools.d.ts +0 -3
- package/dist/mcp/tools/action-tools.d.ts.map +0 -1
- package/dist/mcp/tools/action-tools.js.map +0 -1
- package/dist/mcp/tools/component-tools.d.ts +0 -9
- package/dist/mcp/tools/component-tools.d.ts.map +0 -1
- package/dist/mcp/tools/component-tools.js.map +0 -1
- package/dist/mcp/tools/governance-tools.d.ts +0 -3
- package/dist/mcp/tools/governance-tools.d.ts.map +0 -1
- package/dist/mcp/tools/governance-tools.js.map +0 -1
- package/dist/mcp/tools/info-tools.d.ts +0 -3
- package/dist/mcp/tools/info-tools.d.ts.map +0 -1
- package/dist/mcp/tools/info-tools.js.map +0 -1
- package/dist/mcp/tools/setup-mcp-tool.d.ts +0 -22
- package/dist/mcp/tools/setup-mcp-tool.d.ts.map +0 -1
- package/dist/mcp/tools/setup-mcp-tool.js.map +0 -1
- package/dist/mcp/tools/token-tools.d.ts +0 -3
- package/dist/mcp/tools/token-tools.d.ts.map +0 -1
- package/dist/mcp/tools/token-tools.js.map +0 -1
- package/dist/mcp/tools/verify-tool.d.ts +0 -3
- package/dist/mcp/tools/verify-tool.d.ts.map +0 -1
- package/dist/mcp/tools/verify-tool.js.map +0 -1
- package/dist/onboarding/content.d.ts +0 -39
- package/dist/onboarding/content.d.ts.map +0 -1
- package/dist/onboarding/content.js.map +0 -1
- package/dist/utils/component-slug.d.ts +0 -10
- package/dist/utils/component-slug.d.ts.map +0 -1
- package/dist/utils/component-slug.js.map +0 -1
- package/dist/utils/framework-registry.d.ts +0 -45
- package/dist/utils/framework-registry.d.ts.map +0 -1
- package/dist/utils/framework-registry.js.map +0 -1
- package/dist/utils/gitignore.d.ts +0 -4
- package/dist/utils/gitignore.d.ts.map +0 -1
- package/dist/utils/gitignore.js.map +0 -1
- package/dist/utils/lock-changes.d.ts +0 -14
- package/dist/utils/lock-changes.d.ts.map +0 -1
- package/dist/utils/lock-changes.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -9
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/managed-components.d.ts +0 -17
- package/dist/utils/managed-components.d.ts.map +0 -1
- package/dist/utils/managed-components.js.map +0 -1
- package/dist/utils/permissions.d.ts +0 -17
- package/dist/utils/permissions.d.ts.map +0 -1
- package/dist/utils/permissions.js.map +0 -1
- package/dist/utils/status-logic.d.ts +0 -16
- package/dist/utils/status-logic.d.ts.map +0 -1
- package/dist/utils/status-logic.js.map +0 -1
- package/dist/utils/storybook-setup.d.ts +0 -10
- package/dist/utils/storybook-setup.d.ts.map +0 -1
- package/dist/utils/storybook-setup.js.map +0 -1
- package/dist/utils/team-roster.d.ts +0 -37
- package/dist/utils/team-roster.d.ts.map +0 -1
- package/dist/utils/team-roster.js.map +0 -1
- package/dist/utils/telemetry.d.ts.map +0 -1
- package/dist/utils/telemetry.js.map +0 -1
- package/dist/verify/run-verify.d.ts +0 -38
- package/dist/verify/run-verify.d.ts.map +0 -1
- package/dist/verify/run-verify.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,201 +1,109 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, MIT Future License
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding any notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. Please also get an
|
|
186
|
-
"Alarm or alarm@" e-mail address from Apache to receive
|
|
187
|
-
notifications of activity on this work.
|
|
188
|
-
|
|
189
|
-
Copyright 2025 Deep Adalja
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-MIT
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Deep Adalja
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to use,
|
|
27
|
+
copy, modify, create derivative works, publicly perform, publicly display and
|
|
28
|
+
redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or service
|
|
34
|
+
that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software that
|
|
39
|
+
exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee using
|
|
52
|
+
the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to the
|
|
59
|
+
infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software, you
|
|
68
|
+
must include a copy of or a link to these Terms and Conditions and not remove any
|
|
69
|
+
copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
75
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN
|
|
79
|
+
IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of the
|
|
84
|
+
Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the MIT License that is effective on the second anniversary of the date we make
|
|
91
|
+
the Software available. On or after that date, you may use the Software under the
|
|
92
|
+
MIT License, in which case the following will apply:
|
|
93
|
+
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
95
|
+
the Software and associated documentation files (the "Software"), to deal in the
|
|
96
|
+
Software without restriction, including without limitation the rights to use,
|
|
97
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
98
|
+
Software, and to permit persons to whom the Software is furnished to do so,
|
|
99
|
+
subject to the following conditions:
|
|
100
|
+
|
|
101
|
+
The above copyright notice and this permission notice shall be included in all
|
|
102
|
+
copies or substantial portions of the Software.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
106
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
107
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
108
|
+
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
109
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Calibrate / PTB (@calibrate-ds)
|
|
2
|
+
Copyright 2026 Deep Adalja
|
|
3
|
+
|
|
4
|
+
## License
|
|
5
|
+
|
|
6
|
+
As of version 0.1.87, this software is licensed under the
|
|
7
|
+
Functional Source License, Version 1.1, MIT Future License (FSL-1.1-MIT).
|
|
8
|
+
See the LICENSE file for the full text.
|
|
9
|
+
|
|
10
|
+
In short: you may read, use, copy, modify, and redistribute this software for
|
|
11
|
+
any purpose EXCEPT offering a competing commercial product or service. Two years
|
|
12
|
+
after each version is published, that version additionally becomes available
|
|
13
|
+
under the MIT License.
|
|
14
|
+
|
|
15
|
+
## Prior versions
|
|
16
|
+
|
|
17
|
+
Versions 0.1.0 through 0.1.86 were released under the Apache License, Version 2.0,
|
|
18
|
+
and remain available under that license. The license change applies only to
|
|
19
|
+
version 0.1.87 and later.
|
package/README.md
CHANGED
|
@@ -768,6 +768,6 @@ See [PTB.md](./PTB.md) for architecture, type definitions, the generator interfa
|
|
|
768
768
|
```bash
|
|
769
769
|
pnpm install
|
|
770
770
|
pnpm build
|
|
771
|
-
pnpm test #
|
|
771
|
+
pnpm test # 593 tests across core, generator, and CLI
|
|
772
772
|
node apps/cli/dist/index.js --help
|
|
773
773
|
```
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { setTelemetryEnabled, getTelemetryStatus } from "../utils/telemetry.js";
|
|
1
|
+
import { setTelemetryEnabled, getTelemetryStatus, isTelemetryDisabledByEnv } from "../utils/telemetry.js";
|
|
2
2
|
import { logger } from "../utils/logger.js";
|
|
3
3
|
export async function telemetryCommand(subcommand) {
|
|
4
|
+
// SEC-2: an env kill switch overrides the stored preference — report it honestly.
|
|
5
|
+
if (subcommand !== "on" && subcommand !== "off" && isTelemetryDisabledByEnv()) {
|
|
6
|
+
logger.info(`Telemetry is \x1b[31mdisabled\x1b[0m by environment (DO_NOT_TRACK / CI).`);
|
|
7
|
+
logger.dim("Unset those variables to restore your saved preference.");
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
4
10
|
if (subcommand === "off") {
|
|
5
11
|
await setTelemetryEnabled(false);
|
|
6
12
|
logger.success("Telemetry disabled. PTB will no longer send usage data.");
|
|
@@ -293,7 +293,9 @@ DIVISION OF LABOR WITH FIGMA MCP (composite workflow — most accurate):
|
|
|
293
293
|
TYPICAL WORKFLOW:
|
|
294
294
|
1. Call start_work("<name>") — read blockedBy and tokenConflicts first
|
|
295
295
|
2. For each blocker: call start_work("<dep>"), implement, call submit_work("<dep>")
|
|
296
|
-
3. Read contextFile for the full implementation brief
|
|
296
|
+
3. Read contextFile for the full implementation brief (it contains promptText, the
|
|
297
|
+
render tree, and variantDiffs — these are intentionally NOT inlined in this
|
|
298
|
+
response because they exceed the tool-call size limit on large components)
|
|
297
299
|
4. Implement the requested component
|
|
298
300
|
5. Call submit_work("<name>") when done`, { name: z.string().describe("Component to start working on, e.g. 'SearchBar'") }, async ({ name }) => {
|
|
299
301
|
let ctx;
|
|
@@ -411,7 +413,11 @@ TYPICAL WORKFLOW:
|
|
|
411
413
|
layout: context.layout,
|
|
412
414
|
size: context.size,
|
|
413
415
|
docs: buildDocsPayload(context, codeName, ctx),
|
|
414
|
-
|
|
416
|
+
// NEW-8: promptText (often 100 KB+) is NOT inlined here — it blew the
|
|
417
|
+
// MCP tool-call token limit (94.7% of the payload) and failed the call
|
|
418
|
+
// outright on large component-sets. The full brief lives in contextFile
|
|
419
|
+
// (unchanged — it still contains promptText and every detail); read it
|
|
420
|
+
// from there. Only the compact instructions/summary travel in the payload.
|
|
415
421
|
instructions: promptPackage.instructions,
|
|
416
422
|
structureSummary: promptPackage.structureSummary,
|
|
417
423
|
// Token conflicts: slots where PTB's resolved token hex differs from
|
|
@@ -700,7 +706,9 @@ recursively when you call it for that dependency.`, { name: z.string().describe(
|
|
|
700
706
|
layout: context.layout,
|
|
701
707
|
size: context.size,
|
|
702
708
|
docs: buildDocsPayload(context, codeName, ctx),
|
|
703
|
-
|
|
709
|
+
// NEW-8: promptText is NOT inlined (it exceeds the MCP tool-call token
|
|
710
|
+
// limit on large components). The full brief — including promptText — is
|
|
711
|
+
// in contextFile, which is unchanged; read it from there.
|
|
704
712
|
instructions: promptPackage.instructions,
|
|
705
713
|
structureSummary: promptPackage.structureSummary,
|
|
706
714
|
...(context.tokenConflicts?.length
|
|
@@ -3,12 +3,26 @@ import * as path from "node:path";
|
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { resolveToken } from "@calibrate-ds/core";
|
|
5
5
|
const UPGRADE_CHECKLIST = {
|
|
6
|
+
"0.1.88": [
|
|
7
|
+
"0.1.87 audit fixes (docs/PTB_0187_REPORT.md). Closes the last functional beta blocker plus the emitter-parity residuals. Six-plus releases, zero regressions.",
|
|
8
|
+
"FIX (NEW-8, open since .79 — was FAILING HARD): start_work's MCP response inlined promptText (100 KB+, 94.7% of the payload), so start_work on a large component-set EXCEEDED the tool-call token limit and the call failed outright. promptText is no longer inlined in the response. The contextFile on disk is UNCHANGED — it still contains promptText and every detail; read the full brief from there (the tool description says so). This unblocks the primary agent entry point.",
|
|
9
|
+
"FIX (E-19 parity): multi-mode themes (e.g. Light/Dark) reached the canonical tokens.css but NOT the per-collection css/<name>.css or the TS export <name>.ts. All three emitters now emit every mode — per-collection CSS gets [data-theme] blocks; the TS export carries a valuesByMode field per token.",
|
|
10
|
+
"FIX (E-9 parity): a malformed hex value (e.g. #GGGGGG) was dropped from CSS but still leaked into the TS export. It's now skipped by every emitter, including <name>.ts. A shared token-value guard + a cross-emitter parity test prevent this fix-one-emitter class from recurring.",
|
|
11
|
+
"Re-run 'ptb generate-tokens' (or let start_work regenerate) to pick up the emitter fixes. No re-scan needed for these. Restart your IDE's MCP server for the start_work payload change. 593 tests.",
|
|
12
|
+
],
|
|
13
|
+
"0.1.87": [
|
|
14
|
+
"LICENSE CHANGE release — no code changes. Calibrate is now licensed under the Functional Source License (FSL-1.1-MIT), a source-available license, instead of Apache-2.0.",
|
|
15
|
+
"What it means: you may still read, use, copy, modify, and redistribute the software freely for any purpose EXCEPT a Competing Use (offering it as a commercial product/service that substitutes for Calibrate). Each version additionally becomes MIT-licensed two years after its release.",
|
|
16
|
+
"Prior versions (0.1.0–0.1.86) stay Apache-2.0 forever; the change applies only to 0.1.87+. See LICENSE and NOTICE.",
|
|
17
|
+
"No re-scan, no MCP restart, no behavior change. 586 tests unchanged.",
|
|
18
|
+
],
|
|
6
19
|
"0.1.86": [
|
|
7
20
|
"BETA-READINESS release (docs/PTB_BETA_READINESS_REPORT.md). Closes the two hard blockers a public beta would hit on day one — silent theme loss and a broken onboarding funnel — plus the FLOOR-CALIB verify false-pass and a four-item DX polish sweep.",
|
|
8
21
|
"FIX (E-19, multi-mode themes — the headline): Figma variable modes (e.g. Light/Dark) were silently FLATTENED to the first mode. A design system's entire dark theme vanished from tokens.css with no warning. Both token paths now preserve every mode: the model carries valuesByMode + collection modes, and the CSS emitter writes [data-theme=\"dark\"] override blocks (only for tokens that actually differ; aliases stay var() and cascade). Backward compatible — single-mode collections are unchanged. RE-SCAN (or re-import) and regenerate tokens to emit your non-default themes.",
|
|
9
22
|
"FIX (B-3, onboarding funnel): 'ptb init' ran 'storybook init', which fired an interactive builder prompt ('Vite / Webpack 5 / Rsbuild?') that non-interactively exited 0 without writing .storybook/ — leaving a 'storybook dev' script that fails, right before the verify step that NEEDS Storybook. init now pre-seeds vite (so the builder auto-detects and the prompt never fires), self-heals via PTB's own config writer if init still produces nothing, and 'ptb doctor' now flags a missing .storybook/main.* when docs.tool is storybook.",
|
|
10
23
|
"FIX (FLOOR-CALIB, verify): a blank scaffold on a visually-simple component still passed — its mostly-background frame scored high enough (ChipsWeb ≈ 0.26) to clear the veto AND lift the variant mean past 0.70, disabling the downgrade. A new content-area-aware signal (contentCoverage — the share of the reference's actual ink the impl reproduces) is immune to visual complexity; a token-driven pass reproducing almost none of the reference's content (coverage < 0.35) now downgrades to warn. Real-but-imperfect renders keep their pass.",
|
|
11
24
|
"FIX (DX polish): B-1 malformed token imports now name the exact failing path (collections[0].tokens[9].valuesByMode) instead of a generic 'does not match schema'. B-2 'generate-tokens' reads .ptb/imported-tokens.json directly so import → generate works without an intervening scan (no more 'import tokens first' right after importing). B-4 'ptb team' no longer prints 'undefined member(s)'. E-9 malformed hex colors (#GGGGGG) are skipped instead of emitted as invalid CSS.",
|
|
25
|
+
"SECURITY (audit §4 hardening, no vulnerabilities): SEC-5 — the CLI no longer ships its compiled tests (dist/__tests__) or any source maps; tarball dropped 288 KB/287 files → 181 KB/65 files. SEC-2 — telemetry now honours DO_NOT_TRACK=1 and CI=true (default remains opt-out); 'ptb telemetry' reports the override. SEC-3 — corrected the stale PostHog-key comment (real write-only key, safe to bundle).",
|
|
12
26
|
"Still deferred (by decision): NEW-8 payload size (~759 KB context JSON) — cost/latency only, not correctness.",
|
|
13
27
|
"RE-SCAN required to emit multi-mode themes (E-19) and to re-verify components under the tightened FLOOR-CALIB. Restart your IDE's MCP server for the verify verdict change.",
|
|
14
28
|
],
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SEC-2: honour the cross-tool opt-out conventions in addition to `ptb telemetry off`.
|
|
3
|
+
* `DO_NOT_TRACK=1` is the community standard (consoledonottrack.com); `CI=true` is
|
|
4
|
+
* set by every major CI provider — build agents should never be counted as users.
|
|
5
|
+
* Checked at send time so it works even before the consent file exists.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isTelemetryDisabledByEnv(): boolean;
|
|
1
8
|
/**
|
|
2
9
|
* Prints the opt-out notice exactly once — the first time any PTB command runs.
|
|
3
10
|
* Also creates the config file so subsequent runs are silent.
|
package/dist/utils/telemetry.js
CHANGED
|
@@ -2,10 +2,29 @@ import * as fs from "node:fs/promises";
|
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import * as crypto from "node:crypto";
|
|
5
|
-
//
|
|
6
|
-
//
|
|
5
|
+
// PostHog project capture key. This is a WRITE-ONLY key (publishable by design —
|
|
6
|
+
// it can only ingest events, never read them), so bundling it in a client that ships
|
|
7
|
+
// as readable JS is expected and safe. It is the real production key, not a
|
|
8
|
+
// placeholder. The only residual risk is event poisoning (anyone can read the key
|
|
9
|
+
// and send fake events), which is inherent to all client-side analytics — treat the
|
|
10
|
+
// data as untrusted-ish. Do NOT put any read/admin PostHog key here.
|
|
7
11
|
const POSTHOG_API_KEY = "phc_ygozWWRsEjNWaacxVHQP8wX2sBJ8dtob8tCDtKcEGD3u";
|
|
8
12
|
const POSTHOG_HOST = "https://us.i.posthog.com";
|
|
13
|
+
/**
|
|
14
|
+
* SEC-2: honour the cross-tool opt-out conventions in addition to `ptb telemetry off`.
|
|
15
|
+
* `DO_NOT_TRACK=1` is the community standard (consoledonottrack.com); `CI=true` is
|
|
16
|
+
* set by every major CI provider — build agents should never be counted as users.
|
|
17
|
+
* Checked at send time so it works even before the consent file exists.
|
|
18
|
+
*/
|
|
19
|
+
export function isTelemetryDisabledByEnv() {
|
|
20
|
+
const dnt = process.env["DO_NOT_TRACK"];
|
|
21
|
+
if (dnt && dnt !== "0" && dnt.toLowerCase() !== "false")
|
|
22
|
+
return true;
|
|
23
|
+
const ci = process.env["CI"];
|
|
24
|
+
if (ci && ci !== "0" && ci.toLowerCase() !== "false")
|
|
25
|
+
return true;
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
9
28
|
function getConfigPath() {
|
|
10
29
|
// macOS: use Application Support (~/Library is always user-writable)
|
|
11
30
|
// Linux/other: XDG_CONFIG_HOME or ~/.config
|
|
@@ -51,11 +70,15 @@ async function getOrCreate() {
|
|
|
51
70
|
* invocation — giving the user a real window to opt out before any data is sent.
|
|
52
71
|
*/
|
|
53
72
|
export async function showConsentIfNeeded() {
|
|
73
|
+
// SEC-2: when disabled by env, stay completely silent and don't persist a config —
|
|
74
|
+
// so unsetting DO_NOT_TRACK/CI later still surfaces the notice on a real first run.
|
|
75
|
+
if (isTelemetryDisabledByEnv())
|
|
76
|
+
return false;
|
|
54
77
|
const existing = await readConfig();
|
|
55
78
|
if (existing)
|
|
56
79
|
return false;
|
|
57
80
|
console.log("\n\x1b[90m Telemetry: PTB collects anonymous usage data (command names, version, OS) to improve the tool.\x1b[0m");
|
|
58
|
-
console.log("\x1b[90m No personal data. No file contents. No component names. Run \x1b[36mptb telemetry off\x1b[90m to opt out.\x1b[0m\n");
|
|
81
|
+
console.log("\x1b[90m No personal data. No file contents. No component names. Run \x1b[36mptb telemetry off\x1b[90m to opt out \x1b[90m(or set \x1b[36mDO_NOT_TRACK=1\x1b[90m).\x1b[0m\n");
|
|
59
82
|
await getOrCreate(); // persist config so the notice never shows again
|
|
60
83
|
return true; // first run — skip tracking this invocation
|
|
61
84
|
}
|
|
@@ -67,6 +90,8 @@ export async function track(event, properties = {}) {
|
|
|
67
90
|
try {
|
|
68
91
|
if (POSTHOG_API_KEY.startsWith("phc_REPLACE"))
|
|
69
92
|
return; // placeholder — not configured yet
|
|
93
|
+
if (isTelemetryDisabledByEnv())
|
|
94
|
+
return; // SEC-2: DO_NOT_TRACK / CI kill switch
|
|
70
95
|
const config = await getOrCreate();
|
|
71
96
|
if (!config.enabled)
|
|
72
97
|
return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calibrate-ds/cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "0.1.88",
|
|
4
|
+
"license": "FSL-1.1-MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
"ptb": "./dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"dist",
|
|
13
|
-
"
|
|
12
|
+
"dist/**/*.js",
|
|
13
|
+
"dist/**/*.d.ts",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE",
|
|
16
|
+
"NOTICE"
|
|
14
17
|
],
|
|
15
18
|
"description": "Calibrate — local-first design system compiler. Reads Figma files, normalizes them into a typed DesignSystemModel, and generates React components, design tokens, and AI-ready implementation prompts via MCP.",
|
|
16
19
|
"keywords": [
|
|
@@ -41,10 +44,10 @@
|
|
|
41
44
|
"commander": "^14.0.3",
|
|
42
45
|
"openai": "^6.34.0",
|
|
43
46
|
"zod": "^4.3.6",
|
|
44
|
-
"@calibrate-ds/core": "^0.1.
|
|
45
|
-
"@calibrate-ds/figma-client": "^0.1.
|
|
46
|
-
"@calibrate-ds/
|
|
47
|
-
"@calibrate-ds/
|
|
47
|
+
"@calibrate-ds/core": "^0.1.88",
|
|
48
|
+
"@calibrate-ds/figma-client": "^0.1.88",
|
|
49
|
+
"@calibrate-ds/generator-react": "^0.1.88",
|
|
50
|
+
"@calibrate-ds/shared-types": "^0.1.88"
|
|
48
51
|
},
|
|
49
52
|
"devDependencies": {
|
|
50
53
|
"@types/node": "^22.13.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-slug.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/component-slug.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { toComponentSlug, findComponentSlug } from "../utils/component-slug.js";
|
|
3
|
-
describe("toComponentSlug", () => {
|
|
4
|
-
it("lowercases and hyphenates spaces", () => {
|
|
5
|
-
expect(toComponentSlug("Button")).toBe("button");
|
|
6
|
-
expect(toComponentSlug("Notification Item")).toBe("notification-item");
|
|
7
|
-
});
|
|
8
|
-
it("collapses consecutive non-alphanumeric chars to a single hyphen", () => {
|
|
9
|
-
expect(toComponentSlug("Nav Arrow/Down")).toBe("nav-arrow-down");
|
|
10
|
-
});
|
|
11
|
-
it("strips leading and trailing hyphens", () => {
|
|
12
|
-
expect(toComponentSlug(" Button ")).toBe("button");
|
|
13
|
-
expect(toComponentSlug("-button-")).toBe("button");
|
|
14
|
-
});
|
|
15
|
-
it("handles already-slugged strings unchanged", () => {
|
|
16
|
-
expect(toComponentSlug("notification-item")).toBe("notification-item");
|
|
17
|
-
});
|
|
18
|
-
it("handles special characters", () => {
|
|
19
|
-
expect(toComponentSlug("Icon/Arrow.Up")).toBe("icon-arrow-up");
|
|
20
|
-
});
|
|
21
|
-
it("handles empty string", () => {
|
|
22
|
-
expect(toComponentSlug("")).toBe("");
|
|
23
|
-
});
|
|
24
|
-
it("handles numeric names", () => {
|
|
25
|
-
expect(toComponentSlug("H1 Heading")).toBe("h1-heading");
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
describe("findComponentSlug", () => {
|
|
29
|
-
const components = {
|
|
30
|
-
"button": { displayName: "Button" },
|
|
31
|
-
"notification-item": { displayName: "Notification Item" },
|
|
32
|
-
"nav-arrow-down": { displayName: "Nav Arrow Down" },
|
|
33
|
-
};
|
|
34
|
-
it("matches by exact slug key", () => {
|
|
35
|
-
expect(findComponentSlug("button", components)).toBe("button");
|
|
36
|
-
expect(findComponentSlug("notification-item", components)).toBe("notification-item");
|
|
37
|
-
});
|
|
38
|
-
it("matches by display name (case-insensitive)", () => {
|
|
39
|
-
expect(findComponentSlug("Button", components)).toBe("button");
|
|
40
|
-
expect(findComponentSlug("notification item", components)).toBe("notification-item");
|
|
41
|
-
expect(findComponentSlug("NOTIFICATION ITEM", components)).toBe("notification-item");
|
|
42
|
-
});
|
|
43
|
-
it("derives slug from name and matches", () => {
|
|
44
|
-
expect(findComponentSlug("Nav Arrow Down", components)).toBe("nav-arrow-down");
|
|
45
|
-
});
|
|
46
|
-
it("returns undefined for no match", () => {
|
|
47
|
-
expect(findComponentSlug("Tooltip", components)).toBeUndefined();
|
|
48
|
-
expect(findComponentSlug("", components)).toBeUndefined();
|
|
49
|
-
});
|
|
50
|
-
it("returns undefined for empty component map", () => {
|
|
51
|
-
expect(findComponentSlug("Button", {})).toBeUndefined();
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=component-slug.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-slug.test.js","sourceRoot":"","sources":["../../src/__tests__/component-slug.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEhF,Q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