@contentful/experience-design-system-cli 2.13.1-dev-build-7ded064.0 → 2.13.1-dev-build-544cc3f.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/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_API_HOST, toApiHost } from '../host-utils.js';
|
|
2
2
|
import { getDebugLogger } from '../lib/debug-logger.js';
|
|
3
|
-
import { buildUserAgent } from '../lib/user-agent.js';
|
|
4
3
|
export const DEFAULT_HOST = DEFAULT_API_HOST;
|
|
5
4
|
// Phase-prefix constants used at the two ApiError throw sites below and
|
|
6
5
|
// imported by orchestrator.ts to identify preview-phase 422s for retry.
|
|
@@ -87,7 +86,6 @@ async function request(url, options) {
|
|
|
87
86
|
const headers = {
|
|
88
87
|
Authorization: `Bearer ${options.token}`,
|
|
89
88
|
'Content-Type': 'application/json',
|
|
90
|
-
'X-Contentful-User-Agent': buildUserAgent(),
|
|
91
89
|
};
|
|
92
90
|
const init = {
|
|
93
91
|
method: options.method ?? 'GET',
|
|
@@ -115,7 +113,6 @@ export class ImportApiClient {
|
|
|
115
113
|
return {
|
|
116
114
|
Authorization: `Bearer ${this.token}`,
|
|
117
115
|
'Content-Type': 'application/json',
|
|
118
|
-
'X-Contentful-User-Agent': buildUserAgent(),
|
|
119
116
|
};
|
|
120
117
|
}
|
|
121
118
|
async validateToken() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.13.1-dev-build-
|
|
3
|
+
"version": "2.13.1-dev-build-544cc3f.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"react": "^18.3.1",
|
|
34
34
|
"react-devtools-core": "^4.19.1",
|
|
35
35
|
"react-dom": "^18.3.1",
|
|
36
|
-
"@contentful/experience-design-system-extraction": "2.13.1-dev-build-
|
|
37
|
-
"@contentful/experience-design-system-types": "2.13.1-dev-build-
|
|
36
|
+
"@contentful/experience-design-system-extraction": "2.13.1-dev-build-544cc3f.0",
|
|
37
|
+
"@contentful/experience-design-system-types": "2.13.1-dev-build-544cc3f.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@tsconfig/node24": "^24.0.3",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* X-Contentful-User-Agent for the CLI's CMA requests, so writes are
|
|
3
|
-
* attributable to the DSI CLI as their origin. Format follows CEP-0056:
|
|
4
|
-
* `app <name>/<ver>; platform node.js/<ver>; os <name>/<ver>;`. Carries only
|
|
5
|
-
* the app/platform/os segments — no user- or content-identifying data.
|
|
6
|
-
*/
|
|
7
|
-
export declare function buildUserAgent(version?: string): string;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
const require = createRequire(import.meta.url);
|
|
3
|
-
const pkg = require('../../package.json');
|
|
4
|
-
const APP = 'contentful.experience-design-system-cli';
|
|
5
|
-
// process.platform → CEP-0056 os name, mirroring contentful-sdk-core's
|
|
6
|
-
// getNodeOS so the header parses identically to SDK-originated traffic.
|
|
7
|
-
const OS_NAMES = {
|
|
8
|
-
android: 'Android',
|
|
9
|
-
aix: 'Linux',
|
|
10
|
-
darwin: 'macOS',
|
|
11
|
-
freebsd: 'Linux',
|
|
12
|
-
linux: 'Linux',
|
|
13
|
-
openbsd: 'Linux',
|
|
14
|
-
sunos: 'Linux',
|
|
15
|
-
win32: 'Windows',
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* X-Contentful-User-Agent for the CLI's CMA requests, so writes are
|
|
19
|
-
* attributable to the DSI CLI as their origin. Format follows CEP-0056:
|
|
20
|
-
* `app <name>/<ver>; platform node.js/<ver>; os <name>/<ver>;`. Carries only
|
|
21
|
-
* the app/platform/os segments — no user- or content-identifying data.
|
|
22
|
-
*/
|
|
23
|
-
export function buildUserAgent(version = pkg.version) {
|
|
24
|
-
const parts = [`app ${APP}/${version}`, `platform node.js/${process.version}`];
|
|
25
|
-
const os = OS_NAMES[process.platform];
|
|
26
|
-
if (os)
|
|
27
|
-
parts.push(`os ${os}/${process.version}`);
|
|
28
|
-
return `${parts.join('; ')};`;
|
|
29
|
-
}
|