@contentful/experience-design-system-cli 2.5.2-dev-build-eebccad.0 → 2.5.3-dev-build-727fd69.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/dist/package.json +2 -1
- package/dist/src/apply/api-client.js +2 -6
- package/package.json +3 -2
- package/skills/generate-components.md +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Contentful GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3-dev-build-727fd69.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"bin": {
|
|
7
8
|
"experience-design-system-cli": "./bin/cli.js",
|
|
@@ -48,12 +48,8 @@ export class ImportApiClient {
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
async validateToken() {
|
|
51
|
-
// /users/me is the canonical
|
|
52
|
-
//
|
|
53
|
-
// doesn't false-positive 401 for tokens that are entitled to call import endpoints
|
|
54
|
-
// but lack the role assignments public CMA's SpacesController/EnvironmentsController
|
|
55
|
-
// require. Per-space/per-org authorization is enforced by the design-systems API itself
|
|
56
|
-
// on the actual preview/apply call.
|
|
51
|
+
// /users/me is the canonical token-validity endpoint — avoids space-membership
|
|
52
|
+
// false positives that don't apply to the design-systems API authorization path.
|
|
57
53
|
const url = `${this.host}/users/me`;
|
|
58
54
|
const res = await request(url, { token: this.token });
|
|
59
55
|
if (res.status === 401) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3-dev-build-727fd69.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"bin": {
|
|
7
8
|
"experience-design-system-cli": "./bin/cli.js",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"react-dom": "^18.3.1",
|
|
32
33
|
"ts-morph": "^27.0.2",
|
|
33
34
|
"typescript": "^5.9.3",
|
|
34
|
-
"@contentful/experience-design-system-types": "2.5.
|
|
35
|
+
"@contentful/experience-design-system-types": "2.5.3-dev-build-727fd69.0"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@tsconfig/node24": "^24.0.3",
|
|
@@ -109,7 +109,7 @@ Exactly **6** valid types:
|
|
|
109
109
|
| `token` | Design-token-linked prop — requires `token_kind` |
|
|
110
110
|
| `boolean` | Boolean toggle props (visible, disabled, enabled, etc.) |
|
|
111
111
|
|
|
112
|
-
> **IMPORTANT: No `number` type.** The
|
|
112
|
+
> **IMPORTANT: No `number` type.** The design-systems API only supports the `String` design property variant for numeric values. All numeric props must use `cdf_type: "string"` with the number as a string default (e.g. `"0"`, `"100"`). Boolean props can now use `cdf_type: "boolean"` directly.
|
|
113
113
|
|
|
114
114
|
> **Avoid `link` type for simple URL props.** Props named `href`, `url`, or holding plain URL strings → `cdf_type: "string"`, `cdf_category: "content"`. Reserve `link` for props that hold a reference to another Contentful entry.
|
|
115
115
|
|
|
@@ -337,7 +337,7 @@ Before emitting any tool calls, verify:
|
|
|
337
337
|
7. `required` values are JSON booleans, not strings
|
|
338
338
|
8. Framework internals (`ref`, event handlers, test IDs) are excluded — `className`, `style`, and `styles` are classified as `string` design props; discrete positional/geometric props (`top`, `bottom`, `left`, `right`, `rotation`, etc.) are also classified
|
|
339
339
|
9. No `cdf_type: "link"` used — `link` is reserved and rejected by the CLI parser
|
|
340
|
-
10. No `cdf_type: "number"` used — this is not a
|
|
340
|
+
10. No `cdf_type: "number"` used — this is not a supported type; use `"string"` with numeric defaults. `cdf_type: "boolean"` IS valid — use it for boolean toggle props.
|
|
341
341
|
|
|
342
342
|
After the run completes, the developer can validate the pipeline output with:
|
|
343
343
|
|