norn-cli 2.3.0 → 2.4.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 (92) hide show
  1. package/.claude/skills/norn-social-campaign/SKILL.md +70 -0
  2. package/CHANGELOG.md +6 -0
  3. package/demos/nornenv-region-refactor/README.md +64 -0
  4. package/dist/cli.js +360 -1
  5. package/out/apiResponseIntellisenseCache.js +394 -0
  6. package/out/assertionRunner.js +567 -0
  7. package/out/cacheDir.js +136 -0
  8. package/out/chatParticipant.js +763 -0
  9. package/out/cli/colors.js +127 -0
  10. package/out/cli/formatters/assertion.js +102 -0
  11. package/out/cli/formatters/index.js +23 -0
  12. package/out/cli/formatters/response.js +106 -0
  13. package/out/cli/formatters/summary.js +246 -0
  14. package/out/cli/redaction.js +237 -0
  15. package/out/cli/reporters/html.js +689 -0
  16. package/out/cli/reporters/index.js +22 -0
  17. package/out/cli/reporters/junit.js +226 -0
  18. package/out/codeLensProvider.js +351 -0
  19. package/out/compareContentProvider.js +85 -0
  20. package/out/completionProvider.js +3739 -0
  21. package/out/contractAssertionSummary.js +225 -0
  22. package/out/contractDecorationProvider.js +243 -0
  23. package/out/coverageCalculator.js +879 -0
  24. package/out/coveragePanel.js +597 -0
  25. package/out/debug/breakpointResolver.js +84 -0
  26. package/out/debug/breakpoints.js +52 -0
  27. package/out/debug/nornDebugAdapter.js +166 -0
  28. package/out/debug/nornDebugSession.js +613 -0
  29. package/out/debug/sequenceLocationIndex.js +77 -0
  30. package/out/debug/types.js +3 -0
  31. package/out/deepClone.js +21 -0
  32. package/out/diagnosticProvider.js +2554 -0
  33. package/out/environmentParser.js +736 -0
  34. package/out/environmentProvider.js +544 -0
  35. package/out/environmentTemplates.js +146 -0
  36. package/out/errors/formatError.js +113 -0
  37. package/out/errors/nornError.js +29 -0
  38. package/out/formUrlEncoded.js +89 -0
  39. package/out/httpClient.js +348 -0
  40. package/out/httpRuntimeOptions.js +16 -0
  41. package/out/importErrors.js +31 -0
  42. package/out/inlayHintResolver.js +70 -0
  43. package/out/jsonFileReader.js +323 -0
  44. package/out/mcpClient.js +193 -0
  45. package/out/mcpConfig.js +184 -0
  46. package/out/mcpToolIntellisenseCache.js +96 -0
  47. package/out/mcpToolSchema.js +50 -0
  48. package/out/nornConfig.js +132 -0
  49. package/out/nornHoverProvider.js +124 -0
  50. package/out/nornInlayHintsProvider.js +191 -0
  51. package/out/nornPrompt.js +755 -0
  52. package/out/nornSqlParser.js +286 -0
  53. package/out/nornapiHoverProvider.js +135 -0
  54. package/out/nornapiInlayHintsProvider.js +94 -0
  55. package/out/nornapiParser.js +324 -0
  56. package/out/nornenvCodeActionProvider.js +101 -0
  57. package/out/nornenvDecorationProvider.js +239 -0
  58. package/out/nornenvFoldingProvider.js +63 -0
  59. package/out/nornenvHoverProvider.js +114 -0
  60. package/out/nornenvInlayHintsProvider.js +99 -0
  61. package/out/nornenvLanguageModel.js +187 -0
  62. package/out/nornenvRegionRefactor.js +267 -0
  63. package/out/nornsqlHoverProvider.js +95 -0
  64. package/out/nornsqlInlayHintsProvider.js +114 -0
  65. package/out/parser.js +839 -0
  66. package/out/pathAccess.js +28 -0
  67. package/out/postmanImportPanel.js +732 -0
  68. package/out/postmanImportPlanner.js +1155 -0
  69. package/out/postmanImportSidebarView.js +532 -0
  70. package/out/quotedString.js +35 -0
  71. package/out/requestPreparation.js +179 -0
  72. package/out/requestValidation.js +146 -0
  73. package/out/responsePanel.js +7754 -0
  74. package/out/schemaGenerator.js +562 -0
  75. package/out/scriptRunner.js +419 -0
  76. package/out/secrets/cliSecrets.js +415 -0
  77. package/out/secrets/crypto.js +105 -0
  78. package/out/secrets/envFileSecrets.js +177 -0
  79. package/out/secrets/keyStore.js +259 -0
  80. package/out/sequenceDeclaration.js +15 -0
  81. package/out/sequenceRunner.js +3590 -0
  82. package/out/sqlAdapterRunner.js +122 -0
  83. package/out/sqlBuiltInAdapters.js +604 -0
  84. package/out/sqlConfig.js +184 -0
  85. package/out/starterCatalog.js +554 -0
  86. package/out/stringUtils.js +25 -0
  87. package/out/swaggerBodyIntellisenseCache.js +114 -0
  88. package/out/swaggerParser.js +464 -0
  89. package/out/testProvider.js +767 -0
  90. package/out/theoryCaseLoader.js +113 -0
  91. package/out/validationCache.js +211 -0
  92. package/package.json +6 -1
@@ -0,0 +1,184 @@
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.loadNornSqlProjectConfig = loadNornSqlProjectConfig;
37
+ exports.loadNornSqlAdaptersConfig = loadNornSqlAdaptersConfig;
38
+ exports.resolveSqlConnection = resolveSqlConnection;
39
+ exports.resolveSqlAdapterCommand = resolveSqlAdapterCommand;
40
+ exports.resolveSqlAdapterTarget = resolveSqlAdapterTarget;
41
+ exports.validateSqlAdapterReference = validateSqlAdapterReference;
42
+ const path = __importStar(require("path"));
43
+ const nornConfig_1 = require("./nornConfig");
44
+ const sqlBuiltInAdapters_1 = require("./sqlBuiltInAdapters");
45
+ function isConnectionsConfig(value) {
46
+ return (0, nornConfig_1.isObjectRecord)(value) && Object.values(value).every(connection => (0, nornConfig_1.isStringRecord)(connection) &&
47
+ typeof connection.adapter === 'string' &&
48
+ typeof connection.profile === 'string');
49
+ }
50
+ function isAdaptersConfig(value) {
51
+ return (0, nornConfig_1.isObjectRecord)(value) && Object.values(value).every(adapter => {
52
+ if (!(0, nornConfig_1.isObjectRecord)(adapter)) {
53
+ return false;
54
+ }
55
+ const command = adapter.command;
56
+ return Array.isArray(command) && command.length > 0 && command.every(part => typeof part === 'string' && part.length > 0);
57
+ });
58
+ }
59
+ function isSqlConfigSection(value) {
60
+ if (!(0, nornConfig_1.isObjectRecord)(value)) {
61
+ return false;
62
+ }
63
+ if (value.connections !== undefined && !isConnectionsConfig(value.connections)) {
64
+ return false;
65
+ }
66
+ if (value.adapters !== undefined && !isAdaptersConfig(value.adapters)) {
67
+ return false;
68
+ }
69
+ return true;
70
+ }
71
+ function loadSqlConfigSection(startPath) {
72
+ const { filePath, section } = (0, nornConfig_1.loadNornConfigSection)(startPath, 'sql', isSqlConfigSection);
73
+ return {
74
+ filePath,
75
+ config: section
76
+ };
77
+ }
78
+ function loadNornSqlProjectConfig(startPath) {
79
+ const { filePath, config } = loadSqlConfigSection(startPath);
80
+ if (!config.connections) {
81
+ throw new Error(`Could not find sql.connections in ${nornConfig_1.NORN_CONFIG_FILENAME}`);
82
+ }
83
+ return {
84
+ filePath,
85
+ config: {
86
+ version: 1,
87
+ connections: config.connections
88
+ }
89
+ };
90
+ }
91
+ function loadNornSqlAdaptersConfig(startPath) {
92
+ const { filePath, config } = loadSqlConfigSection(startPath);
93
+ if (!config.adapters) {
94
+ throw new Error(`Could not find sql.adapters in ${nornConfig_1.NORN_CONFIG_FILENAME}`);
95
+ }
96
+ return {
97
+ filePath,
98
+ config: {
99
+ version: 1,
100
+ adapters: config.adapters
101
+ }
102
+ };
103
+ }
104
+ function resolveSqlConnection(startPath, alias) {
105
+ const { filePath, config } = loadNornSqlProjectConfig(startPath);
106
+ const connection = config.connections[alias];
107
+ if (!connection) {
108
+ throw new Error(`Connection alias '${alias}' was not found in ${nornConfig_1.NORN_CONFIG_FILENAME} sql.connections`);
109
+ }
110
+ return {
111
+ alias,
112
+ adapter: connection.adapter,
113
+ profile: connection.profile,
114
+ configPath: filePath
115
+ };
116
+ }
117
+ function resolveCommandParts(configPath, command) {
118
+ const configDir = path.dirname(configPath);
119
+ return command.map((part, index) => {
120
+ if (!part) {
121
+ return part;
122
+ }
123
+ if (index === 0) {
124
+ if (path.isAbsolute(part) || (!part.startsWith('.') && !part.includes(path.sep) && !part.includes('/'))) {
125
+ return part;
126
+ }
127
+ return path.resolve(configDir, part);
128
+ }
129
+ if (part.startsWith('.')) {
130
+ return path.resolve(configDir, part);
131
+ }
132
+ return part;
133
+ });
134
+ }
135
+ function resolveSqlAdapterCommand(startPath, adapterId) {
136
+ const { filePath, config } = loadNornSqlAdaptersConfig(startPath);
137
+ const adapter = config.adapters[adapterId];
138
+ if (!adapter) {
139
+ throw new Error(`Adapter '${adapterId}' was not found in ${nornConfig_1.NORN_CONFIG_FILENAME} sql.adapters`);
140
+ }
141
+ return {
142
+ adapterId,
143
+ command: resolveCommandParts(filePath, adapter.command),
144
+ configPath: filePath
145
+ };
146
+ }
147
+ function resolveSqlAdapterTarget(startPath, adapterId) {
148
+ if ((0, sqlBuiltInAdapters_1.isBuiltInSqlAdapter)(adapterId)) {
149
+ return {
150
+ kind: 'builtin',
151
+ adapterId
152
+ };
153
+ }
154
+ const resolved = resolveSqlAdapterCommand(startPath, adapterId);
155
+ return {
156
+ kind: 'custom',
157
+ adapterId: resolved.adapterId,
158
+ command: resolved.command,
159
+ configPath: resolved.configPath
160
+ };
161
+ }
162
+ function validateSqlAdapterReference(startPath, adapterId) {
163
+ if ((0, sqlBuiltInAdapters_1.isBuiltInSqlAdapter)(adapterId)) {
164
+ return { ok: true, kind: 'builtin' };
165
+ }
166
+ try {
167
+ const { config } = loadNornSqlAdaptersConfig(startPath);
168
+ if (!config.adapters[adapterId]) {
169
+ return {
170
+ ok: false,
171
+ message: `Adapter '${adapterId}' is not built in and was not found in ${nornConfig_1.NORN_CONFIG_FILENAME} sql.adapters. Supported built-in adapters: ${(0, sqlBuiltInAdapters_1.getBuiltInSqlAdapterIds)().join(', ')}.`
172
+ };
173
+ }
174
+ return { ok: true, kind: 'custom' };
175
+ }
176
+ catch (error) {
177
+ const message = error instanceof Error ? error.message : String(error);
178
+ return {
179
+ ok: false,
180
+ message: `Adapter '${adapterId}' is not built in. ${message}`
181
+ };
182
+ }
183
+ }
184
+ //# sourceMappingURL=sqlConfig.js.map