norn-cli 2.4.0 → 2.5.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 (93) hide show
  1. package/AGENTS.md +2 -2
  2. package/CHANGELOG.md +24 -1
  3. package/dist/cli.js +217 -77
  4. package/package.json +13 -4
  5. package/.claude/settings.local.json +0 -18
  6. package/.claude/skills/norn-social-campaign/SKILL.md +0 -70
  7. package/out/apiResponseIntellisenseCache.js +0 -394
  8. package/out/assertionRunner.js +0 -567
  9. package/out/cacheDir.js +0 -136
  10. package/out/chatParticipant.js +0 -763
  11. package/out/cli/colors.js +0 -127
  12. package/out/cli/formatters/assertion.js +0 -102
  13. package/out/cli/formatters/index.js +0 -23
  14. package/out/cli/formatters/response.js +0 -106
  15. package/out/cli/formatters/summary.js +0 -246
  16. package/out/cli/redaction.js +0 -237
  17. package/out/cli/reporters/html.js +0 -689
  18. package/out/cli/reporters/index.js +0 -22
  19. package/out/cli/reporters/junit.js +0 -226
  20. package/out/codeLensProvider.js +0 -351
  21. package/out/compareContentProvider.js +0 -85
  22. package/out/completionProvider.js +0 -3739
  23. package/out/contractAssertionSummary.js +0 -225
  24. package/out/contractDecorationProvider.js +0 -243
  25. package/out/coverageCalculator.js +0 -879
  26. package/out/coveragePanel.js +0 -597
  27. package/out/debug/breakpointResolver.js +0 -84
  28. package/out/debug/breakpoints.js +0 -52
  29. package/out/debug/nornDebugAdapter.js +0 -166
  30. package/out/debug/nornDebugSession.js +0 -613
  31. package/out/debug/sequenceLocationIndex.js +0 -77
  32. package/out/debug/types.js +0 -3
  33. package/out/deepClone.js +0 -21
  34. package/out/diagnosticProvider.js +0 -2554
  35. package/out/environmentParser.js +0 -736
  36. package/out/environmentProvider.js +0 -544
  37. package/out/environmentTemplates.js +0 -146
  38. package/out/errors/formatError.js +0 -113
  39. package/out/errors/nornError.js +0 -29
  40. package/out/formUrlEncoded.js +0 -89
  41. package/out/httpClient.js +0 -348
  42. package/out/httpRuntimeOptions.js +0 -16
  43. package/out/importErrors.js +0 -31
  44. package/out/inlayHintResolver.js +0 -70
  45. package/out/jsonFileReader.js +0 -323
  46. package/out/mcpClient.js +0 -193
  47. package/out/mcpConfig.js +0 -184
  48. package/out/mcpToolIntellisenseCache.js +0 -96
  49. package/out/mcpToolSchema.js +0 -50
  50. package/out/nornConfig.js +0 -132
  51. package/out/nornHoverProvider.js +0 -124
  52. package/out/nornInlayHintsProvider.js +0 -191
  53. package/out/nornPrompt.js +0 -755
  54. package/out/nornSqlParser.js +0 -286
  55. package/out/nornapiHoverProvider.js +0 -135
  56. package/out/nornapiInlayHintsProvider.js +0 -94
  57. package/out/nornapiParser.js +0 -324
  58. package/out/nornenvCodeActionProvider.js +0 -101
  59. package/out/nornenvDecorationProvider.js +0 -239
  60. package/out/nornenvFoldingProvider.js +0 -63
  61. package/out/nornenvHoverProvider.js +0 -114
  62. package/out/nornenvInlayHintsProvider.js +0 -99
  63. package/out/nornenvLanguageModel.js +0 -187
  64. package/out/nornenvRegionRefactor.js +0 -267
  65. package/out/nornsqlHoverProvider.js +0 -95
  66. package/out/nornsqlInlayHintsProvider.js +0 -114
  67. package/out/parser.js +0 -839
  68. package/out/pathAccess.js +0 -28
  69. package/out/postmanImportPanel.js +0 -732
  70. package/out/postmanImportPlanner.js +0 -1155
  71. package/out/postmanImportSidebarView.js +0 -532
  72. package/out/quotedString.js +0 -35
  73. package/out/requestPreparation.js +0 -179
  74. package/out/requestValidation.js +0 -146
  75. package/out/responsePanel.js +0 -7754
  76. package/out/schemaGenerator.js +0 -562
  77. package/out/scriptRunner.js +0 -419
  78. package/out/secrets/cliSecrets.js +0 -415
  79. package/out/secrets/crypto.js +0 -105
  80. package/out/secrets/envFileSecrets.js +0 -177
  81. package/out/secrets/keyStore.js +0 -259
  82. package/out/sequenceDeclaration.js +0 -15
  83. package/out/sequenceRunner.js +0 -3590
  84. package/out/sqlAdapterRunner.js +0 -122
  85. package/out/sqlBuiltInAdapters.js +0 -604
  86. package/out/sqlConfig.js +0 -184
  87. package/out/starterCatalog.js +0 -554
  88. package/out/stringUtils.js +0 -25
  89. package/out/swaggerBodyIntellisenseCache.js +0 -114
  90. package/out/swaggerParser.js +0 -464
  91. package/out/testProvider.js +0 -767
  92. package/out/theoryCaseLoader.js +0 -113
  93. package/out/validationCache.js +0 -211
@@ -1,122 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runSqlAdapter = runSqlAdapter;
4
- const child_process_1 = require("child_process");
5
- const sqlBuiltInAdapters_1 = require("./sqlBuiltInAdapters");
6
- function isRowsResult(value) {
7
- if (!value || typeof value !== 'object' || Array.isArray(value)) {
8
- return false;
9
- }
10
- const candidate = value;
11
- return candidate.kind === 'rows' && Array.isArray(candidate.rows);
12
- }
13
- function isExecResult(value) {
14
- if (!value || typeof value !== 'object' || Array.isArray(value)) {
15
- return false;
16
- }
17
- const candidate = value;
18
- return candidate.kind === 'exec';
19
- }
20
- function isSqlAdapterResponse(value) {
21
- if (!value || typeof value !== 'object' || Array.isArray(value)) {
22
- return false;
23
- }
24
- const candidate = value;
25
- if (candidate.success === true) {
26
- return isRowsResult(candidate.result) || isExecResult(candidate.result);
27
- }
28
- return candidate.success === false && typeof candidate.error === 'string';
29
- }
30
- function buildAdapterError(message, stderr, stdout) {
31
- const details = [message];
32
- if (stderr.trim()) {
33
- details.push(`stderr: ${stderr.trim()}`);
34
- }
35
- if (stdout.trim()) {
36
- details.push(`stdout: ${stdout.trim()}`);
37
- }
38
- return new Error(details.join('\n'));
39
- }
40
- async function runExternalSqlAdapter(command, request, workingDir) {
41
- if (!command.length) {
42
- throw new Error('SQL adapter command is empty');
43
- }
44
- return new Promise((resolve, reject) => {
45
- const child = (0, child_process_1.spawn)(command[0], command.slice(1), {
46
- cwd: workingDir,
47
- env: process.env,
48
- shell: false
49
- });
50
- let stdout = '';
51
- let stderr = '';
52
- let settled = false;
53
- const fail = (error) => {
54
- if (settled) {
55
- return;
56
- }
57
- settled = true;
58
- reject(error);
59
- };
60
- const succeed = (response) => {
61
- if (settled) {
62
- return;
63
- }
64
- settled = true;
65
- resolve(response);
66
- };
67
- child.stdout.on('data', chunk => {
68
- stdout += chunk.toString();
69
- });
70
- child.stderr.on('data', chunk => {
71
- stderr += chunk.toString();
72
- });
73
- child.on('error', error => {
74
- fail(new Error(`Failed to start SQL adapter '${command[0]}': ${error.message}`));
75
- });
76
- child.on('close', code => {
77
- if (settled) {
78
- return;
79
- }
80
- let parsed;
81
- if (stdout.trim()) {
82
- try {
83
- parsed = JSON.parse(stdout);
84
- }
85
- catch (error) {
86
- fail(buildAdapterError(`SQL adapter returned invalid JSON${code && code !== 0 ? ` (exit ${code})` : ''}`, stderr, stdout));
87
- return;
88
- }
89
- }
90
- if (!isSqlAdapterResponse(parsed)) {
91
- fail(buildAdapterError(`SQL adapter returned an invalid response${code && code !== 0 ? ` (exit ${code})` : ''}`, stderr, stdout));
92
- return;
93
- }
94
- if (!parsed.success) {
95
- fail(buildAdapterError(parsed.error, stderr, stdout));
96
- return;
97
- }
98
- if (code !== 0) {
99
- fail(buildAdapterError(`SQL adapter exited with code ${code}`, stderr, stdout));
100
- return;
101
- }
102
- succeed(parsed);
103
- });
104
- child.stdin.on('error', error => {
105
- fail(new Error(`Failed to write SQL adapter input: ${error.message}`));
106
- });
107
- try {
108
- child.stdin.write(JSON.stringify(request));
109
- child.stdin.end();
110
- }
111
- catch (error) {
112
- fail(new Error(`Failed to serialize SQL adapter input: ${error instanceof Error ? error.message : String(error)}`));
113
- }
114
- });
115
- }
116
- async function runSqlAdapter(target, request, workingDir) {
117
- if (target.kind === 'builtin') {
118
- return (0, sqlBuiltInAdapters_1.runBuiltInSqlAdapter)(target.adapterId, request);
119
- }
120
- return runExternalSqlAdapter(target.command, request, workingDir);
121
- }
122
- //# sourceMappingURL=sqlAdapterRunner.js.map