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,113 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.formatTheoryCaseLabel = formatTheoryCaseLabel;
37
- exports.normalizeTheoryCase = normalizeTheoryCase;
38
- exports.loadTheoryCasesFromSource = loadTheoryCasesFromSource;
39
- exports.resolveTheoryCases = resolveTheoryCases;
40
- exports.buildTheoryCaseArgs = buildTheoryCaseArgs;
41
- exports.resolveSequenceRunCases = resolveSequenceRunCases;
42
- const fs = __importStar(require("fs/promises"));
43
- const path = __importStar(require("path"));
44
- function formatTheoryCaseLabel(params, index) {
45
- const entries = Object.entries(params);
46
- if (entries.length === 0) {
47
- return index === undefined ? '[]' : `Case ${index + 1}`;
48
- }
49
- const parts = entries.map(([key, value]) => {
50
- if (typeof value === 'string') {
51
- return `${key}="${value}"`;
52
- }
53
- return `${key}=${value}`;
54
- });
55
- return `[${parts.join(', ')}]`;
56
- }
57
- function normalizeTheoryCase(caseValue, sequenceParamNames) {
58
- if (caseValue && typeof caseValue === 'object' && !Array.isArray(caseValue)) {
59
- return caseValue;
60
- }
61
- if (sequenceParamNames.length === 1) {
62
- return { [sequenceParamNames[0]]: caseValue };
63
- }
64
- return undefined;
65
- }
66
- async function loadTheoryCasesFromSource(sourcePath, workingDir, sequenceParamNames) {
67
- const resolvedPath = path.resolve(workingDir, sourcePath);
68
- const content = await fs.readFile(resolvedPath, 'utf-8');
69
- const parsed = JSON.parse(content);
70
- if (!Array.isArray(parsed)) {
71
- throw new Error(`Theory file "${sourcePath}" must contain a JSON array of test cases`);
72
- }
73
- const cases = [];
74
- for (let index = 0; index < parsed.length; index++) {
75
- const normalized = normalizeTheoryCase(parsed[index], sequenceParamNames);
76
- if (!normalized) {
77
- throw new Error(`Theory file "${sourcePath}" has invalid case at index ${index}. ` +
78
- 'Use objects for multi-parameter sequences.');
79
- }
80
- cases.push(normalized);
81
- }
82
- return cases;
83
- }
84
- async function resolveTheoryCases(sequence, workingDir) {
85
- const inlineCases = sequence.theoryData?.cases ?? [];
86
- if (inlineCases.length > 0) {
87
- return inlineCases;
88
- }
89
- if (!sequence.theoryData?.source) {
90
- return [];
91
- }
92
- return loadTheoryCasesFromSource(sequence.theoryData.source, workingDir, sequence.parameters.map(parameter => parameter.name));
93
- }
94
- function buildTheoryCaseArgs(defaultArgs, caseParams) {
95
- const args = { ...defaultArgs };
96
- for (const [key, value] of Object.entries(caseParams)) {
97
- if (value !== undefined) {
98
- args[key] = String(value);
99
- }
100
- }
101
- return args;
102
- }
103
- async function resolveSequenceRunCases(sequence, workingDir, defaultArgs) {
104
- const cases = await resolveTheoryCases(sequence, workingDir);
105
- if (cases.length === 0) {
106
- return [{ args: { ...defaultArgs } }];
107
- }
108
- return cases.map((caseParams, index) => ({
109
- label: formatTheoryCaseLabel(caseParams, index),
110
- args: buildTheoryCaseArgs(defaultArgs, caseParams)
111
- }));
112
- }
113
- //# sourceMappingURL=theoryCaseLoader.js.map
@@ -1,211 +0,0 @@
1
- "use strict";
2
- /**
3
- * Validation Cache - Stores schema validation results for decorations and status tracking
4
- * Results are persisted in .norn-cache/validation-results.json
5
- */
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || (function () {
23
- var ownKeys = function(o) {
24
- ownKeys = Object.getOwnPropertyNames || function (o) {
25
- var ar = [];
26
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
- return ar;
28
- };
29
- return ownKeys(o);
30
- };
31
- return function (mod) {
32
- if (mod && mod.__esModule) return mod;
33
- var result = {};
34
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
- __setModuleDefault(result, mod);
36
- return result;
37
- };
38
- })();
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.loadCache = loadCache;
41
- exports.saveValidationResult = saveValidationResult;
42
- exports.getResultForAssertion = getResultForAssertion;
43
- exports.getResultsForFile = getResultsForFile;
44
- exports.clearResultsForFile = clearResultsForFile;
45
- exports.clearAllResults = clearAllResults;
46
- exports.markResultsAsStale = markResultsAsStale;
47
- const vscode = __importStar(require("vscode"));
48
- const cacheDir_1 = require("./cacheDir");
49
- const CACHE_VERSION = 1;
50
- const CACHE_FILE = 'validation-results.json';
51
- /**
52
- * Get the workspace root folder
53
- */
54
- function getWorkspaceRoot() {
55
- const workspaceFolders = vscode.workspace.workspaceFolders;
56
- if (workspaceFolders && workspaceFolders.length > 0) {
57
- return workspaceFolders[0].uri.fsPath;
58
- }
59
- return undefined;
60
- }
61
- /**
62
- * Get the path to the cache file
63
- */
64
- function getCachePath() {
65
- const root = getWorkspaceRoot();
66
- if (!root) {
67
- return undefined;
68
- }
69
- return (0, cacheDir_1.getNornCacheFilePath)(root, CACHE_FILE);
70
- }
71
- /**
72
- * Ensure the cache directory exists
73
- */
74
- function ensureCacheDir() {
75
- const root = getWorkspaceRoot();
76
- if (!root) {
77
- return false;
78
- }
79
- return !!(0, cacheDir_1.ensureNornCacheDir)(root);
80
- }
81
- /**
82
- * Load the validation cache from disk
83
- */
84
- function loadCache() {
85
- return (0, cacheDir_1.loadVersionedJsonCache)({
86
- cachePath: getCachePath(),
87
- version: CACHE_VERSION,
88
- createDefault: () => ({ version: CACHE_VERSION, results: {} }),
89
- isValid: cache => typeof cache.results === 'object' && cache.results !== null
90
- });
91
- }
92
- /**
93
- * Save the cache to disk
94
- */
95
- function saveCache(cache) {
96
- return (0, cacheDir_1.saveVersionedJsonCache)(getCachePath(), cache, ensureCacheDir);
97
- }
98
- /**
99
- * Generate a cache key from source file and line number
100
- */
101
- function getCacheKey(sourceFile, line) {
102
- // Normalize to workspace-relative path
103
- const root = getWorkspaceRoot();
104
- let relativePath = sourceFile;
105
- if (root && sourceFile.startsWith(root)) {
106
- relativePath = sourceFile.slice(root.length + 1);
107
- }
108
- return `${relativePath}:${line}`;
109
- }
110
- /**
111
- * Save a validation result to the cache
112
- */
113
- function saveValidationResult(result) {
114
- const cache = loadCache();
115
- const key = getCacheKey(result.sourceFile, result.assertionLine);
116
- // Normalize paths
117
- const root = getWorkspaceRoot();
118
- if (root) {
119
- if (result.sourceFile.startsWith(root)) {
120
- result.sourceFile = result.sourceFile.slice(root.length + 1);
121
- }
122
- if (result.schemaPath.startsWith(root)) {
123
- result.schemaPath = result.schemaPath.slice(root.length + 1);
124
- }
125
- }
126
- cache.results[key] = result;
127
- saveCache(cache);
128
- }
129
- /**
130
- * Get validation result for a specific assertion
131
- * @param sourceFile Absolute path to the .norn file
132
- * @param line Line number (0-based)
133
- */
134
- function getResultForAssertion(sourceFile, line) {
135
- const cache = loadCache();
136
- const key = getCacheKey(sourceFile, line);
137
- return cache.results[key];
138
- }
139
- /**
140
- * Get all validation results for a source file
141
- * @param sourceFile Absolute path to the .norn file
142
- */
143
- function getResultsForFile(sourceFile) {
144
- const cache = loadCache();
145
- const results = [];
146
- // Normalize path for comparison
147
- const root = getWorkspaceRoot();
148
- let normalizedPath = sourceFile;
149
- if (root && sourceFile.startsWith(root)) {
150
- normalizedPath = sourceFile.slice(root.length + 1);
151
- }
152
- for (const [key, result] of Object.entries(cache.results)) {
153
- const [filePath] = key.split(':');
154
- if (filePath === normalizedPath) {
155
- results.push(result);
156
- }
157
- }
158
- return results;
159
- }
160
- /**
161
- * Clear all cached results for a specific file
162
- */
163
- function clearResultsForFile(sourceFile) {
164
- const cache = loadCache();
165
- // Normalize path for comparison
166
- const root = getWorkspaceRoot();
167
- let normalizedPath = sourceFile;
168
- if (root && sourceFile.startsWith(root)) {
169
- normalizedPath = sourceFile.slice(root.length + 1);
170
- }
171
- const keysToDelete = [];
172
- for (const key of Object.keys(cache.results)) {
173
- const [filePath] = key.split(':');
174
- if (filePath === normalizedPath) {
175
- keysToDelete.push(key);
176
- }
177
- }
178
- keysToDelete.forEach(key => delete cache.results[key]);
179
- saveCache(cache);
180
- }
181
- /**
182
- * Clear all cached results
183
- */
184
- function clearAllResults() {
185
- const cache = { version: CACHE_VERSION, results: {} };
186
- saveCache(cache);
187
- }
188
- /**
189
- * Mark all results for a file as stale (used when file changes)
190
- */
191
- function markResultsAsStale(sourceFile) {
192
- const cache = loadCache();
193
- // Normalize path for comparison
194
- const root = getWorkspaceRoot();
195
- let normalizedPath = sourceFile;
196
- if (root && sourceFile.startsWith(root)) {
197
- normalizedPath = sourceFile.slice(root.length + 1);
198
- }
199
- let modified = false;
200
- for (const [key, result] of Object.entries(cache.results)) {
201
- const [filePath] = key.split(':');
202
- if (filePath === normalizedPath && result.status !== 'stale') {
203
- result.status = 'stale';
204
- modified = true;
205
- }
206
- }
207
- if (modified) {
208
- saveCache(cache);
209
- }
210
- }
211
- //# sourceMappingURL=validationCache.js.map