@aws/nx-plugin-mcp 1.0.0-rc.46 → 1.0.0-rc.48

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 (60) hide show
  1. package/bin/aws-nx-mcp.js +56 -39
  2. package/docs/get_started/existing-project.mdx +6 -2
  3. package/docs/get_started/quick-start.mdx +1 -1
  4. package/docs/get_started/tutorials/dungeon-game/1.mdx +2 -2
  5. package/docs/get_started/tutorials/dungeon-game/2.mdx +3 -3
  6. package/docs/get_started/tutorials/dungeon-game/overview.mdx +1 -0
  7. package/docs/guides/agentcore-gateway.mdx +1 -1
  8. package/docs/guides/connection/py-agent-dynamodb.mdx +1 -1
  9. package/docs/guides/connection/py-agent-rdb.mdx +1 -1
  10. package/docs/guides/connection/py-fast-api-rdb.mdx +1 -1
  11. package/docs/guides/connection/py-mcp-server-dynamodb.mdx +1 -1
  12. package/docs/guides/connection/py-mcp-server-rdb.mdx +1 -1
  13. package/docs/guides/connection/smithy-dynamodb.mdx +1 -1
  14. package/docs/guides/connection/smithy-rdb.mdx +3 -3
  15. package/docs/guides/connection/trpc-dynamodb.mdx +1 -1
  16. package/docs/guides/connection/ts-agent-a2a.mdx +1 -1
  17. package/docs/guides/connection/ts-agent-dynamodb.mdx +2 -2
  18. package/docs/guides/connection/ts-agent-gateway.mdx +1 -1
  19. package/docs/guides/connection/ts-agent-mcp.mdx +1 -1
  20. package/docs/guides/connection/ts-agent-rdb.mdx +4 -4
  21. package/docs/guides/connection/ts-mcp-server-dynamodb.mdx +2 -2
  22. package/docs/guides/connection/ts-mcp-server-rdb.mdx +2 -2
  23. package/docs/guides/docker-bundling.mdx +2 -2
  24. package/docs/guides/fastapi.mdx +2 -2
  25. package/docs/guides/react-website-auth.mdx +2 -2
  26. package/docs/guides/react-website.mdx +3 -2
  27. package/docs/guides/runtime-config.mdx +1 -1
  28. package/docs/guides/trpc.mdx +4 -3
  29. package/docs/guides/ts-dynamodb.mdx +2 -1
  30. package/docs/guides/ts-rdb.mdx +3 -2
  31. package/docs/guides/ts-smithy-api.mdx +3 -2
  32. package/docs/guides/typescript-infrastructure.mdx +6 -5
  33. package/docs/guides/typescript-project.mdx +133 -26
  34. package/docs/guides/workspace.mdx +9 -2
  35. package/docs/snippets/agent/bedrock-deployment.mdx +4 -4
  36. package/docs/snippets/agent/runtime-arn.mdx +1 -1
  37. package/docs/snippets/api/cors-configuration-cdk-note.mdx +1 -1
  38. package/docs/snippets/connection/lambda-dynamodb-access.mdx +1 -1
  39. package/docs/snippets/connection/rdb-api-infrastructure.mdx +1 -1
  40. package/docs/snippets/dynamodb/deploying-table.mdx +5 -5
  41. package/docs/snippets/lambda-function/deploying-your-function.mdx +2 -2
  42. package/docs/snippets/mcp/bedrock-deployment.mdx +4 -4
  43. package/docs/snippets/pdk-migration/example/01-migrate-api.mdx +7 -5
  44. package/docs/snippets/pdk-migration/example/02-migrate-website.mdx +29 -10
  45. package/docs/snippets/pdk-migration/example/03-migrate-infra.mdx +4 -4
  46. package/docs/snippets/pdk-migration/faq/type-safe-api.mdx +1 -1
  47. package/docs/snippets/prerequisites.mdx +2 -1
  48. package/docs/snippets/rdb/cluster-instances.mdx +1 -1
  49. package/docs/snippets/rdb/deletion-protection.mdx +1 -1
  50. package/docs/snippets/rdb/deploying.mdx +1 -1
  51. package/docs/snippets/rdb/encryption-key-rotation.mdx +1 -1
  52. package/docs/snippets/rdb/engine-version.mdx +2 -2
  53. package/docs/snippets/rdb/performance-insights.mdx +1 -1
  54. package/docs/snippets/rdb/rds-proxy.mdx +1 -1
  55. package/docs/snippets/rdb/removal-policy.mdx +2 -2
  56. package/docs/snippets/rdb/serverless-capacity.mdx +1 -1
  57. package/docs/snippets/required-prerequisites.mdx +1 -2
  58. package/generators.json +1 -1
  59. package/package.json +1 -1
  60. package/src/preset/schema.json +5 -0
package/bin/aws-nx-mcp.js CHANGED
@@ -20091,7 +20091,7 @@ var generators$1 = {
20091
20091
  "ts#sync": {
20092
20092
  "factory": "./src/ts/sync/generator",
20093
20093
  "schema": "./src/ts/sync/schema.json",
20094
- "description": "TypeScript path alias sync generator",
20094
+ "description": "TypeScript path alias and local workspace dependency sync generator",
20095
20095
  "metric": "g29",
20096
20096
  "hidden": true
20097
20097
  },
@@ -21303,7 +21303,11 @@ const NX_VERSION = {
21303
21303
  "@a2a-js/sdk": "0.3.14",
21304
21304
  "@aws/aws-distro-opentelemetry-node-autoinstrumentation": "0.12.0",
21305
21305
  "@opentelemetry/propagator-jaeger": "2.9.0",
21306
+ minimatch: "10.2.5",
21306
21307
  "@aws-sdk/client-dynamodb": "3.1090.0",
21308
+ "@aws-sdk/client-api-gateway": "3.1090.0",
21309
+ "@aws-sdk/client-iam": "3.1090.0",
21310
+ "@aws-sdk/client-bedrock-agentcore": "3.1090.0",
21307
21311
  "@aws-sdk/client-bedrock-runtime": "3.1090.0",
21308
21312
  "@aws-sdk/client-s3": "3.1090.0",
21309
21313
  "@aws-sdk/client-sts": "3.1090.0",
@@ -21457,9 +21461,22 @@ const buildPackageManagerShortCommand = (pm, command) => {
21457
21461
  return `${PACKAGE_MANAGER_COMMANDS[pm]?.run ?? pm} ${command}`;
21458
21462
  };
21459
21463
  /**
21460
- * Build an install command for a given package manager
21464
+ * Build an install command. With `project`, targets that project's manifest
21465
+ * (pnpm `--filter` by unscoped name, npm/bun by `projectDir` defaulting to
21466
+ * `packages/<name>`, yarn by fully-qualified name); otherwise the root.
21461
21467
  */
21462
- const buildInstallCommand = (pm, pkg, dev) => {
21468
+ const buildInstallCommand = (pm, pkg, dev, project, projectDir) => {
21469
+ if (project) {
21470
+ const shortName = project.split("/").pop();
21471
+ const dir = projectDir ?? `packages/${shortName}`;
21472
+ switch (pm) {
21473
+ case "pnpm": return `pnpm add ${dev ? "-D " : ""}${pkg} --filter ${shortName}`;
21474
+ case "yarn": return `yarn workspace ${project} add ${dev ? "-D " : ""}${pkg}`;
21475
+ case "npm": return `npm install --legacy-peer-deps ${dev ? "-D " : ""}${pkg} -w ${dir}`;
21476
+ case "bun": return `bun add ${dev ? "-D " : ""}${pkg} --cwd ${dir}`;
21477
+ default: return `${pm} install ${dev ? "-D " : ""}${pkg}`;
21478
+ }
21479
+ }
21463
21480
  switch (pm) {
21464
21481
  case "pnpm": return `pnpm add ${dev ? "-D" : "-"}w ${pkg}`;
21465
21482
  case "yarn": return `yarn add ${dev ? "-D " : ""}${pkg}`;
@@ -21492,14 +21509,15 @@ const buildNxInitCommand = (pm) => {
21492
21509
  * The package manager is auto-detected by @aws/create-nx-workspace from the
21493
21510
  * invoking command, so --pm is not needed.
21494
21511
  */
21495
- const buildCreateNxWorkspaceCommand = (pm, workspace, iac, tag, module) => {
21512
+ const buildCreateNxWorkspaceCommand = (pm, workspace, iac, tag, module, extraArgs) => {
21496
21513
  return [
21497
21514
  PACKAGE_MANAGER_COMMANDS[pm]?.create ?? `${pm} create`,
21498
21515
  tag ? `@aws/nx-workspace@${tag}` : "@aws/nx-workspace",
21499
21516
  ...pm === "npm" ? ["--"] : [],
21500
21517
  workspace,
21501
21518
  ...iac ? [`--iac=${iac}`] : [],
21502
- ...module ? [`--module=${module}`] : []
21519
+ ...module ? [`--module=${module}`] : [],
21520
+ ...extraArgs ? [extraArgs] : []
21503
21521
  ].join(" ");
21504
21522
  };
21505
21523
  //#endregion
@@ -28570,7 +28588,7 @@ var init_micromark_factory_space = __esmMin((() => {
28570
28588
  init_micromark_util_character();
28571
28589
  }));
28572
28590
  //#endregion
28573
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/initialize/content.js
28591
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/initialize/content.js
28574
28592
  /**
28575
28593
  * @this {TokenizeContext}
28576
28594
  * Context.
@@ -28632,7 +28650,7 @@ var init_content$1 = __esmMin((() => {
28632
28650
  content$1 = { tokenize: initializeContent };
28633
28651
  }));
28634
28652
  //#endregion
28635
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/initialize/document.js
28653
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/initialize/document.js
28636
28654
  /**
28637
28655
  * @this {TokenizeContext}
28638
28656
  * Self.
@@ -34320,7 +34338,7 @@ var init_micromark_core_commonmark = __esmMin((() => {
34320
34338
  init_thematic_break$1();
34321
34339
  }));
34322
34340
  //#endregion
34323
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/initialize/flow.js
34341
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/initialize/flow.js
34324
34342
  /**
34325
34343
  * @this {TokenizeContext}
34326
34344
  * Self.
@@ -34363,7 +34381,7 @@ var init_flow = __esmMin((() => {
34363
34381
  flow$1 = { tokenize: initializeFlow };
34364
34382
  }));
34365
34383
  //#endregion
34366
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/initialize/text.js
34384
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/initialize/text.js
34367
34385
  /**
34368
34386
  * @param {'string' | 'text'} field
34369
34387
  * Field.
@@ -34533,7 +34551,7 @@ var init_text$1 = __esmMin((() => {
34533
34551
  text$2 = initializeFactory("text");
34534
34552
  }));
34535
34553
  //#endregion
34536
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/constructs.js
34554
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/constructs.js
34537
34555
  var constructs_exports = /* @__PURE__ */ __exportAll({
34538
34556
  attentionMarkers: () => attentionMarkers,
34539
34557
  contentInitial: () => contentInitial,
@@ -34604,7 +34622,7 @@ var init_constructs = __esmMin((() => {
34604
34622
  disable = { null: [] };
34605
34623
  }));
34606
34624
  //#endregion
34607
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/create-tokenizer.js
34625
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/create-tokenizer.js
34608
34626
  /**
34609
34627
  * Create a tokenizer.
34610
34628
  * Tokenizers deal with one type of data (e.g., containers, flow, text).
@@ -35041,7 +35059,7 @@ var init_create_tokenizer = __esmMin((() => {
35041
35059
  init_micromark_util_resolve_all();
35042
35060
  }));
35043
35061
  //#endregion
35044
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/parse.js
35062
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/parse.js
35045
35063
  /**
35046
35064
  * @param {ParseOptions | null | undefined} [options]
35047
35065
  * Configuration (optional).
@@ -35085,7 +35103,7 @@ var init_parse = __esmMin((() => {
35085
35103
  init_create_tokenizer();
35086
35104
  }));
35087
35105
  //#endregion
35088
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/postprocess.js
35106
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/postprocess.js
35089
35107
  /**
35090
35108
  * @param {Array<Event>} events
35091
35109
  * Events.
@@ -35100,7 +35118,7 @@ var init_postprocess = __esmMin((() => {
35100
35118
  init_micromark_util_subtokenize();
35101
35119
  }));
35102
35120
  //#endregion
35103
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/preprocess.js
35121
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/lib/preprocess.js
35104
35122
  /**
35105
35123
  * @returns {Preprocessor}
35106
35124
  * Preprocess a value.
@@ -35189,7 +35207,7 @@ var init_preprocess = __esmMin((() => {
35189
35207
  search = /[\0\t\n\r]/g;
35190
35208
  }));
35191
35209
  //#endregion
35192
- //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/index.js
35210
+ //#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/index.js
35193
35211
  var init_micromark = __esmMin((() => {
35194
35212
  init_decode_named_character_reference();
35195
35213
  init_micromark_util_combine_extensions();
@@ -35241,7 +35259,7 @@ var init_micromark_util_decode_string = __esmMin((() => {
35241
35259
  characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
35242
35260
  }));
35243
35261
  //#endregion
35244
- //#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.2_supports-color@10.2.2/node_modules/mdast-util-from-markdown/lib/index.js
35262
+ //#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.2_supports-color@7.2.0/node_modules/mdast-util-from-markdown/lib/index.js
35245
35263
  /**
35246
35264
  * Turn markdown into a syntax tree.
35247
35265
  *
@@ -36177,12 +36195,12 @@ var init_lib$20 = __esmMin((() => {
36177
36195
  own$4 = {}.hasOwnProperty;
36178
36196
  }));
36179
36197
  //#endregion
36180
- //#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.2_supports-color@10.2.2/node_modules/mdast-util-from-markdown/index.js
36198
+ //#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.2_supports-color@7.2.0/node_modules/mdast-util-from-markdown/index.js
36181
36199
  var init_mdast_util_from_markdown = __esmMin((() => {
36182
36200
  init_lib$20();
36183
36201
  }));
36184
36202
  //#endregion
36185
- //#region ../../node_modules/.pnpm/remark-parse@11.0.0_supports-color@10.2.2/node_modules/remark-parse/lib/index.js
36203
+ //#region ../../node_modules/.pnpm/remark-parse@11.0.0_supports-color@7.2.0/node_modules/remark-parse/lib/index.js
36186
36204
  /**
36187
36205
  * Aadd support for parsing from markdown.
36188
36206
  *
@@ -36211,13 +36229,13 @@ var init_lib$19 = __esmMin((() => {
36211
36229
  init_mdast_util_from_markdown();
36212
36230
  }));
36213
36231
  //#endregion
36214
- //#region ../../node_modules/.pnpm/remark-parse@11.0.0_supports-color@10.2.2/node_modules/remark-parse/index.js
36232
+ //#region ../../node_modules/.pnpm/remark-parse@11.0.0_supports-color@7.2.0/node_modules/remark-parse/index.js
36215
36233
  var remark_parse_exports = /* @__PURE__ */ __exportAll({ default: () => remarkParse });
36216
36234
  var init_remark_parse = __esmMin((() => {
36217
36235
  init_lib$19();
36218
36236
  }));
36219
36237
  //#endregion
36220
- //#region ../../node_modules/.pnpm/mdast-util-mdx-expression@2.0.1_supports-color@10.2.2/node_modules/mdast-util-mdx-expression/lib/index.js
36238
+ //#region ../../node_modules/.pnpm/mdast-util-mdx-expression@2.0.1_supports-color@7.2.0/node_modules/mdast-util-mdx-expression/lib/index.js
36221
36239
  /**
36222
36240
  * Create an extension for `mdast-util-from-markdown` to enable MDX expressions
36223
36241
  * in markdown.
@@ -36328,7 +36346,7 @@ var init_lib$18 = __esmMin((() => {
36328
36346
  init_default();
36329
36347
  }));
36330
36348
  //#endregion
36331
- //#region ../../node_modules/.pnpm/mdast-util-mdx-expression@2.0.1_supports-color@10.2.2/node_modules/mdast-util-mdx-expression/index.js
36349
+ //#region ../../node_modules/.pnpm/mdast-util-mdx-expression@2.0.1_supports-color@7.2.0/node_modules/mdast-util-mdx-expression/index.js
36332
36350
  var init_mdast_util_mdx_expression = __esmMin((() => {
36333
36351
  init_lib$18();
36334
36352
  }));
@@ -36899,7 +36917,7 @@ var init_stringify_entities = __esmMin((() => {
36899
36917
  init_lib$16();
36900
36918
  }));
36901
36919
  //#endregion
36902
- //#region ../../node_modules/.pnpm/mdast-util-mdx-jsx@3.2.0_supports-color@10.2.2/node_modules/mdast-util-mdx-jsx/lib/index.js
36920
+ //#region ../../node_modules/.pnpm/mdast-util-mdx-jsx@3.2.0_supports-color@7.2.0/node_modules/mdast-util-mdx-jsx/lib/index.js
36903
36921
  /**
36904
36922
  * Create an extension for `mdast-util-from-markdown` to enable MDX JSX.
36905
36923
  *
@@ -37422,12 +37440,12 @@ var init_lib$15 = __esmMin((() => {
37422
37440
  indent = " ";
37423
37441
  }));
37424
37442
  //#endregion
37425
- //#region ../../node_modules/.pnpm/mdast-util-mdx-jsx@3.2.0_supports-color@10.2.2/node_modules/mdast-util-mdx-jsx/index.js
37443
+ //#region ../../node_modules/.pnpm/mdast-util-mdx-jsx@3.2.0_supports-color@7.2.0/node_modules/mdast-util-mdx-jsx/index.js
37426
37444
  var init_mdast_util_mdx_jsx = __esmMin((() => {
37427
37445
  init_lib$15();
37428
37446
  }));
37429
37447
  //#endregion
37430
- //#region ../../node_modules/.pnpm/mdast-util-mdxjs-esm@2.0.1_supports-color@10.2.2/node_modules/mdast-util-mdxjs-esm/lib/index.js
37448
+ //#region ../../node_modules/.pnpm/mdast-util-mdxjs-esm@2.0.1_supports-color@7.2.0/node_modules/mdast-util-mdxjs-esm/lib/index.js
37431
37449
  /**
37432
37450
  * Create an extension for `mdast-util-from-markdown` to enable MDX.js ESM in
37433
37451
  * markdown.
@@ -37500,12 +37518,12 @@ var init_lib$14 = __esmMin((() => {
37500
37518
  init_default();
37501
37519
  }));
37502
37520
  //#endregion
37503
- //#region ../../node_modules/.pnpm/mdast-util-mdxjs-esm@2.0.1_supports-color@10.2.2/node_modules/mdast-util-mdxjs-esm/index.js
37521
+ //#region ../../node_modules/.pnpm/mdast-util-mdxjs-esm@2.0.1_supports-color@7.2.0/node_modules/mdast-util-mdxjs-esm/index.js
37504
37522
  var init_mdast_util_mdxjs_esm = __esmMin((() => {
37505
37523
  init_lib$14();
37506
37524
  }));
37507
37525
  //#endregion
37508
- //#region ../../node_modules/.pnpm/mdast-util-mdx@3.0.0_supports-color@10.2.2/node_modules/mdast-util-mdx/lib/index.js
37526
+ //#region ../../node_modules/.pnpm/mdast-util-mdx@3.0.0_supports-color@7.2.0/node_modules/mdast-util-mdx/lib/index.js
37509
37527
  /**
37510
37528
  * Create an extension for `mdast-util-from-markdown` to enable MDX (ESM, JSX,
37511
37529
  * expressions).
@@ -37547,7 +37565,7 @@ var init_lib$13 = __esmMin((() => {
37547
37565
  init_mdast_util_mdxjs_esm();
37548
37566
  }));
37549
37567
  //#endregion
37550
- //#region ../../node_modules/.pnpm/mdast-util-mdx@3.0.0_supports-color@10.2.2/node_modules/mdast-util-mdx/index.js
37568
+ //#region ../../node_modules/.pnpm/mdast-util-mdx@3.0.0_supports-color@7.2.0/node_modules/mdast-util-mdx/index.js
37551
37569
  var init_mdast_util_mdx = __esmMin((() => {
37552
37570
  init_lib$13();
37553
37571
  }));
@@ -50427,7 +50445,7 @@ var init_micromark_extension_mdxjs = __esmMin((() => {
50427
50445
  init_micromark_util_combine_extensions();
50428
50446
  }));
50429
50447
  //#endregion
50430
- //#region ../../node_modules/.pnpm/remark-mdx@3.1.1_supports-color@10.2.2/node_modules/remark-mdx/lib/index.js
50448
+ //#region ../../node_modules/.pnpm/remark-mdx@3.1.1_supports-color@7.2.0/node_modules/remark-mdx/lib/index.js
50431
50449
  /**
50432
50450
  * Add support for MDX (JSX: `<Video id={123} />`, export/imports: `export {x}
50433
50451
  * from 'y'`; and expressions: `{1 + 1}`).
@@ -50457,7 +50475,7 @@ var init_lib$8 = __esmMin((() => {
50457
50475
  emptyOptions$1 = {};
50458
50476
  }));
50459
50477
  //#endregion
50460
- //#region ../../node_modules/.pnpm/remark-mdx@3.1.1_supports-color@10.2.2/node_modules/remark-mdx/index.js
50478
+ //#region ../../node_modules/.pnpm/remark-mdx@3.1.1_supports-color@7.2.0/node_modules/remark-mdx/index.js
50461
50479
  var remark_mdx_exports = /* @__PURE__ */ __exportAll({ default: () => remarkMdx });
50462
50480
  var init_remark_mdx = __esmMin((() => {
50463
50481
  init_lib$8();
@@ -53412,7 +53430,7 @@ function escapeStringRegexp(string) {
53412
53430
  }
53413
53431
  var init_escape_string_regexp = __esmMin((() => {}));
53414
53432
  //#endregion
53415
- //#region ../../node_modules/.pnpm/mdast-util-frontmatter@2.0.1_supports-color@10.2.2/node_modules/mdast-util-frontmatter/lib/index.js
53433
+ //#region ../../node_modules/.pnpm/mdast-util-frontmatter@2.0.1_supports-color@7.2.0/node_modules/mdast-util-frontmatter/lib/index.js
53416
53434
  /**
53417
53435
  * Create an extension for `mdast-util-from-markdown`.
53418
53436
  *
@@ -53563,12 +53581,12 @@ var init_lib$1 = __esmMin((() => {
53563
53581
  init_escape_string_regexp();
53564
53582
  }));
53565
53583
  //#endregion
53566
- //#region ../../node_modules/.pnpm/mdast-util-frontmatter@2.0.1_supports-color@10.2.2/node_modules/mdast-util-frontmatter/index.js
53584
+ //#region ../../node_modules/.pnpm/mdast-util-frontmatter@2.0.1_supports-color@7.2.0/node_modules/mdast-util-frontmatter/index.js
53567
53585
  var init_mdast_util_frontmatter = __esmMin((() => {
53568
53586
  init_lib$1();
53569
53587
  }));
53570
53588
  //#endregion
53571
- //#region ../../node_modules/.pnpm/remark-frontmatter@5.0.0_supports-color@10.2.2/node_modules/remark-frontmatter/lib/index.js
53589
+ //#region ../../node_modules/.pnpm/remark-frontmatter@5.0.0_supports-color@7.2.0/node_modules/remark-frontmatter/lib/index.js
53572
53590
  /**
53573
53591
  * Add support for frontmatter.
53574
53592
  *
@@ -53599,7 +53617,7 @@ var init_lib = __esmMin((() => {
53599
53617
  emptyOptions = "yaml";
53600
53618
  }));
53601
53619
  //#endregion
53602
- //#region ../../node_modules/.pnpm/remark-frontmatter@5.0.0_supports-color@10.2.2/node_modules/remark-frontmatter/index.js
53620
+ //#region ../../node_modules/.pnpm/remark-frontmatter@5.0.0_supports-color@7.2.0/node_modules/remark-frontmatter/index.js
53603
53621
  var remark_frontmatter_exports = /* @__PURE__ */ __exportAll({ default: () => remarkFrontmatter });
53604
53622
  var init_remark_frontmatter = __esmMin((() => {
53605
53623
  init_lib();
@@ -54451,12 +54469,11 @@ ${PACKAGE_MANAGERS.map((pm) => buildNxCommand("<options>", pm)).join(" - \n")}
54451
54469
 
54452
54470
  ## General Instructions
54453
54471
 
54454
- - Workspaces contain a single \`package.json\` file at the root which defines the dependencies for all projects. Therefore when installing dependencies, you must add these to the root workspace using the appropriate command for your package manager:
54455
- - pnpm add -w -D <package>
54456
- - yarn add -D <package>
54457
- - npm install --legacy-peer-deps -D <package>
54458
- - bun add -D <package>
54459
- - (Omit -D for production dependencies)
54472
+ - Each project declares the third-party runtime dependencies its source imports in its own \`package.json\`; shared build/test tooling (test runners, bundlers, etc.) is declared in the root \`package.json\` \`devDependencies\`. Versions follow a single version policy, recorded in the package manager's dependency catalog where supported (referenced as \`catalog:\`). Install with the appropriate command for your package manager:
54473
+ - Add a project runtime dependency: \`pnpm add <package> --filter <project>\` / \`yarn workspace <project> add <package>\` / \`npm install <package> -w <project>\` / \`bun add <package> --cwd <project-directory>\`
54474
+ - Add a shared dev tool at the root: \`pnpm add -Dw <package>\` / \`yarn add -D <package>\` / \`npm install --legacy-peer-deps -D <package>\` / \`bun install -D <package>\`
54475
+ - The \`noUndeclaredDependencies\` lint rule enforces that a project's source only imports packages declared in its own \`package.json\`
54476
+ - Projects in the same workspace can import one another directly by package name (eg \`@workspace-name/project-name\`) without declaring a dependency in \`package.json\` — TypeScript path aliases in \`tsconfig.base.json\` resolve these imports
54460
54477
  - When specifying project names as arguments to generators, prefer the _fully qualified_ project name, for example \`@workspace-name/project-name\`. Check the \`project.json\` file for the specific package to find its fully qualified name
54461
54478
  - When no generator exists for a specific framework required, use the base \`ts#project\` and \`py#project\` generators and build on top.
54462
54479
  - Leave the \`--infra\` option at its default value unless the user has explicitly instructed otherwise. Generators choose a sensible default type of infrastructure to deploy the project with, so only override \`--infra\` when the user has specified a particular requirement.
@@ -124,9 +124,9 @@ It creates or updates the following files:
124
124
  - tsconfig.json a root TypeScript config referencing your workspace's projects, which Nx's TypeScript sync keeps up to date
125
125
  - tsconfig.base.json the shared compiler options the plugin's TypeScript projects extend (see below for what it carries)
126
126
  - pnpm-workspace.yaml (pnpm only) allow-lists the build scripts the plugin's dependencies need (`@swc/core`, `esbuild`, `nx`, `sharp`)
127
- - package.json convenience scripts for common tasks, plus the `nx`, `@nx/js`, `@nx/workspace`, `typescript` and Biome dev dependencies
127
+ - package.json convenience scripts for common tasks, plus the `@aws/nx-plugin`, `@aws/nx-plugin-mcp`, `nx`, `@nx/js`, `@nx/workspace`, `typescript` and Biome dev dependencies
128
128
  - biome.json default Biome formatter and linter configuration
129
- - .mcp.json configures the MCP server for supported coding agents unless disabled (also .cursor/, .kiro/, .gemini/, .vscode/ and .codex/ equivalents)
129
+ - .mcp.json configures the MCP server for supported coding agents unless disabled (also .cursor/, .kiro/, .gemini/, .vscode/ and .codex/ equivalents). It runs the workspace's own `@aws/nx-plugin-mcp`, so the server always matches the version installed in your workspace
130
130
  </FileTree>
131
131
 
132
132
  The <Link path="get_started/building-with-ai">MCP server</Link> configuration can be disabled with `--mcp=false`.
@@ -143,6 +143,10 @@ The plugin's TypeScript projects rely on these compiler options. If a `tsconfig.
143
143
 
144
144
  ## Troubleshooting
145
145
 
146
+ #### `nx build <project>` no longer works for an existing TypeScript library
147
+
148
+ The first `ts#project` run configures the `@nx/js/typescript` plugin to infer the TypeScript build target as `compile` (the plugin reserves `build` for orchestrating `lint`, `compile` and `test`). Existing libraries relying on the inferred `build` target are inferred as `compile` too — run `nx run <project>:compile`, or use `nx run-many --target build,compile`. Libraries with an explicit `build` target in their `project.json` are unaffected.
149
+
146
150
  #### `The workspace is out of sync`
147
151
 
148
152
  TypeScript project references need syncing. `init` registers the sync generators; run:
@@ -112,7 +112,7 @@ Open `packages/infra/src/stacks/application-stack.ts` and add the following code
112
112
 
113
113
  ```typescript
114
114
  import { Stack, StackProps } from 'aws-cdk-lib';
115
- import { DemoApi, DemoWebsite, UserIdentity } from ':my-project/common-constructs';
115
+ import { DemoApi, DemoWebsite, UserIdentity } from '@my-project/common-constructs';
116
116
  import { Construct } from 'constructs';
117
117
 
118
118
  export class ApplicationStack extends Stack {
@@ -202,7 +202,7 @@ import {
202
202
  } from '../../core/api/utils.js';
203
203
  import { AddCorsPreflightAspect, RestApi } from '../../core/api/rest-api.js';
204
204
  import { Procedures, routerToOperations } from '../../core/api/trpc-utils.js';
205
- import { AppRouter, appRouter } from ':dungeon-adventure/game-api';
205
+ import { AppRouter, appRouter } from '@dungeon-adventure/game-api';
206
206
 
207
207
  // String union type for all API operation names
208
208
  type Operations = Procedures<AppRouter>;
@@ -1091,7 +1091,7 @@ The `ts#infra` generator generates/updates these. Let us examine some of the key
1091
1091
  ```ts
1092
1092
  // packages/infra/src/main.ts
1093
1093
  import { ApplicationStage } from './stages/application-stage.js';
1094
- import { App } from ':dungeon-adventure/common-constructs';
1094
+ import { App } from '@dungeon-adventure/common-constructs';
1095
1095
 
1096
1096
  const app = new App();
1097
1097
 
@@ -78,10 +78,10 @@ game -> item: 1..*
78
78
 
79
79
  The `ts#dynamodb` generator set up [ElectroDB](https://electrodb.dev/en/core-concepts/introduction/), which we will use to model our data. We will persist conversation history in S3, so we add a dependency on the S3 client:
80
80
 
81
- <InstallCommand pkg={getDungeonAdventureElectroDbDependencies()} />
81
+ <InstallCommand pkg={getDungeonAdventureElectroDbDependencies()} project="@dungeon-adventure/game-api" />
82
82
 
83
- <Aside title="Root Dependencies">
84
- All dependencies are added to the root `package.json` as the `@aws/nx-plugin` follows the [single version policy](https://nx.dev/concepts/decisions/dependency-management#single-version-policy) principle. For more information, refer to the <Link path="guides/typescript-project#dependencies">ts#project guide</Link>.
83
+ <Aside title="Project Dependencies">
84
+ The S3 client is added to the `game-api` project's own `package.json`, since that project's source imports it. Versions are still aligned across the workspace via the package manager's dependency catalog (where supported) ([single version policy](https://nx.dev/concepts/decisions/dependency-management#single-version-policy)). For more information, refer to the <Link path="guides/typescript-project#dependencies">ts#project guide</Link>.
85
85
  </Aside>
86
86
 
87
87
  Replace the generated example entity in `packages/dungeon-db/src/entities/index.ts` with our `Game` and `Inventory` entities, and delete `packages/dungeon-db/src/entities/example.ts`:
@@ -137,6 +137,7 @@ ddb -> sessions: {
137
137
  Before you proceed, you will need the following global dependencies:
138
138
 
139
139
  <Snippet name="required-prerequisites" />
140
+ - [AWS Credentials](https://docs.aws.amazon.com/sdkref/latest/guide/access.html) configured to your target AWS account, since this tutorial deploys the application and invokes Amazon Bedrock
140
141
  - [Docker](https://www.docker.com/) (or [Finch](https://github.com/runfinch/finch)) is required for local DynamoDB development and for building the AgentCore components
141
142
 
142
143
  :::tip[AI Assistant Setup]
@@ -362,7 +362,7 @@ The AgentCore Gateway generator creates CDK or Terraform infrastructure as code
362
362
  The CDK construct for deploying your Gateway lives in the `common/constructs` folder. You can consume this in a CDK application, for example:
363
363
 
364
364
  ```ts {7} title="packages/infra/src/stacks/application-stack.ts"
365
- import { MyGateway } from ':my-scope/common-constructs';
365
+ import { MyGateway } from '@my-scope/common-constructs';
366
366
 
367
367
  export class ApplicationStack extends Stack {
368
368
  constructor(scope: Construct, id: string, props?: StackProps) {
@@ -58,7 +58,7 @@ To allow the agent's Lambda function to access the DynamoDB table, grant the nec
58
58
  <Fragment slot="cdk">
59
59
 
60
60
  ```ts title="packages/infra/src/stacks/application-stack.ts"
61
- import { MyTable } from ':my-scope/common-constructs';
61
+ import { MyTable } from '@my-scope/common-constructs';
62
62
 
63
63
  const table = new MyTable(this, 'Table');
64
64
  const myAgent = new MyAgent(this, 'MyAgent');
@@ -73,7 +73,7 @@ The generated agent construct implements `IGrantable` and `IConnectable`, so you
73
73
  ```ts title="packages/infra/src/stacks/application-stack.ts"
74
74
  import { SecurityGroup } from 'aws-cdk-lib/aws-ec2';
75
75
  import { RuntimeNetworkConfiguration } from 'aws-cdk-lib/aws-bedrockagentcore';
76
- import { MyDatabase } from ':my-scope/common-constructs';
76
+ import { MyDatabase } from '@my-scope/common-constructs';
77
77
 
78
78
  const db = new MyDatabase(this, 'Db', { vpc, ... });
79
79
 
@@ -82,7 +82,7 @@ To allow the FastAPI Lambda function to connect to the database at runtime, it m
82
82
  In your application stack, deploy the API into the same VPC as the database, then call `allowDefaultPortFrom` and `grantConnect` to open the network path and grant IAM `rds-db:connect` permission to the Lambda handler:
83
83
 
84
84
  ```ts title="packages/infra/src/stacks/application-stack.ts"
85
- import { MyDatabase } from ':my-scope/common-constructs';
85
+ import { MyDatabase } from '@my-scope/common-constructs';
86
86
 
87
87
  const db = new MyDatabase(this, 'Db', { vpc, ... });
88
88
 
@@ -58,7 +58,7 @@ To allow the MCP server's Lambda function to access the DynamoDB table, grant th
58
58
  <Fragment slot="cdk">
59
59
 
60
60
  ```ts title="packages/infra/src/stacks/application-stack.ts"
61
- import { MyTable } from ':my-scope/common-constructs';
61
+ import { MyTable } from '@my-scope/common-constructs';
62
62
 
63
63
  const table = new MyTable(this, 'Table');
64
64
  const myMcpServer = new MyMcpServer(this, 'MyMcpServer');
@@ -82,7 +82,7 @@ The generated MCP server construct implements `IGrantable` and `IConnectable`, s
82
82
  ```ts title="packages/infra/src/stacks/application-stack.ts"
83
83
  import { SecurityGroup } from 'aws-cdk-lib/aws-ec2';
84
84
  import { RuntimeNetworkConfiguration } from 'aws-cdk-lib/aws-bedrockagentcore';
85
- import { MyDatabase } from ':my-scope/common-constructs';
85
+ import { MyDatabase } from '@my-scope/common-constructs';
86
86
 
87
87
  const db = new MyDatabase(this, 'Db', { vpc, ... });
88
88
 
@@ -42,7 +42,7 @@ The generator updates your Smithy API's `project.json` to add a dependency from
42
42
  Import entity factories from the DynamoDB package and use them inside your operation implementations:
43
43
 
44
44
  ```ts title="packages/api/src/operations/list-examples.ts"
45
- import { createExampleEntity } from ':my-scope/my-table';
45
+ import { createExampleEntity } from '@my-scope/my-table';
46
46
  import {
47
47
  ListExamplesOperationInput,
48
48
  ListExamplesOperationOutput,
@@ -55,7 +55,7 @@ Additionally, it updates the API's `dev` target to start the database automatica
55
55
  The generator adds a typed `db` property to `ServiceContext` in `context.ts`:
56
56
 
57
57
  ```ts title="packages/api/src/context.ts" {1,7}
58
- import { getPrisma as getMyDb } from ':my-scope/my-db';
58
+ import { getPrisma as getMyDb } from '@my-scope/my-db';
59
59
 
60
60
  export interface ServiceContext {
61
61
  tracer: Tracer;
@@ -70,7 +70,7 @@ export interface ServiceContext {
70
70
  The Prisma client is instantiated inside `lambdaHandler` and passed through the service context:
71
71
 
72
72
  ```ts title="packages/api/src/handler.ts" {1,10}
73
- import { getPrisma as getMyDb } from ':my-scope/my-db';
73
+ import { getPrisma as getMyDb } from '@my-scope/my-db';
74
74
 
75
75
  export const lambdaHandler = async (event: APIGatewayProxyEvent) => {
76
76
  const httpRequest = convertEvent(event);
@@ -141,7 +141,7 @@ const httpResponse = await serviceHandler.handle(httpRequest, {
141
141
  The generator applies the same Prisma client injection inside the request handler in `local-server.ts`:
142
142
 
143
143
  ```ts title="packages/api/src/local-server.ts" {1,5,10}
144
- import { getPrisma as getMyDb } from ':my-scope/my-db';
144
+ import { getPrisma as getMyDb } from '@my-scope/my-db';
145
145
 
146
146
  const server = createServer(async function (req, res) {
147
147
  const httpRequest = convertRequest(req);
@@ -42,7 +42,7 @@ The generator updates your tRPC API's `project.json` to add a dependency from it
42
42
  Import entity factories from the DynamoDB package and use them inside your tRPC procedures:
43
43
 
44
44
  ```ts title="packages/api/src/procedures/example.ts"
45
- import { createExampleEntity } from ':my-scope/my-table';
45
+ import { createExampleEntity } from '@my-scope/my-table';
46
46
  import { publicProcedure } from '../init.js';
47
47
 
48
48
  export const listExamples = publicProcedure
@@ -70,7 +70,7 @@ The generator transforms your agent's `agent.ts` to wrap the remote A2A agent as
70
70
 
71
71
  ```ts title="packages/example/src/my-agent/agent.ts" {2,5-11,14}
72
72
  import { Agent, tool } from '@strands-agents/sdk';
73
- import { RemoteAgentClientStrands } from ':my-scope/agent-connection';
73
+ import { RemoteAgentClientStrands } from '@my-scope/agent-connection';
74
74
  import { z } from 'zod';
75
75
 
76
76
  export const getAgent = async (sessionId: string) => {
@@ -42,7 +42,7 @@ The generator updates the agent's `<agent-name>-dev` target in `project.json` to
42
42
  Import entity factories from the DynamoDB package and use them inside your agent definition:
43
43
 
44
44
  ```ts title="packages/my-service/src/my-agent/agent.ts"
45
- import { createExampleEntity } from ':my-scope/my-table';
45
+ import { createExampleEntity } from '@my-scope/my-table';
46
46
 
47
47
  export const getAgent = async () => {
48
48
  // ...
@@ -70,7 +70,7 @@ To allow the agent's Lambda function to access the DynamoDB table, grant the nec
70
70
  <Fragment slot="cdk">
71
71
 
72
72
  ```ts title="packages/infra/src/stacks/application-stack.ts"
73
- import { MyTable } from ':my-scope/common-constructs';
73
+ import { MyTable } from '@my-scope/common-constructs';
74
74
 
75
75
  const table = new MyTable(this, 'Table');
76
76
  const myAgent = new MyAgent(this, 'MyAgent');
@@ -67,7 +67,7 @@ The generator transforms your agent's `agent.ts` to use the Gateway client:
67
67
 
68
68
  ```ts title="packages/example/src/my-agent/agent.ts" {2,5,8}
69
69
  import { Agent } from '@strands-agents/sdk';
70
- import { MyGatewayClientStrands } from ':my-scope/agent-connection';
70
+ import { MyGatewayClientStrands } from '@my-scope/agent-connection';
71
71
 
72
72
  export const getAgent = async () => {
73
73
  const myGateway = await MyGatewayClientStrands.create();
@@ -70,7 +70,7 @@ The generator transforms your agent's `agent.ts` to use the MCP server's tools:
70
70
 
71
71
  ```ts title="packages/example/src/my-agent/agent.ts" {2,5,8}
72
72
  import { Agent, tool } from '@strands-agents/sdk';
73
- import { MyMcpServerClientStrands } from ':my-scope/agent-connection';
73
+ import { MyMcpServerClientStrands } from '@my-scope/agent-connection';
74
74
 
75
75
  export const getAgent = async (sessionId: string) => {
76
76
  const myMcpServerClient = await MyMcpServerClientStrands.create(sessionId);
@@ -53,7 +53,7 @@ Additionally, the agent's `<agent-name>-dev` target is updated to depend on the
53
53
  The Prisma client is instantiated inside `getAgent()`. Since the `ts#agent` generator configures a single Agent per session, the client is also reused for the lifetime of the session:
54
54
 
55
55
  ```ts title="packages/my-service/src/my-agent/agent.ts" {1,4}
56
- import { getPrisma as getMyDb } from ':my-scope/my-db';
56
+ import { getPrisma as getMyDb } from '@my-scope/my-db';
57
57
 
58
58
  export const getAgent = async () => {
59
59
  const myDb = await getMyDb();
@@ -67,8 +67,8 @@ export const getAgent = async () => {
67
67
  Running the generator again with a different target adds the second database alongside the first:
68
68
 
69
69
  ```ts title="packages/my-service/src/my-agent/agent.ts" {1,2,5,6}
70
- import { getPrisma as getMyDb } from ':my-scope/my-db';
71
- import { getPrisma as getOtherDb } from ':my-scope/other-db';
70
+ import { getPrisma as getMyDb } from '@my-scope/my-db';
71
+ import { getPrisma as getOtherDb } from '@my-scope/other-db';
72
72
 
73
73
  export const getAgent = async () => {
74
74
  const myDb = await getMyDb();
@@ -88,7 +88,7 @@ The generated agent construct implements `IGrantable` and `IConnectable`, so you
88
88
  ```ts title="packages/infra/src/stacks/application-stack.ts"
89
89
  import { SecurityGroup } from 'aws-cdk-lib/aws-ec2';
90
90
  import { RuntimeNetworkConfiguration } from 'aws-cdk-lib/aws-bedrockagentcore';
91
- import { MyDatabase } from ':my-scope/common-constructs';
91
+ import { MyDatabase } from '@my-scope/common-constructs';
92
92
 
93
93
  const db = new MyDatabase(this, 'Db', { vpc, ... });
94
94
 
@@ -42,7 +42,7 @@ The generator updates the MCP server's `<mcp-server-name>-dev` target in `projec
42
42
  Import entity factories from the DynamoDB package and use them inside `createServer`:
43
43
 
44
44
  ```ts title="packages/my-service/src/my-mcp/server.ts"
45
- import { createExampleEntity } from ':my-scope/my-table';
45
+ import { createExampleEntity } from '@my-scope/my-table';
46
46
 
47
47
  export const createServer = async () => {
48
48
  const server = new McpServer({ name: 'my-service', version: '1.0.0' });
@@ -67,7 +67,7 @@ To allow the MCP server to access the DynamoDB table, grant the necessary permis
67
67
  <Fragment slot="cdk">
68
68
 
69
69
  ```ts title="packages/infra/src/stacks/application-stack.ts"
70
- import { MyTable } from ':my-scope/common-constructs';
70
+ import { MyTable } from '@my-scope/common-constructs';
71
71
 
72
72
  const table = new MyTable(this, 'Table');
73
73
  const myMcpServer = new MyMcpServer(this, 'MyMcpServer');
@@ -53,7 +53,7 @@ Additionally, the `<mcp-server-name>-dev` target is updated to depend on the dat
53
53
  The Prisma client is fetched inside `createServer` and available to all tools and resources registered there:
54
54
 
55
55
  ```ts title="packages/my-service/src/my-mcp/server.ts" {1,4}
56
- import { getPrisma as getMyDb } from ':my-scope/my-db';
56
+ import { getPrisma as getMyDb } from '@my-scope/my-db';
57
57
 
58
58
  export const createServer = async () => {
59
59
  const myDb = await getMyDb();
@@ -87,7 +87,7 @@ The generated MCP server construct implements `IGrantable` and `IConnectable`, s
87
87
  ```ts title="packages/infra/src/stacks/application-stack.ts"
88
88
  import { SecurityGroup } from 'aws-cdk-lib/aws-ec2';
89
89
  import { RuntimeNetworkConfiguration } from 'aws-cdk-lib/aws-bedrockagentcore';
90
- import { MyDatabase } from ':my-scope/common-constructs';
90
+ import { MyDatabase } from '@my-scope/common-constructs';
91
91
 
92
92
  const db = new MyDatabase(this, 'Db', { vpc, ... });
93
93