@atlaskit/ads-mcp 0.10.0 → 0.11.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/CHANGELOG.md +20 -0
- package/dist/cjs/helpers/analytics.js +2 -2
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/tools/get-tokens/token-structured-content.codegen.js +101 -1
- package/dist/cjs/tools/migration-guides/index.js +78 -0
- package/dist/cjs/tools/migration-guides/migrations/onboarding-to-spotlight.js +55 -0
- package/dist/cjs/tools/migration-guides/registry.js +36 -0
- package/dist/cjs/tools/migration-guides/types.js +1 -0
- package/dist/es2019/helpers/analytics.js +2 -2
- package/dist/es2019/index.js +6 -0
- package/dist/es2019/tools/analyze-a11y/index.js +1 -1
- package/dist/es2019/tools/get-tokens/token-structured-content.codegen.js +101 -1
- package/dist/es2019/tools/migration-guides/index.js +58 -0
- package/dist/es2019/tools/migration-guides/migrations/onboarding-to-spotlight.js +416 -0
- package/dist/es2019/tools/migration-guides/registry.js +30 -0
- package/dist/es2019/tools/migration-guides/types.js +0 -0
- package/dist/esm/helpers/analytics.js +2 -2
- package/dist/esm/index.js +6 -1
- package/dist/esm/tools/get-tokens/token-structured-content.codegen.js +101 -1
- package/dist/esm/tools/migration-guides/index.js +72 -0
- package/dist/esm/tools/migration-guides/migrations/onboarding-to-spotlight.js +49 -0
- package/dist/esm/tools/migration-guides/registry.js +29 -0
- package/dist/esm/tools/migration-guides/types.js +0 -0
- package/dist/types/tools/get-tokens/token-structured-content.codegen.d.ts +1 -1
- package/dist/types/tools/migration-guides/index.d.ts +16 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +4 -0
- package/dist/types/tools/migration-guides/registry.d.ts +19 -0
- package/dist/types/tools/migration-guides/types.d.ts +23 -0
- package/dist/types-ts4.5/tools/get-tokens/token-structured-content.codegen.d.ts +1 -1
- package/dist/types-ts4.5/tools/migration-guides/index.d.ts +19 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +4 -0
- package/dist/types-ts4.5/tools/migration-guides/registry.d.ts +19 -0
- package/dist/types-ts4.5/tools/migration-guides/types.d.ts +23 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/ads-mcp
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`fb3c14e64741b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fb3c14e64741b) -
|
|
8
|
+
Create 'ads-migration-guides' tool, to facilitate `@atlaskit/onboarding` -> `@atlaskit/spotlight`
|
|
9
|
+
migration, and any future migrations.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 0.10.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`a60a82196851a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a60a82196851a) -
|
|
20
|
+
Internal refactors to remove unused variables. No functional or public changes.
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 0.10.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -51,7 +51,7 @@ if (!isAnalyticsOptedOut) {
|
|
|
51
51
|
subproduct: 'ads-mcp',
|
|
52
52
|
flushInterval: 5000
|
|
53
53
|
});
|
|
54
|
-
} catch (
|
|
54
|
+
} catch (_unused) {
|
|
55
55
|
// Analytics client not available or failed to initialize
|
|
56
56
|
// Log the error but continue without analytics
|
|
57
57
|
console.error('Could not initialize analytics client. This is normal as it is only intended to measure authenticated Atlassians');
|
|
@@ -90,7 +90,7 @@ function sendOperationalEvent(_ref) {
|
|
|
90
90
|
}, attributes)
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
} catch (
|
|
93
|
+
} catch (_unused2) {
|
|
94
94
|
// Analytics errors should not prevent normal operation
|
|
95
95
|
// Silently fail to avoid disrupting the main functionality
|
|
96
96
|
console.error('Error sending operational event to analytics');
|
package/dist/cjs/index.js
CHANGED
|
@@ -22,6 +22,7 @@ var _getAllTokens = require("./tools/get-all-tokens");
|
|
|
22
22
|
var _getComponents = require("./tools/get-components");
|
|
23
23
|
var _getIcons = require("./tools/get-icons");
|
|
24
24
|
var _getTokens = require("./tools/get-tokens");
|
|
25
|
+
var _migrationGuides = require("./tools/migration-guides");
|
|
25
26
|
var _plan = require("./tools/plan");
|
|
26
27
|
var _suggestA11yFixes = require("./tools/suggest-a11y-fixes");
|
|
27
28
|
/* eslint-disable no-console, import/extensions */
|
|
@@ -61,7 +62,7 @@ var generateLogger = function generateLogger(level) {
|
|
|
61
62
|
};
|
|
62
63
|
};
|
|
63
64
|
var getToolRegistry = exports.getToolRegistry = function getToolRegistry() {
|
|
64
|
-
var baseTools = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _analyzeA11y.listAnalyzeA11yTool.name, {
|
|
65
|
+
var baseTools = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _analyzeA11y.listAnalyzeA11yTool.name, {
|
|
65
66
|
handler: _analyzeA11y.analyzeA11yTool,
|
|
66
67
|
inputSchema: _analyzeA11y.analyzeA11yInputSchema,
|
|
67
68
|
tool: _analyzeA11y.listAnalyzeA11yTool
|
|
@@ -85,6 +86,10 @@ var getToolRegistry = exports.getToolRegistry = function getToolRegistry() {
|
|
|
85
86
|
handler: _suggestA11yFixes.suggestA11yFixesTool,
|
|
86
87
|
inputSchema: _suggestA11yFixes.suggestA11yFixesInputSchema,
|
|
87
88
|
tool: _suggestA11yFixes.listSuggestA11yFixesTool
|
|
89
|
+
}), _migrationGuides.listMigrationGuidesTool.name, {
|
|
90
|
+
handler: _migrationGuides.migrationGuidesTool,
|
|
91
|
+
inputSchema: _migrationGuides.migrationGuidesInputSchema,
|
|
92
|
+
tool: _migrationGuides.listMigrationGuidesTool
|
|
88
93
|
});
|
|
89
94
|
|
|
90
95
|
// Conditionally add token and icon tools based on feature flag
|
|
@@ -9,7 +9,7 @@ exports.tokenStructuredContent = void 0;
|
|
|
9
9
|
*
|
|
10
10
|
* Structured content for tokens generated from token-metadata.
|
|
11
11
|
*
|
|
12
|
-
* @codegen <<SignedSource::
|
|
12
|
+
* @codegen <<SignedSource::71826c7e9b24620099bd0316f7a0a305>>
|
|
13
13
|
* @codegenCommand yarn build structured-docs
|
|
14
14
|
*/
|
|
15
15
|
|
|
@@ -143,6 +143,11 @@ var tokenStructuredContent = exports.tokenStructuredContent = [{
|
|
|
143
143
|
name: 'color.text.danger',
|
|
144
144
|
description: 'Use for critical text, such as input field error messaging.',
|
|
145
145
|
exampleValue: '#AE2E24'
|
|
146
|
+
}, {
|
|
147
|
+
content: '# color.text.danger.bolder\n\nUse for text on top of danger semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#5D1F1A`\n',
|
|
148
|
+
name: 'color.text.danger.bolder',
|
|
149
|
+
description: 'Use for text on top of danger semantic labels to ensure accessibility and desired visual appearance.',
|
|
150
|
+
exampleValue: '#5D1F1A'
|
|
146
151
|
}, {
|
|
147
152
|
content: '# color.text.warning\n\nUse for text to emphasize caution, such as in moved lozenges.\n\nExample Value: `#9E4C00`\n',
|
|
148
153
|
name: 'color.text.warning',
|
|
@@ -153,21 +158,41 @@ var tokenStructuredContent = exports.tokenStructuredContent = [{
|
|
|
153
158
|
name: 'color.text.warning.inverse',
|
|
154
159
|
description: 'Use for text when on bold warning backgrounds.',
|
|
155
160
|
exampleValue: '#292A2E'
|
|
161
|
+
}, {
|
|
162
|
+
content: '# color.text.warning.bolder\n\nUse for text on top of warning semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#693200`\n',
|
|
163
|
+
name: 'color.text.warning.bolder',
|
|
164
|
+
description: 'Use for text on top of warning semantic labels to ensure accessibility and desired visual appearance.',
|
|
165
|
+
exampleValue: '#693200'
|
|
156
166
|
}, {
|
|
157
167
|
content: '# color.text.success\n\nUse for text to communicate a favorable outcome, such as input field success messaging.\n\nExample Value: `#4C6B1F`\n',
|
|
158
168
|
name: 'color.text.success',
|
|
159
169
|
description: 'Use for text to communicate a favorable outcome, such as input field success messaging.',
|
|
160
170
|
exampleValue: '#4C6B1F'
|
|
171
|
+
}, {
|
|
172
|
+
content: '# color.text.success.bolder\n\nUse for text on top of success semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#37471F`\n',
|
|
173
|
+
name: 'color.text.success.bolder',
|
|
174
|
+
description: 'Use for text on top of success semantic labels to ensure accessibility and desired visual appearance.',
|
|
175
|
+
exampleValue: '#37471F'
|
|
161
176
|
}, {
|
|
162
177
|
content: '# color.text.discovery\n\nUse for text to emphasize change or something new, such as in new lozenges.\n\nExample Value: `#803FA5`\n',
|
|
163
178
|
name: 'color.text.discovery',
|
|
164
179
|
description: 'Use for text to emphasize change or something new, such as in new lozenges.',
|
|
165
180
|
exampleValue: '#803FA5'
|
|
181
|
+
}, {
|
|
182
|
+
content: '# color.text.discovery.bolder\n\nUse for text on top of discovery semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#48245D`\n',
|
|
183
|
+
name: 'color.text.discovery.bolder',
|
|
184
|
+
description: 'Use for text on top of discovery semantic labels to ensure accessibility and desired visual appearance.',
|
|
185
|
+
exampleValue: '#48245D'
|
|
166
186
|
}, {
|
|
167
187
|
content: '# color.text.information\n\nUse for informative text or to communicate something is in progress, such as in-progress lozenges.\n\nExample Value: `#1558BC`\n',
|
|
168
188
|
name: 'color.text.information',
|
|
169
189
|
description: 'Use for informative text or to communicate something is in progress, such as in-progress lozenges.',
|
|
170
190
|
exampleValue: '#1558BC'
|
|
191
|
+
}, {
|
|
192
|
+
content: '# color.text.information.bolder\n\nUse for text on top of information semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#123263`\n',
|
|
193
|
+
name: 'color.text.information.bolder',
|
|
194
|
+
description: 'Use for text on top of information semantic labels to ensure accessibility and desired visual appearance.',
|
|
195
|
+
exampleValue: '#123263'
|
|
171
196
|
}, {
|
|
172
197
|
content: '# color.text.subtlest\n\nUse for tertiary text, such as meta-data, breadcrumbs, input field placeholder and helper text.\n\nExample Value: `#6B6E76`\n',
|
|
173
198
|
name: 'color.text.subtlest',
|
|
@@ -1198,6 +1223,21 @@ var tokenStructuredContent = exports.tokenStructuredContent = [{
|
|
|
1198
1223
|
name: 'color.background.danger.pressed',
|
|
1199
1224
|
description: 'Pressed state for color.background.danger',
|
|
1200
1225
|
exampleValue: '#FFB8B2'
|
|
1226
|
+
}, {
|
|
1227
|
+
content: '# color.background.danger.subtler\n\nUse for backgrounds of danger lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#FFD5D2`\n',
|
|
1228
|
+
name: 'color.background.danger.subtler',
|
|
1229
|
+
description: 'Use for backgrounds of danger lozenges and badges to ensure accessibility and desired visual appearance.',
|
|
1230
|
+
exampleValue: '#FFD5D2'
|
|
1231
|
+
}, {
|
|
1232
|
+
content: '# color.background.danger.subtler.hovered\n\nHovered state of color.background.danger.subtler\n\nExample Value: `#FFB8B2`\n',
|
|
1233
|
+
name: 'color.background.danger.subtler.hovered',
|
|
1234
|
+
description: 'Hovered state of color.background.danger.subtler',
|
|
1235
|
+
exampleValue: '#FFB8B2'
|
|
1236
|
+
}, {
|
|
1237
|
+
content: '# color.background.danger.subtler.pressed\n\nPressed state of color.background.danger.subtler\n\nExample Value: `#FD9891`\n',
|
|
1238
|
+
name: 'color.background.danger.subtler.pressed',
|
|
1239
|
+
description: 'Pressed state of color.background.danger.subtler',
|
|
1240
|
+
exampleValue: '#FD9891'
|
|
1201
1241
|
}, {
|
|
1202
1242
|
content: '# color.background.danger.bold\n\nA vibrant background option for communicating critical information, such as in danger buttons and error banners.\n\nExample Value: `#C9372C`\n',
|
|
1203
1243
|
name: 'color.background.danger.bold',
|
|
@@ -1228,6 +1268,21 @@ var tokenStructuredContent = exports.tokenStructuredContent = [{
|
|
|
1228
1268
|
name: 'color.background.warning.pressed',
|
|
1229
1269
|
description: 'Pressed state for color.background.warning',
|
|
1230
1270
|
exampleValue: '#FBD779'
|
|
1271
|
+
}, {
|
|
1272
|
+
content: '# color.background.warning.subtler\n\nUse for backgrounds of warning lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#FCE4A6`\n',
|
|
1273
|
+
name: 'color.background.warning.subtler',
|
|
1274
|
+
description: 'Use for backgrounds of warning lozenges and badges to ensure accessibility and desired visual appearance.',
|
|
1275
|
+
exampleValue: '#FCE4A6'
|
|
1276
|
+
}, {
|
|
1277
|
+
content: '# color.background.warning.subtler.hovered\n\nHovered state of color.background.warning.subtler\n\nExample Value: `#FBD779`\n',
|
|
1278
|
+
name: 'color.background.warning.subtler.hovered',
|
|
1279
|
+
description: 'Hovered state of color.background.warning.subtler',
|
|
1280
|
+
exampleValue: '#FBD779'
|
|
1281
|
+
}, {
|
|
1282
|
+
content: '# color.background.warning.subtler.pressed\n\nPressed state of color.background.warning.subtler\n\nExample Value: `#FBC828`\n',
|
|
1283
|
+
name: 'color.background.warning.subtler.pressed',
|
|
1284
|
+
description: 'Pressed state of color.background.warning.subtler',
|
|
1285
|
+
exampleValue: '#FBC828'
|
|
1231
1286
|
}, {
|
|
1232
1287
|
content: '# color.background.warning.bold\n\nA vibrant background option for communicating caution, such as in warning buttons and warning banners.\n\nExample Value: `#FBC828`\n',
|
|
1233
1288
|
name: 'color.background.warning.bold',
|
|
@@ -1258,6 +1313,21 @@ var tokenStructuredContent = exports.tokenStructuredContent = [{
|
|
|
1258
1313
|
name: 'color.background.success.pressed',
|
|
1259
1314
|
description: 'Pressed state for color.background.success',
|
|
1260
1315
|
exampleValue: '#BDE97C'
|
|
1316
|
+
}, {
|
|
1317
|
+
content: '# color.background.success.subtler\n\nUse for backgrounds of success lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#D3F1A7`\n',
|
|
1318
|
+
name: 'color.background.success.subtler',
|
|
1319
|
+
description: 'Use for backgrounds of success lozenges and badges to ensure accessibility and desired visual appearance.',
|
|
1320
|
+
exampleValue: '#D3F1A7'
|
|
1321
|
+
}, {
|
|
1322
|
+
content: '# color.background.success.subtler.hovered\n\nHovered state of color.background.success.subtler\n\nExample Value: `#BDE97C`\n',
|
|
1323
|
+
name: 'color.background.success.subtler.hovered',
|
|
1324
|
+
description: 'Hovered state of color.background.success.subtler',
|
|
1325
|
+
exampleValue: '#BDE97C'
|
|
1326
|
+
}, {
|
|
1327
|
+
content: '# color.background.success.subtler.pressed\n\nPressed state of color.background.success.subtler\n\nExample Value: `#B3DF72`\n',
|
|
1328
|
+
name: 'color.background.success.subtler.pressed',
|
|
1329
|
+
description: 'Pressed state of color.background.success.subtler',
|
|
1330
|
+
exampleValue: '#B3DF72'
|
|
1261
1331
|
}, {
|
|
1262
1332
|
content: '# color.background.success.bold\n\nA vibrant background option for communicating a favorable outcome, such as in checked toggles.\n\nExample Value: `#5B7F24`\n',
|
|
1263
1333
|
name: 'color.background.success.bold',
|
|
@@ -1288,6 +1358,21 @@ var tokenStructuredContent = exports.tokenStructuredContent = [{
|
|
|
1288
1358
|
name: 'color.background.discovery.pressed',
|
|
1289
1359
|
description: 'Pressed state for color.background.discovery',
|
|
1290
1360
|
exampleValue: '#E3BDFA'
|
|
1361
|
+
}, {
|
|
1362
|
+
content: '# color.background.discovery.subtler\n\nUse for backgrounds of discovery lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#EED7FC`\n',
|
|
1363
|
+
name: 'color.background.discovery.subtler',
|
|
1364
|
+
description: 'Use for backgrounds of discovery lozenges and badges to ensure accessibility and desired visual appearance.',
|
|
1365
|
+
exampleValue: '#EED7FC'
|
|
1366
|
+
}, {
|
|
1367
|
+
content: '# color.background.discovery.subtler.hovered\n\nHovered state of color.background.discovery.subtler\n\nExample Value: `#E3BDFA`\n',
|
|
1368
|
+
name: 'color.background.discovery.subtler.hovered',
|
|
1369
|
+
description: 'Hovered state of color.background.discovery.subtler',
|
|
1370
|
+
exampleValue: '#E3BDFA'
|
|
1371
|
+
}, {
|
|
1372
|
+
content: '# color.background.discovery.subtler.pressed\n\nPressed state of color.background.discovery.subtler\n\nExample Value: `#D8A0F7`\n',
|
|
1373
|
+
name: 'color.background.discovery.subtler.pressed',
|
|
1374
|
+
description: 'Pressed state of color.background.discovery.subtler',
|
|
1375
|
+
exampleValue: '#D8A0F7'
|
|
1291
1376
|
}, {
|
|
1292
1377
|
content: '# color.background.discovery.bold\n\nA vibrant background option communicating change or something new, such as in onboarding spotlights.\n\nExample Value: `#964AC0`\n',
|
|
1293
1378
|
name: 'color.background.discovery.bold',
|
|
@@ -1318,6 +1403,21 @@ var tokenStructuredContent = exports.tokenStructuredContent = [{
|
|
|
1318
1403
|
name: 'color.background.information.pressed',
|
|
1319
1404
|
description: 'Pressed state of color.background.information',
|
|
1320
1405
|
exampleValue: '#ADCBFB'
|
|
1406
|
+
}, {
|
|
1407
|
+
content: '# color.background.information.subtler\n\nUse for backgrounds of information lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#CFE1FD`\n',
|
|
1408
|
+
name: 'color.background.information.subtler',
|
|
1409
|
+
description: 'Use for backgrounds of information lozenges and badges to ensure accessibility and desired visual appearance.',
|
|
1410
|
+
exampleValue: '#CFE1FD'
|
|
1411
|
+
}, {
|
|
1412
|
+
content: '# color.background.information.subtler.hovered\n\nHovered state of color.background.information.subtler\n\nExample Value: `#ADCBFB`\n',
|
|
1413
|
+
name: 'color.background.information.subtler.hovered',
|
|
1414
|
+
description: 'Hovered state of color.background.information.subtler',
|
|
1415
|
+
exampleValue: '#ADCBFB'
|
|
1416
|
+
}, {
|
|
1417
|
+
content: '# color.background.information.subtler.pressed\n\nPressed state of color.background.information.subtler\n\nExample Value: `#8FB8F6`\n',
|
|
1418
|
+
name: 'color.background.information.subtler.pressed',
|
|
1419
|
+
description: 'Pressed state of color.background.information.subtler',
|
|
1420
|
+
exampleValue: '#8FB8F6'
|
|
1321
1421
|
}, {
|
|
1322
1422
|
content: '# color.background.information.bold\n\nA vibrant background option for communicating information or something in-progress.\n\nExample Value: `#1868DB`\n',
|
|
1323
1423
|
name: 'color.background.information.bold',
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.migrationGuidesTool = exports.migrationGuidesInputSchema = exports.listMigrationGuidesTool = void 0;
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
var _zod = require("zod");
|
|
11
|
+
var _helpers = require("../../helpers");
|
|
12
|
+
var _registry = require("./registry");
|
|
13
|
+
// Build the enum dynamically from the registry
|
|
14
|
+
var migrationIds = (0, _registry.getAvailableMigrationIds)();
|
|
15
|
+
var migrationGuidesInputSchema = exports.migrationGuidesInputSchema = _zod.z.object({
|
|
16
|
+
migration: _zod.z.enum(migrationIds).describe("The specific migration to perform.\n")
|
|
17
|
+
});
|
|
18
|
+
var listMigrationGuidesTool = exports.listMigrationGuidesTool = {
|
|
19
|
+
name: 'ads_migration_guides',
|
|
20
|
+
description: "Provides migration guides for deprecated Atlassian Design System components. Returns before/after examples, best practices, and step-by-step migration instructions.\n\nAvailable migrations:\n".concat((0, _registry.getAvailableMigrationsDescription)()),
|
|
21
|
+
annotations: {
|
|
22
|
+
title: 'ADS Migration Guides',
|
|
23
|
+
readOnlyHint: true,
|
|
24
|
+
destructiveHint: false,
|
|
25
|
+
idempotentHint: true,
|
|
26
|
+
openWorldHint: false
|
|
27
|
+
},
|
|
28
|
+
inputSchema: (0, _helpers.zodToJsonSchema)(migrationGuidesInputSchema)
|
|
29
|
+
};
|
|
30
|
+
var migrationGuidesTool = exports.migrationGuidesTool = /*#__PURE__*/function () {
|
|
31
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(params) {
|
|
32
|
+
var migration, guide;
|
|
33
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
34
|
+
while (1) switch (_context.prev = _context.next) {
|
|
35
|
+
case 0:
|
|
36
|
+
migration = params.migration;
|
|
37
|
+
guide = _registry.migrationRegistry[migration];
|
|
38
|
+
if (guide) {
|
|
39
|
+
_context.next = 4;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
return _context.abrupt("return", {
|
|
43
|
+
content: [{
|
|
44
|
+
type: 'text',
|
|
45
|
+
text: JSON.stringify({
|
|
46
|
+
error: "Unknown migration: ".concat(migration),
|
|
47
|
+
availableMigrations: (0, _registry.getAvailableMigrationIds)(),
|
|
48
|
+
suggestion: 'Please use one of the available migration IDs listed above.'
|
|
49
|
+
}, null, 2)
|
|
50
|
+
}]
|
|
51
|
+
});
|
|
52
|
+
case 4:
|
|
53
|
+
return _context.abrupt("return", {
|
|
54
|
+
content: [{
|
|
55
|
+
type: 'text',
|
|
56
|
+
text: JSON.stringify({
|
|
57
|
+
migration: guide.id,
|
|
58
|
+
title: guide.title,
|
|
59
|
+
description: guide.description,
|
|
60
|
+
fromPackage: guide.fromPackage,
|
|
61
|
+
toPackage: guide.toPackage,
|
|
62
|
+
examples: guide.examples,
|
|
63
|
+
bestPractices: guide.bestPractices,
|
|
64
|
+
additionalResources: guide.additionalResources,
|
|
65
|
+
nextSteps: ['Review the before/after examples to understand the migration pattern', 'Apply the migration pattern', 'Follow the best practices listed above', 'Test the migrated code thoroughly']
|
|
66
|
+
}, null, 2)
|
|
67
|
+
}]
|
|
68
|
+
});
|
|
69
|
+
case 5:
|
|
70
|
+
case "end":
|
|
71
|
+
return _context.stop();
|
|
72
|
+
}
|
|
73
|
+
}, _callee);
|
|
74
|
+
}));
|
|
75
|
+
return function migrationGuidesTool(_x) {
|
|
76
|
+
return _ref.apply(this, arguments);
|
|
77
|
+
};
|
|
78
|
+
}();
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.onboardingWithMotion = exports.onboardingSingleStep = exports.onboardingMultiStep = void 0;
|
|
7
|
+
var additionalResources = "Visit https://hello.atlassian.net/wiki/spaces/DST/pages/6069774593 or https://atlassian.design/components/spotlight for more context";
|
|
8
|
+
var onboardingSingleStep = exports.onboardingSingleStep = {
|
|
9
|
+
id: 'onboarding-single-step',
|
|
10
|
+
title: 'Single Step Spotlight Migration',
|
|
11
|
+
description: 'Migrate a single step spotlight from @atlaskit/onboarding to @atlaskit/spotlight',
|
|
12
|
+
fromPackage: '@atlaskit/onboarding',
|
|
13
|
+
toPackage: '@atlaskit/spotlight',
|
|
14
|
+
examples: [{
|
|
15
|
+
title: 'Migrate single step spotlight',
|
|
16
|
+
description: 'Replace SpotlightManager, SpotlightTarget, SpotlightTransition, and Spotlight with the new compositional @atlaskit/spotlight components',
|
|
17
|
+
before: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingSpotlight = () => {\n const [isSpotlightActive, setIsSpotlightActive] = useState(false);\n const start = () => setIsSpotlightActive(true);\n const end = () => setIsSpotlightActive(false);\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"my-target\">\n <Button>Target Element</Button>\n </SpotlightTarget>\n <div>\n <Button appearance=\"primary\" onClick={start}>\n Show spotlight\n </Button>\n </div>\n <SpotlightTransition>\n {isSpotlightActive && (\n <Spotlight\n actions={[\n {\n onClick: end,\n text: 'Got it',\n },\n ]}\n heading=\"Feature Heading\"\n target=\"my-target\"\n key=\"my-target\"\n >\n This is the spotlight body content describing the feature.\n </Spotlight>\n )}\n </SpotlightTransition>\n </SpotlightManager>\n );\n};",
|
|
18
|
+
after: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n} from '@atlaskit/spotlight';\n\nconst Spotlight = () => {\n const [isVisible, setIsVisible] = useState(false);\n const dismiss = () => setIsVisible(false);\n const done = () => setIsVisible(false);\n\n return (\n <PopoverProvider>\n <PopoverTarget>\n <Button onClick={() => setIsVisible(true)}>Target Element</Button>\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={isVisible}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Feature Heading</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>This is the spotlight body content describing the feature.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n );\n};",
|
|
19
|
+
explanation: "Key changes when migrating a single step spotlight:\n1. Replace SpotlightManager with PopoverProvider - the new context provider\n2. Replace SpotlightTarget with PopoverTarget - wraps the element to highlight\n3. Replace SpotlightTransition and Spotlight with PopoverContent containing SpotlightCard - controls visibility and positioning\n4. The 'heading' prop becomes SpotlightHeadline inside SpotlightHeader\n5. The 'actions' array becomes SpotlightActions with SpotlightPrimaryAction (and optionally SpotlightSecondaryAction)\n6. The children content moves into SpotlightBody wrapped with Text component\n7. Add SpotlightDismissControl inside SpotlightControls for the close button\n8. The 'target' prop is no longer needed - PopoverTarget automatically handles this\n9. The 'dialogPlacement' prop becomes 'placement' on PopoverContent (e.g., 'bottom left' \u2192 'bottom-start')"
|
|
20
|
+
}],
|
|
21
|
+
bestPractices: ['Use PopoverProvider as the root wrapper for spotlight functionality', 'PopoverTarget should wrap exactly one child element that will be highlighted', 'Always include SpotlightDismissControl for accessibility - allows users to dismiss via close button', 'Use SpotlightPrimaryAction for the main call-to-action button', 'Wrap body text content in the Text component from @atlaskit/primitives/compiled', 'Map old dialogPlacement values: "bottom left" → "bottom-start", "bottom center" → "bottom", "bottom right" → "bottom-end"'],
|
|
22
|
+
additionalResources: additionalResources
|
|
23
|
+
};
|
|
24
|
+
var onboardingMultiStep = exports.onboardingMultiStep = {
|
|
25
|
+
id: 'onboarding-multi-step',
|
|
26
|
+
title: 'Multi Step Spotlight Tour Migration',
|
|
27
|
+
description: 'Migrate a multi-step spotlight tour from @atlaskit/onboarding to @atlaskit/spotlight',
|
|
28
|
+
fromPackage: '@atlaskit/onboarding',
|
|
29
|
+
toPackage: '@atlaskit/spotlight',
|
|
30
|
+
examples: [{
|
|
31
|
+
title: 'Migrate multi step spotlight tour',
|
|
32
|
+
description: 'Replace the single SpotlightManager pattern with multiple PopoverProvider instances, one for each target in the tour',
|
|
33
|
+
before: "import React, { useState } from 'react';\nimport Button, { IconButton } from '@atlaskit/button/new';\nimport CommentAddIcon from '@atlaskit/icon/core/comment-add';\nimport CopyIcon from '@atlaskit/icon/core/copy';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingTour = () => {\n const [activeSpotlight, setActiveSpotlight] = useState<null | number>(null);\n const start = () => setActiveSpotlight(0);\n const next = () => setActiveSpotlight((activeSpotlight || 0) + 1);\n const back = () => setActiveSpotlight((activeSpotlight || 1) - 1);\n const end = () => setActiveSpotlight(null);\n\n const renderActiveSpotlight = () => {\n const spotlights = [\n <Spotlight\n actions={[\n { onClick: () => next(), text: 'Next' },\n { onClick: () => end(), text: 'Dismiss', appearance: 'subtle' },\n ]}\n heading=\"Add a comment\"\n target=\"comment\"\n key=\"comment\"\n >\n Quickly add a comment to the work item.\n </Spotlight>,\n <Spotlight\n actions={[\n { onClick: () => end(), text: 'Done' },\n { onClick: () => back(), text: 'Back', appearance: 'subtle' },\n ]}\n heading=\"Copy code\"\n target=\"copy\"\n key=\"copy\"\n >\n Click to copy the example code to your clipboard.\n </Spotlight>,\n ];\n\n if (activeSpotlight === null) {\n return null;\n }\n return spotlights[activeSpotlight];\n };\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"comment\">\n <IconButton icon={CommentAddIcon} label=\"comment\" />\n </SpotlightTarget>\n <SpotlightTarget name=\"copy\">\n <IconButton icon={CopyIcon} label=\"Copy\" />\n </SpotlightTarget>\n <Button appearance=\"primary\" onClick={start}>\n Start tour\n </Button>\n <SpotlightTransition>{renderActiveSpotlight()}</SpotlightTransition>\n </SpotlightManager>\n );\n};",
|
|
34
|
+
after: "import React, { useState } from 'react';\nimport Button, { IconButton } from '@atlaskit/button/new';\nimport CommentAddIcon from '@atlaskit/icon/core/comment-add';\nimport CopyIcon from '@atlaskit/icon/core/copy';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n SpotlightSecondaryAction,\n SpotlightStepCount,\n} from '@atlaskit/spotlight';\n\nconst SpotlightTour = () => {\n const [currentStep, setCurrentStep] = useState<number>(0);\n\n const dismiss = () => setCurrentStep(0);\n const back = () => setCurrentStep(Math.max(currentStep - 1, 1));\n const next = () => setCurrentStep(Math.min(currentStep + 1, 2));\n const done = () => setCurrentStep(0);\n\n return (\n <>\n <PopoverProvider>\n <PopoverTarget>\n <IconButton icon={CommentAddIcon} label=\"comment\" />\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={currentStep === 1}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Add a comment</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl onClick={dismiss} />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>Quickly add a comment to the work item.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightStepCount>1 of 2</SpotlightStepCount>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={next}>Next</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n\n <PopoverProvider>\n <PopoverTarget>\n <IconButton icon={CopyIcon} label=\"Copy\" />\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={currentStep === 2}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Copy code</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl onClick={dismiss} />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>Click to copy the example code to your clipboard.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightStepCount>2 of 2</SpotlightStepCount>\n <SpotlightActions>\n <SpotlightSecondaryAction onClick={back}>Back</SpotlightSecondaryAction>\n <SpotlightPrimaryAction onClick={done}>Done</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n\n <Button appearance=\"primary\" onClick={() => setCurrentStep(1)}>\n Start tour\n </Button>\n </>\n );\n};",
|
|
35
|
+
explanation: "Key changes when migrating a multi-step spotlight tour:\n1. Replace the single SpotlightManager with multiple PopoverProvider instances - one for each target element\n2. Each target gets its own PopoverProvider > PopoverTarget > PopoverContent structure\n3. The spotlight array pattern is replaced with individual SpotlightCard components per target\n4. Use a single currentStep state (starting at 0 for hidden, 1+ for active steps) instead of null/index\n5. Control visibility with isVisible={currentStep === n} on each PopoverContent\n6. Add SpotlightStepCount component in SpotlightFooter to show progress (e.g., \"1 of 3\")\n7. Use SpotlightSecondaryAction for \"Back\" buttons instead of appearance: 'subtle' in the actions array\n8. Use SpotlightPrimaryAction for \"Next\" and \"Done\" buttons\n9. The renderActiveSpotlight pattern is no longer needed - visibility is controlled declaratively\n10. Navigation functions use Math.max/Math.min to bound the step range safely"
|
|
36
|
+
}],
|
|
37
|
+
bestPractices: ['Each target element in a tour needs its own PopoverProvider wrapper', 'Use a numeric currentStep state where 0 = hidden, 1+ = active step number', 'Always include SpotlightStepCount in multi-step tours for user orientation', 'First step should only have "Next" action, middle steps have "Back" and "Next", last step has "Back" and "Done"', 'Use SpotlightSecondaryAction for back/dismiss actions and SpotlightPrimaryAction for next/done', 'Include SpotlightDismissControl with onClick={dismiss} so users can exit the tour at any point', 'Bound navigation functions with Math.max/Math.min to prevent invalid step values', 'Preference duplicating Spotlight code instead of trying to have a single `@atlaskit/spotlight` instance that conditionally renders content based on step.'],
|
|
38
|
+
additionalResources: additionalResources
|
|
39
|
+
};
|
|
40
|
+
var onboardingWithMotion = exports.onboardingWithMotion = {
|
|
41
|
+
id: 'onboarding-with-motion',
|
|
42
|
+
title: 'Single Step Spotlight with Motion Migration',
|
|
43
|
+
description: 'Migrate a single step spotlight with entrance animation from @atlaskit/onboarding to @atlaskit/spotlight using @atlaskit/motion',
|
|
44
|
+
fromPackage: '@atlaskit/onboarding',
|
|
45
|
+
toPackage: '@atlaskit/spotlight',
|
|
46
|
+
examples: [{
|
|
47
|
+
title: 'Migrate spotlight with transition animation',
|
|
48
|
+
description: 'Replace SpotlightTransition with FadeIn from @atlaskit/motion wrapped around the SpotlightCard',
|
|
49
|
+
before: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingSpotlightWithTransition = () => {\n const [isSpotlightActive, setIsSpotlightActive] = useState(false);\n const start = () => setIsSpotlightActive(true);\n const end = () => setIsSpotlightActive(false);\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"my-target\">\n <Button>Target Element</Button>\n </SpotlightTarget>\n <div>\n <Button appearance=\"primary\" onClick={start}>\n Show spotlight\n </Button>\n </div>\n <SpotlightTransition>\n {isSpotlightActive && (\n <Spotlight\n actions={[\n {\n onClick: end,\n text: 'Got it',\n },\n ]}\n heading=\"Feature Heading\"\n target=\"my-target\"\n key=\"my-target\"\n >\n This is the spotlight body content describing the feature.\n </Spotlight>\n )}\n </SpotlightTransition>\n </SpotlightManager>\n );\n};",
|
|
50
|
+
after: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport { FadeIn } from '@atlaskit/motion';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n} from '@atlaskit/spotlight';\n\nconst SpotlightWithMotion = () => {\n const [isVisible, setIsVisible] = useState(false);\n const dismiss = () => setIsVisible(false);\n const done = () => setIsVisible(false);\n\n return (\n <PopoverProvider>\n <PopoverTarget>\n <Button onClick={() => setIsVisible(true)}>Target Element</Button>\n </PopoverTarget>\n <PopoverContent done={done} dismiss={dismiss} placement=\"bottom-start\" isVisible={isVisible}>\n <FadeIn entranceDirection=\"left\">\n {(props) => (\n <div {...props}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Feature Heading</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>This is the spotlight body content describing the feature.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </div>\n )}\n </FadeIn>\n </PopoverContent>\n </PopoverProvider>\n );\n};",
|
|
51
|
+
explanation: "Key changes when migrating a spotlight with transition animation:\n1. Replace SpotlightTransition with FadeIn from @atlaskit/motion\n2. Import FadeIn from '@atlaskit/motion' instead of SpotlightTransition from '@atlaskit/onboarding'\n3. FadeIn uses a render props pattern - wrap content in {(props) => <div {...props}>...</div>}\n4. The entranceDirection prop controls animation direction: 'left', 'right', 'top', or 'bottom'\n5. SpotlightCard must be wrapped in a div that receives the animation props\n6. PopoverContent now accepts a 'done' prop in addition to 'dismiss' for completed actions\n7. All other migration changes from single step spotlight apply (PopoverProvider, compositional components, etc.)"
|
|
52
|
+
}],
|
|
53
|
+
bestPractices: ['Use FadeIn from @atlaskit/motion to add entrance animations to spotlights', 'Choose entranceDirection based on spotlight placement (e.g., "left" for right-placed spotlights)', 'Always wrap SpotlightCard in a div that receives the animation props from FadeIn', 'FadeIn uses render props pattern: {(props) => <div {...props}>content</div>}', 'Pass both done and dismiss props to PopoverContent when using motion', 'Motion is optional - only add if the original onboarding spotlight used SpotlightTransition for entrance effects'],
|
|
54
|
+
additionalResources: additionalResources
|
|
55
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.migrationRegistry = exports.getAvailableMigrationsDescription = exports.getAvailableMigrationIds = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _onboardingToSpotlight = require("./migrations/onboarding-to-spotlight");
|
|
10
|
+
/**
|
|
11
|
+
* Migration registry - central place to register all available migrations
|
|
12
|
+
*
|
|
13
|
+
* To add a new migration:
|
|
14
|
+
* 1. Create a new file in ./migrations/ with your MigrationGuide(s)
|
|
15
|
+
* 2. Import and add to the registry below
|
|
16
|
+
* 3. The tool will automatically include it in the available options
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
var migrationRegistry = exports.migrationRegistry = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _onboardingToSpotlight.onboardingSingleStep.id, _onboardingToSpotlight.onboardingSingleStep), _onboardingToSpotlight.onboardingMultiStep.id, _onboardingToSpotlight.onboardingMultiStep), _onboardingToSpotlight.onboardingWithMotion.id, _onboardingToSpotlight.onboardingWithMotion);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Get all available migration IDs for use in the tool schema
|
|
23
|
+
*/
|
|
24
|
+
var getAvailableMigrationIds = exports.getAvailableMigrationIds = function getAvailableMigrationIds() {
|
|
25
|
+
return Object.keys(migrationRegistry);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get a formatted list of available migrations with descriptions
|
|
30
|
+
* Useful for tool descriptions and help text
|
|
31
|
+
*/
|
|
32
|
+
var getAvailableMigrationsDescription = exports.getAvailableMigrationsDescription = function getAvailableMigrationsDescription() {
|
|
33
|
+
return Object.values(migrationRegistry).map(function (m) {
|
|
34
|
+
return "- \"".concat(m.id, "\": ").concat(m.description);
|
|
35
|
+
}).join('\n');
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -41,7 +41,7 @@ if (!isAnalyticsOptedOut) {
|
|
|
41
41
|
subproduct: 'ads-mcp',
|
|
42
42
|
flushInterval: 5000
|
|
43
43
|
});
|
|
44
|
-
} catch
|
|
44
|
+
} catch {
|
|
45
45
|
// Analytics client not available or failed to initialize
|
|
46
46
|
// Log the error but continue without analytics
|
|
47
47
|
console.error('Could not initialize analytics client. This is normal as it is only intended to measure authenticated Atlassians');
|
|
@@ -80,7 +80,7 @@ export function sendOperationalEvent({
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
-
} catch
|
|
83
|
+
} catch {
|
|
84
84
|
// Analytics errors should not prevent normal operation
|
|
85
85
|
// Silently fail to avoid disrupting the main functionality
|
|
86
86
|
console.error('Error sending operational event to analytics');
|
package/dist/es2019/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { getAllTokensTool, listGetAllTokensTool } from './tools/get-all-tokens';
|
|
|
13
13
|
import { getComponentsTool, listGetComponentsTool } from './tools/get-components';
|
|
14
14
|
import { getIconsInputSchema, getIconsTool, listGetIconsTool } from './tools/get-icons';
|
|
15
15
|
import { getTokensInputSchema, getTokensTool, listGetTokensTool } from './tools/get-tokens';
|
|
16
|
+
import { listMigrationGuidesTool, migrationGuidesInputSchema, migrationGuidesTool } from './tools/migration-guides';
|
|
16
17
|
import { listPlanTool, planInputSchema, planTool } from './tools/plan';
|
|
17
18
|
import { listSuggestA11yFixesTool, suggestA11yFixesInputSchema, suggestA11yFixesTool } from './tools/suggest-a11y-fixes';
|
|
18
19
|
|
|
@@ -92,6 +93,11 @@ export const getToolRegistry = () => {
|
|
|
92
93
|
handler: suggestA11yFixesTool,
|
|
93
94
|
inputSchema: suggestA11yFixesInputSchema,
|
|
94
95
|
tool: listSuggestA11yFixesTool
|
|
96
|
+
},
|
|
97
|
+
[listMigrationGuidesTool.name]: {
|
|
98
|
+
handler: migrationGuidesTool,
|
|
99
|
+
inputSchema: migrationGuidesInputSchema,
|
|
100
|
+
tool: listMigrationGuidesTool
|
|
95
101
|
}
|
|
96
102
|
};
|
|
97
103
|
|
|
@@ -235,7 +235,7 @@ export const analyzeA11yTool = async params => {
|
|
|
235
235
|
}, null, 2)
|
|
236
236
|
}]
|
|
237
237
|
};
|
|
238
|
-
} catch
|
|
238
|
+
} catch {
|
|
239
239
|
// Fallback to pattern-based analysis if axe-core fails
|
|
240
240
|
// console.warn('Axe-core analysis failed, falling back to pattern analysis:', error);
|
|
241
241
|
|