agent-docs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.cursor/plans/OPTIMISE.md +379 -0
  2. package/.cursor/plans/VERSIONING.md +207 -0
  3. package/.cursor/rules/IMPORTANT.mdc +97 -0
  4. package/.github/ISSUE_TEMPLATE/bug_report.md +13 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
  6. package/.github/dependabot.yml +38 -0
  7. package/.github/pull_request_template.md +10 -0
  8. package/.github/workflows/format.yml +35 -0
  9. package/CODE_OF_CONDUCT.md +64 -0
  10. package/CONTRIBUTING.md +52 -0
  11. package/LICENSE.md +20 -0
  12. package/PLAN.md +707 -0
  13. package/README.md +133 -0
  14. package/SECURITY.md +21 -0
  15. package/docs/APEXANNOTATIONS.md +472 -0
  16. package/docs/APEXDOC.md +198 -0
  17. package/docs/CML.md +877 -0
  18. package/docs/CODEANALYZER.md +435 -0
  19. package/docs/CONTEXTDEFINITIONS.md +617 -0
  20. package/docs/ESLINT.md +827 -0
  21. package/docs/ESLINTJSDOC.md +520 -0
  22. package/docs/FIELDSERVICE.md +4452 -0
  23. package/docs/GRAPHBINARY.md +208 -0
  24. package/docs/GRAPHENGINE.md +616 -0
  25. package/docs/GRAPHML.md +337 -0
  26. package/docs/GRAPHSON.md +302 -0
  27. package/docs/GREMLIN.md +490 -0
  28. package/docs/GRYO.md +232 -0
  29. package/docs/HUSKY.md +106 -0
  30. package/docs/JEST.md +387 -0
  31. package/docs/JORJE.md +537 -0
  32. package/docs/JSDOC.md +621 -0
  33. package/docs/PMD.md +910 -0
  34. package/docs/PNPM.md +409 -0
  35. package/docs/PRETTIER.md +716 -0
  36. package/docs/PRETTIERAPEX.md +874 -0
  37. package/docs/REVENUETRANSACTIONMANAGEMENT.md +887 -0
  38. package/docs/TINKERPOP.md +252 -0
  39. package/docs/VITEST.md +706 -0
  40. package/docs/VSCODE.md +231 -0
  41. package/docs/XPATH31.md +213 -0
  42. package/package.json +32 -0
  43. package/postinstall.mjs +51 -0
  44. package/prettier.config.js +18 -0
package/docs/PNPM.md ADDED
@@ -0,0 +1,409 @@
1
+ # pnpm Reference
2
+
3
+ > **Version**: 1.0.0
4
+
5
+ ## Core Concepts
6
+
7
+ - **Content-addressable store**: Single copy per package version, hard-linked to
8
+ projects. 100 projects using same dep = 1 disk copy.
9
+ - **Install stages**: 1) Resolve deps → 2) Calculate structure → 3) Hard-link
10
+ from store
11
+ - **Non-flat node_modules**: Symlinks for direct deps only; prevents phantom
12
+ dependencies. Fallback: `node-linker=hoisted`
13
+
14
+ ## Feature Comparison
15
+
16
+ | Feature | pnpm | Yarn | npm |
17
+ | ----------------------------------------------------------------------- | ---- | ----------- | --- |
18
+ | Workspace/Isolated node_modules/Hoisted/Lockfile/Overrides/Dynamic exec | ✅ | ✅ | ✅ |
19
+ | Plug'n'Play | ✅ | ✅(default) | ❌ |
20
+ | Auto-install peers | ✅ | ❌ | ✅ |
21
+ | Zero-Installs | ❌ | ✅ | ❌ |
22
+ | Patching deps | ✅ | ✅ | ❌ |
23
+ | Node.js version mgmt | ✅ | ❌ | ❌ |
24
+ | Content-addressable storage/Side-effects cache/Catalogs/Config deps | ✅ | ❌ | ❌ |
25
+
26
+ ## Installation
27
+
28
+ **Requires**: Node.js v18.12+ (unless standalone/@pnpm/exe)
29
+
30
+ ```bash
31
+ # Corepack (recommended)
32
+ npm i -g corepack@latest && corepack enable pnpm && corepack use pnpm@latest-10
33
+
34
+ # npm
35
+ npm i -g pnpm@latest-10
36
+
37
+ # Homebrew/winget/scoop/choco/volta
38
+ brew install pnpm | winget install pnpm.pnpm | scoop install pnpm | choco install pnpm | volta install pnpm
39
+
40
+ # Update
41
+ pnpm self-update
42
+ ```
43
+
44
+ **Compatibility**: pnpm 10 requires Node.js 18+
45
+
46
+ ## CLI Commands
47
+
48
+ ### Package Management
49
+
50
+ ```bash
51
+ # Install
52
+ pnpm install [--frozen-lockfile|--lockfile-only|--prefer-offline|--offline|--ignore-scripts|--no-optional|--production|--shamefully-hoist]
53
+ pnpm i -r # All workspaces
54
+ pnpm i --filter <sel> # Filtered
55
+
56
+ # Add
57
+ pnpm add <pkg>[@version|@tag] # deps
58
+ pnpm add -D|-O|-g <pkg> # dev|optional|global
59
+ pnpm add <pkg> --save-exact|--save-peer|--no-save
60
+ pnpm add jsr:@scope/pkg | ./path | file:./path | <tarball-url> | git+<url> | github:user/repo | workspace:*
61
+
62
+ # Update
63
+ pnpm up [<pkg>] [--latest|--interactive|--no-save] [-r|--filter <sel>]
64
+
65
+ # Remove
66
+ pnpm rm <pkg> [--save-dev|--save-optional|-g|-r|--filter <sel>]
67
+
68
+ # Link/Unlink
69
+ pnpm link <path>|-g # Link local/to global
70
+ pnpm link <pkg-name> # Link from global
71
+ pnpm unlink [<pkg>] [-g]
72
+
73
+ # Other
74
+ pnpm import # From npm/yarn lockfile
75
+ pnpm rebuild [<pkg>] [-r|--filter]
76
+ pnpm prune [--production|--no-optional]
77
+ pnpm fetch [--frozen-lockfile]
78
+ pnpm dedupe [--check]
79
+ pnpm install-test | pnpm it # Install + test
80
+ ```
81
+
82
+ ### Patching
83
+
84
+ ```bash
85
+ pnpm patch <pkg>[@ver] # Create temp edit dir
86
+ pnpm patch-commit <path> # Save patch to patches/
87
+ pnpm patch-remove <pkg> # Remove patch
88
+ ```
89
+
90
+ ### Inspection
91
+
92
+ ```bash
93
+ pnpm list [<pkg>] [--depth=N|--long|--json|--parseable|-g|--prod|--dev] [-r|--filter]
94
+ pnpm outdated [--long|--json] [-r|--filter]
95
+ pnpm why <pkg> [--json|--find-by=<finder>] [-r|--filter]
96
+ pnpm licenses list [--json|--prod|--dev] [-r|--filter]
97
+ pnpm audit [--fix|--audit-level <lvl>|--json|--prod] [-r|--filter]
98
+ ```
99
+
100
+ ### Scripts
101
+
102
+ ```bash
103
+ pnpm run <script> [-- <args>] [--silent|--if-present|--parallel|--stream|-r|--filter]
104
+ pnpm <script> # Shorthand if no cmd conflict
105
+ pnpm test|t | pnpm start # Run test/start script
106
+ pnpm exec <cmd> # Run in project context (node_modules/.bin in PATH)
107
+ pnpm dlx <pkg> [args] # Download+execute (like npx)
108
+ pnpm create <template> [args] # Run create-<template>
109
+ ```
110
+
111
+ ### Publishing
112
+
113
+ ```bash
114
+ pnpm publish [--dry-run|--access public|restricted|--tag <tag>|--no-git-checks|--force]
115
+ pnpm pack [--pack-destination <dir>]
116
+ ```
117
+
118
+ ### Build Scripts Security
119
+
120
+ ```bash
121
+ pnpm approve-builds [<pkg>] # Allow pkg build scripts
122
+ pnpm ignored-builds # List blocked pkgs
123
+ ```
124
+
125
+ ### Store/Cache
126
+
127
+ ```bash
128
+ pnpm store path|status|prune
129
+ pnpm cache-list|cache-list-registries|cache-view <pkg>|cache-delete <pkg>
130
+ pnpm cat-file|cat-index <hash>
131
+ pnpm find-hash <pkg>
132
+ ```
133
+
134
+ ### Environment
135
+
136
+ ```bash
137
+ pnpm env use <ver>|lts|latest [-g] # Install/use Node.js
138
+ pnpm env list|remove <ver>
139
+ ```
140
+
141
+ ### Other
142
+
143
+ ```bash
144
+ pnpm root [-g] | pnpm bin [-g]
145
+ pnpm init [-y]
146
+ pnpm deploy <dir> [--filter|--prod] # Deploy pkg with deps
147
+ pnpm doctor # Check issues
148
+ pnpm config get|set|delete|list|edit [--global]
149
+ pnpm setup # Setup shell
150
+ pnpm completion <shell> # Generate completions
151
+ pnpm -C <path>|--dir <path> # Run in different dir
152
+ pnpm -w|--workspace-root # Run in workspace root
153
+ ```
154
+
155
+ ## Configuration
156
+
157
+ **Files**: `.npmrc` (project/global), `pnpm-workspace.yaml`, env vars, CLI flags
158
+
159
+ ### Key Settings (.npmrc)
160
+
161
+ ```ini
162
+ # Store
163
+ store-dir=/path/.pnpm-store
164
+ package-import-method=hardlink|copy|clone-or-copy
165
+
166
+ # Node modules structure
167
+ node-linker=isolated|hoisted|pnp
168
+ shamefully-hoist=true|false
169
+ hoist-pattern[]=*eslint*
170
+ public-hoist-pattern[]=*prettier*
171
+
172
+ # Workspace
173
+ link-workspace-packages=true
174
+ prefer-workspace-packages=true
175
+ shared-workspace-lockfile=true
176
+ save-workspace-protocol=true
177
+
178
+ # Peers
179
+ auto-install-peers=true
180
+ strict-peer-dependencies=true
181
+
182
+ # Lockfile
183
+ frozen-lockfile=true
184
+ lockfile-only=true
185
+
186
+ # Registry
187
+ registry=<url>
188
+ @scope:registry=<url>
189
+
190
+ # Install
191
+ save-exact=true
192
+ save-prefix=^
193
+ ignore-scripts=true
194
+ side-effects-cache=true
195
+
196
+ # Engine
197
+ engine-strict=true
198
+ use-node-version=20.10.0
199
+
200
+ # Security
201
+ only-built-dependencies[]=pkg
202
+ ignored-built-dependencies[]=pkg
203
+ minimum-release-age=7d
204
+
205
+ # Performance
206
+ network-concurrency=16
207
+ workspace-concurrency=4
208
+ resolution-mode=highest|lowest-direct
209
+ git-branch-lockfile=true
210
+ ```
211
+
212
+ ## Workspaces
213
+
214
+ ### pnpm-workspace.yaml
215
+
216
+ ```yaml
217
+ packages:
218
+ - 'packages/*'
219
+ - 'apps/*'
220
+ - '!**/test/**'
221
+
222
+ catalog:
223
+ react: ^18.3.1
224
+ typescript: ^5.0.0
225
+
226
+ configDependencies:
227
+ my-configs: '1.0.0+sha512-<checksum>'
228
+
229
+ onlyBuiltDependencies: [pkg-name]
230
+ ignoredBuiltDependencies: [pkg-name]
231
+
232
+ # All .npmrc settings also valid here
233
+ link-workspace-packages: true
234
+ node-linker: isolated
235
+ public-hoist-pattern: ['*eslint*']
236
+ ```
237
+
238
+ ### Workspace Protocol
239
+
240
+ ```json
241
+ {
242
+ "dependencies": {
243
+ "pkg": "workspace:*", // Any version
244
+ "pkg": "workspace:^1.0.0", // Matching range
245
+ "alias": "workspace:pkg@*", // Alias
246
+ "pkg": "workspace:../pkg" // Relative path
247
+ }
248
+ }
249
+ ```
250
+
251
+ On publish: `workspace:*` → `1.5.0`, `workspace:~` → `~1.5.0`, `workspace:^` →
252
+ `^1.5.0`
253
+
254
+ ### Filtering
255
+
256
+ ```bash
257
+ pnpm --filter <pkg-name> <cmd>
258
+ pnpm --filter "@scope/*" <cmd>
259
+ pnpm --filter ./path <cmd>
260
+ pnpm --filter "<pkg>..." <cmd> # Pkg + deps
261
+ pnpm --filter "...<pkg>" <cmd> # Pkg + dependents
262
+ pnpm --filter "<pkg>^..." <cmd> # Deps only
263
+ pnpm --filter "...^<pkg>" <cmd> # Dependents only
264
+ pnpm --filter "!<pkg>" <cmd> # Exclude
265
+ pnpm --filter <a> --filter <b> <cmd> # Multiple
266
+ ```
267
+
268
+ ## pnpmfile (.pnpmfile.cjs)
269
+
270
+ ```javascript
271
+ module.exports = {
272
+ hooks: {
273
+ readPackage(pkg, ctx) {
274
+ if (pkg.name === 'some-pkg') {
275
+ pkg.dependencies['missing'] = '^1.0.0';
276
+ }
277
+ return pkg;
278
+ },
279
+ afterAllResolved(lockfile, ctx) {
280
+ return lockfile;
281
+ },
282
+ },
283
+ finders: {
284
+ // v10.16+
285
+ react17: (ctx) =>
286
+ ctx.readManifest().peerDependencies?.react === '^17.0.0',
287
+ mitLicense: (ctx) => ctx.readManifest().license === 'MIT',
288
+ },
289
+ };
290
+ ```
291
+
292
+ Usage: `pnpm why --find-by=react17`
293
+
294
+ ## package.json Extensions
295
+
296
+ ```json
297
+ {
298
+ "engines": { "node": ">=18.12", "pnpm": ">=9" },
299
+ "devEngines": {
300
+ "runtime": {
301
+ "name": "node",
302
+ "version": "^24.4.0",
303
+ "onFail": "download"
304
+ }
305
+ },
306
+ "packageManager": "pnpm@9.0.0",
307
+ "pnpm": {
308
+ "overrides": { "lodash": "^4.17.21" },
309
+ "peerDependencyRules": {
310
+ "allowedVersions": { "react": "17 || 18" },
311
+ "ignoreMissing": ["@types/*"]
312
+ }
313
+ }
314
+ }
315
+ ```
316
+
317
+ ## Recipes
318
+
319
+ ### CI (GitHub Actions)
320
+
321
+ ```yaml
322
+ - uses: pnpm/action-setup@v2
323
+ with: { version: 9 }
324
+ - uses: actions/setup-node@v4
325
+ with: { node-version: 20, cache: 'pnpm' }
326
+ - run: pnpm install --frozen-lockfile
327
+ ```
328
+
329
+ ### Docker
330
+
331
+ ```dockerfile
332
+ FROM node:20-slim AS base
333
+ ENV PNPM_HOME="/pnpm" PATH="$PNPM_HOME:$PATH"
334
+ RUN corepack enable
335
+ WORKDIR /app
336
+
337
+ FROM base AS deps
338
+ COPY pnpm-lock.yaml package.json ./
339
+ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile
340
+
341
+ FROM base AS build
342
+ COPY --from=deps /app/node_modules ./node_modules
343
+ COPY . .
344
+ RUN pnpm build
345
+
346
+ FROM base
347
+ COPY --from=build /app/dist ./dist
348
+ COPY --from=deps /app/node_modules ./node_modules
349
+ CMD ["pnpm", "start"]
350
+ ```
351
+
352
+ ### Changesets
353
+
354
+ ```bash
355
+ pnpm add -Dw @changesets/cli && pnpm changeset init
356
+ pnpm changeset # Create changeset
357
+ pnpm changeset version # Bump versions
358
+ pnpm publish -r # Publish all
359
+ ```
360
+
361
+ ### Shell Completions
362
+
363
+ ```bash
364
+ pnpm completion bash > ~/pnpm.bash && echo 'source ~/pnpm.bash' >> ~/.bashrc
365
+ pnpm completion zsh > ~/.zsh/_pnpm && echo 'fpath+=~/.zsh' >> ~/.zshrc
366
+ pnpm completion fish > ~/.config/fish/completions/pnpm.fish
367
+ ```
368
+
369
+ ### Alias
370
+
371
+ ```bash
372
+ alias pn=pnpm # .bashrc/.zshrc
373
+ ```
374
+
375
+ ## Error Codes
376
+
377
+ | Code | Cause | Fix |
378
+ | --------------------------------------------- | -------------------------------------- | ------------------------------------------- |
379
+ | ERR_PNPM_UNEXPECTED_STORE | node_modules linked to different store | Run `pnpm install` |
380
+ | ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE | workspace dep version mismatch | Update pkg versions or run `pnpm -r update` |
381
+ | ERR_PNPM_PEER_DEP_ISSUES | Missing/mismatched peers | Install peers or use peerDependencyRules |
382
+ | ERR_PNPM_OUTDATED_LOCKFILE | Lockfile out of sync | Run `pnpm install` |
383
+ | ERR_PNPM_TARBALL_INTEGRITY | Checksum mismatch | Run `pnpm store prune` then retry |
384
+ | ERR_PNPM_MISMATCHED_RELEASE_CHANNEL | Invalid use-node-version format | Use `X.Y.Z` or `rc/X.Y.Z-rc.W` |
385
+
386
+ ## FAQ
387
+
388
+ - **Disk space with store?** Hard links = same bytes on disk, different paths.
389
+ 1MB pkg appears in store + project = 1MB total.
390
+ - **Windows?** Yes, uses junctions instead of symlinks.
391
+ - **Circular symlinks?** Avoided; deps placed alongside package, not nested.
392
+ - **Cross-drive?** Store must be same drive/filesystem or packages are copied.
393
+ - **Tool incompatibility?** Usually phantom dep issue. Fix:
394
+ `node-linker=hoisted`, add missing dep, or use pnpmfile hook.
395
+
396
+ ## Limitations
397
+
398
+ - npm lockfiles (`package-lock.json`, `npm-shrinkwrap.json`) ignored; use
399
+ `pnpm import`
400
+ - `node_modules/.bin` files are shell scripts, not symlinks
401
+
402
+ ## Uninstall
403
+
404
+ ```bash
405
+ npm uninstall -g pnpm # If installed via npm
406
+ corepack disable # If via corepack
407
+ rm -rf $(pnpm store path) # Remove store
408
+ rm ~/.npmrc # Remove global config
409
+ ```