@uniformdev/cli 20.59.1 → 20.60.1

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.
@@ -19,6 +19,95 @@ import { dump, load } from "js-yaml";
19
19
  import { dirname, extname, isAbsolute, resolve, sep } from "path";
20
20
  import { fetch as undiciFetch, ProxyAgent } from "undici";
21
21
 
22
+ // package.json
23
+ var package_default = {
24
+ name: "@uniformdev/cli",
25
+ version: "20.60.1",
26
+ description: "Uniform command line interface tool",
27
+ license: "SEE LICENSE IN LICENSE.txt",
28
+ main: "./cli.js",
29
+ exports: {
30
+ ".": {
31
+ types: "./dist/index.d.mts",
32
+ default: "./cli.js"
33
+ },
34
+ "./config": {
35
+ types: "./dist/defaultConfig.d.mts",
36
+ default: "./dist/defaultConfig.mjs"
37
+ }
38
+ },
39
+ types: "./dist/index.d.mts",
40
+ sideEffects: false,
41
+ scripts: {
42
+ uniform: "node ./cli.js",
43
+ build: "tsc --noEmit && tsup",
44
+ dev: "tsup --watch",
45
+ clean: "rimraf dist",
46
+ test: "vitest run",
47
+ lint: 'eslint "src/**/*.{js,ts,tsx}"',
48
+ format: 'prettier --write "src/**/*.{js,ts,tsx}"'
49
+ },
50
+ dependencies: {
51
+ "@inquirer/prompts": "^7.10.1",
52
+ "@thi.ng/mime": "^2.2.23",
53
+ "@uniformdev/assets": "workspace:*",
54
+ "@uniformdev/canvas": "workspace:*",
55
+ "@uniformdev/context": "workspace:*",
56
+ "@uniformdev/files": "workspace:*",
57
+ "@uniformdev/project-map": "workspace:*",
58
+ "@uniformdev/redirect": "workspace:*",
59
+ "@uniformdev/richtext": "workspace:*",
60
+ "call-bind": "^1.0.2",
61
+ colorette: "2.0.20",
62
+ cosmiconfig: "9.0.0",
63
+ "cosmiconfig-typescript-loader": "5.0.0",
64
+ diff: "^5.0.0",
65
+ dotenv: "^16.4.7",
66
+ esbuild: "0.25.0",
67
+ execa: "5.1.1",
68
+ "file-type": "^20.0.0",
69
+ "fs-jetpack": "5.1.0",
70
+ graphql: "16.9.0",
71
+ "graphql-request": "6.1.0",
72
+ "image-size": "^1.2.1",
73
+ "isomorphic-git": "1.35.0",
74
+ "js-yaml": "^4.1.0",
75
+ jsonwebtoken: "9.0.3",
76
+ mitt: "^3.0.1",
77
+ "normalize-newline": "^4.1.0",
78
+ open: "10.2.0",
79
+ ora: "8.0.1",
80
+ "p-queue": "7.3.4",
81
+ "posthog-node": "5.28.5",
82
+ "registry-auth-token": "^5.0.0",
83
+ "registry-url": "^6.0.0",
84
+ slugify: "1.6.6",
85
+ svix: "^1.71.0",
86
+ undici: "^7.16.0",
87
+ yargs: "^17.6.2",
88
+ zod: "3.25.76"
89
+ },
90
+ devDependencies: {
91
+ "@types/diff": "5.0.9",
92
+ "@types/js-yaml": "4.0.9",
93
+ "@types/jsonwebtoken": "9.0.5",
94
+ "@types/node": "24.3.1",
95
+ "@types/yargs": "17.0.32"
96
+ },
97
+ bin: {
98
+ uniform: "./cli.js"
99
+ },
100
+ files: [
101
+ "/dist"
102
+ ],
103
+ publishConfig: {
104
+ access: "public"
105
+ }
106
+ };
107
+
108
+ // src/constants.ts
109
+ var CLI_USER_AGENT = `uniform-cli/${package_default.version}`;
110
+
22
111
  // src/sync/windowsRetry.ts
23
112
  var RETRIABLE_ERRORS = [
24
113
  "ECONNRESET",
@@ -117,6 +206,11 @@ function nodeFetchProxy(proxy, verbose) {
117
206
  console.log(`\u{1F991} Using proxy ${proxy}`);
118
207
  }
119
208
  const baseFetch = (input, init) => {
209
+ const initWithUserAgent = {
210
+ ...init,
211
+ headers: { "User-Agent": CLI_USER_AGENT, ...init?.headers }
212
+ };
213
+ init = initWithUserAgent;
120
214
  const handleFetchError = (e) => {
121
215
  if (e instanceof Error) {
122
216
  e.message = `Error fetching ${input.toString()}
@@ -370,6 +464,8 @@ var getDirectoryOrFilename = ({
370
464
 
371
465
  export {
372
466
  __require,
467
+ package_default,
468
+ CLI_USER_AGENT,
373
469
  withConfiguration,
374
470
  withApiOptions,
375
471
  withDebugOptions,
@@ -1,4 +1,4 @@
1
- import "./chunk-SRP5OQEZ.mjs";
1
+ import "./chunk-Q2OIQYWQ.mjs";
2
2
 
3
3
  // src/sync/allSerializableEntitiesConfig.ts
4
4
  var allSerializableEntitiesConfig = {
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ CLI_USER_AGENT,
3
4
  __require,
4
5
  applyDefaultSyncConfiguration,
5
6
  emitWithFormat,
@@ -7,6 +8,7 @@ import {
7
8
  getEntityOption,
8
9
  isPathAPackageFile,
9
10
  nodeFetchProxy,
11
+ package_default,
10
12
  paginateAsync,
11
13
  readFileToObject,
12
14
  withApiOptions,
@@ -16,7 +18,7 @@ import {
16
18
  withFormatOptions,
17
19
  withProjectOptions,
18
20
  withTeamOptions
19
- } from "./chunk-SRP5OQEZ.mjs";
21
+ } from "./chunk-Q2OIQYWQ.mjs";
20
22
 
21
23
  // src/index.ts
22
24
  import * as dotenv from "dotenv";
@@ -140,7 +142,7 @@ var createClient = (baseUrl, authToken) => {
140
142
  const request2 = async (path8, opts, allowedNon2xxStatusCodes = []) => {
141
143
  const res = await fetch(makeUrl(baseUrl, path8), {
142
144
  ...opts,
143
- headers: { Authorization: `Bearer ${authToken}` }
145
+ headers: { Authorization: `Bearer ${authToken}`, "User-Agent": CLI_USER_AGENT }
144
146
  });
145
147
  if (res.ok || allowedNon2xxStatusCodes.includes(res.status)) {
146
148
  return res;
@@ -1061,7 +1063,7 @@ var identitySchema = z2.object({
1061
1063
  });
1062
1064
  var getUserInfo = async (baseUrl, authToken, subject) => {
1063
1065
  try {
1064
- const headers = { Authorization: `Bearer ${authToken}` };
1066
+ const headers = { Authorization: `Bearer ${authToken}`, "User-Agent": CLI_USER_AGENT };
1065
1067
  const projectClient = new ProjectClient({ apiHost: baseUrl, bearerToken: authToken });
1066
1068
  const [identityRes, projectsRes] = await Promise.all([
1067
1069
  request(makeUrl(baseUrl, "/v1/graphql"), identityQuery, { subject }, headers),
@@ -1103,94 +1105,6 @@ async function fetchUserAndEnsureFirstTeamExists({
1103
1105
  // src/telemetry/telemetry.ts
1104
1106
  import crypto from "crypto";
1105
1107
  import { PostHog } from "posthog-node";
1106
-
1107
- // package.json
1108
- var package_default = {
1109
- name: "@uniformdev/cli",
1110
- version: "20.59.1",
1111
- description: "Uniform command line interface tool",
1112
- license: "SEE LICENSE IN LICENSE.txt",
1113
- main: "./cli.js",
1114
- exports: {
1115
- ".": {
1116
- types: "./dist/index.d.mts",
1117
- default: "./cli.js"
1118
- },
1119
- "./config": {
1120
- types: "./dist/defaultConfig.d.mts",
1121
- default: "./dist/defaultConfig.mjs"
1122
- }
1123
- },
1124
- types: "./dist/index.d.mts",
1125
- sideEffects: false,
1126
- scripts: {
1127
- uniform: "node ./cli.js",
1128
- build: "tsc --noEmit && tsup",
1129
- dev: "tsup --watch",
1130
- clean: "rimraf dist",
1131
- test: "vitest run",
1132
- lint: 'eslint "src/**/*.{js,ts,tsx}"',
1133
- format: 'prettier --write "src/**/*.{js,ts,tsx}"'
1134
- },
1135
- dependencies: {
1136
- "@inquirer/prompts": "^7.10.1",
1137
- "@thi.ng/mime": "^2.2.23",
1138
- "@uniformdev/assets": "workspace:*",
1139
- "@uniformdev/canvas": "workspace:*",
1140
- "@uniformdev/context": "workspace:*",
1141
- "@uniformdev/files": "workspace:*",
1142
- "@uniformdev/project-map": "workspace:*",
1143
- "@uniformdev/redirect": "workspace:*",
1144
- "@uniformdev/richtext": "workspace:*",
1145
- "call-bind": "^1.0.2",
1146
- colorette: "2.0.20",
1147
- cosmiconfig: "9.0.0",
1148
- "cosmiconfig-typescript-loader": "5.0.0",
1149
- diff: "^5.0.0",
1150
- dotenv: "^16.4.7",
1151
- esbuild: "0.25.0",
1152
- execa: "5.1.1",
1153
- "file-type": "^20.0.0",
1154
- "fs-jetpack": "5.1.0",
1155
- graphql: "16.9.0",
1156
- "graphql-request": "6.1.0",
1157
- "image-size": "^1.2.1",
1158
- "isomorphic-git": "1.35.0",
1159
- "js-yaml": "^4.1.0",
1160
- jsonwebtoken: "9.0.3",
1161
- mitt: "^3.0.1",
1162
- "normalize-newline": "^4.1.0",
1163
- open: "10.2.0",
1164
- ora: "8.0.1",
1165
- "p-queue": "7.3.4",
1166
- "posthog-node": "5.28.5",
1167
- "registry-auth-token": "^5.0.0",
1168
- "registry-url": "^6.0.0",
1169
- slugify: "1.6.6",
1170
- svix: "^1.71.0",
1171
- undici: "^7.16.0",
1172
- yargs: "^17.6.2",
1173
- zod: "3.25.76"
1174
- },
1175
- devDependencies: {
1176
- "@types/diff": "5.0.9",
1177
- "@types/js-yaml": "4.0.9",
1178
- "@types/jsonwebtoken": "9.0.5",
1179
- "@types/node": "24.3.1",
1180
- "@types/yargs": "17.0.32"
1181
- },
1182
- bin: {
1183
- uniform: "./cli.js"
1184
- },
1185
- files: [
1186
- "/dist"
1187
- ],
1188
- publishConfig: {
1189
- access: "public"
1190
- }
1191
- };
1192
-
1193
- // src/telemetry/telemetry.ts
1194
1108
  var POSTHOG_WRITE_ONLY_KEY = "phc_c8YoKI9984KOHBfNrCRfIKvL56aYd5OpYxOdYexRzH7";
1195
1109
  var Telemetry = class {
1196
1110
  constructor(prefix, disable = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "20.59.1",
3
+ "version": "20.60.1",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -28,13 +28,13 @@
28
28
  "dependencies": {
29
29
  "@inquirer/prompts": "^7.10.1",
30
30
  "@thi.ng/mime": "^2.2.23",
31
- "@uniformdev/assets": "20.59.1",
32
- "@uniformdev/canvas": "20.59.1",
33
- "@uniformdev/context": "20.59.1",
34
- "@uniformdev/files": "20.59.1",
35
- "@uniformdev/project-map": "20.59.1",
36
- "@uniformdev/redirect": "20.59.1",
37
- "@uniformdev/richtext": "20.59.1",
31
+ "@uniformdev/assets": "20.60.1",
32
+ "@uniformdev/canvas": "20.60.1",
33
+ "@uniformdev/context": "20.60.1",
34
+ "@uniformdev/files": "20.60.1",
35
+ "@uniformdev/project-map": "20.60.1",
36
+ "@uniformdev/redirect": "20.60.1",
37
+ "@uniformdev/richtext": "20.60.1",
38
38
  "call-bind": "^1.0.2",
39
39
  "colorette": "2.0.20",
40
40
  "cosmiconfig": "9.0.0",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "c373fe4a7fa491894a70b5529281db08696e8231"
84
+ "gitHead": "57c08725684e9ae947f51ebbce85d3331df5e8b9"
85
85
  }