@webex/plugin-logger 3.12.0-next.56 → 3.12.0-next.58
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.
- package/.repo-context.json +389 -0
- package/.sdd/manifest.json +334 -0
- package/AGENTS.md +175 -0
- package/dist/logger.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +76 -0
- package/docs/adr/index.md +18 -0
- package/docs/architecture.md +252 -0
- package/docs/getting-started.md +88 -0
- package/docs/index.md +42 -0
- package/docs/specs/README.md +65 -0
- package/package.json +2 -2
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +320 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./schemas/repo-context.schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"repository": {
|
|
5
|
+
"name": "@webex/plugin-logger",
|
|
6
|
+
"purpose": "Logger plugin for the Cisco Webex JS SDK. It replaces the minimal webex-core logger with leveled console output, redaction of authorization keys, email addresses, and MTID values, and in-memory log buffers that internal-plugin-support formats and uploads."
|
|
7
|
+
},
|
|
8
|
+
"commands": {
|
|
9
|
+
"install": "yarn install",
|
|
10
|
+
"compile": "yarn workspace @webex/plugin-logger build:src",
|
|
11
|
+
"build": "yarn workspace @webex/plugin-logger build",
|
|
12
|
+
"unit-test": "yarn workspace @webex/plugin-logger test:unit",
|
|
13
|
+
"browser-test": "yarn workspace @webex/plugin-logger test:browser",
|
|
14
|
+
"lint": "yarn workspace @webex/plugin-logger test:style",
|
|
15
|
+
"deploy": "yarn workspace @webex/plugin-logger deploy:npm"
|
|
16
|
+
},
|
|
17
|
+
"public_interfaces": [
|
|
18
|
+
{
|
|
19
|
+
"name": "@webex/plugin-logger package barrel",
|
|
20
|
+
"kind": "package_export",
|
|
21
|
+
"source": "src/index.js",
|
|
22
|
+
"entrypoints": [
|
|
23
|
+
"import Logger, {levels} from '@webex/plugin-logger'"
|
|
24
|
+
],
|
|
25
|
+
"audience": "14 workspace packages that depend on @webex/plugin-logger, plus external npm consumers",
|
|
26
|
+
"notes": "Default export Logger and named export levels. Importing the package also registers Logger as the webex 'logger' plugin with replace: true."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "webex.logger runtime methods",
|
|
30
|
+
"kind": "plugin_api",
|
|
31
|
+
"source": "src/logger.js",
|
|
32
|
+
"entrypoints": [
|
|
33
|
+
"webex.logger.error()",
|
|
34
|
+
"webex.logger.client_error()",
|
|
35
|
+
"webex.logger.logToBuffer()",
|
|
36
|
+
"webex.logger.client_logToBuffer()",
|
|
37
|
+
"webex.logger.formatLogs()",
|
|
38
|
+
"webex.logger.updateLastSubmittedIndex()",
|
|
39
|
+
"webex.logger.resetBufferToLastSuccessfulUpload()"
|
|
40
|
+
],
|
|
41
|
+
"audience": "SDK plugins, client applications, and @webex/internal-plugin-support",
|
|
42
|
+
"notes": "One method per level and one client_ twin per level: group, groupEnd, error, warn, log, info, debug, trace. error and client_error are listed as representatives. Config keys read: level, clientLevel, bufferLogLevel, historyLength, clientHistoryLength, separateLogBuffers, clientName."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "package scripts",
|
|
46
|
+
"kind": "npm_scripts",
|
|
47
|
+
"source": "package.json",
|
|
48
|
+
"entrypoints": [
|
|
49
|
+
"build",
|
|
50
|
+
"build:src",
|
|
51
|
+
"test:style",
|
|
52
|
+
"test:unit",
|
|
53
|
+
"test:browser",
|
|
54
|
+
"deploy:npm"
|
|
55
|
+
],
|
|
56
|
+
"audience": "contributors and CI",
|
|
57
|
+
"notes": "Do not run the aggregate test script: it chains test:integration, which is not defined."
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"source_of_truth": [
|
|
61
|
+
{
|
|
62
|
+
"surface": "module implementation",
|
|
63
|
+
"paths": [
|
|
64
|
+
"src"
|
|
65
|
+
],
|
|
66
|
+
"generated_artifacts": [
|
|
67
|
+
"dist"
|
|
68
|
+
],
|
|
69
|
+
"refresh_with": [
|
|
70
|
+
"yarn workspace @webex/plugin-logger build:src"
|
|
71
|
+
],
|
|
72
|
+
"validate_with": [
|
|
73
|
+
"yarn workspace @webex/plugin-logger test:unit",
|
|
74
|
+
"yarn workspace @webex/plugin-logger test:style"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"surface": "module specification",
|
|
79
|
+
"paths": [
|
|
80
|
+
"src/docs/README.md"
|
|
81
|
+
],
|
|
82
|
+
"generated_artifacts": [],
|
|
83
|
+
"refresh_with": [
|
|
84
|
+
"update alongside the behavior change in the same commit"
|
|
85
|
+
],
|
|
86
|
+
"validate_with": [
|
|
87
|
+
"spec-validator on an independent runtime"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"generated_artifacts": [
|
|
92
|
+
{
|
|
93
|
+
"path": "dist",
|
|
94
|
+
"generated_from": "src",
|
|
95
|
+
"refresh_with": "yarn workspace @webex/plugin-logger build:src"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"path": ".sdd/templates/repo-standards/template-map.json",
|
|
99
|
+
"generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
100
|
+
"refresh_with": "Symlink to the JS SDK root .sdd/templates/repo-standards (Repo Standards 0.3.0 snapshot from PR 5246). Do not replace it with a package copy."
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"validation_matrix": [
|
|
104
|
+
{
|
|
105
|
+
"paths": [
|
|
106
|
+
"src/**"
|
|
107
|
+
],
|
|
108
|
+
"minimum": [
|
|
109
|
+
"yarn workspace @webex/plugin-logger test:unit"
|
|
110
|
+
],
|
|
111
|
+
"recommended": [
|
|
112
|
+
"yarn workspace @webex/plugin-logger test:style",
|
|
113
|
+
"yarn workspace @webex/plugin-logger build:src"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"paths": [
|
|
118
|
+
"src/logger.js"
|
|
119
|
+
],
|
|
120
|
+
"minimum": [
|
|
121
|
+
"yarn workspace @webex/plugin-logger test:unit"
|
|
122
|
+
],
|
|
123
|
+
"recommended": [
|
|
124
|
+
"yarn workspace @webex/plugin-logger test:browser",
|
|
125
|
+
"review packages/@webex/internal-plugin-support/src/support.js when buffers, cursors, or formatLogs change"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"paths": [
|
|
130
|
+
"src/index.js",
|
|
131
|
+
"src/config.js"
|
|
132
|
+
],
|
|
133
|
+
"minimum": [
|
|
134
|
+
"yarn workspace @webex/plugin-logger test:unit"
|
|
135
|
+
],
|
|
136
|
+
"recommended": [
|
|
137
|
+
"confirm registerPlugin still passes replace: true and the default config keys are unchanged"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"change_impact": [
|
|
142
|
+
{
|
|
143
|
+
"paths": [
|
|
144
|
+
"src/logger.js"
|
|
145
|
+
],
|
|
146
|
+
"affects": [
|
|
147
|
+
"every package that calls webex.logger",
|
|
148
|
+
"@webex/internal-plugin-support log upload"
|
|
149
|
+
],
|
|
150
|
+
"refresh_with": [
|
|
151
|
+
"yarn workspace @webex/plugin-logger build:src"
|
|
152
|
+
],
|
|
153
|
+
"validate_with": [
|
|
154
|
+
"yarn workspace @webex/plugin-logger test:unit"
|
|
155
|
+
],
|
|
156
|
+
"avoid_direct_edits": [
|
|
157
|
+
"dist"
|
|
158
|
+
],
|
|
159
|
+
"notes": "Redaction, buffer entry layout, and formatLogs output are relied on by consumers and by the uploaded log text."
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"paths": [
|
|
163
|
+
"src/index.js"
|
|
164
|
+
],
|
|
165
|
+
"affects": [
|
|
166
|
+
"webex.logger resolution in every webex instance",
|
|
167
|
+
"external npm consumers"
|
|
168
|
+
],
|
|
169
|
+
"refresh_with": [
|
|
170
|
+
"yarn workspace @webex/plugin-logger build:src"
|
|
171
|
+
],
|
|
172
|
+
"validate_with": [
|
|
173
|
+
"yarn workspace @webex/plugin-logger test:unit"
|
|
174
|
+
],
|
|
175
|
+
"avoid_direct_edits": [
|
|
176
|
+
"dist"
|
|
177
|
+
],
|
|
178
|
+
"notes": "Dropping replace: true leaves the @webex/webex-core fallback logger in place."
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"evidence_rules": [
|
|
182
|
+
{
|
|
183
|
+
"claim_category": "command_name",
|
|
184
|
+
"sources": [
|
|
185
|
+
"package.json"
|
|
186
|
+
],
|
|
187
|
+
"requirement": "The script must exist in package.json scripts. test:integration is referenced by test but undefined.",
|
|
188
|
+
"notes": "Never cite the aggregate test script as runnable."
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"claim_category": "import_path",
|
|
192
|
+
"sources": [
|
|
193
|
+
"src/index.js"
|
|
194
|
+
],
|
|
195
|
+
"requirement": "A binding is public only if exported from src/index.js.",
|
|
196
|
+
"notes": "Consumers import from the package root; there are no subpath entry points."
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"claim_category": "behavior_claim",
|
|
200
|
+
"sources": [
|
|
201
|
+
"src",
|
|
202
|
+
"test/unit/spec"
|
|
203
|
+
],
|
|
204
|
+
"requirement": "Ground every behavioral claim in source or test evidence.",
|
|
205
|
+
"notes": "Commit history is not an evidence source for this package. README.md is retained product documentation, not the behavioral authority."
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"negative_guidance": [
|
|
209
|
+
{
|
|
210
|
+
"rule": "Do not add an output path that skips Logger#filter.",
|
|
211
|
+
"why": "filter is the only place authorization keys, emails, and MTID values are removed."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"rule": "Do not change the buffer entry layout or the timestamp position.",
|
|
215
|
+
"why": "formatLogs merges separate buffers by entry index 1 and internal-plugin-support uploads the joined text."
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"rule": "Do not remove replace: true from registerPlugin.",
|
|
219
|
+
"why": "@webex/webex-core registers a fallback logger first; without replace the plugin is not installed."
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"rule": "Do not let a log method throw.",
|
|
223
|
+
"why": "Callers log inside error paths; makeLoggerMethod catches and reports through console.warn."
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"rule": "Do not treat README.md as the list of supported levels or config keys.",
|
|
227
|
+
"why": "It omits group, groupEnd, client_ methods, buffers, and five of the seven config keys. See docs/adr/0001-retain-product-readme.md."
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"confidence_policy": {
|
|
231
|
+
"high": {
|
|
232
|
+
"action": "update",
|
|
233
|
+
"expectation": "Source and test evidence both support the change, and the affected behavior has a unit case in test/unit/spec/logger.js."
|
|
234
|
+
},
|
|
235
|
+
"medium": {
|
|
236
|
+
"action": "narrow-scope",
|
|
237
|
+
"expectation": "Only source evidence exists, for example registration, the catch branch, or group indentation. Pin current behavior with a characterization test before modifying."
|
|
238
|
+
},
|
|
239
|
+
"low": {
|
|
240
|
+
"action": "noop",
|
|
241
|
+
"expectation": "Neither source nor tests settle the question. Stop and report the gap."
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"repository_topology": {
|
|
245
|
+
"main_entrypoints": [
|
|
246
|
+
{
|
|
247
|
+
"name": "package barrel",
|
|
248
|
+
"path": "src/index.js",
|
|
249
|
+
"purpose": "Registers the plugin and re-exports Logger and levels",
|
|
250
|
+
"notes": "No subpath exports."
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"workspace_packages": [
|
|
254
|
+
{
|
|
255
|
+
"name": "@webex/plugin-logger",
|
|
256
|
+
"paths": [
|
|
257
|
+
"src",
|
|
258
|
+
"test"
|
|
259
|
+
],
|
|
260
|
+
"notes": "One module; this SDD root is the package directory inside the webex-js-sdk monorepo."
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"source_surfaces": [
|
|
264
|
+
{
|
|
265
|
+
"name": "implementation",
|
|
266
|
+
"paths": [
|
|
267
|
+
"src"
|
|
268
|
+
],
|
|
269
|
+
"notes": "index.js, logger.js, config.js."
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "unit tests",
|
|
273
|
+
"paths": [
|
|
274
|
+
"test/unit/spec"
|
|
275
|
+
],
|
|
276
|
+
"notes": "One spec file, logger.js, run by jest and karma."
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"generated_surfaces": [
|
|
280
|
+
{
|
|
281
|
+
"name": "build output",
|
|
282
|
+
"paths": [
|
|
283
|
+
"dist"
|
|
284
|
+
],
|
|
285
|
+
"generated_from": "src",
|
|
286
|
+
"refresh_with": "yarn workspace @webex/plugin-logger build:src",
|
|
287
|
+
"notes": "Produced by webex-legacy-tools. Do not edit by hand."
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "repo-standards template map",
|
|
291
|
+
"paths": [
|
|
292
|
+
".sdd/templates/repo-standards"
|
|
293
|
+
],
|
|
294
|
+
"generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
295
|
+
"refresh_with": "Symlink to the JS SDK root .sdd/templates/repo-standards (Repo Standards 0.3.0 snapshot from PR 5246). Do not replace it with a package copy.",
|
|
296
|
+
"notes": "Symlink to the JS SDK root .sdd/templates/repo-standards (Repo Standards 0.3.0 snapshot from PR 5246). Do not replace it with a package copy."
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"validation_entrypoints": [
|
|
300
|
+
{
|
|
301
|
+
"name": "unit tests",
|
|
302
|
+
"command": "yarn workspace @webex/plugin-logger test:unit",
|
|
303
|
+
"scope": "test/unit/spec",
|
|
304
|
+
"notes": "jest via @webex/jest-config-legacy."
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "browser unit tests",
|
|
308
|
+
"command": "yarn workspace @webex/plugin-logger test:browser",
|
|
309
|
+
"scope": "test/unit/spec",
|
|
310
|
+
"notes": "karma via webex-legacy-tools."
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "lint",
|
|
314
|
+
"command": "yarn workspace @webex/plugin-logger test:style",
|
|
315
|
+
"scope": "src",
|
|
316
|
+
"notes": "eslint via the local root .eslintrc.js."
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"sync_paths": [
|
|
320
|
+
{
|
|
321
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
322
|
+
"targets": [
|
|
323
|
+
".sdd/templates/repo-standards"
|
|
324
|
+
],
|
|
325
|
+
"mechanism": "Symlink to the JS SDK root .sdd/templates/repo-standards (Repo Standards 0.3.0 snapshot from PR 5246). Do not replace it with a package copy.",
|
|
326
|
+
"notes": "Symlink to the JS SDK root .sdd/templates/repo-standards (Repo Standards 0.3.0 snapshot from PR 5246). Do not replace it with a package copy."
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
"folder_readme_contract": {
|
|
331
|
+
"required_sections": [
|
|
332
|
+
"purpose",
|
|
333
|
+
"boundaries",
|
|
334
|
+
"key-files",
|
|
335
|
+
"common-tasks"
|
|
336
|
+
],
|
|
337
|
+
"rules": [
|
|
338
|
+
"Orient the reader before describing detail.",
|
|
339
|
+
"Link to the module specification rather than duplicating it."
|
|
340
|
+
],
|
|
341
|
+
"example_policy": "Examples are allowed only when verified against src/ or test/unit/spec/.",
|
|
342
|
+
"fallback": "Omit a section rather than inventing content; report unresolved facts as gaps."
|
|
343
|
+
},
|
|
344
|
+
"surface_owners": [
|
|
345
|
+
{
|
|
346
|
+
"surface": "module implementation and specification",
|
|
347
|
+
"owner": "@webex/web-client, @webex/web-sdk",
|
|
348
|
+
"edit_boundary": "Owners per the monorepo .github/CODEOWNERS entry for packages/@webex/plugin-logger."
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"do_not_edit": [
|
|
352
|
+
"dist",
|
|
353
|
+
".sdd/templates/repo-standards"
|
|
354
|
+
],
|
|
355
|
+
"marker_scopes": {
|
|
356
|
+
"sdd": [
|
|
357
|
+
".sdd/manifest.json",
|
|
358
|
+
"src/docs/README.md",
|
|
359
|
+
"docs"
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
"fallback_rules": [
|
|
363
|
+
"When source and tests disagree, code is the referee and the disagreement is recorded rather than silently resolved.",
|
|
364
|
+
"When neither source nor tests settle a question, report it as a gap instead of inferring.",
|
|
365
|
+
"Commit history is not a valid rationale source for this package."
|
|
366
|
+
],
|
|
367
|
+
"downstream_context_pack": {
|
|
368
|
+
"required_human_surfaces": [
|
|
369
|
+
"README.md",
|
|
370
|
+
"docs/index.md",
|
|
371
|
+
"docs/architecture.md",
|
|
372
|
+
"src/docs/README.md"
|
|
373
|
+
],
|
|
374
|
+
"required_agent_operational_surfaces": [
|
|
375
|
+
"AGENTS.md",
|
|
376
|
+
"docs/specs/README.md"
|
|
377
|
+
],
|
|
378
|
+
"required_machine_readable_surface": ".sdd/manifest.json",
|
|
379
|
+
"recommended_machine_readable_sections": [
|
|
380
|
+
"public_interfaces",
|
|
381
|
+
"change_impact",
|
|
382
|
+
"evidence_rules",
|
|
383
|
+
"negative_guidance",
|
|
384
|
+
"confidence_policy",
|
|
385
|
+
"repository_topology",
|
|
386
|
+
"folder_readme_contract"
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
}
|