@metamask-previews/platform-api-docs 0.1.0-preview-abca9bcea → 0.2.0-preview-0a30e47

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 (74) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/{cli.mjs → cli.js} +10 -40
  5. package/dist/cli.js.map +1 -0
  6. package/dist/{extraction.d.cts → extraction.d.ts} +3 -3
  7. package/dist/extraction.d.ts.map +1 -0
  8. package/dist/{extraction.mjs → extraction.js} +3 -3
  9. package/dist/extraction.js.map +1 -0
  10. package/dist/{generate.d.cts → generate.d.ts} +2 -2
  11. package/dist/generate.d.ts.map +1 -0
  12. package/dist/{generate.mjs → generate.js} +10 -10
  13. package/dist/generate.js.map +1 -0
  14. package/dist/{markdown.d.cts → markdown.d.ts} +2 -2
  15. package/dist/markdown.d.ts.map +1 -0
  16. package/dist/{markdown.mjs → markdown.js} +1 -1
  17. package/dist/markdown.js.map +1 -0
  18. package/dist/{root-messenger-discovery.d.cts → root-messenger-discovery.d.ts} +2 -2
  19. package/dist/root-messenger-discovery.d.ts.map +1 -0
  20. package/dist/{root-messenger-discovery.mjs → root-messenger-discovery.js} +5 -5
  21. package/dist/root-messenger-discovery.js.map +1 -0
  22. package/dist/{ts-project.d.cts → ts-project.d.ts} +2 -2
  23. package/dist/ts-project.d.ts.map +1 -0
  24. package/dist/{ts-project.mjs → ts-project.js} +2 -2
  25. package/dist/ts-project.js.map +1 -0
  26. package/dist/{types.d.cts → types.d.ts} +1 -1
  27. package/dist/types.d.ts.map +1 -0
  28. package/dist/types.js +2 -0
  29. package/dist/types.js.map +1 -0
  30. package/package.json +12 -8
  31. package/dist/cli.cjs +0 -328
  32. package/dist/cli.cjs.map +0 -1
  33. package/dist/cli.d.cts +0 -3
  34. package/dist/cli.d.cts.map +0 -1
  35. package/dist/cli.d.mts +0 -3
  36. package/dist/cli.d.mts.map +0 -1
  37. package/dist/cli.mjs.map +0 -1
  38. package/dist/extraction.cjs +0 -754
  39. package/dist/extraction.cjs.map +0 -1
  40. package/dist/extraction.d.cts.map +0 -1
  41. package/dist/extraction.d.mts +0 -73
  42. package/dist/extraction.d.mts.map +0 -1
  43. package/dist/extraction.mjs.map +0 -1
  44. package/dist/generate.cjs +0 -505
  45. package/dist/generate.cjs.map +0 -1
  46. package/dist/generate.d.cts.map +0 -1
  47. package/dist/generate.d.mts +0 -70
  48. package/dist/generate.d.mts.map +0 -1
  49. package/dist/generate.mjs.map +0 -1
  50. package/dist/markdown.cjs +0 -239
  51. package/dist/markdown.cjs.map +0 -1
  52. package/dist/markdown.d.cts.map +0 -1
  53. package/dist/markdown.d.mts +0 -52
  54. package/dist/markdown.d.mts.map +0 -1
  55. package/dist/markdown.mjs.map +0 -1
  56. package/dist/root-messenger-discovery.cjs +0 -359
  57. package/dist/root-messenger-discovery.cjs.map +0 -1
  58. package/dist/root-messenger-discovery.d.cts.map +0 -1
  59. package/dist/root-messenger-discovery.d.mts +0 -61
  60. package/dist/root-messenger-discovery.d.mts.map +0 -1
  61. package/dist/root-messenger-discovery.mjs.map +0 -1
  62. package/dist/ts-project.cjs +0 -33
  63. package/dist/ts-project.cjs.map +0 -1
  64. package/dist/ts-project.d.cts.map +0 -1
  65. package/dist/ts-project.d.mts +0 -12
  66. package/dist/ts-project.d.mts.map +0 -1
  67. package/dist/ts-project.mjs.map +0 -1
  68. package/dist/types.cjs +0 -3
  69. package/dist/types.cjs.map +0 -1
  70. package/dist/types.d.cts.map +0 -1
  71. package/dist/types.d.mts +0 -47
  72. package/dist/types.d.mts.map +0 -1
  73. package/dist/types.mjs +0 -2
  74. package/dist/types.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,2FAA2F;IAC3F,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAC;IACzB,qFAAqF;IACrF,UAAU,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,MAAM,EAAE,yBAAyB,EAAE,CAAC;CACrC,CAAC"}
package/dist/types.d.mts DELETED
@@ -1,47 +0,0 @@
1
- /**
2
- * A documented parameter for an action handler or event payload — name from
3
- * the JSDoc `@param` tag, description from the tag's comment body.
4
- */
5
- export type DocumentedParameter = {
6
- name: string;
7
- description: string;
8
- };
9
- /**
10
- * Information about a messenger action or event extracted from its type
11
- * in a source file.
12
- */
13
- export type MessengerCapabilityPacket = {
14
- /** The capability type's TypeScript identifier, e.g. `NetworkControllerGetStateAction`. */
15
- typeName: string;
16
- /** The capability's messenger key, e.g. `NetworkController:getState`. */
17
- typeString: string;
18
- /** Whether the capability is an action (request/response) or an event (broadcast). */
19
- kind: 'action' | 'event';
20
- /** Cleaned description body — content above the first JSDoc tag. */
21
- jsDoc: string;
22
- /**
23
- * Documented parameters — populated from `@param` tags, in source order.
24
- * For actions these describe the handler's arguments; for events they
25
- * describe the payload tuple's positional elements.
26
- */
27
- params: DocumentedParameter[];
28
- /** Documented return value — populated from a `@returns` tag, if any. */
29
- returns: string;
30
- /** Raw type text of the handler (action) or payload (event). */
31
- handlerOrPayload: string;
32
- /** Path to the file the capability was declared in, relative to the project root. */
33
- sourceFile: string;
34
- /** 1-based line number of the capability declaration. */
35
- line: number;
36
- /** Whether the capability is marked `@deprecated`. */
37
- deprecated: boolean;
38
- };
39
- /**
40
- * A namespace's actions and events, after dedup and sorting.
41
- */
42
- export type NamespaceGroup = {
43
- namespace: string;
44
- actions: MessengerCapabilityPacket[];
45
- events: MessengerCapabilityPacket[];
46
- };
47
- //# sourceMappingURL=types.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,2FAA2F;IAC3F,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAC;IACzB,qFAAqF;IACrF,UAAU,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,MAAM,EAAE,yBAAyB,EAAE,CAAC;CACrC,CAAC"}
package/dist/types.mjs DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A documented parameter for an action handler or event payload — name from\n * the JSDoc `@param` tag, description from the tag's comment body.\n */\nexport type DocumentedParameter = {\n name: string;\n description: string;\n};\n\n/**\n * Information about a messenger action or event extracted from its type\n * in a source file.\n */\nexport type MessengerCapabilityPacket = {\n /** The capability type's TypeScript identifier, e.g. `NetworkControllerGetStateAction`. */\n typeName: string;\n /** The capability's messenger key, e.g. `NetworkController:getState`. */\n typeString: string;\n /** Whether the capability is an action (request/response) or an event (broadcast). */\n kind: 'action' | 'event';\n /** Cleaned description body — content above the first JSDoc tag. */\n jsDoc: string;\n /**\n * Documented parameters — populated from `@param` tags, in source order.\n * For actions these describe the handler's arguments; for events they\n * describe the payload tuple's positional elements.\n */\n params: DocumentedParameter[];\n /** Documented return value — populated from a `@returns` tag, if any. */\n returns: string;\n /** Raw type text of the handler (action) or payload (event). */\n handlerOrPayload: string;\n /** Path to the file the capability was declared in, relative to the project root. */\n sourceFile: string;\n /** 1-based line number of the capability declaration. */\n line: number;\n /** Whether the capability is marked `@deprecated`. */\n deprecated: boolean;\n};\n\n/**\n * A namespace's actions and events, after dedup and sorting.\n */\nexport type NamespaceGroup = {\n namespace: string;\n actions: MessengerCapabilityPacket[];\n events: MessengerCapabilityPacket[];\n};\n"]}