@sanity/cli 8.6.0 → 8.8.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.
Files changed (103) hide show
  1. package/README.md +918 -40
  2. package/dist/actions/api/distillApiRoutes.js +1 -1
  3. package/dist/actions/api/distillApiRoutes.js.map +1 -1
  4. package/dist/actions/api/resolveEndpoint.js +1 -1
  5. package/dist/actions/api/resolveEndpoint.js.map +1 -1
  6. package/dist/actions/backup/archiveDir.js +7 -3
  7. package/dist/actions/backup/archiveDir.js.map +1 -1
  8. package/dist/actions/context/resolveOrganizationId.js +17 -0
  9. package/dist/actions/context/resolveOrganizationId.js.map +1 -0
  10. package/dist/actions/context/waitForJob.js +24 -0
  11. package/dist/actions/context/waitForJob.js.map +1 -0
  12. package/dist/actions/context/watchJob.js +32 -0
  13. package/dist/actions/context/watchJob.js.map +1 -0
  14. package/dist/actions/deploy/deployApp.js +6 -6
  15. package/dist/actions/deploy/deployApp.js.map +1 -1
  16. package/dist/actions/deploy/deployStudio.js +6 -6
  17. package/dist/actions/deploy/deployStudio.js.map +1 -1
  18. package/dist/actions/exec/execScript.js +6 -18
  19. package/dist/actions/exec/execScript.js.map +1 -1
  20. package/dist/actions/exec/runScript.worker.js +21 -0
  21. package/dist/actions/exec/runScript.worker.js.map +1 -0
  22. package/dist/actions/init/initAction.js +1 -1
  23. package/dist/actions/init/initAction.js.map +1 -1
  24. package/dist/actions/media/importMedia.js +4 -2
  25. package/dist/actions/media/importMedia.js.map +1 -1
  26. package/dist/commands/backups/download.js +8 -17
  27. package/dist/commands/backups/download.js.map +1 -1
  28. package/dist/commands/backups/list.js +1 -1
  29. package/dist/commands/backups/list.js.map +1 -1
  30. package/dist/commands/context/build.js +111 -0
  31. package/dist/commands/context/build.js.map +1 -0
  32. package/dist/commands/context/create.js +106 -0
  33. package/dist/commands/context/create.js.map +1 -0
  34. package/dist/commands/context/delete.js +68 -0
  35. package/dist/commands/context/delete.js.map +1 -0
  36. package/dist/commands/context/get.js +95 -0
  37. package/dist/commands/context/get.js.map +1 -0
  38. package/dist/commands/context/imports/create.js +270 -0
  39. package/dist/commands/context/imports/create.js.map +1 -0
  40. package/dist/commands/context/imports/delete.js +73 -0
  41. package/dist/commands/context/imports/delete.js.map +1 -0
  42. package/dist/commands/context/imports/download.js +65 -0
  43. package/dist/commands/context/imports/download.js.map +1 -0
  44. package/dist/commands/context/imports/get.js +93 -0
  45. package/dist/commands/context/imports/get.js.map +1 -0
  46. package/dist/commands/context/imports/list.js +105 -0
  47. package/dist/commands/context/imports/list.js.map +1 -0
  48. package/dist/commands/context/jobs/get.js +90 -0
  49. package/dist/commands/context/jobs/get.js.map +1 -0
  50. package/dist/commands/context/list.js +109 -0
  51. package/dist/commands/context/list.js.map +1 -0
  52. package/dist/commands/context/refresh.js +46 -0
  53. package/dist/commands/context/refresh.js.map +1 -0
  54. package/dist/commands/context/update.js +127 -0
  55. package/dist/commands/context/update.js.map +1 -0
  56. package/dist/commands/datasets/alias/delete.js +4 -9
  57. package/dist/commands/datasets/alias/delete.js.map +1 -1
  58. package/dist/commands/datasets/alias/unlink.js +4 -9
  59. package/dist/commands/datasets/alias/unlink.js.map +1 -1
  60. package/dist/commands/datasets/copy.js +1 -1
  61. package/dist/commands/datasets/copy.js.map +1 -1
  62. package/dist/commands/datasets/delete.js +4 -9
  63. package/dist/commands/datasets/delete.js.map +1 -1
  64. package/dist/commands/graphql/undeploy.js +4 -9
  65. package/dist/commands/graphql/undeploy.js.map +1 -1
  66. package/dist/commands/init.js +1 -1
  67. package/dist/commands/init.js.map +1 -1
  68. package/dist/commands/media/create-aspect.js +5 -6
  69. package/dist/commands/media/create-aspect.js.map +1 -1
  70. package/dist/commands/media/delete-aspect.js +7 -23
  71. package/dist/commands/media/delete-aspect.js.map +1 -1
  72. package/dist/commands/media/deploy-aspect.js +4 -9
  73. package/dist/commands/media/deploy-aspect.js.map +1 -1
  74. package/dist/commands/media/export.js +3 -7
  75. package/dist/commands/media/export.js.map +1 -1
  76. package/dist/commands/media/import.js +3 -7
  77. package/dist/commands/media/import.js.map +1 -1
  78. package/dist/commands/organizations/create.js +4 -9
  79. package/dist/commands/organizations/create.js.map +1 -1
  80. package/dist/commands/schemas/delete.js +3 -8
  81. package/dist/commands/schemas/delete.js.map +1 -1
  82. package/dist/commands/tokens/delete.js +4 -7
  83. package/dist/commands/tokens/delete.js.map +1 -1
  84. package/dist/commands/users/invite.js +8 -18
  85. package/dist/commands/users/invite.js.map +1 -1
  86. package/dist/exports/index.js +1 -1
  87. package/dist/exports/index.js.map +1 -1
  88. package/dist/exports/invokeSanityCli/commandPolicies/mcpPolicy.js +18 -0
  89. package/dist/exports/invokeSanityCli/commandPolicies/mcpPolicy.js.map +1 -1
  90. package/dist/generated/apiRoutes.js +11 -9
  91. package/dist/generated/apiRoutes.js.map +1 -1
  92. package/dist/prompts/promptForOrganization.js +19 -0
  93. package/dist/prompts/promptForOrganization.js.map +1 -0
  94. package/dist/services/context.js +132 -0
  95. package/dist/services/context.js.map +1 -0
  96. package/dist/util/extractDocumentsFromNdjsonOrTarball.js.map +1 -1
  97. package/dist/util/sharedFlags.js +24 -0
  98. package/dist/util/sharedFlags.js.map +1 -1
  99. package/oclif.config.js +1 -0
  100. package/oclif.manifest.json +1931 -1133
  101. package/package.json +20 -26
  102. package/dist/util/dates.js +0 -125
  103. package/dist/util/dates.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "8.6.0",
3
+ "version": "8.8.0",
4
4
  "description": "Sanity CLI tool for managing Sanity projects and organizations",
5
5
  "keywords": [
6
6
  "cli",
@@ -62,27 +62,30 @@
62
62
  "@oclif/core": "^4.11.14",
63
63
  "@oclif/plugin-help": "^6.2.53",
64
64
  "@oclif/plugin-not-found": "^3.2.88",
65
+ "@sanity/cli-build": "^6.3.0",
66
+ "@sanity/cli-core": "^3.6.1",
65
67
  "@sanity/client": "^8.4.0",
66
68
  "@sanity/codegen": "^8.0.0",
67
69
  "@sanity/descriptors": "^1.3.0",
68
- "@sanity/export": "^6.2.0",
70
+ "@sanity/export": "^6.2.1",
69
71
  "@sanity/generate-help-url": "^4.0.0",
70
72
  "@sanity/id-utils": "^1.0.0",
71
73
  "@sanity/import": "^6.0.4",
72
74
  "@sanity/migrate": "^8.0.2",
73
- "@sanity/runtime-cli": "^17.4.0",
74
- "@sanity/schema": "^6.7.0",
75
+ "@sanity/runtime-cli": "^17.11.1",
76
+ "@sanity/schema": "^6.12.0",
75
77
  "@sanity/telemetry": "^1.1.0",
76
- "@sanity/template-validator": "^3.1.0",
77
- "@sanity/types": "^6.7.0",
78
+ "@sanity/template-validator": "^3.1.1",
79
+ "@sanity/types": "^6.12.0",
80
+ "@sanity/workbench-cli": "^2.4.0",
78
81
  "@sanity/worker-channels": "^2.0.0",
79
- "@sanity/workflow-cli": "0.30.0",
80
- "@sanity/workflow-engine": "0.30.0",
82
+ "@sanity/workflow-cli": "0.31.0",
83
+ "@sanity/workflow-engine": "0.31.0",
81
84
  "@vercel/frameworks": "3.29.0",
82
85
  "chokidar": "^5.0.0",
83
86
  "console-table-printer": "^2.15.0",
84
87
  "eventsource": "^4.1.1",
85
- "execa": "^9.6.0",
88
+ "execa": "^10.0.1",
86
89
  "form-data": "^4.0.5",
87
90
  "get-latest-version": "^6.0.1",
88
91
  "groq-js": "^2.0.0",
@@ -102,8 +105,6 @@
102
105
  "pluralize-esm": "^9.0.5",
103
106
  "pretty-ms": "^9.3.0",
104
107
  "promise-props-recursive": "^2.0.2",
105
- "react": "^19.2.7",
106
- "react-dom": "^19.2.7",
107
108
  "rxjs": "^7.8.2",
108
109
  "semver": "^7.8.1",
109
110
  "skills": "^1.5.9",
@@ -111,22 +112,21 @@
111
112
  "string-argv": "^0.3.2",
112
113
  "string-width": "^7.2.0",
113
114
  "tar": "^7.5.18",
114
- "tar-fs": "^3.1.2",
115
115
  "tar-stream": "^3.2.0",
116
116
  "tinyglobby": "^0.2.17",
117
- "tsx": "^4.23.12",
118
117
  "typeid-js": "^1.2.0",
119
118
  "vite": "^8.2.2",
120
119
  "which": "^6.0.1",
121
120
  "wrap-ansi": "^9.0.2",
122
121
  "yaml": "^2.9.0",
123
- "zod": "^4.4.3",
124
- "@sanity/cli-build": "^6.1.0",
125
- "@sanity/cli-core": "^3.5.1",
126
- "@sanity/workbench-cli": "^2.2.4"
122
+ "zod": "^4.5.2"
127
123
  },
128
124
  "devDependencies": {
129
125
  "@eslint/compat": "^2.1.0",
126
+ "@repo/package.config": "0.0.1",
127
+ "@repo/tsconfig": "3.70.0",
128
+ "@sanity/cli-test": "16.0.1",
129
+ "@sanity/eslint-config-cli": "1.1.3",
130
130
  "@sanity/pkg-utils": "^12.3.4",
131
131
  "@swc/cli": "^0.8.1",
132
132
  "@swc/core": "^1.15.43",
@@ -136,10 +136,7 @@
136
136
  "@types/minimist": "^1.2.5",
137
137
  "@types/node": "^22.20.0",
138
138
  "@types/picomatch": "^4.0.3",
139
- "@types/react": "^19.2.17",
140
- "@types/react-dom": "^19.2.3",
141
139
  "@types/semver": "^7.7.1",
142
- "@types/tar-fs": "^2.0.4",
143
140
  "@types/tar-stream": "^3.1.4",
144
141
  "@types/which": "^3.0.4",
145
142
  "@vitest/coverage-istanbul": "^4.1.11",
@@ -152,13 +149,10 @@
152
149
  "oxc-transform-react": "^0.147.0",
153
150
  "publint": "^0.3.21",
154
151
  "rimraf": "^6.0.1",
155
- "sanity": "^6.7.0",
152
+ "sanity": "^6.11.0",
153
+ "tsx": "^4.23.12",
156
154
  "typescript": "^6.0.3",
157
- "vitest": "^4.1.11",
158
- "@repo/tsconfig": "3.70.0",
159
- "@repo/package.config": "0.0.1",
160
- "@sanity/cli-test": "15.1.0",
161
- "@sanity/eslint-config-cli": "1.1.3"
155
+ "vitest": "^4.1.11"
162
156
  },
163
157
  "peerDependencies": {
164
158
  "babel-plugin-react-compiler": "*",
@@ -1,125 +0,0 @@
1
- import { pluralize } from './pluralize.js';
2
- const MS_IN = {
3
- day: 86_400_000,
4
- hour: 3_600_000,
5
- minute: 60_000,
6
- month: 2_592_000_000,
7
- second: 1000,
8
- week: 604_800_000,
9
- year: 31_536_000_000
10
- };
11
- /** Largest unit first, so the first unit the duration fills is the one we report. */ const UNITS = [
12
- {
13
- ms: MS_IN.year,
14
- unit: 'year'
15
- },
16
- {
17
- ms: MS_IN.month,
18
- unit: 'month'
19
- },
20
- {
21
- ms: MS_IN.week,
22
- unit: 'week'
23
- },
24
- {
25
- ms: MS_IN.day,
26
- unit: 'day'
27
- },
28
- {
29
- ms: MS_IN.hour,
30
- unit: 'hour'
31
- },
32
- {
33
- ms: MS_IN.minute,
34
- unit: 'minute'
35
- },
36
- {
37
- ms: MS_IN.second,
38
- unit: 'second'
39
- }
40
- ];
41
- const relativeTime = new Intl.RelativeTimeFormat('en', {
42
- numeric: 'always'
43
- });
44
- const DATE_ONLY_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/;
45
- function pad(value, length = 2) {
46
- return String(value).padStart(length, '0');
47
- }
48
- /**
49
- * Returns the coarsest unit the elapsed time fills and the rounded number of those
50
- * units, or `undefined` below a second.
51
- *
52
- * Rounding can land the value on the boundary of the next unit up, so we promote
53
- * rather than report `60 minutes` where `1 hour` is meant. Units aren't all whole
54
- * multiples of each other, so the boundary is the rounded count we'd display, which
55
- * is why 25+ days reads as `1 month` rather than `4 weeks`.
56
- */ function selectUnit(elapsed) {
57
- let index = UNITS.findIndex(({ ms })=>elapsed >= ms);
58
- if (index === -1) return undefined;
59
- while(index > 0 && Math.round(elapsed / UNITS[index].ms) >= Math.round(UNITS[index - 1].ms / UNITS[index].ms)){
60
- index -= 1;
61
- }
62
- const { ms, unit } = UNITS[index];
63
- return {
64
- unit,
65
- value: Math.round(elapsed / ms)
66
- };
67
- }
68
- /**
69
- * Formats a timestamp as `YYYY-MM-DD HH:mm:ss` in the local time zone. Unparseable
70
- * timestamps are returned as-is, so a bad value from the API doesn't fail the command.
71
- *
72
- * @param timestamp - An ISO 8601 timestamp
73
- * @internal
74
- */ export function formatDateTime(timestamp) {
75
- const date = new Date(timestamp);
76
- if (!Number.isFinite(date.getTime())) return timestamp;
77
- const day = `${pad(date.getFullYear(), 4)}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
78
- const time = `${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
79
- return `${day} ${time}`;
80
- }
81
- /**
82
- * Formats a duration in milliseconds as an approximate, human readable length of
83
- * time, eg `less than a minute`, `5 minutes` or `2 days`.
84
- *
85
- * @param ms - The duration in milliseconds
86
- * @internal
87
- */ export function formatDuration(ms) {
88
- if (!Number.isFinite(ms)) return '';
89
- const selected = selectUnit(Math.abs(ms));
90
- if (!selected || selected.unit === 'second') return 'less than a minute';
91
- return `${selected.value} ${pluralize(selected.unit, selected.value)}`;
92
- }
93
- /**
94
- * Formats a date relative to now, eg `2 days ago` or `in 3 hours`.
95
- *
96
- * @param date - The date to describe
97
- * @param now - The reference point to compare against, defaults to the current time
98
- * @internal
99
- */ export function formatTimeAgo(date, now = Date.now()) {
100
- const delta = date.getTime() - now;
101
- if (!Number.isFinite(delta)) return '';
102
- const selected = selectUnit(Math.abs(delta));
103
- if (!selected) return 'just now';
104
- return relativeTime.format(delta < 0 ? -selected.value : selected.value, selected.unit);
105
- }
106
- /**
107
- * Parses a `YYYY-MM-DD` date into a `Date` at local midnight. Returns `undefined`
108
- * for anything that isn't a real calendar date in that exact format.
109
- *
110
- * @param value - The date string to parse
111
- * @internal
112
- */ export function parseDateOnly(value) {
113
- const match = DATE_ONLY_PATTERN.exec(value);
114
- if (!match) return undefined;
115
- const year = Number(match[1]);
116
- const month = Number(match[2]);
117
- const day = Number(match[3]);
118
- const date = new Date(year, month - 1, day);
119
- // `new Date(2024, 1, 31)` silently rolls over into March, so reject anything
120
- // that didn't survive the round trip
121
- const isRoundTrip = date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day;
122
- return isRoundTrip ? date : undefined;
123
- }
124
-
125
- //# sourceMappingURL=dates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/util/dates.ts"],"sourcesContent":["import {pluralize} from './pluralize.js'\n\nconst MS_IN = {\n day: 86_400_000,\n hour: 3_600_000,\n minute: 60_000,\n month: 2_592_000_000, // 30 days\n second: 1000,\n week: 604_800_000,\n year: 31_536_000_000, // 365 days\n} as const\n\n/** Largest unit first, so the first unit the duration fills is the one we report. */\nconst UNITS: {ms: number; unit: Intl.RelativeTimeFormatUnit}[] = [\n {ms: MS_IN.year, unit: 'year'},\n {ms: MS_IN.month, unit: 'month'},\n {ms: MS_IN.week, unit: 'week'},\n {ms: MS_IN.day, unit: 'day'},\n {ms: MS_IN.hour, unit: 'hour'},\n {ms: MS_IN.minute, unit: 'minute'},\n {ms: MS_IN.second, unit: 'second'},\n]\n\nconst relativeTime = new Intl.RelativeTimeFormat('en', {numeric: 'always'})\n\nconst DATE_ONLY_PATTERN = /^(\\d{4})-(\\d{2})-(\\d{2})$/\n\nfunction pad(value: number, length = 2): string {\n return String(value).padStart(length, '0')\n}\n\n/**\n * Returns the coarsest unit the elapsed time fills and the rounded number of those\n * units, or `undefined` below a second.\n *\n * Rounding can land the value on the boundary of the next unit up, so we promote\n * rather than report `60 minutes` where `1 hour` is meant. Units aren't all whole\n * multiples of each other, so the boundary is the rounded count we'd display, which\n * is why 25+ days reads as `1 month` rather than `4 weeks`.\n */\nfunction selectUnit(\n elapsed: number,\n): {unit: Intl.RelativeTimeFormatUnit; value: number} | undefined {\n let index = UNITS.findIndex(({ms}) => elapsed >= ms)\n if (index === -1) return undefined\n\n while (\n index > 0 &&\n Math.round(elapsed / UNITS[index].ms) >= Math.round(UNITS[index - 1].ms / UNITS[index].ms)\n ) {\n index -= 1\n }\n\n const {ms, unit} = UNITS[index]\n return {unit, value: Math.round(elapsed / ms)}\n}\n\n/**\n * Formats a timestamp as `YYYY-MM-DD HH:mm:ss` in the local time zone. Unparseable\n * timestamps are returned as-is, so a bad value from the API doesn't fail the command.\n *\n * @param timestamp - An ISO 8601 timestamp\n * @internal\n */\nexport function formatDateTime(timestamp: string): string {\n const date = new Date(timestamp)\n if (!Number.isFinite(date.getTime())) return timestamp\n\n const day = `${pad(date.getFullYear(), 4)}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`\n const time = `${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`\n return `${day} ${time}`\n}\n\n/**\n * Formats a duration in milliseconds as an approximate, human readable length of\n * time, eg `less than a minute`, `5 minutes` or `2 days`.\n *\n * @param ms - The duration in milliseconds\n * @internal\n */\nexport function formatDuration(ms: number): string {\n if (!Number.isFinite(ms)) return ''\n\n const selected = selectUnit(Math.abs(ms))\n if (!selected || selected.unit === 'second') return 'less than a minute'\n\n return `${selected.value} ${pluralize(selected.unit, selected.value)}`\n}\n\n/**\n * Formats a date relative to now, eg `2 days ago` or `in 3 hours`.\n *\n * @param date - The date to describe\n * @param now - The reference point to compare against, defaults to the current time\n * @internal\n */\nexport function formatTimeAgo(date: Date, now: number = Date.now()): string {\n const delta = date.getTime() - now\n if (!Number.isFinite(delta)) return ''\n\n const selected = selectUnit(Math.abs(delta))\n if (!selected) return 'just now'\n\n return relativeTime.format(delta < 0 ? -selected.value : selected.value, selected.unit)\n}\n\n/**\n * Parses a `YYYY-MM-DD` date into a `Date` at local midnight. Returns `undefined`\n * for anything that isn't a real calendar date in that exact format.\n *\n * @param value - The date string to parse\n * @internal\n */\nexport function parseDateOnly(value: string): Date | undefined {\n const match = DATE_ONLY_PATTERN.exec(value)\n if (!match) return undefined\n\n const year = Number(match[1])\n const month = Number(match[2])\n const day = Number(match[3])\n const date = new Date(year, month - 1, day)\n\n // `new Date(2024, 1, 31)` silently rolls over into March, so reject anything\n // that didn't survive the round trip\n const isRoundTrip =\n date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day\n\n return isRoundTrip ? date : undefined\n}\n"],"names":["pluralize","MS_IN","day","hour","minute","month","second","week","year","UNITS","ms","unit","relativeTime","Intl","RelativeTimeFormat","numeric","DATE_ONLY_PATTERN","pad","value","length","String","padStart","selectUnit","elapsed","index","findIndex","undefined","Math","round","formatDateTime","timestamp","date","Date","Number","isFinite","getTime","getFullYear","getMonth","getDate","time","getHours","getMinutes","getSeconds","formatDuration","selected","abs","formatTimeAgo","now","delta","format","parseDateOnly","match","exec","isRoundTrip"],"mappings":"AAAA,SAAQA,SAAS,QAAO,iBAAgB;AAExC,MAAMC,QAAQ;IACZC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,OAAO;IACPC,QAAQ;IACRC,MAAM;IACNC,MAAM;AACR;AAEA,mFAAmF,GACnF,MAAMC,QAA2D;IAC/D;QAACC,IAAIT,MAAMO,IAAI;QAAEG,MAAM;IAAM;IAC7B;QAACD,IAAIT,MAAMI,KAAK;QAAEM,MAAM;IAAO;IAC/B;QAACD,IAAIT,MAAMM,IAAI;QAAEI,MAAM;IAAM;IAC7B;QAACD,IAAIT,MAAMC,GAAG;QAAES,MAAM;IAAK;IAC3B;QAACD,IAAIT,MAAME,IAAI;QAAEQ,MAAM;IAAM;IAC7B;QAACD,IAAIT,MAAMG,MAAM;QAAEO,MAAM;IAAQ;IACjC;QAACD,IAAIT,MAAMK,MAAM;QAAEK,MAAM;IAAQ;CAClC;AAED,MAAMC,eAAe,IAAIC,KAAKC,kBAAkB,CAAC,MAAM;IAACC,SAAS;AAAQ;AAEzE,MAAMC,oBAAoB;AAE1B,SAASC,IAAIC,KAAa,EAAEC,SAAS,CAAC;IACpC,OAAOC,OAAOF,OAAOG,QAAQ,CAACF,QAAQ;AACxC;AAEA;;;;;;;;CAQC,GACD,SAASG,WACPC,OAAe;IAEf,IAAIC,QAAQf,MAAMgB,SAAS,CAAC,CAAC,EAACf,EAAE,EAAC,GAAKa,WAAWb;IACjD,IAAIc,UAAU,CAAC,GAAG,OAAOE;IAEzB,MACEF,QAAQ,KACRG,KAAKC,KAAK,CAACL,UAAUd,KAAK,CAAC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