@unbrained/pm-cli 2026.12.1 → 2026.12.2

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 (267) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/cli-bundle/bundle-manifest.json +1 -1
  3. package/dist/cli-bundle/chunks/{chunk-CWPR234D.js → chunk-7NAO7I75.js} +2 -2
  4. package/dist/cli-bundle/chunks/{chunk-4YQMQOUO.js → chunk-7V65VACG.js} +52 -52
  5. package/dist/cli-bundle/chunks/{chunk-NA6D75V5.js → chunk-G6TARHFK.js} +2 -2
  6. package/dist/cli-bundle/chunks/{chunk-YSVOXCYH.js → chunk-GOEQXVOI.js} +2 -2
  7. package/dist/cli-bundle/chunks/{chunk-OKEJ4U2I.js → chunk-ROTEELDL.js} +3 -3
  8. package/dist/cli-bundle/chunks/{chunk-U7RBJGLF.js → chunk-SDXCJZKB.js} +2 -2
  9. package/dist/cli-bundle/chunks/{chunk-XME6GIFQ.js → chunk-TKUG2X24.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-Q6GLSAJY.js → chunk-UNBW2LF3.js} +2 -2
  11. package/dist/cli-bundle/chunks/chunk-V2S4XAX3.js +2 -0
  12. package/dist/cli-bundle/chunks/{item-transaction-66RDV7PH.js → item-transaction-56J5OCHA.js} +2 -2
  13. package/dist/cli-bundle/chunks/{linked-resource-value-list-E2DX52LY.js → linked-resource-value-list-ZBIY4H23.js} +2 -2
  14. package/dist/cli-bundle/chunks/{register-mutation-2F6JUBST.js → register-mutation-EK6DVIQK.js} +2 -2
  15. package/dist/cli-bundle/chunks/{register-operations-ET3UKPYK.js → register-operations-6MURXE4V.js} +2 -2
  16. package/dist/cli-bundle/chunks/{register-setup-I63QTFCU.js → register-setup-RW26X3GJ.js} +2 -2
  17. package/dist/cli-bundle/focused-chunks/{chunk-SQ72CVUH.js → chunk-3COWDIPX.js} +54 -54
  18. package/dist/cli-bundle/focused-chunks/{chunk-PT7RT3T6.js → chunk-J72TRWR5.js} +3 -3
  19. package/dist/cli-bundle/focused-chunks/{item-transaction-2K4SFLJ7.js → item-transaction-LQLQLZE7.js} +2 -2
  20. package/dist/cli-bundle/main.js +3 -3
  21. package/dist/cli-bundle/sdk-core.js +1 -1
  22. package/dist/cli-bundle/sdk-governance.js +1 -1
  23. package/dist/cli-bundle/sdk-merge.js +1 -1
  24. package/dist/cli-bundle/sdk-runtime.js +1 -1
  25. package/dist/cli-bundle/sdk-testing.js +1 -1
  26. package/dist/cli-bundle/sdk.js +1 -1
  27. package/dist/sdk/extension/install-sources.d.ts +2 -2
  28. package/dist/sdk/extension/install-sources.js +5 -5
  29. package/marketplace.json +1 -1
  30. package/node_modules/tar/README.md +1792 -1147
  31. package/node_modules/tar/dist/commonjs/bytes.d.ts +21 -0
  32. package/node_modules/tar/dist/commonjs/bytes.js +83 -0
  33. package/node_modules/tar/dist/commonjs/codec.d.ts +53 -0
  34. package/node_modules/tar/dist/commonjs/codec.js +35 -0
  35. package/node_modules/tar/dist/commonjs/concat.d.ts +3 -0
  36. package/node_modules/tar/dist/commonjs/concat.js +20 -0
  37. package/node_modules/tar/dist/commonjs/create.d.ts +39 -2
  38. package/node_modules/tar/dist/commonjs/create.js +150 -64
  39. package/node_modules/tar/dist/commonjs/dealias.d.ts +79 -0
  40. package/node_modules/tar/dist/commonjs/dealias.js +50 -0
  41. package/node_modules/tar/dist/commonjs/delete.d.ts +19 -0
  42. package/node_modules/tar/dist/commonjs/delete.js +121 -0
  43. package/node_modules/tar/dist/commonjs/entries.d.ts +82 -0
  44. package/node_modules/tar/dist/commonjs/entries.js +398 -0
  45. package/node_modules/tar/dist/commonjs/extract.d.ts +14 -2
  46. package/node_modules/tar/dist/commonjs/extract.js +40 -81
  47. package/node_modules/tar/dist/commonjs/fs.d.ts +201 -0
  48. package/node_modules/tar/dist/commonjs/fs.js +5 -0
  49. package/node_modules/tar/dist/commonjs/header.d.ts +4 -4
  50. package/node_modules/tar/dist/commonjs/header.js +71 -53
  51. package/node_modules/tar/dist/commonjs/index.d.ts +25 -18
  52. package/node_modules/tar/dist/commonjs/index.js +46 -18
  53. package/node_modules/tar/dist/commonjs/index.min.js +2 -3
  54. package/node_modules/tar/dist/commonjs/large-numbers.d.ts +2 -2
  55. package/node_modules/tar/dist/commonjs/large-numbers.js +4 -4
  56. package/node_modules/tar/dist/commonjs/list.d.ts +23 -6
  57. package/node_modules/tar/dist/commonjs/list.js +99 -138
  58. package/node_modules/tar/dist/commonjs/mkdir.d.ts +16 -11
  59. package/node_modules/tar/dist/commonjs/mkdir.js +121 -159
  60. package/node_modules/tar/dist/commonjs/normalize-unicode.js +9 -0
  61. package/node_modules/tar/dist/commonjs/options.d.ts +284 -513
  62. package/node_modules/tar/dist/commonjs/options.js +20 -61
  63. package/node_modules/tar/dist/commonjs/pack.d.ts +150 -96
  64. package/node_modules/tar/dist/commonjs/pack.js +752 -445
  65. package/node_modules/tar/dist/commonjs/parser.d.ts +98 -0
  66. package/node_modules/tar/dist/commonjs/parser.js +452 -0
  67. package/node_modules/tar/dist/commonjs/path-reservations.d.ts +17 -7
  68. package/node_modules/tar/dist/commonjs/path-reservations.js +110 -140
  69. package/node_modules/tar/dist/commonjs/path.d.ts +19 -0
  70. package/node_modules/tar/dist/commonjs/path.js +90 -0
  71. package/node_modules/tar/dist/commonjs/pax.d.ts +3 -1
  72. package/node_modules/tar/dist/commonjs/pax.js +67 -36
  73. package/node_modules/tar/dist/commonjs/read-entry.d.ts +97 -11
  74. package/node_modules/tar/dist/commonjs/read-entry.js +251 -97
  75. package/node_modules/tar/dist/commonjs/read-file.d.ts +22 -0
  76. package/node_modules/tar/dist/commonjs/read-file.js +104 -0
  77. package/node_modules/tar/dist/commonjs/replace.d.ts +45 -1
  78. package/node_modules/tar/dist/commonjs/replace.js +164 -211
  79. package/node_modules/tar/dist/commonjs/server/codecs.d.ts +38 -0
  80. package/node_modules/tar/dist/commonjs/server/codecs.js +252 -0
  81. package/node_modules/tar/dist/commonjs/server/index.d.ts +115 -0
  82. package/node_modules/tar/dist/commonjs/server/index.js +166 -0
  83. package/node_modules/tar/dist/commonjs/server/index.min.js +3 -0
  84. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +8 -0
  85. package/node_modules/tar/dist/commonjs/strip-absolute-path.js +17 -20
  86. package/node_modules/tar/dist/commonjs/to-stream.d.ts +7 -0
  87. package/node_modules/tar/dist/commonjs/to-stream.js +22 -0
  88. package/node_modules/tar/dist/commonjs/types.d.ts +4 -3
  89. package/node_modules/tar/dist/commonjs/types.js +4 -3
  90. package/node_modules/tar/dist/commonjs/unpack.d.ts +143 -89
  91. package/node_modules/tar/dist/commonjs/unpack.js +780 -725
  92. package/node_modules/tar/dist/commonjs/update.d.ts +11 -1
  93. package/node_modules/tar/dist/commonjs/update.js +37 -28
  94. package/node_modules/tar/dist/commonjs/warn.d.ts +27 -0
  95. package/node_modules/tar/dist/commonjs/warn.js +36 -0
  96. package/node_modules/tar/dist/commonjs/win32-path.d.ts +16 -0
  97. package/node_modules/tar/dist/commonjs/win32-path.js +67 -0
  98. package/node_modules/tar/dist/commonjs/write-entry.d.ts +64 -111
  99. package/node_modules/tar/dist/commonjs/write-entry.js +108 -672
  100. package/node_modules/tar/dist/commonjs/write-flag.d.ts +18 -0
  101. package/node_modules/tar/dist/commonjs/write-flag.js +29 -0
  102. package/node_modules/tar/dist/esm/bytes.d.ts +21 -0
  103. package/node_modules/tar/dist/esm/bytes.js +72 -0
  104. package/node_modules/tar/dist/esm/codec.d.ts +53 -0
  105. package/node_modules/tar/dist/esm/codec.js +32 -0
  106. package/node_modules/tar/dist/esm/concat.d.ts +3 -0
  107. package/node_modules/tar/dist/esm/concat.js +16 -0
  108. package/node_modules/tar/dist/esm/create.d.ts +39 -2
  109. package/node_modules/tar/dist/esm/create.js +144 -61
  110. package/node_modules/tar/dist/esm/dealias.d.ts +79 -0
  111. package/node_modules/tar/dist/esm/dealias.js +46 -0
  112. package/node_modules/tar/dist/esm/delete.d.ts +19 -0
  113. package/node_modules/tar/dist/esm/delete.js +117 -0
  114. package/node_modules/tar/dist/esm/entries.d.ts +82 -0
  115. package/node_modules/tar/dist/esm/entries.js +388 -0
  116. package/node_modules/tar/dist/esm/extract.d.ts +14 -2
  117. package/node_modules/tar/dist/esm/extract.js +37 -44
  118. package/node_modules/tar/dist/esm/fs.d.ts +201 -0
  119. package/node_modules/tar/dist/esm/fs.js +4 -0
  120. package/node_modules/tar/dist/esm/header.d.ts +4 -4
  121. package/node_modules/tar/dist/esm/header.js +71 -53
  122. package/node_modules/tar/dist/esm/index.d.ts +25 -18
  123. package/node_modules/tar/dist/esm/index.js +23 -18
  124. package/node_modules/tar/dist/esm/index.min.js +2 -3
  125. package/node_modules/tar/dist/esm/large-numbers.d.ts +2 -2
  126. package/node_modules/tar/dist/esm/large-numbers.js +4 -4
  127. package/node_modules/tar/dist/esm/list.d.ts +23 -6
  128. package/node_modules/tar/dist/esm/list.js +96 -101
  129. package/node_modules/tar/dist/esm/mkdir.d.ts +16 -11
  130. package/node_modules/tar/dist/esm/mkdir.js +119 -154
  131. package/node_modules/tar/dist/esm/normalize-unicode.js +9 -0
  132. package/node_modules/tar/dist/esm/options.d.ts +284 -513
  133. package/node_modules/tar/dist/esm/options.js +17 -51
  134. package/node_modules/tar/dist/esm/pack.d.ts +150 -96
  135. package/node_modules/tar/dist/esm/pack.js +750 -441
  136. package/node_modules/tar/dist/esm/parser.d.ts +98 -0
  137. package/node_modules/tar/dist/esm/parser.js +448 -0
  138. package/node_modules/tar/dist/esm/path-reservations.d.ts +17 -7
  139. package/node_modules/tar/dist/esm/path-reservations.js +110 -140
  140. package/node_modules/tar/dist/esm/path.d.ts +19 -0
  141. package/node_modules/tar/dist/esm/path.js +80 -0
  142. package/node_modules/tar/dist/esm/pax.d.ts +3 -1
  143. package/node_modules/tar/dist/esm/pax.js +66 -35
  144. package/node_modules/tar/dist/esm/read-entry.d.ts +97 -11
  145. package/node_modules/tar/dist/esm/read-entry.js +248 -96
  146. package/node_modules/tar/dist/esm/read-file.d.ts +22 -0
  147. package/node_modules/tar/dist/esm/read-file.js +99 -0
  148. package/node_modules/tar/dist/esm/replace.d.ts +45 -1
  149. package/node_modules/tar/dist/esm/replace.js +160 -207
  150. package/node_modules/tar/dist/esm/server/codecs.d.ts +38 -0
  151. package/node_modules/tar/dist/esm/server/codecs.js +214 -0
  152. package/node_modules/tar/dist/esm/server/index.d.ts +115 -0
  153. package/node_modules/tar/dist/esm/server/index.js +102 -0
  154. package/node_modules/tar/dist/esm/server/index.min.js +3 -0
  155. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +8 -0
  156. package/node_modules/tar/dist/esm/strip-absolute-path.js +17 -20
  157. package/node_modules/tar/dist/esm/to-stream.d.ts +7 -0
  158. package/node_modules/tar/dist/esm/to-stream.js +18 -0
  159. package/node_modules/tar/dist/esm/types.d.ts +4 -3
  160. package/node_modules/tar/dist/esm/types.js +4 -3
  161. package/node_modules/tar/dist/esm/unpack.d.ts +143 -89
  162. package/node_modules/tar/dist/esm/unpack.js +776 -719
  163. package/node_modules/tar/dist/esm/update.d.ts +11 -1
  164. package/node_modules/tar/dist/esm/update.js +35 -28
  165. package/node_modules/tar/dist/esm/warn.d.ts +27 -0
  166. package/node_modules/tar/dist/esm/warn.js +31 -0
  167. package/node_modules/tar/dist/esm/win32-path.d.ts +16 -0
  168. package/node_modules/tar/dist/esm/win32-path.js +60 -0
  169. package/node_modules/tar/dist/esm/write-entry.d.ts +64 -111
  170. package/node_modules/tar/dist/esm/write-entry.js +107 -633
  171. package/node_modules/tar/dist/esm/write-flag.d.ts +18 -0
  172. package/node_modules/tar/dist/esm/write-flag.js +25 -0
  173. package/node_modules/tar/package.json +68 -224
  174. package/package.json +2 -2
  175. package/packages/pm-beads/package.json +1 -1
  176. package/packages/pm-calendar/package.json +1 -1
  177. package/packages/pm-command-kit/package.json +1 -1
  178. package/packages/pm-digital-twin/package.json +1 -1
  179. package/packages/pm-governance-audit/package.json +1 -1
  180. package/packages/pm-guide-shell/package.json +1 -1
  181. package/packages/pm-kanban/package.json +1 -1
  182. package/packages/pm-lifecycle-hooks/package.json +1 -1
  183. package/packages/pm-linked-test-adapters/package.json +1 -1
  184. package/packages/pm-search-advanced/package.json +1 -1
  185. package/packages/pm-templates/package.json +1 -1
  186. package/packages/pm-todos/package.json +1 -1
  187. package/packages/pm-vcs/package.json +1 -1
  188. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  189. package/plugins/pm-claude/package.json +1 -1
  190. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  191. package/plugins/pm-codex/package.json +1 -1
  192. package/plugins/pm-codex/plugin.json +1 -1
  193. package/runtime-dependencies.json +1 -1
  194. package/dist/cli-bundle/chunks/chunk-AJLU6KLW.js +0 -2
  195. package/node_modules/@isaacs/fs-minipass/LICENSE +0 -15
  196. package/node_modules/@isaacs/fs-minipass/README.md +0 -71
  197. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +0 -118
  198. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +0 -430
  199. package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +0 -3
  200. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +0 -118
  201. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +0 -420
  202. package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +0 -3
  203. package/node_modules/@isaacs/fs-minipass/package.json +0 -72
  204. package/node_modules/chownr/LICENSE.md +0 -63
  205. package/node_modules/chownr/README.md +0 -3
  206. package/node_modules/chownr/dist/commonjs/index.d.ts +0 -3
  207. package/node_modules/chownr/dist/commonjs/index.js +0 -93
  208. package/node_modules/chownr/dist/commonjs/package.json +0 -3
  209. package/node_modules/chownr/dist/esm/index.d.ts +0 -3
  210. package/node_modules/chownr/dist/esm/index.js +0 -85
  211. package/node_modules/chownr/dist/esm/package.json +0 -3
  212. package/node_modules/chownr/package.json +0 -69
  213. package/node_modules/minipass/LICENSE.md +0 -55
  214. package/node_modules/minipass/README.md +0 -825
  215. package/node_modules/minipass/dist/commonjs/index.d.ts +0 -545
  216. package/node_modules/minipass/dist/commonjs/index.js +0 -1038
  217. package/node_modules/minipass/dist/commonjs/package.json +0 -3
  218. package/node_modules/minipass/dist/esm/index.d.ts +0 -545
  219. package/node_modules/minipass/dist/esm/index.js +0 -1020
  220. package/node_modules/minipass/dist/esm/package.json +0 -3
  221. package/node_modules/minipass/package.json +0 -77
  222. package/node_modules/minizlib/LICENSE +0 -26
  223. package/node_modules/minizlib/README.md +0 -64
  224. package/node_modules/minizlib/dist/commonjs/constants.d.ts +0 -2
  225. package/node_modules/minizlib/dist/commonjs/constants.js +0 -123
  226. package/node_modules/minizlib/dist/commonjs/index.d.ts +0 -99
  227. package/node_modules/minizlib/dist/commonjs/index.js +0 -416
  228. package/node_modules/minizlib/dist/commonjs/package.json +0 -3
  229. package/node_modules/minizlib/dist/esm/constants.d.ts +0 -2
  230. package/node_modules/minizlib/dist/esm/constants.js +0 -117
  231. package/node_modules/minizlib/dist/esm/index.d.ts +0 -99
  232. package/node_modules/minizlib/dist/esm/index.js +0 -363
  233. package/node_modules/minizlib/dist/esm/package.json +0 -3
  234. package/node_modules/minizlib/package.json +0 -80
  235. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +0 -2
  236. package/node_modules/tar/dist/commonjs/get-write-flag.js +0 -32
  237. package/node_modules/tar/dist/commonjs/make-command.d.ts +0 -49
  238. package/node_modules/tar/dist/commonjs/make-command.js +0 -52
  239. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +0 -2
  240. package/node_modules/tar/dist/commonjs/normalize-windows-path.js +0 -12
  241. package/node_modules/tar/dist/commonjs/parse.d.ts +0 -92
  242. package/node_modules/tar/dist/commonjs/parse.js +0 -655
  243. package/node_modules/tar/dist/commonjs/process-umask.d.ts +0 -2
  244. package/node_modules/tar/dist/commonjs/process-umask.js +0 -7
  245. package/node_modules/tar/dist/commonjs/warn-method.d.ts +0 -24
  246. package/node_modules/tar/dist/commonjs/warn-method.js +0 -31
  247. package/node_modules/tar/dist/esm/get-write-flag.d.ts +0 -2
  248. package/node_modules/tar/dist/esm/get-write-flag.js +0 -26
  249. package/node_modules/tar/dist/esm/make-command.d.ts +0 -49
  250. package/node_modules/tar/dist/esm/make-command.js +0 -48
  251. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +0 -2
  252. package/node_modules/tar/dist/esm/normalize-windows-path.js +0 -9
  253. package/node_modules/tar/dist/esm/parse.d.ts +0 -92
  254. package/node_modules/tar/dist/esm/parse.js +0 -651
  255. package/node_modules/tar/dist/esm/process-umask.d.ts +0 -2
  256. package/node_modules/tar/dist/esm/process-umask.js +0 -3
  257. package/node_modules/tar/dist/esm/warn-method.d.ts +0 -24
  258. package/node_modules/tar/dist/esm/warn-method.js +0 -27
  259. package/node_modules/yallist/LICENSE.md +0 -63
  260. package/node_modules/yallist/README.md +0 -205
  261. package/node_modules/yallist/dist/commonjs/index.d.ts +0 -39
  262. package/node_modules/yallist/dist/commonjs/index.js +0 -384
  263. package/node_modules/yallist/dist/commonjs/package.json +0 -3
  264. package/node_modules/yallist/dist/esm/index.d.ts +0 -39
  265. package/node_modules/yallist/dist/esm/index.js +0 -379
  266. package/node_modules/yallist/dist/esm/package.json +0 -3
  267. package/node_modules/yallist/package.json +0 -68
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,39 +0,0 @@
1
- export declare class Yallist<T = unknown> {
2
- tail?: Node<T>;
3
- head?: Node<T>;
4
- length: number;
5
- static create<T = unknown>(list?: Iterable<T>): Yallist<T>;
6
- constructor(list?: Iterable<T>);
7
- [Symbol.iterator](): Generator<T, void, unknown>;
8
- removeNode(node: Node<T>): Node<T> | undefined;
9
- unshiftNode(node: Node<T>): void;
10
- pushNode(node: Node<T>): void;
11
- push(...args: T[]): number;
12
- unshift(...args: T[]): number;
13
- pop(): T | undefined;
14
- shift(): T | undefined;
15
- forEach(fn: (value: T, i: number, list: Yallist<T>) => any, thisp?: any): void;
16
- forEachReverse(fn: (value: T, i: number, list: Yallist<T>) => any, thisp?: any): void;
17
- get(n: number): T | undefined;
18
- getReverse(n: number): T | undefined;
19
- map<R = any>(fn: (value: T, list: Yallist<T>) => R, thisp?: any): Yallist<R>;
20
- mapReverse<R = any>(fn: (value: T, list: Yallist<T>) => R, thisp?: any): Yallist<R>;
21
- reduce(fn: (left: T, right: T, i: number) => T): T;
22
- reduce<R = any>(fn: (acc: R, next: T, i: number) => R, initial: R): R;
23
- reduceReverse(fn: (left: T, right: T, i: number) => T): T;
24
- reduceReverse<R = any>(fn: (acc: R, next: T, i: number) => R, initial: R): R;
25
- toArray(): any[];
26
- toArrayReverse(): any[];
27
- slice(from?: number, to?: number): Yallist<unknown>;
28
- sliceReverse(from?: number, to?: number): Yallist<unknown>;
29
- splice(start: number, deleteCount?: number, ...nodes: T[]): T[];
30
- reverse(): this;
31
- }
32
- export declare class Node<T = unknown> {
33
- list?: Yallist<T>;
34
- next?: Node<T>;
35
- prev?: Node<T>;
36
- value: T;
37
- constructor(value: T, prev?: Node<T> | undefined, next?: Node<T> | undefined, list?: Yallist<T> | undefined);
38
- }
39
- //# sourceMappingURL=index.d.ts.map
@@ -1,379 +0,0 @@
1
- export class Yallist {
2
- tail;
3
- head;
4
- length = 0;
5
- static create(list = []) {
6
- return new Yallist(list);
7
- }
8
- constructor(list = []) {
9
- for (const item of list) {
10
- this.push(item);
11
- }
12
- }
13
- *[Symbol.iterator]() {
14
- for (let walker = this.head; walker; walker = walker.next) {
15
- yield walker.value;
16
- }
17
- }
18
- removeNode(node) {
19
- if (node.list !== this) {
20
- throw new Error('removing node which does not belong to this list');
21
- }
22
- const next = node.next;
23
- const prev = node.prev;
24
- if (next) {
25
- next.prev = prev;
26
- }
27
- if (prev) {
28
- prev.next = next;
29
- }
30
- if (node === this.head) {
31
- this.head = next;
32
- }
33
- if (node === this.tail) {
34
- this.tail = prev;
35
- }
36
- this.length--;
37
- node.next = undefined;
38
- node.prev = undefined;
39
- node.list = undefined;
40
- return next;
41
- }
42
- unshiftNode(node) {
43
- if (node === this.head) {
44
- return;
45
- }
46
- if (node.list) {
47
- node.list.removeNode(node);
48
- }
49
- const head = this.head;
50
- node.list = this;
51
- node.next = head;
52
- if (head) {
53
- head.prev = node;
54
- }
55
- this.head = node;
56
- if (!this.tail) {
57
- this.tail = node;
58
- }
59
- this.length++;
60
- }
61
- pushNode(node) {
62
- if (node === this.tail) {
63
- return;
64
- }
65
- if (node.list) {
66
- node.list.removeNode(node);
67
- }
68
- const tail = this.tail;
69
- node.list = this;
70
- node.prev = tail;
71
- if (tail) {
72
- tail.next = node;
73
- }
74
- this.tail = node;
75
- if (!this.head) {
76
- this.head = node;
77
- }
78
- this.length++;
79
- }
80
- push(...args) {
81
- for (let i = 0, l = args.length; i < l; i++) {
82
- push(this, args[i]);
83
- }
84
- return this.length;
85
- }
86
- unshift(...args) {
87
- for (var i = 0, l = args.length; i < l; i++) {
88
- unshift(this, args[i]);
89
- }
90
- return this.length;
91
- }
92
- pop() {
93
- if (!this.tail) {
94
- return undefined;
95
- }
96
- const res = this.tail.value;
97
- const t = this.tail;
98
- this.tail = this.tail.prev;
99
- if (this.tail) {
100
- this.tail.next = undefined;
101
- }
102
- else {
103
- this.head = undefined;
104
- }
105
- t.list = undefined;
106
- this.length--;
107
- return res;
108
- }
109
- shift() {
110
- if (!this.head) {
111
- return undefined;
112
- }
113
- const res = this.head.value;
114
- const h = this.head;
115
- this.head = this.head.next;
116
- if (this.head) {
117
- this.head.prev = undefined;
118
- }
119
- else {
120
- this.tail = undefined;
121
- }
122
- h.list = undefined;
123
- this.length--;
124
- return res;
125
- }
126
- forEach(fn, thisp) {
127
- thisp = thisp || this;
128
- for (let walker = this.head, i = 0; !!walker; i++) {
129
- fn.call(thisp, walker.value, i, this);
130
- walker = walker.next;
131
- }
132
- }
133
- forEachReverse(fn, thisp) {
134
- thisp = thisp || this;
135
- for (let walker = this.tail, i = this.length - 1; !!walker; i--) {
136
- fn.call(thisp, walker.value, i, this);
137
- walker = walker.prev;
138
- }
139
- }
140
- get(n) {
141
- let i = 0;
142
- let walker = this.head;
143
- for (; !!walker && i < n; i++) {
144
- walker = walker.next;
145
- }
146
- if (i === n && !!walker) {
147
- return walker.value;
148
- }
149
- }
150
- getReverse(n) {
151
- let i = 0;
152
- let walker = this.tail;
153
- for (; !!walker && i < n; i++) {
154
- // abort out of the list early if we hit a cycle
155
- walker = walker.prev;
156
- }
157
- if (i === n && !!walker) {
158
- return walker.value;
159
- }
160
- }
161
- map(fn, thisp) {
162
- thisp = thisp || this;
163
- const res = new Yallist();
164
- for (let walker = this.head; !!walker;) {
165
- res.push(fn.call(thisp, walker.value, this));
166
- walker = walker.next;
167
- }
168
- return res;
169
- }
170
- mapReverse(fn, thisp) {
171
- thisp = thisp || this;
172
- var res = new Yallist();
173
- for (let walker = this.tail; !!walker;) {
174
- res.push(fn.call(thisp, walker.value, this));
175
- walker = walker.prev;
176
- }
177
- return res;
178
- }
179
- reduce(fn, initial) {
180
- let acc;
181
- let walker = this.head;
182
- if (arguments.length > 1) {
183
- acc = initial;
184
- }
185
- else if (this.head) {
186
- walker = this.head.next;
187
- acc = this.head.value;
188
- }
189
- else {
190
- throw new TypeError('Reduce of empty list with no initial value');
191
- }
192
- for (var i = 0; !!walker; i++) {
193
- acc = fn(acc, walker.value, i);
194
- walker = walker.next;
195
- }
196
- return acc;
197
- }
198
- reduceReverse(fn, initial) {
199
- let acc;
200
- let walker = this.tail;
201
- if (arguments.length > 1) {
202
- acc = initial;
203
- }
204
- else if (this.tail) {
205
- walker = this.tail.prev;
206
- acc = this.tail.value;
207
- }
208
- else {
209
- throw new TypeError('Reduce of empty list with no initial value');
210
- }
211
- for (let i = this.length - 1; !!walker; i--) {
212
- acc = fn(acc, walker.value, i);
213
- walker = walker.prev;
214
- }
215
- return acc;
216
- }
217
- toArray() {
218
- const arr = new Array(this.length);
219
- for (let i = 0, walker = this.head; !!walker; i++) {
220
- arr[i] = walker.value;
221
- walker = walker.next;
222
- }
223
- return arr;
224
- }
225
- toArrayReverse() {
226
- const arr = new Array(this.length);
227
- for (let i = 0, walker = this.tail; !!walker; i++) {
228
- arr[i] = walker.value;
229
- walker = walker.prev;
230
- }
231
- return arr;
232
- }
233
- slice(from = 0, to = this.length) {
234
- if (to < 0) {
235
- to += this.length;
236
- }
237
- if (from < 0) {
238
- from += this.length;
239
- }
240
- const ret = new Yallist();
241
- if (to < from || to < 0) {
242
- return ret;
243
- }
244
- if (from < 0) {
245
- from = 0;
246
- }
247
- if (to > this.length) {
248
- to = this.length;
249
- }
250
- let walker = this.head;
251
- let i = 0;
252
- for (i = 0; !!walker && i < from; i++) {
253
- walker = walker.next;
254
- }
255
- for (; !!walker && i < to; i++, walker = walker.next) {
256
- ret.push(walker.value);
257
- }
258
- return ret;
259
- }
260
- sliceReverse(from = 0, to = this.length) {
261
- if (to < 0) {
262
- to += this.length;
263
- }
264
- if (from < 0) {
265
- from += this.length;
266
- }
267
- const ret = new Yallist();
268
- if (to < from || to < 0) {
269
- return ret;
270
- }
271
- if (from < 0) {
272
- from = 0;
273
- }
274
- if (to > this.length) {
275
- to = this.length;
276
- }
277
- let i = this.length;
278
- let walker = this.tail;
279
- for (; !!walker && i > to; i--) {
280
- walker = walker.prev;
281
- }
282
- for (; !!walker && i > from; i--, walker = walker.prev) {
283
- ret.push(walker.value);
284
- }
285
- return ret;
286
- }
287
- splice(start, deleteCount = 0, ...nodes) {
288
- if (start > this.length) {
289
- start = this.length - 1;
290
- }
291
- if (start < 0) {
292
- start = this.length + start;
293
- }
294
- let walker = this.head;
295
- for (let i = 0; !!walker && i < start; i++) {
296
- walker = walker.next;
297
- }
298
- const ret = [];
299
- for (let i = 0; !!walker && i < deleteCount; i++) {
300
- ret.push(walker.value);
301
- walker = this.removeNode(walker);
302
- }
303
- if (!walker) {
304
- walker = this.tail;
305
- }
306
- else if (walker !== this.tail) {
307
- walker = walker.prev;
308
- }
309
- for (const v of nodes) {
310
- walker = insertAfter(this, walker, v);
311
- }
312
- return ret;
313
- }
314
- reverse() {
315
- const head = this.head;
316
- const tail = this.tail;
317
- for (let walker = head; !!walker; walker = walker.prev) {
318
- const p = walker.prev;
319
- walker.prev = walker.next;
320
- walker.next = p;
321
- }
322
- this.head = tail;
323
- this.tail = head;
324
- return this;
325
- }
326
- }
327
- // insertAfter undefined means "make the node the new head of list"
328
- function insertAfter(self, node, value) {
329
- const prev = node;
330
- const next = node ? node.next : self.head;
331
- const inserted = new Node(value, prev, next, self);
332
- if (inserted.next === undefined) {
333
- self.tail = inserted;
334
- }
335
- if (inserted.prev === undefined) {
336
- self.head = inserted;
337
- }
338
- self.length++;
339
- return inserted;
340
- }
341
- function push(self, item) {
342
- self.tail = new Node(item, self.tail, undefined, self);
343
- if (!self.head) {
344
- self.head = self.tail;
345
- }
346
- self.length++;
347
- }
348
- function unshift(self, item) {
349
- self.head = new Node(item, undefined, self.head, self);
350
- if (!self.tail) {
351
- self.tail = self.head;
352
- }
353
- self.length++;
354
- }
355
- export class Node {
356
- list;
357
- next;
358
- prev;
359
- value;
360
- constructor(value, prev, next, list) {
361
- this.list = list;
362
- this.value = value;
363
- if (prev) {
364
- prev.next = this;
365
- this.prev = prev;
366
- }
367
- else {
368
- this.prev = undefined;
369
- }
370
- if (next) {
371
- next.prev = this;
372
- this.next = next;
373
- }
374
- else {
375
- this.next = undefined;
376
- }
377
- }
378
- }
379
- //# sourceMappingURL=index.js.map
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
@@ -1,68 +0,0 @@
1
- {
2
- "name": "yallist",
3
- "version": "5.0.0",
4
- "description": "Yet Another Linked List",
5
- "files": [
6
- "dist"
7
- ],
8
- "devDependencies": {
9
- "prettier": "^3.2.5",
10
- "tap": "^18.7.2",
11
- "tshy": "^1.13.1",
12
- "typedoc": "^0.25.13"
13
- },
14
- "scripts": {
15
- "preversion": "npm test",
16
- "postversion": "npm publish",
17
- "prepublishOnly": "git push origin --follow-tags",
18
- "prepare": "tshy",
19
- "pretest": "npm run prepare",
20
- "presnap": "npm run prepare",
21
- "test": "tap",
22
- "snap": "tap",
23
- "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
24
- "typedoc": "typedoc"
25
- },
26
- "repository": {
27
- "type": "git",
28
- "url": "git+https://github.com/isaacs/yallist.git"
29
- },
30
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
31
- "license": "BlueOak-1.0.0",
32
- "tshy": {
33
- "exports": {
34
- "./package.json": "./package.json",
35
- ".": "./src/index.ts"
36
- }
37
- },
38
- "exports": {
39
- "./package.json": "./package.json",
40
- ".": {
41
- "import": {
42
- "types": "./dist/esm/index.d.ts",
43
- "default": "./dist/esm/index.js"
44
- },
45
- "require": {
46
- "types": "./dist/commonjs/index.d.ts",
47
- "default": "./dist/commonjs/index.js"
48
- }
49
- }
50
- },
51
- "main": "./dist/commonjs/index.js",
52
- "types": "./dist/commonjs/index.d.ts",
53
- "type": "module",
54
- "prettier": {
55
- "semi": false,
56
- "printWidth": 70,
57
- "tabWidth": 2,
58
- "useTabs": false,
59
- "singleQuote": true,
60
- "jsxSingleQuote": false,
61
- "bracketSameLine": true,
62
- "arrowParens": "avoid",
63
- "endOfLine": "lf"
64
- },
65
- "engines": {
66
- "node": ">=18"
67
- }
68
- }