norn-cli 2.4.0 → 2.6.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 (96) hide show
  1. package/AGENTS.md +2 -2
  2. package/CHANGELOG.md +26 -1
  3. package/dist/cli.js +330 -85
  4. package/package.json +24 -5
  5. package/schemas/norn.config.schema.json +43 -1
  6. package/scripts/__pycache__/reddit_signal_miner.cpython-312.pyc +0 -0
  7. package/scripts/reddit_signal_miner.py +482 -0
  8. package/.claude/settings.local.json +0 -18
  9. package/.claude/skills/norn-social-campaign/SKILL.md +0 -70
  10. package/out/apiResponseIntellisenseCache.js +0 -394
  11. package/out/assertionRunner.js +0 -567
  12. package/out/cacheDir.js +0 -136
  13. package/out/chatParticipant.js +0 -763
  14. package/out/cli/colors.js +0 -127
  15. package/out/cli/formatters/assertion.js +0 -102
  16. package/out/cli/formatters/index.js +0 -23
  17. package/out/cli/formatters/response.js +0 -106
  18. package/out/cli/formatters/summary.js +0 -246
  19. package/out/cli/redaction.js +0 -237
  20. package/out/cli/reporters/html.js +0 -689
  21. package/out/cli/reporters/index.js +0 -22
  22. package/out/cli/reporters/junit.js +0 -226
  23. package/out/codeLensProvider.js +0 -351
  24. package/out/compareContentProvider.js +0 -85
  25. package/out/completionProvider.js +0 -3739
  26. package/out/contractAssertionSummary.js +0 -225
  27. package/out/contractDecorationProvider.js +0 -243
  28. package/out/coverageCalculator.js +0 -879
  29. package/out/coveragePanel.js +0 -597
  30. package/out/debug/breakpointResolver.js +0 -84
  31. package/out/debug/breakpoints.js +0 -52
  32. package/out/debug/nornDebugAdapter.js +0 -166
  33. package/out/debug/nornDebugSession.js +0 -613
  34. package/out/debug/sequenceLocationIndex.js +0 -77
  35. package/out/debug/types.js +0 -3
  36. package/out/deepClone.js +0 -21
  37. package/out/diagnosticProvider.js +0 -2554
  38. package/out/environmentParser.js +0 -736
  39. package/out/environmentProvider.js +0 -544
  40. package/out/environmentTemplates.js +0 -146
  41. package/out/errors/formatError.js +0 -113
  42. package/out/errors/nornError.js +0 -29
  43. package/out/formUrlEncoded.js +0 -89
  44. package/out/httpClient.js +0 -348
  45. package/out/httpRuntimeOptions.js +0 -16
  46. package/out/importErrors.js +0 -31
  47. package/out/inlayHintResolver.js +0 -70
  48. package/out/jsonFileReader.js +0 -323
  49. package/out/mcpClient.js +0 -193
  50. package/out/mcpConfig.js +0 -184
  51. package/out/mcpToolIntellisenseCache.js +0 -96
  52. package/out/mcpToolSchema.js +0 -50
  53. package/out/nornConfig.js +0 -132
  54. package/out/nornHoverProvider.js +0 -124
  55. package/out/nornInlayHintsProvider.js +0 -191
  56. package/out/nornPrompt.js +0 -755
  57. package/out/nornSqlParser.js +0 -286
  58. package/out/nornapiHoverProvider.js +0 -135
  59. package/out/nornapiInlayHintsProvider.js +0 -94
  60. package/out/nornapiParser.js +0 -324
  61. package/out/nornenvCodeActionProvider.js +0 -101
  62. package/out/nornenvDecorationProvider.js +0 -239
  63. package/out/nornenvFoldingProvider.js +0 -63
  64. package/out/nornenvHoverProvider.js +0 -114
  65. package/out/nornenvInlayHintsProvider.js +0 -99
  66. package/out/nornenvLanguageModel.js +0 -187
  67. package/out/nornenvRegionRefactor.js +0 -267
  68. package/out/nornsqlHoverProvider.js +0 -95
  69. package/out/nornsqlInlayHintsProvider.js +0 -114
  70. package/out/parser.js +0 -839
  71. package/out/pathAccess.js +0 -28
  72. package/out/postmanImportPanel.js +0 -732
  73. package/out/postmanImportPlanner.js +0 -1155
  74. package/out/postmanImportSidebarView.js +0 -532
  75. package/out/quotedString.js +0 -35
  76. package/out/requestPreparation.js +0 -179
  77. package/out/requestValidation.js +0 -146
  78. package/out/responsePanel.js +0 -7754
  79. package/out/schemaGenerator.js +0 -562
  80. package/out/scriptRunner.js +0 -419
  81. package/out/secrets/cliSecrets.js +0 -415
  82. package/out/secrets/crypto.js +0 -105
  83. package/out/secrets/envFileSecrets.js +0 -177
  84. package/out/secrets/keyStore.js +0 -259
  85. package/out/sequenceDeclaration.js +0 -15
  86. package/out/sequenceRunner.js +0 -3590
  87. package/out/sqlAdapterRunner.js +0 -122
  88. package/out/sqlBuiltInAdapters.js +0 -604
  89. package/out/sqlConfig.js +0 -184
  90. package/out/starterCatalog.js +0 -554
  91. package/out/stringUtils.js +0 -25
  92. package/out/swaggerBodyIntellisenseCache.js +0 -114
  93. package/out/swaggerParser.js +0 -464
  94. package/out/testProvider.js +0 -767
  95. package/out/theoryCaseLoader.js +0 -113
  96. package/out/validationCache.js +0 -211
@@ -1,237 +0,0 @@
1
- "use strict";
2
- /**
3
- * Redaction module for sensitive data in CLI output
4
- *
5
- * Automatically redacts:
6
- * - Authorization headers (Bearer tokens, Basic auth, API keys)
7
- * - Common sensitive field names (password, secret, token, api_key, etc.)
8
- * - User-defined secrets from .nornenv `secret` declarations
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.createRedactionOptions = createRedactionOptions;
12
- exports.redactHeaders = redactHeaders;
13
- exports.redactString = redactString;
14
- exports.redactBody = redactBody;
15
- exports.redactUrl = redactUrl;
16
- exports.getRedactedMarker = getRedactedMarker;
17
- const REDACTED = '***REDACTED***';
18
- /**
19
- * Common header names that should always be redacted
20
- */
21
- const SENSITIVE_HEADERS = new Set([
22
- 'authorization',
23
- 'x-api-key',
24
- 'x-auth-token',
25
- 'x-access-token',
26
- 'api-key',
27
- 'apikey',
28
- 'cookie',
29
- 'set-cookie',
30
- 'x-csrf-token',
31
- 'x-xsrf-token',
32
- ]);
33
- /**
34
- * Patterns for sensitive values in headers/bodies
35
- * These patterns match common token/key formats
36
- */
37
- const SENSITIVE_PATTERNS = [
38
- // Bearer tokens
39
- /Bearer\s+[A-Za-z0-9\-_=]+\.?[A-Za-z0-9\-_=]*\.?[A-Za-z0-9\-_=]*/gi,
40
- // Basic auth
41
- /Basic\s+[A-Za-z0-9+/=]+/gi,
42
- // API keys (common formats)
43
- /api[_-]?key[=:]\s*["']?[A-Za-z0-9\-_]+["']?/gi,
44
- ];
45
- /**
46
- * Field names in JSON that should have their values redacted
47
- */
48
- const SENSITIVE_FIELD_NAMES = new Set([
49
- 'password',
50
- 'passwd',
51
- 'secret',
52
- 'token',
53
- 'access_token',
54
- 'accesstoken',
55
- 'refresh_token',
56
- 'refreshtoken',
57
- 'api_key',
58
- 'apikey',
59
- 'api-key',
60
- 'private_key',
61
- 'privatekey',
62
- 'client_secret',
63
- 'clientsecret',
64
- 'auth',
65
- 'authorization',
66
- 'credential',
67
- 'credentials',
68
- ]);
69
- /**
70
- * Create default redaction options
71
- */
72
- function createRedactionOptions(secretNames = new Set(), secretValues = new Map(), enabled = true) {
73
- return { secretNames, secretValues, enabled };
74
- }
75
- /**
76
- * Redact sensitive headers
77
- */
78
- function redactHeaders(headers, options) {
79
- if (!options.enabled) {
80
- return headers;
81
- }
82
- const redacted = {};
83
- for (const [key, value] of Object.entries(headers)) {
84
- const lowerKey = key.toLowerCase();
85
- // Check if header name is sensitive
86
- if (SENSITIVE_HEADERS.has(lowerKey)) {
87
- redacted[key] = REDACTED;
88
- continue;
89
- }
90
- // Check for Bearer/Basic patterns in value
91
- let redactedValue = value;
92
- for (const pattern of SENSITIVE_PATTERNS) {
93
- redactedValue = redactedValue.replace(pattern, REDACTED);
94
- }
95
- // Check if value matches any secret values
96
- redactedValue = redactSecretValues(redactedValue, options);
97
- redacted[key] = redactedValue;
98
- }
99
- return redacted;
100
- }
101
- /**
102
- * Redact sensitive values in a string
103
- */
104
- function redactString(text, options) {
105
- if (!options.enabled || !text) {
106
- return text;
107
- }
108
- let result = text;
109
- // Apply pattern-based redaction
110
- for (const pattern of SENSITIVE_PATTERNS) {
111
- result = result.replace(pattern, REDACTED);
112
- }
113
- // Redact user-defined secret values
114
- result = redactSecretValues(result, options);
115
- return result;
116
- }
117
- /**
118
- * Redact secret values from .nornenv
119
- */
120
- function redactSecretValues(text, options) {
121
- if (!text || options.secretValues.size === 0) {
122
- return text;
123
- }
124
- let result = text;
125
- // Replace each secret value with redacted marker
126
- for (const [, value] of options.secretValues) {
127
- if (value && value.length > 0) {
128
- // Escape special regex characters in the value
129
- const escaped = value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
130
- result = result.replace(new RegExp(escaped, 'g'), REDACTED);
131
- }
132
- }
133
- return result;
134
- }
135
- /**
136
- * Redact sensitive fields in JSON body
137
- */
138
- function redactBody(body, options) {
139
- if (!options.enabled) {
140
- return body;
141
- }
142
- if (typeof body === 'string') {
143
- // Try to parse as JSON first
144
- try {
145
- const parsed = JSON.parse(body);
146
- return JSON.stringify(redactObject(parsed, options), null, 2);
147
- }
148
- catch {
149
- // Not JSON, apply string redaction
150
- return redactString(body, options);
151
- }
152
- }
153
- if (typeof body === 'object' && body !== null) {
154
- return redactObject(body, options);
155
- }
156
- return body;
157
- }
158
- /**
159
- * Recursively redact sensitive fields in an object
160
- */
161
- function redactObject(obj, options) {
162
- if (Array.isArray(obj)) {
163
- return obj.map(item => redactObject(item, options));
164
- }
165
- if (typeof obj !== 'object' || obj === null) {
166
- if (typeof obj === 'string') {
167
- return redactSecretValues(obj, options);
168
- }
169
- return obj;
170
- }
171
- const result = {};
172
- for (const [key, value] of Object.entries(obj)) {
173
- const lowerKey = key.toLowerCase();
174
- // Check if field name indicates sensitive data
175
- if (SENSITIVE_FIELD_NAMES.has(lowerKey)) {
176
- result[key] = REDACTED;
177
- continue;
178
- }
179
- // Check if this is a user-defined secret variable name
180
- if (options.secretNames.has(key)) {
181
- result[key] = REDACTED;
182
- continue;
183
- }
184
- // Recursively process nested objects
185
- if (typeof value === 'object' && value !== null) {
186
- result[key] = redactObject(value, options);
187
- }
188
- else if (typeof value === 'string') {
189
- result[key] = redactSecretValues(value, options);
190
- }
191
- else {
192
- result[key] = value;
193
- }
194
- }
195
- return result;
196
- }
197
- /**
198
- * Redact a URL (query parameters with sensitive names)
199
- */
200
- function redactUrl(url, options) {
201
- if (!options.enabled) {
202
- return url;
203
- }
204
- try {
205
- const urlObj = new URL(url);
206
- const params = new URLSearchParams(urlObj.search);
207
- let modified = false;
208
- for (const [key] of params.entries()) {
209
- const lowerKey = key.toLowerCase();
210
- if (SENSITIVE_FIELD_NAMES.has(lowerKey) ||
211
- lowerKey.includes('token') ||
212
- lowerKey.includes('key') ||
213
- lowerKey.includes('secret') ||
214
- lowerKey.includes('password')) {
215
- params.set(key, REDACTED);
216
- modified = true;
217
- }
218
- }
219
- if (modified) {
220
- urlObj.search = params.toString();
221
- return urlObj.toString();
222
- }
223
- // Also redact secret values that appear in the URL
224
- return redactSecretValues(url, options);
225
- }
226
- catch {
227
- // If URL parsing fails, just do string-based redaction
228
- return redactSecretValues(url, options);
229
- }
230
- }
231
- /**
232
- * Get the redaction marker (for display purposes)
233
- */
234
- function getRedactedMarker() {
235
- return REDACTED;
236
- }
237
- //# sourceMappingURL=redaction.js.map