@mastra/codemod 0.0.0-main-test-05-11-2025-2-20251106053353 → 0.0.0-main-test-2-20251127203846

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 (95) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/README.md +41 -24
  3. package/dist/codemods/chunk-JNFQ6J6B.js +21 -0
  4. package/dist/codemods/chunk-JNFQ6J6B.js.map +1 -0
  5. package/dist/codemods/chunk-LGW3NUAJ.js +32 -0
  6. package/dist/codemods/chunk-LGW3NUAJ.js.map +1 -0
  7. package/dist/codemods/chunk-PKCFDS7J.js +177 -0
  8. package/dist/codemods/chunk-PKCFDS7J.js.map +1 -0
  9. package/dist/codemods/lib/add-comment.js +6 -54
  10. package/dist/codemods/lib/add-comment.js.map +1 -1
  11. package/dist/codemods/lib/create-transformer.js +5 -43
  12. package/dist/codemods/lib/create-transformer.js.map +1 -1
  13. package/dist/codemods/lib/utils.js +23 -0
  14. package/dist/codemods/lib/utils.js.map +1 -0
  15. package/dist/codemods/v1/agent-abort-signal.js +61 -0
  16. package/dist/codemods/v1/agent-abort-signal.js.map +1 -0
  17. package/dist/codemods/v1/agent-generate-stream-v-next.js +13 -70
  18. package/dist/codemods/v1/agent-generate-stream-v-next.js.map +1 -1
  19. package/dist/codemods/v1/agent-processor-methods.js +14 -71
  20. package/dist/codemods/v1/agent-processor-methods.js.map +1 -1
  21. package/dist/codemods/v1/agent-property-access.js +11 -50
  22. package/dist/codemods/v1/agent-property-access.js.map +1 -1
  23. package/dist/codemods/v1/agent-voice.js +10 -49
  24. package/dist/codemods/v1/agent-voice.js.map +1 -1
  25. package/dist/codemods/v1/client-get-memory-thread.js +58 -0
  26. package/dist/codemods/v1/client-get-memory-thread.js.map +1 -0
  27. package/dist/codemods/v1/client-offset-limit.js +49 -0
  28. package/dist/codemods/v1/client-offset-limit.js.map +1 -0
  29. package/dist/codemods/v1/client-sdk-types.js +56 -0
  30. package/dist/codemods/v1/client-sdk-types.js.map +1 -0
  31. package/dist/codemods/v1/client-to-ai-sdk-format.js +20 -0
  32. package/dist/codemods/v1/client-to-ai-sdk-format.js.map +1 -0
  33. package/dist/codemods/v1/evals-prebuilt-imports.js +24 -0
  34. package/dist/codemods/v1/evals-prebuilt-imports.js.map +1 -0
  35. package/dist/codemods/v1/evals-run-experiment.js +20 -0
  36. package/dist/codemods/v1/evals-run-experiment.js.map +1 -0
  37. package/dist/codemods/v1/evals-scorer-by-name.js +22 -0
  38. package/dist/codemods/v1/evals-scorer-by-name.js.map +1 -0
  39. package/dist/codemods/v1/experimental-auth.js +7 -43
  40. package/dist/codemods/v1/experimental-auth.js.map +1 -1
  41. package/dist/codemods/v1/mastra-core-imports.js +8 -44
  42. package/dist/codemods/v1/mastra-core-imports.js.map +1 -1
  43. package/dist/codemods/v1/mastra-plural-apis.js +31 -0
  44. package/dist/codemods/v1/mastra-plural-apis.js.map +1 -0
  45. package/dist/codemods/v1/mcp-get-tools.js +16 -66
  46. package/dist/codemods/v1/mcp-get-tools.js.map +1 -1
  47. package/dist/codemods/v1/mcp-get-toolsets.js +16 -66
  48. package/dist/codemods/v1/mcp-get-toolsets.js.map +1 -1
  49. package/dist/codemods/v1/memory-message-v2-type.js +50 -0
  50. package/dist/codemods/v1/memory-message-v2-type.js.map +1 -0
  51. package/dist/codemods/v1/memory-query-to-recall.js +22 -0
  52. package/dist/codemods/v1/memory-query-to-recall.js.map +1 -0
  53. package/dist/codemods/v1/memory-vector-search-param.js +31 -0
  54. package/dist/codemods/v1/memory-vector-search-param.js.map +1 -0
  55. package/dist/codemods/v1/not-implemented/agent-format-parameter.js +53 -0
  56. package/dist/codemods/v1/not-implemented/agent-format-parameter.js.map +1 -0
  57. package/dist/codemods/v1/not-implemented/agent-to-step.js +54 -0
  58. package/dist/codemods/v1/not-implemented/agent-to-step.js.map +1 -0
  59. package/dist/codemods/v1/not-implemented/mastra-memory.js +50 -0
  60. package/dist/codemods/v1/not-implemented/mastra-memory.js.map +1 -0
  61. package/dist/codemods/v1/not-implemented/mastra-required-id.js +113 -0
  62. package/dist/codemods/v1/not-implemented/mastra-required-id.js.map +1 -0
  63. package/dist/codemods/v1/runtime-context.js +6 -42
  64. package/dist/codemods/v1/runtime-context.js.map +1 -1
  65. package/dist/codemods/v1/storage-get-messages-paginated.js +41 -0
  66. package/dist/codemods/v1/storage-get-messages-paginated.js.map +1 -0
  67. package/dist/codemods/v1/storage-get-threads-by-resource.js +23 -0
  68. package/dist/codemods/v1/storage-get-threads-by-resource.js.map +1 -0
  69. package/dist/codemods/v1/storage-list-messages-by-id.js +23 -0
  70. package/dist/codemods/v1/storage-list-messages-by-id.js.map +1 -0
  71. package/dist/codemods/v1/storage-list-workflow-runs.js +23 -0
  72. package/dist/codemods/v1/storage-list-workflow-runs.js.map +1 -0
  73. package/dist/codemods/v1/storage-postgres-schema-name.js +20 -0
  74. package/dist/codemods/v1/storage-postgres-schema-name.js.map +1 -0
  75. package/dist/codemods/v1/vector-pg-constructor.js +27 -0
  76. package/dist/codemods/v1/vector-pg-constructor.js.map +1 -0
  77. package/dist/codemods/v1/voice-property-names.js +12 -48
  78. package/dist/codemods/v1/voice-property-names.js.map +1 -1
  79. package/dist/codemods/v1/workflow-create-run-async.js +22 -0
  80. package/dist/codemods/v1/workflow-create-run-async.js.map +1 -0
  81. package/dist/codemods/v1/workflow-list-runs.js +22 -0
  82. package/dist/codemods/v1/workflow-list-runs.js.map +1 -0
  83. package/dist/codemods/v1/workflow-run-count.js +53 -0
  84. package/dist/codemods/v1/workflow-run-count.js.map +1 -0
  85. package/dist/index.js +66 -46
  86. package/dist/index.js.map +1 -1
  87. package/package.json +8 -5
  88. package/dist/codemods/v1/agent-get-agents.js +0 -74
  89. package/dist/codemods/v1/agent-get-agents.js.map +0 -1
  90. package/dist/codemods/v1/evals-get-scorers.js +0 -74
  91. package/dist/codemods/v1/evals-get-scorers.js.map +0 -1
  92. package/dist/codemods/v1/mcp-get-mcp-servers.js +0 -74
  93. package/dist/codemods/v1/mcp-get-mcp-servers.js.map +0 -1
  94. package/dist/codemods/v1/workflows-get-workflows.js +0 -74
  95. package/dist/codemods/v1/workflows-get-workflows.js.map +0 -1
@@ -1,74 +1,24 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/codemods/v1/mcp-get-toolsets.ts
21
- var mcp_get_toolsets_exports = {};
22
- __export(mcp_get_toolsets_exports, {
23
- default: () => mcp_get_toolsets_default
24
- });
25
- module.exports = __toCommonJS(mcp_get_toolsets_exports);
26
-
27
- // src/codemods/lib/create-transformer.ts
28
- function createTransformer(transformFn) {
29
- return function transformer(fileInfo, api, options) {
30
- const j = api.jscodeshift;
31
- const root = j(fileInfo.source);
32
- const context = {
33
- j,
34
- root,
35
- hasChanges: false,
36
- messages: []
37
- };
38
- transformFn(fileInfo, api, options, context);
39
- context.messages.forEach((message) => api.report(message));
40
- return context.hasChanges ? root.toSource({ quote: "single" }) : null;
41
- };
42
- }
1
+ import {
2
+ createTransformer
3
+ } from "../chunk-JNFQ6J6B.js";
4
+ import {
5
+ renameMethod,
6
+ trackClassInstances
7
+ } from "../chunk-PKCFDS7J.js";
43
8
 
44
9
  // src/codemods/v1/mcp-get-toolsets.ts
45
- var mcp_get_toolsets_default = createTransformer((fileInfo, api, options, context) => {
10
+ var mcp_get_toolsets_default = createTransformer((_fileInfo, _api, _options, context) => {
46
11
  const { j, root } = context;
47
- const mcpVariables = /* @__PURE__ */ new Set();
48
- root.find(j.VariableDeclarator).forEach((path) => {
49
- const node = path.node;
50
- if (node.init && node.init.type === "NewExpression" && node.init.callee.type === "Identifier" && node.init.callee.name === "MCPServer" && node.id.type === "Identifier") {
51
- mcpVariables.add(node.id.name);
52
- }
53
- });
54
- if (mcpVariables.size === 0) return;
55
- root.find(j.CallExpression).forEach((path) => {
56
- const node = path.node;
57
- if (node.callee.type !== "MemberExpression") {
58
- return;
59
- }
60
- const callee = node.callee;
61
- if (callee.object.type !== "Identifier" || !mcpVariables.has(callee.object.name)) {
62
- return;
63
- }
64
- if (callee.property.type !== "Identifier" || callee.property.name !== "getToolsets") {
65
- return;
66
- }
67
- callee.property.name = "listToolsets";
12
+ const mcpServerInstances = trackClassInstances(j, root, "MCPServer");
13
+ const mcpClientInstances = trackClassInstances(j, root, "MCPClient");
14
+ const mcpInstances = /* @__PURE__ */ new Set([...mcpServerInstances, ...mcpClientInstances]);
15
+ const count = renameMethod(j, root, mcpInstances, "getToolsets", "listToolsets");
16
+ if (count > 0) {
68
17
  context.hasChanges = true;
69
- });
70
- if (context.hasChanges) {
71
18
  context.messages.push(`Transformed MCPServer method: getToolsets \u2192 listToolsets`);
72
19
  }
73
20
  });
21
+ export {
22
+ mcp_get_toolsets_default as default
23
+ };
74
24
  //# sourceMappingURL=mcp-get-toolsets.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/codemods/v1/mcp-get-toolsets.ts","../../../src/codemods/lib/create-transformer.ts"],"sourcesContent":["import { createTransformer } from '../lib/create-transformer';\n\n/**\n * Transforms MCPServer getToolsets method to listToolsets:\n * - mcp.getToolsets() → mcp.listToolsets()\n *\n * Only transforms methods on variables that were instantiated with `new MCPServer(...)`\n */\nexport default createTransformer((fileInfo, api, options, context) => {\n const { j, root } = context;\n\n // Track variable names that are MCPServer instances\n const mcpVariables = new Set<string>();\n\n // Find all variable declarations with new MCPServer() assignments\n root.find(j.VariableDeclarator).forEach(path => {\n const node = path.node;\n\n // Check if the init is a new MCPServer() expression\n if (\n node.init &&\n node.init.type === 'NewExpression' &&\n node.init.callee.type === 'Identifier' &&\n node.init.callee.name === 'MCPServer' &&\n node.id.type === 'Identifier'\n ) {\n mcpVariables.add(node.id.name);\n }\n });\n\n // Early return if no MCPServer instances found\n if (mcpVariables.size === 0) return;\n\n // Find all call expressions where the callee is mcp.getToolsets\n root.find(j.CallExpression).forEach(path => {\n const node = path.node;\n\n // Check if callee is a member expression (e.g., mcp.getToolsets)\n if (node.callee.type !== 'MemberExpression') {\n return;\n }\n\n const callee = node.callee;\n\n // Check if the object is a MCPServer variable\n if (callee.object.type !== 'Identifier' || !mcpVariables.has(callee.object.name)) {\n return;\n }\n\n // Check if the property is 'getToolsets'\n if (callee.property.type !== 'Identifier' || callee.property.name !== 'getToolsets') {\n return;\n }\n\n // Rename the method to 'listToolsets'\n callee.property.name = 'listToolsets';\n context.hasChanges = true;\n });\n\n if (context.hasChanges) {\n context.messages.push(`Transformed MCPServer method: getToolsets → listToolsets`);\n }\n});\n","// Copied from https://github.com/vercel/ai/blob/main/packages/codemod/src/codemods/lib/create-transformer.ts\n// License: Apache-2.0\n\nimport type { FileInfo, API, JSCodeshift, Collection } from 'jscodeshift';\n\ntype TransformerFunction = (fileInfo: FileInfo, api: API, options: any, context: TransformContext) => void;\n\nexport interface TransformContext {\n /**\n * The jscodeshift API object.\n */\n j: JSCodeshift;\n\n /**\n * The root collection of the AST.\n */\n root: Collection<any>;\n\n /**\n * Codemods should set this to true if they make any changes to the AST.\n */\n hasChanges: boolean;\n\n /**\n * Codemods can append messages to this array to report information to the user.\n */\n messages: string[];\n}\n\nexport function createTransformer(transformFn: TransformerFunction) {\n // Note the return type of this function is explicitly designed to conform to\n // the signature expected by jscodeshift. For more see\n // https://github.com/facebook/jscodeshift\n return function transformer(fileInfo: FileInfo, api: API, options: any) {\n const j = api.jscodeshift;\n const root = j(fileInfo.source);\n const context: TransformContext = {\n j,\n root,\n hasChanges: false,\n messages: [],\n };\n\n // Execute the transformation\n transformFn(fileInfo, api, options, context);\n\n // Report any messages\n context.messages.forEach(message => api.report(message));\n\n // Return the transformed source code if changes were made\n return context.hasChanges ? root.toSource({ quote: 'single' }) : null;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC6BO,SAAS,kBAAkB,aAAkC;AAIlE,SAAO,SAAS,YAAY,UAAoB,KAAU,SAAc;AACtE,UAAM,IAAI,IAAI;AACd,UAAM,OAAO,EAAE,SAAS,MAAM;AAC9B,UAAM,UAA4B;AAAA,MAChC;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ,UAAU,CAAC;AAAA,IACb;AAGA,gBAAY,UAAU,KAAK,SAAS,OAAO;AAG3C,YAAQ,SAAS,QAAQ,aAAW,IAAI,OAAO,OAAO,CAAC;AAGvD,WAAO,QAAQ,aAAa,KAAK,SAAS,EAAE,OAAO,SAAS,CAAC,IAAI;AAAA,EACnE;AACF;;;AD5CA,IAAO,2BAAQ,kBAAkB,CAAC,UAAU,KAAK,SAAS,YAAY;AACpE,QAAM,EAAE,GAAG,KAAK,IAAI;AAGpB,QAAM,eAAe,oBAAI,IAAY;AAGrC,OAAK,KAAK,EAAE,kBAAkB,EAAE,QAAQ,UAAQ;AAC9C,UAAM,OAAO,KAAK;AAGlB,QACE,KAAK,QACL,KAAK,KAAK,SAAS,mBACnB,KAAK,KAAK,OAAO,SAAS,gBAC1B,KAAK,KAAK,OAAO,SAAS,eAC1B,KAAK,GAAG,SAAS,cACjB;AACA,mBAAa,IAAI,KAAK,GAAG,IAAI;AAAA,IAC/B;AAAA,EACF,CAAC;AAGD,MAAI,aAAa,SAAS,EAAG;AAG7B,OAAK,KAAK,EAAE,cAAc,EAAE,QAAQ,UAAQ;AAC1C,UAAM,OAAO,KAAK;AAGlB,QAAI,KAAK,OAAO,SAAS,oBAAoB;AAC3C;AAAA,IACF;AAEA,UAAM,SAAS,KAAK;AAGpB,QAAI,OAAO,OAAO,SAAS,gBAAgB,CAAC,aAAa,IAAI,OAAO,OAAO,IAAI,GAAG;AAChF;AAAA,IACF;AAGA,QAAI,OAAO,SAAS,SAAS,gBAAgB,OAAO,SAAS,SAAS,eAAe;AACnF;AAAA,IACF;AAGA,WAAO,SAAS,OAAO;AACvB,YAAQ,aAAa;AAAA,EACvB,CAAC;AAED,MAAI,QAAQ,YAAY;AACtB,YAAQ,SAAS,KAAK,+DAA0D;AAAA,EAClF;AACF,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/codemods/v1/mcp-get-toolsets.ts"],"sourcesContent":["import { createTransformer } from '../lib/create-transformer';\nimport { trackClassInstances, renameMethod } from '../lib/utils';\n\n/**\n * Transforms MCPServer and MCPClient getToolsets method to listToolsets:\n * - mcp.getToolsets() → mcp.listToolsets()\n *\n * Only transforms methods on variables that were instantiated with `new MCPServer(...)` or `new MCPClient(...)`\n */\nexport default createTransformer((_fileInfo, _api, _options, context) => {\n const { j, root } = context;\n\n // Track MCPServer and MCPClient instances and rename method in a single optimized pass\n const mcpServerInstances = trackClassInstances(j, root, 'MCPServer');\n const mcpClientInstances = trackClassInstances(j, root, 'MCPClient');\n const mcpInstances = new Set([...mcpServerInstances, ...mcpClientInstances]);\n const count = renameMethod(j, root, mcpInstances, 'getToolsets', 'listToolsets');\n\n if (count > 0) {\n context.hasChanges = true;\n context.messages.push(`Transformed MCPServer method: getToolsets → listToolsets`);\n }\n});\n"],"mappings":";;;;;;;;;AASA,IAAO,2BAAQ,kBAAkB,CAAC,WAAW,MAAM,UAAU,YAAY;AACvE,QAAM,EAAE,GAAG,KAAK,IAAI;AAGpB,QAAM,qBAAqB,oBAAoB,GAAG,MAAM,WAAW;AACnE,QAAM,qBAAqB,oBAAoB,GAAG,MAAM,WAAW;AACnE,QAAM,eAAe,oBAAI,IAAI,CAAC,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;AAC3E,QAAM,QAAQ,aAAa,GAAG,MAAM,cAAc,eAAe,cAAc;AAE/E,MAAI,QAAQ,GAAG;AACb,YAAQ,aAAa;AACrB,YAAQ,SAAS,KAAK,+DAA0D;AAAA,EAClF;AACF,CAAC;","names":[]}
@@ -0,0 +1,50 @@
1
+ import {
2
+ createTransformer
3
+ } from "../chunk-JNFQ6J6B.js";
4
+
5
+ // src/codemods/v1/memory-message-v2-type.ts
6
+ var memory_message_v2_type_default = createTransformer((_fileInfo, _api, _options, context) => {
7
+ const { j, root } = context;
8
+ const oldTypeName = "MastraMessageV2";
9
+ const newTypeName = "MastraDBMessage";
10
+ const localNamesToRewrite = /* @__PURE__ */ new Set();
11
+ root.find(j.ImportDeclaration).filter((path) => {
12
+ const source = path.value.source.value;
13
+ return typeof source === "string" && source === "@mastra/core";
14
+ }).forEach((path) => {
15
+ if (!path.value.specifiers) return;
16
+ path.value.specifiers.forEach((specifier) => {
17
+ if (specifier.type === "ImportSpecifier" && specifier.imported.type === "Identifier" && specifier.imported.name === oldTypeName) {
18
+ const localName = specifier.local?.name || oldTypeName;
19
+ const isAliased = localName !== oldTypeName;
20
+ specifier.imported.name = newTypeName;
21
+ if (!isAliased) {
22
+ if (specifier.local) {
23
+ specifier.local.name = newTypeName;
24
+ }
25
+ localNamesToRewrite.add(oldTypeName);
26
+ }
27
+ context.hasChanges = true;
28
+ }
29
+ });
30
+ });
31
+ if (localNamesToRewrite.size > 0) {
32
+ localNamesToRewrite.forEach((oldLocalName) => {
33
+ root.find(j.Identifier, { name: oldLocalName }).forEach((path) => {
34
+ const parent = path.parent;
35
+ if (parent && parent.value.type === "ImportSpecifier") {
36
+ return;
37
+ }
38
+ path.value.name = newTypeName;
39
+ context.hasChanges = true;
40
+ });
41
+ });
42
+ }
43
+ if (context.hasChanges) {
44
+ context.messages.push("Renamed MastraMessageV2 type to MastraDBMessage");
45
+ }
46
+ });
47
+ export {
48
+ memory_message_v2_type_default as default
49
+ };
50
+ //# sourceMappingURL=memory-message-v2-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/codemods/v1/memory-message-v2-type.ts"],"sourcesContent":["import { createTransformer } from '../lib/create-transformer';\n\n/**\n * Renames MastraMessageV2 type to MastraDBMessage.\n * This better describes the purpose as the database message format.\n *\n * Before:\n * import { MastraMessageV2 } from '@mastra/core';\n * function processMessage(message: MastraMessageV2) {}\n *\n * After:\n * import { MastraDBMessage } from '@mastra/core';\n * function processMessage(message: MastraDBMessage) {}\n */\nexport default createTransformer((_fileInfo, _api, _options, context) => {\n const { j, root } = context;\n\n const oldTypeName = 'MastraMessageV2';\n const newTypeName = 'MastraDBMessage';\n\n // Track which local names should be rewritten (only non-aliased imports)\n const localNamesToRewrite = new Set<string>();\n\n // Transform import specifiers from @mastra/core\n root\n .find(j.ImportDeclaration)\n .filter(path => {\n const source = path.value.source.value;\n return typeof source === 'string' && source === '@mastra/core';\n })\n .forEach(path => {\n if (!path.value.specifiers) return;\n\n path.value.specifiers.forEach((specifier: any) => {\n if (\n specifier.type === 'ImportSpecifier' &&\n specifier.imported.type === 'Identifier' &&\n specifier.imported.name === oldTypeName\n ) {\n const localName = specifier.local?.name || oldTypeName;\n const isAliased = localName !== oldTypeName;\n\n // Rename the imported name\n specifier.imported.name = newTypeName;\n\n // Only update local name and track for rewriting if not aliased\n if (!isAliased) {\n if (specifier.local) {\n specifier.local.name = newTypeName;\n }\n // Track the old local name (oldTypeName) to rewrite all its usages\n localNamesToRewrite.add(oldTypeName);\n }\n // If aliased, leave the local name intact and don't track for rewriting\n\n context.hasChanges = true;\n }\n });\n });\n\n // Only transform usages for non-aliased imports\n if (localNamesToRewrite.size > 0) {\n // Transform all references that need to be rewritten\n localNamesToRewrite.forEach(oldLocalName => {\n root.find(j.Identifier, { name: oldLocalName }).forEach(path => {\n // Skip identifiers that are part of import declarations\n const parent = path.parent;\n if (parent && parent.value.type === 'ImportSpecifier') {\n return;\n }\n\n path.value.name = newTypeName;\n context.hasChanges = true;\n });\n });\n }\n\n if (context.hasChanges) {\n context.messages.push('Renamed MastraMessageV2 type to MastraDBMessage');\n }\n});\n"],"mappings":";;;;;AAcA,IAAO,iCAAQ,kBAAkB,CAAC,WAAW,MAAM,UAAU,YAAY;AACvE,QAAM,EAAE,GAAG,KAAK,IAAI;AAEpB,QAAM,cAAc;AACpB,QAAM,cAAc;AAGpB,QAAM,sBAAsB,oBAAI,IAAY;AAG5C,OACG,KAAK,EAAE,iBAAiB,EACxB,OAAO,UAAQ;AACd,UAAM,SAAS,KAAK,MAAM,OAAO;AACjC,WAAO,OAAO,WAAW,YAAY,WAAW;AAAA,EAClD,CAAC,EACA,QAAQ,UAAQ;AACf,QAAI,CAAC,KAAK,MAAM,WAAY;AAE5B,SAAK,MAAM,WAAW,QAAQ,CAAC,cAAmB;AAChD,UACE,UAAU,SAAS,qBACnB,UAAU,SAAS,SAAS,gBAC5B,UAAU,SAAS,SAAS,aAC5B;AACA,cAAM,YAAY,UAAU,OAAO,QAAQ;AAC3C,cAAM,YAAY,cAAc;AAGhC,kBAAU,SAAS,OAAO;AAG1B,YAAI,CAAC,WAAW;AACd,cAAI,UAAU,OAAO;AACnB,sBAAU,MAAM,OAAO;AAAA,UACzB;AAEA,8BAAoB,IAAI,WAAW;AAAA,QACrC;AAGA,gBAAQ,aAAa;AAAA,MACvB;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AAGH,MAAI,oBAAoB,OAAO,GAAG;AAEhC,wBAAoB,QAAQ,kBAAgB;AAC1C,WAAK,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC,EAAE,QAAQ,UAAQ;AAE9D,cAAM,SAAS,KAAK;AACpB,YAAI,UAAU,OAAO,MAAM,SAAS,mBAAmB;AACrD;AAAA,QACF;AAEA,aAAK,MAAM,OAAO;AAClB,gBAAQ,aAAa;AAAA,MACvB,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAEA,MAAI,QAAQ,YAAY;AACtB,YAAQ,SAAS,KAAK,iDAAiD;AAAA,EACzE;AACF,CAAC;","names":[]}
@@ -0,0 +1,22 @@
1
+ import {
2
+ createTransformer
3
+ } from "../chunk-JNFQ6J6B.js";
4
+ import {
5
+ renameMethod,
6
+ trackClassInstances
7
+ } from "../chunk-PKCFDS7J.js";
8
+
9
+ // src/codemods/v1/memory-query-to-recall.ts
10
+ var memory_query_to_recall_default = createTransformer((_fileInfo, _api, _options, context) => {
11
+ const { j, root } = context;
12
+ const memoryInstances = trackClassInstances(j, root, "Memory");
13
+ const count = renameMethod(j, root, memoryInstances, "query", "recall");
14
+ if (count > 0) {
15
+ context.hasChanges = true;
16
+ context.messages.push("Renamed query to recall on Memory instances");
17
+ }
18
+ });
19
+ export {
20
+ memory_query_to_recall_default as default
21
+ };
22
+ //# sourceMappingURL=memory-query-to-recall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/codemods/v1/memory-query-to-recall.ts"],"sourcesContent":["import { createTransformer } from '../lib/create-transformer';\nimport { trackClassInstances, renameMethod } from '../lib/utils';\n\n/**\n * Renames memory.query() to memory.recall().\n * This better describes the action of retrieving messages from memory.\n *\n * Before:\n * const result = await memory.query({ threadId: 'thread-123' });\n *\n * After:\n * const result = await memory.recall({ threadId: 'thread-123' });\n */\nexport default createTransformer((_fileInfo, _api, _options, context) => {\n const { j, root } = context;\n\n // Track Memory instances and rename query to recall in a single optimized pass\n const memoryInstances = trackClassInstances(j, root, 'Memory');\n const count = renameMethod(j, root, memoryInstances, 'query', 'recall');\n\n if (count > 0) {\n context.hasChanges = true;\n context.messages.push('Renamed query to recall on Memory instances');\n }\n});\n"],"mappings":";;;;;;;;;AAaA,IAAO,iCAAQ,kBAAkB,CAAC,WAAW,MAAM,UAAU,YAAY;AACvE,QAAM,EAAE,GAAG,KAAK,IAAI;AAGpB,QAAM,kBAAkB,oBAAoB,GAAG,MAAM,QAAQ;AAC7D,QAAM,QAAQ,aAAa,GAAG,MAAM,iBAAiB,SAAS,QAAQ;AAEtE,MAAI,QAAQ,GAAG;AACb,YAAQ,aAAa;AACrB,YAAQ,SAAS,KAAK,6CAA6C;AAAA,EACrE;AACF,CAAC;","names":[]}
@@ -0,0 +1,31 @@
1
+ import {
2
+ createTransformer
3
+ } from "../chunk-JNFQ6J6B.js";
4
+ import {
5
+ trackClassInstances,
6
+ transformMethodCalls
7
+ } from "../chunk-PKCFDS7J.js";
8
+
9
+ // src/codemods/v1/memory-vector-search-param.ts
10
+ var memory_vector_search_param_default = createTransformer((_fileInfo, _api, _options, context) => {
11
+ const { j, root } = context;
12
+ const memoryInstances = trackClassInstances(j, root, "Memory");
13
+ transformMethodCalls(j, root, memoryInstances, "recall", (path) => {
14
+ const args = path.value.arguments;
15
+ const firstArg = args[0];
16
+ if (!firstArg || firstArg.type !== "ObjectExpression" || !firstArg.properties) return;
17
+ firstArg.properties.forEach((prop) => {
18
+ if ((prop.type === "Property" || prop.type === "ObjectProperty") && prop.key && prop.key.type === "Identifier" && prop.key.name === "vectorMessageSearch") {
19
+ prop.key.name = "vectorSearchString";
20
+ context.hasChanges = true;
21
+ }
22
+ });
23
+ });
24
+ if (context.hasChanges) {
25
+ context.messages.push("Renamed vectorMessageSearch to vectorSearchString in memory.recall() calls");
26
+ }
27
+ });
28
+ export {
29
+ memory_vector_search_param_default as default
30
+ };
31
+ //# sourceMappingURL=memory-vector-search-param.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/codemods/v1/memory-vector-search-param.ts"],"sourcesContent":["import { createTransformer } from '../lib/create-transformer';\nimport { trackClassInstances, transformMethodCalls } from '../lib/utils';\n\n/**\n * Renames vectorMessageSearch parameter to vectorSearchString in memory.recall() calls.\n * This provides more consistent naming.\n *\n * Before:\n * memory.recall({\n * threadId: 'thread-123',\n * vectorMessageSearch: 'What did we discuss?',\n * });\n *\n * After:\n * memory.recall({\n * threadId: 'thread-123',\n * vectorSearchString: 'What did we discuss?',\n * });\n */\nexport default createTransformer((_fileInfo, _api, _options, context) => {\n const { j, root } = context;\n\n const memoryInstances = trackClassInstances(j, root, 'Memory');\n\n transformMethodCalls(j, root, memoryInstances, 'recall', path => {\n const args = path.value.arguments;\n const firstArg = args[0];\n if (!firstArg || firstArg.type !== 'ObjectExpression' || !firstArg.properties) return;\n\n firstArg.properties.forEach((prop: any) => {\n if (\n (prop.type === 'Property' || prop.type === 'ObjectProperty') &&\n prop.key &&\n prop.key.type === 'Identifier' &&\n prop.key.name === 'vectorMessageSearch'\n ) {\n prop.key.name = 'vectorSearchString';\n context.hasChanges = true;\n }\n });\n });\n\n if (context.hasChanges) {\n context.messages.push('Renamed vectorMessageSearch to vectorSearchString in memory.recall() calls');\n }\n});\n"],"mappings":";;;;;;;;;AAmBA,IAAO,qCAAQ,kBAAkB,CAAC,WAAW,MAAM,UAAU,YAAY;AACvE,QAAM,EAAE,GAAG,KAAK,IAAI;AAEpB,QAAM,kBAAkB,oBAAoB,GAAG,MAAM,QAAQ;AAE7D,uBAAqB,GAAG,MAAM,iBAAiB,UAAU,UAAQ;AAC/D,UAAM,OAAO,KAAK,MAAM;AACxB,UAAM,WAAW,KAAK,CAAC;AACvB,QAAI,CAAC,YAAY,SAAS,SAAS,sBAAsB,CAAC,SAAS,WAAY;AAE/E,aAAS,WAAW,QAAQ,CAAC,SAAc;AACzC,WACG,KAAK,SAAS,cAAc,KAAK,SAAS,qBAC3C,KAAK,OACL,KAAK,IAAI,SAAS,gBAClB,KAAK,IAAI,SAAS,uBAClB;AACA,aAAK,IAAI,OAAO;AAChB,gBAAQ,aAAa;AAAA,MACvB;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AAED,MAAI,QAAQ,YAAY;AACtB,YAAQ,SAAS,KAAK,4EAA4E;AAAA,EACpG;AACF,CAAC;","names":[]}
@@ -0,0 +1,53 @@
1
+ import {
2
+ insertCommentOnce
3
+ } from "../../chunk-LGW3NUAJ.js";
4
+ import {
5
+ createTransformer
6
+ } from "../../chunk-JNFQ6J6B.js";
7
+
8
+ // src/codemods/v1/not-implemented/agent-format-parameter.ts
9
+ var agent_format_parameter_default = createTransformer((fileInfo, api, options, context) => {
10
+ const { j, root } = context;
11
+ const COMMENT_MESSAGE = "FIXME(mastra): The format parameter has been removed. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/agent#format-parameter-from-stream-and-generate";
12
+ const agentInstances = /* @__PURE__ */ new Set();
13
+ root.find(j.NewExpression, {
14
+ callee: {
15
+ type: "Identifier",
16
+ name: "Agent"
17
+ }
18
+ }).forEach((path) => {
19
+ const parent = path.parent.value;
20
+ if (parent.type === "VariableDeclarator" && parent.id.type === "Identifier") {
21
+ agentInstances.add(parent.id.name);
22
+ }
23
+ });
24
+ root.find(j.CallExpression).filter((path) => {
25
+ const { callee } = path.value;
26
+ if (callee.type !== "MemberExpression") return false;
27
+ if (callee.object.type !== "Identifier") return false;
28
+ if (callee.property.type !== "Identifier") return false;
29
+ if (!agentInstances.has(callee.object.name)) return false;
30
+ return callee.property.name === "generate" || callee.property.name === "stream";
31
+ }).forEach((path) => {
32
+ const args = path.value.arguments;
33
+ if (args.length < 2) return;
34
+ const optionsArg = args[1];
35
+ if (!optionsArg || optionsArg.type !== "ObjectExpression") return;
36
+ if (!optionsArg.properties) return;
37
+ optionsArg.properties.forEach((prop) => {
38
+ if ((prop.type === "Property" || prop.type === "ObjectProperty") && prop.key?.type === "Identifier" && prop.key.name === "format") {
39
+ const added = insertCommentOnce(prop, j, COMMENT_MESSAGE);
40
+ if (added) {
41
+ context.hasChanges = true;
42
+ }
43
+ }
44
+ });
45
+ });
46
+ if (context.hasChanges) {
47
+ context.messages.push(`Not Implemented ${fileInfo.path}: The format 'aisdk' parameter has been removed.`);
48
+ }
49
+ });
50
+ export {
51
+ agent_format_parameter_default as default
52
+ };
53
+ //# sourceMappingURL=agent-format-parameter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/codemods/v1/not-implemented/agent-format-parameter.ts"],"sourcesContent":["/* eslint-disable no-warning-comments */\nimport { insertCommentOnce } from '../../lib/add-comment';\nimport { createTransformer } from '../../lib/create-transformer';\n\n/**\n * Adds a FIXME comment above the format parameter in agent.generate() and agent.stream() calls.\n * The format parameter has been removed in v1 and requires manual migration.\n *\n * Before:\n * agent.generate('prompt', { format: 'aisdk' })\n *\n * After:\n * agent.generate('prompt', {\n * /* FIXME(mastra): The format parameter has been removed. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/agent#format-parameter-from-stream-and-generate *\\/\n * format: 'aisdk'\n * })\n */\nexport default createTransformer((fileInfo, api, options, context) => {\n const { j, root } = context;\n\n const COMMENT_MESSAGE =\n 'FIXME(mastra): The format parameter has been removed. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/agent#format-parameter-from-stream-and-generate';\n\n // Track Agent instances\n const agentInstances = new Set<string>();\n\n root\n .find(j.NewExpression, {\n callee: {\n type: 'Identifier',\n name: 'Agent',\n },\n })\n .forEach(path => {\n const parent = path.parent.value;\n if (parent.type === 'VariableDeclarator' && parent.id.type === 'Identifier') {\n agentInstances.add(parent.id.name);\n }\n });\n\n // Find agent.generate() and agent.stream() calls\n root\n .find(j.CallExpression)\n .filter(path => {\n const { callee } = path.value;\n if (callee.type !== 'MemberExpression') return false;\n if (callee.object.type !== 'Identifier') return false;\n if (callee.property.type !== 'Identifier') return false;\n\n // Only process if called on an Agent instance\n if (!agentInstances.has(callee.object.name)) return false;\n\n // Only process generate() and stream() methods\n return callee.property.name === 'generate' || callee.property.name === 'stream';\n })\n .forEach(path => {\n const args = path.value.arguments;\n\n // We're looking for calls with an options object that has format parameter\n if (args.length < 2) return;\n\n const optionsArg = args[1];\n if (!optionsArg || optionsArg.type !== 'ObjectExpression') return;\n if (!optionsArg.properties) return;\n\n // Find the format property\n optionsArg.properties.forEach(prop => {\n if (\n (prop.type === 'Property' || prop.type === 'ObjectProperty') &&\n prop.key?.type === 'Identifier' &&\n prop.key.name === 'format'\n ) {\n // Add FIXME comment to the format property\n const added = insertCommentOnce(prop, j, COMMENT_MESSAGE);\n if (added) {\n context.hasChanges = true;\n }\n }\n });\n });\n\n if (context.hasChanges) {\n context.messages.push(`Not Implemented ${fileInfo.path}: The format 'aisdk' parameter has been removed.`);\n }\n});\n"],"mappings":";;;;;;;;AAiBA,IAAO,iCAAQ,kBAAkB,CAAC,UAAU,KAAK,SAAS,YAAY;AACpE,QAAM,EAAE,GAAG,KAAK,IAAI;AAEpB,QAAM,kBACJ;AAGF,QAAM,iBAAiB,oBAAI,IAAY;AAEvC,OACG,KAAK,EAAE,eAAe;AAAA,IACrB,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,EACF,CAAC,EACA,QAAQ,UAAQ;AACf,UAAM,SAAS,KAAK,OAAO;AAC3B,QAAI,OAAO,SAAS,wBAAwB,OAAO,GAAG,SAAS,cAAc;AAC3E,qBAAe,IAAI,OAAO,GAAG,IAAI;AAAA,IACnC;AAAA,EACF,CAAC;AAGH,OACG,KAAK,EAAE,cAAc,EACrB,OAAO,UAAQ;AACd,UAAM,EAAE,OAAO,IAAI,KAAK;AACxB,QAAI,OAAO,SAAS,mBAAoB,QAAO;AAC/C,QAAI,OAAO,OAAO,SAAS,aAAc,QAAO;AAChD,QAAI,OAAO,SAAS,SAAS,aAAc,QAAO;AAGlD,QAAI,CAAC,eAAe,IAAI,OAAO,OAAO,IAAI,EAAG,QAAO;AAGpD,WAAO,OAAO,SAAS,SAAS,cAAc,OAAO,SAAS,SAAS;AAAA,EACzE,CAAC,EACA,QAAQ,UAAQ;AACf,UAAM,OAAO,KAAK,MAAM;AAGxB,QAAI,KAAK,SAAS,EAAG;AAErB,UAAM,aAAa,KAAK,CAAC;AACzB,QAAI,CAAC,cAAc,WAAW,SAAS,mBAAoB;AAC3D,QAAI,CAAC,WAAW,WAAY;AAG5B,eAAW,WAAW,QAAQ,UAAQ;AACpC,WACG,KAAK,SAAS,cAAc,KAAK,SAAS,qBAC3C,KAAK,KAAK,SAAS,gBACnB,KAAK,IAAI,SAAS,UAClB;AAEA,cAAM,QAAQ,kBAAkB,MAAM,GAAG,eAAe;AACxD,YAAI,OAAO;AACT,kBAAQ,aAAa;AAAA,QACvB;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AAEH,MAAI,QAAQ,YAAY;AACtB,YAAQ,SAAS,KAAK,mBAAmB,SAAS,IAAI,kDAAkD;AAAA,EAC1G;AACF,CAAC;","names":[]}
@@ -0,0 +1,54 @@
1
+ import {
2
+ insertCommentOnce
3
+ } from "../../chunk-LGW3NUAJ.js";
4
+ import {
5
+ createTransformer
6
+ } from "../../chunk-JNFQ6J6B.js";
7
+
8
+ // src/codemods/v1/not-implemented/agent-to-step.ts
9
+ var agent_to_step_default = createTransformer((fileInfo, api, options, context) => {
10
+ const { j, root } = context;
11
+ const COMMENT_MESSAGE = "FIXME(mastra): The toStep() method has been removed. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/agent#agenttostep-method";
12
+ const agentInstances = /* @__PURE__ */ new Set();
13
+ root.find(j.NewExpression, {
14
+ callee: {
15
+ type: "Identifier",
16
+ name: "Agent"
17
+ }
18
+ }).forEach((path) => {
19
+ const parent = path.parent.value;
20
+ if (parent.type === "VariableDeclarator" && parent.id.type === "Identifier") {
21
+ agentInstances.add(parent.id.name);
22
+ }
23
+ });
24
+ root.find(j.CallExpression).filter((path) => {
25
+ const { callee } = path.value;
26
+ if (callee.type !== "MemberExpression") return false;
27
+ if (callee.object.type !== "Identifier") return false;
28
+ if (callee.property.type !== "Identifier") return false;
29
+ if (!agentInstances.has(callee.object.name)) return false;
30
+ return callee.property.name === "toStep";
31
+ }).forEach((path) => {
32
+ let parent = path.parent;
33
+ while (parent && parent.value.type !== "VariableDeclaration" && parent.value.type !== "ExpressionStatement") {
34
+ parent = parent.parent;
35
+ }
36
+ if (parent && parent.value) {
37
+ let targetNode = parent.value;
38
+ if (parent.parent && parent.parent.value.type === "ExportNamedDeclaration") {
39
+ targetNode = parent.parent.value;
40
+ }
41
+ const added = insertCommentOnce(targetNode, j, COMMENT_MESSAGE);
42
+ if (added) {
43
+ context.hasChanges = true;
44
+ }
45
+ }
46
+ });
47
+ if (context.hasChanges) {
48
+ context.messages.push(`Not Implemented ${fileInfo.path}: The toStep() method has been removed.`);
49
+ }
50
+ });
51
+ export {
52
+ agent_to_step_default as default
53
+ };
54
+ //# sourceMappingURL=agent-to-step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/codemods/v1/not-implemented/agent-to-step.ts"],"sourcesContent":["/* eslint-disable no-warning-comments */\nimport { insertCommentOnce } from '../../lib/add-comment';\nimport { createTransformer } from '../../lib/create-transformer';\n\n/**\n * Adds a FIXME comment above agent.toStep() method calls.\n * The toStep() method has been removed in v1 and requires manual migration.\n *\n * Before:\n * const step = agent.toStep();\n *\n * After:\n * /* FIXME(mastra): The toStep() method has been removed. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/agent#agenttostep-method *\\/\n * const step = agent.toStep();\n */\nexport default createTransformer((fileInfo, api, options, context) => {\n const { j, root } = context;\n\n const COMMENT_MESSAGE =\n 'FIXME(mastra): The toStep() method has been removed. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/agent#agenttostep-method';\n\n // Track Agent instances\n const agentInstances = new Set<string>();\n\n root\n .find(j.NewExpression, {\n callee: {\n type: 'Identifier',\n name: 'Agent',\n },\n })\n .forEach(path => {\n const parent = path.parent.value;\n if (parent.type === 'VariableDeclarator' && parent.id.type === 'Identifier') {\n agentInstances.add(parent.id.name);\n }\n });\n\n // Find agent.toStep() calls\n root\n .find(j.CallExpression)\n .filter(path => {\n const { callee } = path.value;\n if (callee.type !== 'MemberExpression') return false;\n if (callee.object.type !== 'Identifier') return false;\n if (callee.property.type !== 'Identifier') return false;\n\n // Only process if called on an Agent instance\n if (!agentInstances.has(callee.object.name)) return false;\n\n // Only process toStep() method\n return callee.property.name === 'toStep';\n })\n .forEach(path => {\n // Find the parent statement to add the comment to\n let parent = path.parent;\n while (parent && parent.value.type !== 'VariableDeclaration' && parent.value.type !== 'ExpressionStatement') {\n parent = parent.parent;\n }\n\n if (parent && parent.value) {\n // Check if this statement is wrapped in an export declaration\n let targetNode = parent.value;\n if (parent.parent && parent.parent.value.type === 'ExportNamedDeclaration') {\n targetNode = parent.parent.value;\n }\n\n // Add FIXME comment to the statement (or export if it's exported)\n const added = insertCommentOnce(targetNode, j, COMMENT_MESSAGE);\n if (added) {\n context.hasChanges = true;\n }\n }\n });\n\n if (context.hasChanges) {\n context.messages.push(`Not Implemented ${fileInfo.path}: The toStep() method has been removed.`);\n }\n});\n"],"mappings":";;;;;;;;AAeA,IAAO,wBAAQ,kBAAkB,CAAC,UAAU,KAAK,SAAS,YAAY;AACpE,QAAM,EAAE,GAAG,KAAK,IAAI;AAEpB,QAAM,kBACJ;AAGF,QAAM,iBAAiB,oBAAI,IAAY;AAEvC,OACG,KAAK,EAAE,eAAe;AAAA,IACrB,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,EACF,CAAC,EACA,QAAQ,UAAQ;AACf,UAAM,SAAS,KAAK,OAAO;AAC3B,QAAI,OAAO,SAAS,wBAAwB,OAAO,GAAG,SAAS,cAAc;AAC3E,qBAAe,IAAI,OAAO,GAAG,IAAI;AAAA,IACnC;AAAA,EACF,CAAC;AAGH,OACG,KAAK,EAAE,cAAc,EACrB,OAAO,UAAQ;AACd,UAAM,EAAE,OAAO,IAAI,KAAK;AACxB,QAAI,OAAO,SAAS,mBAAoB,QAAO;AAC/C,QAAI,OAAO,OAAO,SAAS,aAAc,QAAO;AAChD,QAAI,OAAO,SAAS,SAAS,aAAc,QAAO;AAGlD,QAAI,CAAC,eAAe,IAAI,OAAO,OAAO,IAAI,EAAG,QAAO;AAGpD,WAAO,OAAO,SAAS,SAAS;AAAA,EAClC,CAAC,EACA,QAAQ,UAAQ;AAEf,QAAI,SAAS,KAAK;AAClB,WAAO,UAAU,OAAO,MAAM,SAAS,yBAAyB,OAAO,MAAM,SAAS,uBAAuB;AAC3G,eAAS,OAAO;AAAA,IAClB;AAEA,QAAI,UAAU,OAAO,OAAO;AAE1B,UAAI,aAAa,OAAO;AACxB,UAAI,OAAO,UAAU,OAAO,OAAO,MAAM,SAAS,0BAA0B;AAC1E,qBAAa,OAAO,OAAO;AAAA,MAC7B;AAGA,YAAM,QAAQ,kBAAkB,YAAY,GAAG,eAAe;AAC9D,UAAI,OAAO;AACT,gBAAQ,aAAa;AAAA,MACvB;AAAA,IACF;AAAA,EACF,CAAC;AAEH,MAAI,QAAQ,YAAY;AACtB,YAAQ,SAAS,KAAK,mBAAmB,SAAS,IAAI,yCAAyC;AAAA,EACjG;AACF,CAAC;","names":[]}
@@ -0,0 +1,50 @@
1
+ import {
2
+ insertCommentOnce
3
+ } from "../../chunk-LGW3NUAJ.js";
4
+ import {
5
+ createTransformer
6
+ } from "../../chunk-JNFQ6J6B.js";
7
+
8
+ // src/codemods/v1/not-implemented/mastra-memory.ts
9
+ var mastra_memory_default = createTransformer((fileInfo, api, options, context) => {
10
+ const { j, root } = context;
11
+ const COMMENT_MESSAGE = "FIXME(mastra): `memory` property has been removed. Memory is configured at the agent level. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/mastra#memory-property-from-mastra-class";
12
+ root.find(j.NewExpression, {
13
+ callee: {
14
+ type: "Identifier",
15
+ name: "Mastra"
16
+ }
17
+ }).forEach((path) => {
18
+ const hasMemory = path.value.arguments.some((arg) => {
19
+ if (arg.type === "ObjectExpression") {
20
+ return arg.properties?.some(
21
+ (prop) => (prop.type === "Property" || prop.type === "ObjectProperty") && prop.key?.type === "Identifier" && prop.key.name === "memory"
22
+ );
23
+ }
24
+ return false;
25
+ });
26
+ if (hasMemory) {
27
+ let parent = path.parent;
28
+ while (parent && parent.value.type !== "VariableDeclaration" && parent.value.type !== "ExpressionStatement") {
29
+ parent = parent.parent;
30
+ }
31
+ if (parent && parent.value) {
32
+ let targetNode = parent.value;
33
+ if (parent.parent && parent.parent.value.type === "ExportNamedDeclaration") {
34
+ targetNode = parent.parent.value;
35
+ }
36
+ const added = insertCommentOnce(targetNode, j, COMMENT_MESSAGE);
37
+ if (added) {
38
+ context.hasChanges = true;
39
+ }
40
+ }
41
+ }
42
+ });
43
+ if (context.hasChanges) {
44
+ context.messages.push(`Not Implemented ${fileInfo.path}: The memory property has been removed.`);
45
+ }
46
+ });
47
+ export {
48
+ mastra_memory_default as default
49
+ };
50
+ //# sourceMappingURL=mastra-memory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/codemods/v1/not-implemented/mastra-memory.ts"],"sourcesContent":["/* eslint-disable no-warning-comments */\nimport { insertCommentOnce } from '../../lib/add-comment';\nimport { createTransformer } from '../../lib/create-transformer';\n\n/**\n * Adds FIXME comment when Mastra config includes a memory property.\n * The memory property has been removed from Mastra class and should be configured at the agent level.\n *\n * Before:\n * const mastra = new Mastra({ memory: new Memory() });\n *\n * After:\n * /* FIXME(mastra): `memory` property has been removed. Memory is configured at the agent level. See: ... *\\/\n * const mastra = new Mastra({ memory: new Memory() });\n */\nexport default createTransformer((fileInfo, api, options, context) => {\n const { j, root } = context;\n\n const COMMENT_MESSAGE =\n 'FIXME(mastra): `memory` property has been removed. Memory is configured at the agent level. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/mastra#memory-property-from-mastra-class';\n\n // Find new Mastra() expressions\n root\n .find(j.NewExpression, {\n callee: {\n type: 'Identifier',\n name: 'Mastra',\n },\n })\n .forEach(path => {\n // Check if config has a memory property\n const hasMemory = path.value.arguments.some(arg => {\n if (arg.type === 'ObjectExpression') {\n return arg.properties?.some(\n prop =>\n (prop.type === 'Property' || prop.type === 'ObjectProperty') &&\n prop.key?.type === 'Identifier' &&\n prop.key.name === 'memory',\n );\n }\n return false;\n });\n\n if (hasMemory) {\n // Find the parent statement to add comment\n let parent = path.parent;\n while (parent && parent.value.type !== 'VariableDeclaration' && parent.value.type !== 'ExpressionStatement') {\n parent = parent.parent;\n }\n\n if (parent && parent.value) {\n // Check if this statement is wrapped in an export declaration\n let targetNode = parent.value;\n if (parent.parent && parent.parent.value.type === 'ExportNamedDeclaration') {\n targetNode = parent.parent.value;\n }\n\n const added = insertCommentOnce(targetNode, j, COMMENT_MESSAGE);\n if (added) {\n context.hasChanges = true;\n }\n }\n }\n });\n\n if (context.hasChanges) {\n context.messages.push(`Not Implemented ${fileInfo.path}: The memory property has been removed.`);\n }\n});\n"],"mappings":";;;;;;;;AAeA,IAAO,wBAAQ,kBAAkB,CAAC,UAAU,KAAK,SAAS,YAAY;AACpE,QAAM,EAAE,GAAG,KAAK,IAAI;AAEpB,QAAM,kBACJ;AAGF,OACG,KAAK,EAAE,eAAe;AAAA,IACrB,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,EACF,CAAC,EACA,QAAQ,UAAQ;AAEf,UAAM,YAAY,KAAK,MAAM,UAAU,KAAK,SAAO;AACjD,UAAI,IAAI,SAAS,oBAAoB;AACnC,eAAO,IAAI,YAAY;AAAA,UACrB,WACG,KAAK,SAAS,cAAc,KAAK,SAAS,qBAC3C,KAAK,KAAK,SAAS,gBACnB,KAAK,IAAI,SAAS;AAAA,QACtB;AAAA,MACF;AACA,aAAO;AAAA,IACT,CAAC;AAED,QAAI,WAAW;AAEb,UAAI,SAAS,KAAK;AAClB,aAAO,UAAU,OAAO,MAAM,SAAS,yBAAyB,OAAO,MAAM,SAAS,uBAAuB;AAC3G,iBAAS,OAAO;AAAA,MAClB;AAEA,UAAI,UAAU,OAAO,OAAO;AAE1B,YAAI,aAAa,OAAO;AACxB,YAAI,OAAO,UAAU,OAAO,OAAO,MAAM,SAAS,0BAA0B;AAC1E,uBAAa,OAAO,OAAO;AAAA,QAC7B;AAEA,cAAM,QAAQ,kBAAkB,YAAY,GAAG,eAAe;AAC9D,YAAI,OAAO;AACT,kBAAQ,aAAa;AAAA,QACvB;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAEH,MAAI,QAAQ,YAAY;AACtB,YAAQ,SAAS,KAAK,mBAAmB,SAAS,IAAI,yCAAyC;AAAA,EACjG;AACF,CAAC;","names":[]}
@@ -0,0 +1,113 @@
1
+ import {
2
+ insertCommentOnce
3
+ } from "../../chunk-LGW3NUAJ.js";
4
+ import {
5
+ createTransformer
6
+ } from "../../chunk-JNFQ6J6B.js";
7
+
8
+ // src/codemods/v1/not-implemented/mastra-required-id.ts
9
+ var mastra_required_id_default = createTransformer((fileInfo, api, options, context) => {
10
+ const { j, root } = context;
11
+ const COMMENT_MESSAGE = "FIXME(mastra): Add a unique `id` parameter. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/mastra#required-id-parameter-for-all-mastra-primitives";
12
+ const storageClasses = [
13
+ "LibSQLStore",
14
+ "PostgresStore",
15
+ "D1Store",
16
+ "MongoDBStore",
17
+ "DynamoDBStore",
18
+ "LibSQLVector",
19
+ "PgVector",
20
+ "ChromaVector",
21
+ "PineconeVector",
22
+ "QdrantVector",
23
+ "LanceVector",
24
+ "Agent",
25
+ "MCPServer"
26
+ ];
27
+ const createFunctions = ["createWorkflow", "createTool", "createScorer"];
28
+ root.find(j.NewExpression).forEach((path) => {
29
+ if (path.value.callee.type === "Identifier") {
30
+ const className = path.value.callee.name;
31
+ if (storageClasses.includes(className)) {
32
+ const hasId = path.value.arguments.some((arg) => {
33
+ if (arg.type === "ObjectExpression") {
34
+ return arg.properties?.some(
35
+ (prop) => (prop.type === "Property" || prop.type === "ObjectProperty") && prop.key?.type === "Identifier" && prop.key.name === "id"
36
+ );
37
+ }
38
+ return false;
39
+ });
40
+ if (!hasId) {
41
+ let parent = path.parent;
42
+ const statementTypes = /* @__PURE__ */ new Set([
43
+ "VariableDeclaration",
44
+ "ExpressionStatement",
45
+ "ReturnStatement",
46
+ "ExportDefaultDeclaration",
47
+ "ExportNamedDeclaration",
48
+ "Program"
49
+ ]);
50
+ while (parent && !statementTypes.has(parent.value.type)) {
51
+ parent = parent.parent;
52
+ }
53
+ if (parent && parent.value) {
54
+ let targetNode = parent.value;
55
+ if (targetNode.type !== "ExportDefaultDeclaration" && targetNode.type !== "ExportNamedDeclaration" && parent.parent && (parent.parent.value.type === "ExportDefaultDeclaration" || parent.parent.value.type === "ExportNamedDeclaration")) {
56
+ targetNode = parent.parent.value;
57
+ }
58
+ const added = insertCommentOnce(targetNode, j, COMMENT_MESSAGE);
59
+ if (added) {
60
+ context.hasChanges = true;
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ });
67
+ root.find(j.CallExpression).forEach((path) => {
68
+ if (path.value.callee.type === "Identifier") {
69
+ const functionName = path.value.callee.name;
70
+ if (createFunctions.includes(functionName)) {
71
+ const hasId = path.value.arguments.some((arg) => {
72
+ if (arg.type === "ObjectExpression") {
73
+ return arg.properties?.some(
74
+ (prop) => (prop.type === "Property" || prop.type === "ObjectProperty") && prop.key?.type === "Identifier" && prop.key.name === "id"
75
+ );
76
+ }
77
+ return false;
78
+ });
79
+ if (!hasId) {
80
+ let parent = path.parent;
81
+ const statementTypes = /* @__PURE__ */ new Set([
82
+ "VariableDeclaration",
83
+ "ExpressionStatement",
84
+ "ReturnStatement",
85
+ "ExportDefaultDeclaration",
86
+ "ExportNamedDeclaration",
87
+ "Program"
88
+ ]);
89
+ while (parent && !statementTypes.has(parent.value.type)) {
90
+ parent = parent.parent;
91
+ }
92
+ if (parent && parent.value) {
93
+ let targetNode = parent.value;
94
+ if (targetNode.type !== "ExportDefaultDeclaration" && targetNode.type !== "ExportNamedDeclaration" && parent.parent && (parent.parent.value.type === "ExportDefaultDeclaration" || parent.parent.value.type === "ExportNamedDeclaration")) {
95
+ targetNode = parent.parent.value;
96
+ }
97
+ const added = insertCommentOnce(targetNode, j, COMMENT_MESSAGE);
98
+ if (added) {
99
+ context.hasChanges = true;
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+ });
106
+ if (context.hasChanges) {
107
+ context.messages.push(`Not Implemented ${fileInfo.path}: Mastra primitives now require a unique id parameter.`);
108
+ }
109
+ });
110
+ export {
111
+ mastra_required_id_default as default
112
+ };
113
+ //# sourceMappingURL=mastra-required-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/codemods/v1/not-implemented/mastra-required-id.ts"],"sourcesContent":["/* eslint-disable no-warning-comments */\nimport { insertCommentOnce } from '../../lib/add-comment';\nimport { createTransformer } from '../../lib/create-transformer';\n\n/**\n * Adds FIXME comments to Mastra primitives that now require an `id` parameter.\n * This includes storages, vector stores, agents, workflows, tools, scorers, and MCP servers.\n *\n * Before:\n * const agent = new Agent({ name: 'Support Agent' });\n * const tool = createTool({ description: 'Get weather' });\n *\n * After:\n * /* FIXME(mastra): Add a unique `id` parameter. See: ... *\\/\n * const agent = new Agent({ name: 'Support Agent' });\n * /* FIXME(mastra): Add a unique `id` parameter. See: ... *\\/\n * const tool = createTool({ description: 'Get weather' });\n */\nexport default createTransformer((fileInfo, api, options, context) => {\n const { j, root } = context;\n\n const COMMENT_MESSAGE =\n 'FIXME(mastra): Add a unique `id` parameter. See: https://mastra.ai/guides/v1/migrations/upgrade-to-v1/mastra#required-id-parameter-for-all-mastra-primitives';\n\n // List of class names that require id\n const storageClasses = [\n 'LibSQLStore',\n 'PostgresStore',\n 'D1Store',\n 'MongoDBStore',\n 'DynamoDBStore',\n 'LibSQLVector',\n 'PgVector',\n 'ChromaVector',\n 'PineconeVector',\n 'QdrantVector',\n 'LanceVector',\n 'Agent',\n 'MCPServer',\n ];\n\n // List of function names that require id\n const createFunctions = ['createWorkflow', 'createTool', 'createScorer'];\n\n // Find NewExpression for classes\n root.find(j.NewExpression).forEach(path => {\n if (path.value.callee.type === 'Identifier') {\n const className = path.value.callee.name;\n\n if (storageClasses.includes(className)) {\n // Check if the config already has an id property\n const hasId = path.value.arguments.some(arg => {\n if (arg.type === 'ObjectExpression') {\n return arg.properties?.some(\n prop =>\n (prop.type === 'Property' || prop.type === 'ObjectProperty') &&\n prop.key?.type === 'Identifier' &&\n prop.key.name === 'id',\n );\n }\n return false;\n });\n\n if (!hasId) {\n // Find the parent statement to add comment\n let parent = path.parent;\n const statementTypes = new Set([\n 'VariableDeclaration',\n 'ExpressionStatement',\n 'ReturnStatement',\n 'ExportDefaultDeclaration',\n 'ExportNamedDeclaration',\n 'Program',\n ]);\n\n while (parent && !statementTypes.has(parent.value.type)) {\n parent = parent.parent;\n }\n\n if (parent && parent.value) {\n // For export declarations, add comment to the export itself\n let targetNode = parent.value;\n if (\n targetNode.type !== 'ExportDefaultDeclaration' &&\n targetNode.type !== 'ExportNamedDeclaration' &&\n parent.parent &&\n (parent.parent.value.type === 'ExportDefaultDeclaration' ||\n parent.parent.value.type === 'ExportNamedDeclaration')\n ) {\n targetNode = parent.parent.value;\n }\n\n const added = insertCommentOnce(targetNode, j, COMMENT_MESSAGE);\n if (added) {\n context.hasChanges = true;\n }\n }\n }\n }\n }\n });\n\n // Find CallExpression for create functions\n root.find(j.CallExpression).forEach(path => {\n if (path.value.callee.type === 'Identifier') {\n const functionName = path.value.callee.name;\n\n if (createFunctions.includes(functionName)) {\n // Check if the config already has an id property\n const hasId = path.value.arguments.some(arg => {\n if (arg.type === 'ObjectExpression') {\n return arg.properties?.some(\n prop =>\n (prop.type === 'Property' || prop.type === 'ObjectProperty') &&\n prop.key?.type === 'Identifier' &&\n prop.key.name === 'id',\n );\n }\n return false;\n });\n\n if (!hasId) {\n // Find the parent statement to add comment\n let parent = path.parent;\n const statementTypes = new Set([\n 'VariableDeclaration',\n 'ExpressionStatement',\n 'ReturnStatement',\n 'ExportDefaultDeclaration',\n 'ExportNamedDeclaration',\n 'Program',\n ]);\n\n while (parent && !statementTypes.has(parent.value.type)) {\n parent = parent.parent;\n }\n\n if (parent && parent.value) {\n // For export declarations, add comment to the export itself\n let targetNode = parent.value;\n if (\n targetNode.type !== 'ExportDefaultDeclaration' &&\n targetNode.type !== 'ExportNamedDeclaration' &&\n parent.parent &&\n (parent.parent.value.type === 'ExportDefaultDeclaration' ||\n parent.parent.value.type === 'ExportNamedDeclaration')\n ) {\n targetNode = parent.parent.value;\n }\n\n const added = insertCommentOnce(targetNode, j, COMMENT_MESSAGE);\n if (added) {\n context.hasChanges = true;\n }\n }\n }\n }\n }\n });\n\n if (context.hasChanges) {\n context.messages.push(`Not Implemented ${fileInfo.path}: Mastra primitives now require a unique id parameter.`);\n }\n});\n"],"mappings":";;;;;;;;AAkBA,IAAO,6BAAQ,kBAAkB,CAAC,UAAU,KAAK,SAAS,YAAY;AACpE,QAAM,EAAE,GAAG,KAAK,IAAI;AAEpB,QAAM,kBACJ;AAGF,QAAM,iBAAiB;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAGA,QAAM,kBAAkB,CAAC,kBAAkB,cAAc,cAAc;AAGvE,OAAK,KAAK,EAAE,aAAa,EAAE,QAAQ,UAAQ;AACzC,QAAI,KAAK,MAAM,OAAO,SAAS,cAAc;AAC3C,YAAM,YAAY,KAAK,MAAM,OAAO;AAEpC,UAAI,eAAe,SAAS,SAAS,GAAG;AAEtC,cAAM,QAAQ,KAAK,MAAM,UAAU,KAAK,SAAO;AAC7C,cAAI,IAAI,SAAS,oBAAoB;AACnC,mBAAO,IAAI,YAAY;AAAA,cACrB,WACG,KAAK,SAAS,cAAc,KAAK,SAAS,qBAC3C,KAAK,KAAK,SAAS,gBACnB,KAAK,IAAI,SAAS;AAAA,YACtB;AAAA,UACF;AACA,iBAAO;AAAA,QACT,CAAC;AAED,YAAI,CAAC,OAAO;AAEV,cAAI,SAAS,KAAK;AAClB,gBAAM,iBAAiB,oBAAI,IAAI;AAAA,YAC7B;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAED,iBAAO,UAAU,CAAC,eAAe,IAAI,OAAO,MAAM,IAAI,GAAG;AACvD,qBAAS,OAAO;AAAA,UAClB;AAEA,cAAI,UAAU,OAAO,OAAO;AAE1B,gBAAI,aAAa,OAAO;AACxB,gBACE,WAAW,SAAS,8BACpB,WAAW,SAAS,4BACpB,OAAO,WACN,OAAO,OAAO,MAAM,SAAS,8BAC5B,OAAO,OAAO,MAAM,SAAS,2BAC/B;AACA,2BAAa,OAAO,OAAO;AAAA,YAC7B;AAEA,kBAAM,QAAQ,kBAAkB,YAAY,GAAG,eAAe;AAC9D,gBAAI,OAAO;AACT,sBAAQ,aAAa;AAAA,YACvB;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAGD,OAAK,KAAK,EAAE,cAAc,EAAE,QAAQ,UAAQ;AAC1C,QAAI,KAAK,MAAM,OAAO,SAAS,cAAc;AAC3C,YAAM,eAAe,KAAK,MAAM,OAAO;AAEvC,UAAI,gBAAgB,SAAS,YAAY,GAAG;AAE1C,cAAM,QAAQ,KAAK,MAAM,UAAU,KAAK,SAAO;AAC7C,cAAI,IAAI,SAAS,oBAAoB;AACnC,mBAAO,IAAI,YAAY;AAAA,cACrB,WACG,KAAK,SAAS,cAAc,KAAK,SAAS,qBAC3C,KAAK,KAAK,SAAS,gBACnB,KAAK,IAAI,SAAS;AAAA,YACtB;AAAA,UACF;AACA,iBAAO;AAAA,QACT,CAAC;AAED,YAAI,CAAC,OAAO;AAEV,cAAI,SAAS,KAAK;AAClB,gBAAM,iBAAiB,oBAAI,IAAI;AAAA,YAC7B;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAED,iBAAO,UAAU,CAAC,eAAe,IAAI,OAAO,MAAM,IAAI,GAAG;AACvD,qBAAS,OAAO;AAAA,UAClB;AAEA,cAAI,UAAU,OAAO,OAAO;AAE1B,gBAAI,aAAa,OAAO;AACxB,gBACE,WAAW,SAAS,8BACpB,WAAW,SAAS,4BACpB,OAAO,WACN,OAAO,OAAO,MAAM,SAAS,8BAC5B,OAAO,OAAO,MAAM,SAAS,2BAC/B;AACA,2BAAa,OAAO,OAAO;AAAA,YAC7B;AAEA,kBAAM,QAAQ,kBAAkB,YAAY,GAAG,eAAe;AAC9D,gBAAI,OAAO;AACT,sBAAQ,aAAa;AAAA,YACvB;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAED,MAAI,QAAQ,YAAY;AACtB,YAAQ,SAAS,KAAK,mBAAmB,SAAS,IAAI,wDAAwD;AAAA,EAChH;AACF,CAAC;","names":[]}
@@ -1,45 +1,6 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/codemods/v1/runtime-context.ts
21
- var runtime_context_exports = {};
22
- __export(runtime_context_exports, {
23
- default: () => runtime_context_default
24
- });
25
- module.exports = __toCommonJS(runtime_context_exports);
26
-
27
- // src/codemods/lib/create-transformer.ts
28
- function createTransformer(transformFn) {
29
- return function transformer(fileInfo, api, options) {
30
- const j = api.jscodeshift;
31
- const root = j(fileInfo.source);
32
- const context = {
33
- j,
34
- root,
35
- hasChanges: false,
36
- messages: []
37
- };
38
- transformFn(fileInfo, api, options, context);
39
- context.messages.forEach((message) => api.report(message));
40
- return context.hasChanges ? root.toSource({ quote: "single" }) : null;
41
- };
42
- }
1
+ import {
2
+ createTransformer
3
+ } from "../chunk-JNFQ6J6B.js";
43
4
 
44
5
  // src/codemods/v1/runtime-context.ts
45
6
  var runtime_context_default = createTransformer((fileInfo, api, options, context) => {
@@ -163,4 +124,7 @@ function shouldProcessKey(key, node) {
163
124
  if (key === "loc" || key === "comments") return false;
164
125
  return true;
165
126
  }
127
+ export {
128
+ runtime_context_default as default
129
+ };
166
130
  //# sourceMappingURL=runtime-context.js.map