@contentful/experience-design-system-cli 2.37.1-dev-build-12d812a6.0 → 2.37.1-dev-build-12711902.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/dist/app.js +10 -2
- package/dist/index.js +18 -2
- package/dist/package.json +1 -1
- package/dist/src/tui/user-agent.d.ts +5 -0
- package/legacy/package.json +1 -1
- package/package.json +4 -4
package/dist/app.js
CHANGED
|
@@ -4601,12 +4601,14 @@ var ApiClient = class {
|
|
|
4601
4601
|
spaceId;
|
|
4602
4602
|
environmentId;
|
|
4603
4603
|
retry;
|
|
4604
|
+
userAgent;
|
|
4604
4605
|
lastRequestId;
|
|
4605
4606
|
constructor(opts) {
|
|
4606
4607
|
this.host = toApiHost2(opts.host);
|
|
4607
4608
|
this.token = opts.cmaToken;
|
|
4608
4609
|
this.spaceId = opts.spaceId;
|
|
4609
4610
|
this.environmentId = opts.environmentId;
|
|
4611
|
+
this.userAgent = opts.userAgent ?? USER_AGENT;
|
|
4610
4612
|
const initialDelayMs = Math.max(0, opts.retry?.initialDelayMs ?? 250);
|
|
4611
4613
|
this.retry = {
|
|
4612
4614
|
maxAttempts: Math.max(1, Math.floor(opts.retry?.maxAttempts ?? 3)),
|
|
@@ -4627,7 +4629,7 @@ var ApiClient = class {
|
|
|
4627
4629
|
return {
|
|
4628
4630
|
Authorization: `Bearer ${this.token}`,
|
|
4629
4631
|
"Content-Type": "application/json",
|
|
4630
|
-
"X-Contentful-User-Agent":
|
|
4632
|
+
"X-Contentful-User-Agent": this.userAgent
|
|
4631
4633
|
};
|
|
4632
4634
|
}
|
|
4633
4635
|
async requestWithRetry(phase, errorPrefix, makeCall) {
|
|
@@ -5341,6 +5343,11 @@ function useCredentialsControls(handlers) {
|
|
|
5341
5343
|
});
|
|
5342
5344
|
}
|
|
5343
5345
|
|
|
5346
|
+
// packages/experience-design-system-cli/src/tui/user-agent.ts
|
|
5347
|
+
function cliUserAgent() {
|
|
5348
|
+
return buildUserAgent(readPackageVersion());
|
|
5349
|
+
}
|
|
5350
|
+
|
|
5344
5351
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/validate.ts
|
|
5345
5352
|
async function validateCredentials(values) {
|
|
5346
5353
|
const host = toApiHost2(values.host);
|
|
@@ -5348,7 +5355,8 @@ async function validateCredentials(values) {
|
|
|
5348
5355
|
host,
|
|
5349
5356
|
spaceId: values.spaceId,
|
|
5350
5357
|
environmentId: values.environmentId,
|
|
5351
|
-
cmaToken: values.cmaToken
|
|
5358
|
+
cmaToken: values.cmaToken,
|
|
5359
|
+
userAgent: cliUserAgent()
|
|
5352
5360
|
});
|
|
5353
5361
|
try {
|
|
5354
5362
|
await client2.validateToken();
|
package/dist/index.js
CHANGED
|
@@ -6191,12 +6191,14 @@ var init_api_client = __esm({
|
|
|
6191
6191
|
spaceId;
|
|
6192
6192
|
environmentId;
|
|
6193
6193
|
retry;
|
|
6194
|
+
userAgent;
|
|
6194
6195
|
lastRequestId;
|
|
6195
6196
|
constructor(opts) {
|
|
6196
6197
|
this.host = toApiHost2(opts.host);
|
|
6197
6198
|
this.token = opts.cmaToken;
|
|
6198
6199
|
this.spaceId = opts.spaceId;
|
|
6199
6200
|
this.environmentId = opts.environmentId;
|
|
6201
|
+
this.userAgent = opts.userAgent ?? USER_AGENT;
|
|
6200
6202
|
const initialDelayMs = Math.max(0, opts.retry?.initialDelayMs ?? 250);
|
|
6201
6203
|
this.retry = {
|
|
6202
6204
|
maxAttempts: Math.max(1, Math.floor(opts.retry?.maxAttempts ?? 3)),
|
|
@@ -6217,7 +6219,7 @@ var init_api_client = __esm({
|
|
|
6217
6219
|
return {
|
|
6218
6220
|
Authorization: `Bearer ${this.token}`,
|
|
6219
6221
|
"Content-Type": "application/json",
|
|
6220
|
-
"X-Contentful-User-Agent":
|
|
6222
|
+
"X-Contentful-User-Agent": this.userAgent
|
|
6221
6223
|
};
|
|
6222
6224
|
}
|
|
6223
6225
|
async requestWithRetry(phase, errorPrefix, makeCall) {
|
|
@@ -7575,6 +7577,18 @@ var init_controls4 = __esm({
|
|
|
7575
7577
|
}
|
|
7576
7578
|
});
|
|
7577
7579
|
|
|
7580
|
+
// packages/experience-design-system-cli/src/tui/user-agent.ts
|
|
7581
|
+
function cliUserAgent() {
|
|
7582
|
+
return buildUserAgent(readPackageVersion());
|
|
7583
|
+
}
|
|
7584
|
+
var init_user_agent = __esm({
|
|
7585
|
+
"packages/experience-design-system-cli/src/tui/user-agent.ts"() {
|
|
7586
|
+
"use strict";
|
|
7587
|
+
init_src3();
|
|
7588
|
+
init_version();
|
|
7589
|
+
}
|
|
7590
|
+
});
|
|
7591
|
+
|
|
7578
7592
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/validate.ts
|
|
7579
7593
|
async function validateCredentials(values) {
|
|
7580
7594
|
const host = toApiHost2(values.host);
|
|
@@ -7582,7 +7596,8 @@ async function validateCredentials(values) {
|
|
|
7582
7596
|
host,
|
|
7583
7597
|
spaceId: values.spaceId,
|
|
7584
7598
|
environmentId: values.environmentId,
|
|
7585
|
-
cmaToken: values.cmaToken
|
|
7599
|
+
cmaToken: values.cmaToken,
|
|
7600
|
+
userAgent: cliUserAgent()
|
|
7586
7601
|
});
|
|
7587
7602
|
try {
|
|
7588
7603
|
await client2.validateToken();
|
|
@@ -7605,6 +7620,7 @@ var init_validate4 = __esm({
|
|
|
7605
7620
|
"packages/experience-design-system-cli/src/tui/import/steps/04-credentials/validate.ts"() {
|
|
7606
7621
|
"use strict";
|
|
7607
7622
|
init_src3();
|
|
7623
|
+
init_user_agent();
|
|
7608
7624
|
}
|
|
7609
7625
|
});
|
|
7610
7626
|
|
package/dist/package.json
CHANGED
package/legacy/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.37.1-dev-build-
|
|
3
|
+
"version": "2.37.1-dev-build-12711902.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-
|
|
49
|
-
"@contentful/experience-design-system-
|
|
50
|
-
"@contentful/experience-design-system-
|
|
48
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-12711902.0",
|
|
49
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-12711902.0",
|
|
50
|
+
"@contentful/experience-design-system-generation": "2.37.1-dev-build-12711902.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@tsconfig/node24": "^24.0.4",
|