norn-cli 2.2.2 → 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.
- package/.claude/settings.local.json +18 -0
- package/.claude/skills/norn-social-campaign/SKILL.md +70 -0
- package/CHANGELOG.md +22 -1
- package/LICENSE +20 -29
- package/README.md +32 -1
- package/demos/nornenv-region-refactor/README.md +64 -0
- package/demos/nornenv-showcase/README.md +62 -0
- package/demos/nornenv-showcase/norn.config.json +16 -0
- package/demos/nornenv-showcase/showcase.norn +70 -0
- package/demos/nornenv-showcase/showcase.nornapi +26 -0
- package/demos/nornenv-showcase/showcase.nornsql +20 -0
- package/dist/cli.js +564 -54
- package/out/apiResponseIntellisenseCache.js +394 -0
- package/out/assertionRunner.js +567 -0
- package/out/cacheDir.js +136 -0
- package/out/chatParticipant.js +763 -0
- package/out/cli/colors.js +127 -0
- package/out/cli/formatters/assertion.js +102 -0
- package/out/cli/formatters/index.js +23 -0
- package/out/cli/formatters/response.js +106 -0
- package/out/cli/formatters/summary.js +246 -0
- package/out/cli/redaction.js +237 -0
- package/out/cli/reporters/html.js +689 -0
- package/out/cli/reporters/index.js +22 -0
- package/out/cli/reporters/junit.js +226 -0
- package/out/codeLensProvider.js +351 -0
- package/out/compareContentProvider.js +85 -0
- package/out/completionProvider.js +3739 -0
- package/out/contractAssertionSummary.js +225 -0
- package/out/contractDecorationProvider.js +243 -0
- package/out/coverageCalculator.js +879 -0
- package/out/coveragePanel.js +597 -0
- package/out/debug/breakpointResolver.js +84 -0
- package/out/debug/breakpoints.js +52 -0
- package/out/debug/nornDebugAdapter.js +166 -0
- package/out/debug/nornDebugSession.js +613 -0
- package/out/debug/sequenceLocationIndex.js +77 -0
- package/out/debug/types.js +3 -0
- package/out/deepClone.js +21 -0
- package/out/diagnosticProvider.js +2554 -0
- package/out/environmentParser.js +736 -0
- package/out/environmentProvider.js +544 -0
- package/out/environmentTemplates.js +146 -0
- package/out/errors/formatError.js +113 -0
- package/out/errors/nornError.js +29 -0
- package/out/formUrlEncoded.js +89 -0
- package/out/httpClient.js +348 -0
- package/out/httpRuntimeOptions.js +16 -0
- package/out/importErrors.js +31 -0
- package/out/inlayHintResolver.js +70 -0
- package/out/jsonFileReader.js +323 -0
- package/out/mcpClient.js +193 -0
- package/out/mcpConfig.js +184 -0
- package/out/mcpToolIntellisenseCache.js +96 -0
- package/out/mcpToolSchema.js +50 -0
- package/out/nornConfig.js +132 -0
- package/out/nornHoverProvider.js +124 -0
- package/out/nornInlayHintsProvider.js +191 -0
- package/out/nornPrompt.js +755 -0
- package/out/nornSqlParser.js +286 -0
- package/out/nornapiHoverProvider.js +135 -0
- package/out/nornapiInlayHintsProvider.js +94 -0
- package/out/nornapiParser.js +324 -0
- package/out/nornenvCodeActionProvider.js +101 -0
- package/out/nornenvDecorationProvider.js +239 -0
- package/out/nornenvFoldingProvider.js +63 -0
- package/out/nornenvHoverProvider.js +114 -0
- package/out/nornenvInlayHintsProvider.js +99 -0
- package/out/nornenvLanguageModel.js +187 -0
- package/out/nornenvRegionRefactor.js +267 -0
- package/out/nornsqlHoverProvider.js +95 -0
- package/out/nornsqlInlayHintsProvider.js +114 -0
- package/out/parser.js +839 -0
- package/out/pathAccess.js +28 -0
- package/out/postmanImportPanel.js +732 -0
- package/out/postmanImportPlanner.js +1155 -0
- package/out/postmanImportSidebarView.js +532 -0
- package/out/quotedString.js +35 -0
- package/out/requestPreparation.js +179 -0
- package/out/requestValidation.js +146 -0
- package/out/responsePanel.js +7754 -0
- package/out/schemaGenerator.js +562 -0
- package/out/scriptRunner.js +419 -0
- package/out/secrets/cliSecrets.js +415 -0
- package/out/secrets/crypto.js +105 -0
- package/out/secrets/envFileSecrets.js +177 -0
- package/out/secrets/keyStore.js +259 -0
- package/out/sequenceDeclaration.js +15 -0
- package/out/sequenceRunner.js +3590 -0
- package/out/sqlAdapterRunner.js +122 -0
- package/out/sqlBuiltInAdapters.js +604 -0
- package/out/sqlConfig.js +184 -0
- package/out/starterCatalog.js +554 -0
- package/out/stringUtils.js +25 -0
- package/out/swaggerBodyIntellisenseCache.js +114 -0
- package/out/swaggerParser.js +464 -0
- package/out/testProvider.js +767 -0
- package/out/theoryCaseLoader.js +113 -0
- package/out/validationCache.js +211 -0
- package/package.json +38 -11
- package/.kanbn/index.md +0 -31
- package/.kanbn/tasks/book-first-mentor-session.md +0 -13
- package/.kanbn/tasks/decide-what-success-in-a-pilot-looks-like.md +0 -9
- package/.kanbn/tasks/do-5-customer-conversations.md +0 -9
- package/.kanbn/tasks/finalise-the-one-line-pitch.md +0 -11
- package/.kanbn/tasks/interview-script.md +0 -49
- package/.kanbn/tasks/make-a-list-of-10-people-to-speak-to.md +0 -11
- package/.kanbn/tasks/prepare-your-customer-interview-questions.md +0 -11
- package/.kanbn/tasks/recruit-2/342/200/2233-pilot-users.md +0 -9
- package/.kanbn/tasks/refine-your-pitch.md +0 -9
- package/.kanbn/tasks/use-the-shiplight-website-as-a-template-to-improve-norn-website.md +0 -9
- package/.kanbn/tasks/write-down-repeated-wording.md +0 -9
- package/.kanbn/tasks/write-the-one-pager.md +0 -27
|
@@ -0,0 +1,532 @@
|
|
|
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.HomeSidebarViewProvider = void 0;
|
|
37
|
+
const vscode = __importStar(require("vscode"));
|
|
38
|
+
const starterCatalog_1 = require("./starterCatalog");
|
|
39
|
+
class HomeSidebarViewProvider {
|
|
40
|
+
extensionUri;
|
|
41
|
+
static viewType = 'norn.sidebarHome';
|
|
42
|
+
constructor(extensionUri) {
|
|
43
|
+
this.extensionUri = extensionUri;
|
|
44
|
+
void this.extensionUri;
|
|
45
|
+
}
|
|
46
|
+
resolveWebviewView(webviewView, _context, _token) {
|
|
47
|
+
webviewView.webview.options = {
|
|
48
|
+
enableScripts: true,
|
|
49
|
+
};
|
|
50
|
+
webviewView.webview.html = this.getHtml();
|
|
51
|
+
webviewView.webview.onDidReceiveMessage(async (message) => {
|
|
52
|
+
if (message.command === 'importCollection') {
|
|
53
|
+
await vscode.commands.executeCommand('norn.importPostmanCollection');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (message.command === 'importEnvironment') {
|
|
57
|
+
await vscode.commands.executeCommand('norn.importPostmanEnvironment');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (message.command === 'createStarterCatalog') {
|
|
61
|
+
await vscode.commands.executeCommand('norn.createStarterCatalog', message.starterId);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (message.command === 'createMcpStarterConfig') {
|
|
65
|
+
await vscode.commands.executeCommand('norn.createMcpStarterConfig');
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
getStarterCatalogButtonsHtml() {
|
|
70
|
+
return starterCatalog_1.STARTER_CATALOG_ITEMS.map((starterItem) => `
|
|
71
|
+
<button class="setup-button sample" data-command="createStarterCatalog" data-starter-id="${this.escapeHtml(starterItem.id)}">
|
|
72
|
+
<span class="button-title">${this.escapeHtml(starterItem.label)}</span>
|
|
73
|
+
<span class="button-meta">${this.escapeHtml(starterItem.description)}</span>
|
|
74
|
+
</button>`).join('');
|
|
75
|
+
}
|
|
76
|
+
escapeHtml(value) {
|
|
77
|
+
return value
|
|
78
|
+
.replace(/&/g, '&')
|
|
79
|
+
.replace(/</g, '<')
|
|
80
|
+
.replace(/>/g, '>')
|
|
81
|
+
.replace(/"/g, '"')
|
|
82
|
+
.replace(/'/g, ''');
|
|
83
|
+
}
|
|
84
|
+
getHtml() {
|
|
85
|
+
return `<!DOCTYPE html>
|
|
86
|
+
<html lang="en">
|
|
87
|
+
<head>
|
|
88
|
+
<meta charset="UTF-8" />
|
|
89
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
90
|
+
<title>Norn</title>
|
|
91
|
+
<style>
|
|
92
|
+
:root {
|
|
93
|
+
color-scheme: light dark;
|
|
94
|
+
}
|
|
95
|
+
body {
|
|
96
|
+
margin: 0;
|
|
97
|
+
padding: 12px;
|
|
98
|
+
font-family: var(--vscode-font-family);
|
|
99
|
+
font-size: var(--vscode-font-size);
|
|
100
|
+
color: var(--vscode-foreground);
|
|
101
|
+
background: var(--vscode-sideBar-background);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Welcome Card with Aurora Gradient */
|
|
105
|
+
.welcome-card {
|
|
106
|
+
border: 1px solid rgba(78, 201, 176, 0.25);
|
|
107
|
+
border-radius: 12px;
|
|
108
|
+
padding: 16px;
|
|
109
|
+
margin-bottom: 12px;
|
|
110
|
+
background: linear-gradient(135deg,
|
|
111
|
+
rgba(78, 201, 176, 0.08) 0%,
|
|
112
|
+
rgba(86, 156, 214, 0.1) 50%,
|
|
113
|
+
rgba(197, 134, 192, 0.06) 100%);
|
|
114
|
+
position: relative;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
}
|
|
117
|
+
.welcome-card::before {
|
|
118
|
+
content: '';
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: -50%;
|
|
121
|
+
left: -50%;
|
|
122
|
+
width: 200%;
|
|
123
|
+
height: 200%;
|
|
124
|
+
background: radial-gradient(circle at 30% 30%, rgba(78, 201, 176, 0.1) 0%, transparent 50%),
|
|
125
|
+
radial-gradient(circle at 70% 70%, rgba(86, 156, 214, 0.08) 0%, transparent 50%);
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
128
|
+
.welcome-header {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: 10px;
|
|
132
|
+
margin-bottom: 8px;
|
|
133
|
+
position: relative;
|
|
134
|
+
}
|
|
135
|
+
.welcome-icon {
|
|
136
|
+
width: 28px;
|
|
137
|
+
height: 28px;
|
|
138
|
+
filter: drop-shadow(0 0 6px rgba(78, 201, 176, 0.5));
|
|
139
|
+
}
|
|
140
|
+
.welcome-icon svg {
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
}
|
|
144
|
+
.welcome-title {
|
|
145
|
+
margin: 0;
|
|
146
|
+
font-size: 16px;
|
|
147
|
+
font-weight: 600;
|
|
148
|
+
background: linear-gradient(135deg, #4ec9b0 0%, #569cd6 100%);
|
|
149
|
+
-webkit-background-clip: text;
|
|
150
|
+
-webkit-text-fill-color: transparent;
|
|
151
|
+
background-clip: text;
|
|
152
|
+
}
|
|
153
|
+
.welcome-tagline {
|
|
154
|
+
margin: 0;
|
|
155
|
+
font-size: 12px;
|
|
156
|
+
color: var(--vscode-descriptionForeground);
|
|
157
|
+
line-height: 1.5;
|
|
158
|
+
position: relative;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* File Type Pills */
|
|
162
|
+
.file-types {
|
|
163
|
+
display: flex;
|
|
164
|
+
flex-wrap: wrap;
|
|
165
|
+
gap: 6px;
|
|
166
|
+
margin-top: 12px;
|
|
167
|
+
position: relative;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
}
|
|
170
|
+
.file-pill {
|
|
171
|
+
display: inline-flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
gap: 4px;
|
|
174
|
+
padding: 4px 10px;
|
|
175
|
+
border-radius: 12px;
|
|
176
|
+
font-size: 11px;
|
|
177
|
+
font-family: var(--vscode-editor-font-family);
|
|
178
|
+
font-weight: 500;
|
|
179
|
+
border: 1px solid transparent;
|
|
180
|
+
cursor: default;
|
|
181
|
+
transition: transform 0.15s, box-shadow 0.15s;
|
|
182
|
+
}
|
|
183
|
+
.file-pill:hover {
|
|
184
|
+
transform: translateY(-1px);
|
|
185
|
+
}
|
|
186
|
+
.file-pill.norn {
|
|
187
|
+
background: rgba(78, 201, 176, 0.15);
|
|
188
|
+
color: #4ec9b0;
|
|
189
|
+
border-color: rgba(78, 201, 176, 0.3);
|
|
190
|
+
}
|
|
191
|
+
.file-pill.norn:hover {
|
|
192
|
+
box-shadow: 0 2px 8px rgba(78, 201, 176, 0.25);
|
|
193
|
+
}
|
|
194
|
+
.file-pill.nornapi {
|
|
195
|
+
background: rgba(86, 156, 214, 0.15);
|
|
196
|
+
color: #569cd6;
|
|
197
|
+
border-color: rgba(86, 156, 214, 0.3);
|
|
198
|
+
}
|
|
199
|
+
.file-pill.nornapi:hover {
|
|
200
|
+
box-shadow: 0 2px 8px rgba(86, 156, 214, 0.25);
|
|
201
|
+
}
|
|
202
|
+
.file-pill.nornenv {
|
|
203
|
+
background: rgba(197, 134, 192, 0.15);
|
|
204
|
+
color: #c586c0;
|
|
205
|
+
border-color: rgba(197, 134, 192, 0.3);
|
|
206
|
+
}
|
|
207
|
+
.file-pill.nornenv:hover {
|
|
208
|
+
box-shadow: 0 2px 8px rgba(197, 134, 192, 0.25);
|
|
209
|
+
}
|
|
210
|
+
.file-pill.nornsql {
|
|
211
|
+
background: rgba(215, 186, 125, 0.16);
|
|
212
|
+
color: #d7ba7d;
|
|
213
|
+
border-color: rgba(215, 186, 125, 0.3);
|
|
214
|
+
}
|
|
215
|
+
.file-pill.nornsql:hover {
|
|
216
|
+
box-shadow: 0 2px 8px rgba(215, 186, 125, 0.25);
|
|
217
|
+
}
|
|
218
|
+
.pill-tooltip {
|
|
219
|
+
display: none;
|
|
220
|
+
position: absolute;
|
|
221
|
+
bottom: calc(100% + 6px);
|
|
222
|
+
left: 50%;
|
|
223
|
+
transform: translateX(-50%);
|
|
224
|
+
background: var(--vscode-editorHoverWidget-background);
|
|
225
|
+
border: 1px solid var(--vscode-editorHoverWidget-border);
|
|
226
|
+
border-radius: 4px;
|
|
227
|
+
padding: 4px 8px;
|
|
228
|
+
font-size: 11px;
|
|
229
|
+
white-space: normal;
|
|
230
|
+
max-width: 140px;
|
|
231
|
+
text-align: center;
|
|
232
|
+
line-height: 1.3;
|
|
233
|
+
z-index: 10;
|
|
234
|
+
color: var(--vscode-foreground);
|
|
235
|
+
}
|
|
236
|
+
.file-pill:hover .pill-tooltip {
|
|
237
|
+
display: block;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Sections */
|
|
241
|
+
.section {
|
|
242
|
+
border: 1px solid var(--vscode-panel-border);
|
|
243
|
+
border-radius: 10px;
|
|
244
|
+
padding: 12px;
|
|
245
|
+
margin-bottom: 12px;
|
|
246
|
+
background: color-mix(in srgb, var(--vscode-editor-background) 55%, var(--vscode-sideBar-background));
|
|
247
|
+
}
|
|
248
|
+
.section-label {
|
|
249
|
+
margin: 0 0 8px 0;
|
|
250
|
+
font-size: 11px;
|
|
251
|
+
letter-spacing: 0.05em;
|
|
252
|
+
text-transform: uppercase;
|
|
253
|
+
color: var(--vscode-descriptionForeground);
|
|
254
|
+
}
|
|
255
|
+
.section-desc {
|
|
256
|
+
margin: 0 0 12px 0;
|
|
257
|
+
line-height: 1.4;
|
|
258
|
+
color: var(--vscode-descriptionForeground);
|
|
259
|
+
}
|
|
260
|
+
.buttons {
|
|
261
|
+
display: grid;
|
|
262
|
+
gap: 8px;
|
|
263
|
+
}
|
|
264
|
+
.setup-buttons {
|
|
265
|
+
display: grid;
|
|
266
|
+
gap: 10px;
|
|
267
|
+
}
|
|
268
|
+
.setup-view[hidden] {
|
|
269
|
+
display: none;
|
|
270
|
+
}
|
|
271
|
+
.setup-header {
|
|
272
|
+
display: grid;
|
|
273
|
+
gap: 8px;
|
|
274
|
+
}
|
|
275
|
+
button {
|
|
276
|
+
display: flex;
|
|
277
|
+
justify-content: center;
|
|
278
|
+
align-items: center;
|
|
279
|
+
text-align: center;
|
|
280
|
+
border: 1px solid var(--vscode-button-border, transparent);
|
|
281
|
+
background: var(--vscode-button-secondaryBackground);
|
|
282
|
+
color: var(--vscode-button-secondaryForeground);
|
|
283
|
+
padding: 8px 10px;
|
|
284
|
+
border-radius: 8px;
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
line-height: 1.35;
|
|
287
|
+
transition: background 0.15s, transform 0.1s;
|
|
288
|
+
}
|
|
289
|
+
button:hover {
|
|
290
|
+
background: var(--vscode-button-secondaryHoverBackground);
|
|
291
|
+
}
|
|
292
|
+
button:active {
|
|
293
|
+
transform: scale(0.98);
|
|
294
|
+
}
|
|
295
|
+
button.primary {
|
|
296
|
+
background: var(--vscode-button-background);
|
|
297
|
+
color: var(--vscode-button-foreground);
|
|
298
|
+
}
|
|
299
|
+
button.primary:hover {
|
|
300
|
+
background: var(--vscode-button-hoverBackground);
|
|
301
|
+
}
|
|
302
|
+
.back-button {
|
|
303
|
+
justify-self: start;
|
|
304
|
+
padding: 5px 9px;
|
|
305
|
+
font-size: 11px;
|
|
306
|
+
}
|
|
307
|
+
.setup-button {
|
|
308
|
+
display: grid;
|
|
309
|
+
grid-template-columns: minmax(0, 1fr);
|
|
310
|
+
justify-content: flex-start;
|
|
311
|
+
align-items: flex-start;
|
|
312
|
+
text-align: left;
|
|
313
|
+
gap: 4px;
|
|
314
|
+
padding: 10px 12px;
|
|
315
|
+
width: 100%;
|
|
316
|
+
min-width: 0;
|
|
317
|
+
box-sizing: border-box;
|
|
318
|
+
}
|
|
319
|
+
.setup-button .button-title {
|
|
320
|
+
display: block;
|
|
321
|
+
min-width: 0;
|
|
322
|
+
font-weight: 600;
|
|
323
|
+
color: var(--vscode-foreground);
|
|
324
|
+
overflow-wrap: anywhere;
|
|
325
|
+
}
|
|
326
|
+
.setup-button .button-meta {
|
|
327
|
+
display: block;
|
|
328
|
+
min-width: 0;
|
|
329
|
+
font-size: 11px;
|
|
330
|
+
line-height: 1.35;
|
|
331
|
+
color: var(--vscode-descriptionForeground);
|
|
332
|
+
overflow-wrap: anywhere;
|
|
333
|
+
}
|
|
334
|
+
.setup-button.catalog {
|
|
335
|
+
border-color: rgba(78, 201, 176, 0.28);
|
|
336
|
+
background: linear-gradient(135deg,
|
|
337
|
+
rgba(78, 201, 176, 0.12) 0%,
|
|
338
|
+
rgba(86, 156, 214, 0.07) 100%);
|
|
339
|
+
}
|
|
340
|
+
.setup-button.catalog:hover {
|
|
341
|
+
background: linear-gradient(135deg,
|
|
342
|
+
rgba(78, 201, 176, 0.18) 0%,
|
|
343
|
+
rgba(86, 156, 214, 0.11) 100%);
|
|
344
|
+
}
|
|
345
|
+
.setup-button.sample {
|
|
346
|
+
border-color: rgba(215, 186, 125, 0.28);
|
|
347
|
+
background: linear-gradient(135deg,
|
|
348
|
+
rgba(215, 186, 125, 0.12) 0%,
|
|
349
|
+
rgba(215, 186, 125, 0.04) 100%);
|
|
350
|
+
}
|
|
351
|
+
.setup-button.sample:hover {
|
|
352
|
+
background: linear-gradient(135deg,
|
|
353
|
+
rgba(215, 186, 125, 0.18) 0%,
|
|
354
|
+
rgba(215, 186, 125, 0.08) 100%);
|
|
355
|
+
}
|
|
356
|
+
.setup-button.mcp {
|
|
357
|
+
border-color: rgba(92, 136, 201, 0.28);
|
|
358
|
+
background: linear-gradient(135deg,
|
|
359
|
+
rgba(53, 93, 140, 0.16) 0%,
|
|
360
|
+
rgba(40, 72, 111, 0.08) 100%);
|
|
361
|
+
}
|
|
362
|
+
.setup-button.mcp:hover {
|
|
363
|
+
background: linear-gradient(135deg,
|
|
364
|
+
rgba(53, 93, 140, 0.24) 0%,
|
|
365
|
+
rgba(40, 72, 111, 0.12) 100%);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* Links Section */
|
|
369
|
+
.links-section {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-direction: column;
|
|
372
|
+
gap: 6px;
|
|
373
|
+
}
|
|
374
|
+
.link-item {
|
|
375
|
+
display: flex;
|
|
376
|
+
align-items: center;
|
|
377
|
+
gap: 8px;
|
|
378
|
+
padding: 6px 8px;
|
|
379
|
+
border-radius: 6px;
|
|
380
|
+
text-decoration: none;
|
|
381
|
+
color: var(--vscode-textLink-foreground);
|
|
382
|
+
font-size: 12px;
|
|
383
|
+
transition: background 0.15s;
|
|
384
|
+
}
|
|
385
|
+
.link-item:hover {
|
|
386
|
+
background: var(--vscode-list-hoverBackground);
|
|
387
|
+
text-decoration: underline;
|
|
388
|
+
}
|
|
389
|
+
.link-icon {
|
|
390
|
+
width: 16px;
|
|
391
|
+
height: 16px;
|
|
392
|
+
opacity: 0.75;
|
|
393
|
+
flex-shrink: 0;
|
|
394
|
+
}
|
|
395
|
+
.link-icon svg {
|
|
396
|
+
width: 100%;
|
|
397
|
+
height: 100%;
|
|
398
|
+
}
|
|
399
|
+
</style>
|
|
400
|
+
</head>
|
|
401
|
+
<body>
|
|
402
|
+
<!-- Welcome Card -->
|
|
403
|
+
<div class="welcome-card">
|
|
404
|
+
<div class="welcome-header">
|
|
405
|
+
<span class="welcome-icon">
|
|
406
|
+
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
407
|
+
<line x1="8" y1="8" x2="3" y2="3" stroke="#4ec9b0" stroke-width="1" stroke-opacity="0.6"/>
|
|
408
|
+
<line x1="8" y1="8" x2="13" y2="3" stroke="#569cd6" stroke-width="1" stroke-opacity="0.6"/>
|
|
409
|
+
<line x1="8" y1="8" x2="2" y2="10" stroke="#4ec9b0" stroke-width="1" stroke-opacity="0.6"/>
|
|
410
|
+
<line x1="8" y1="8" x2="14" y2="10" stroke="#569cd6" stroke-width="1" stroke-opacity="0.6"/>
|
|
411
|
+
<line x1="8" y1="8" x2="5" y2="14" stroke="#4ec9b0" stroke-width="1" stroke-opacity="0.6"/>
|
|
412
|
+
<line x1="8" y1="8" x2="11" y2="14" stroke="#569cd6" stroke-width="1" stroke-opacity="0.6"/>
|
|
413
|
+
<circle cx="8" cy="8" r="2.5" fill="#4ec9b0"/>
|
|
414
|
+
<circle cx="3" cy="3" r="1.3" fill="#569cd6"/>
|
|
415
|
+
<circle cx="13" cy="3" r="1.5" fill="#4ec9b0"/>
|
|
416
|
+
<circle cx="2" cy="10" r="1.1" fill="#569cd6"/>
|
|
417
|
+
<circle cx="14" cy="10" r="1.4" fill="#4ec9b0"/>
|
|
418
|
+
<circle cx="5" cy="14" r="1.2" fill="#569cd6"/>
|
|
419
|
+
<circle cx="11" cy="14" r="1.3" fill="#4ec9b0"/>
|
|
420
|
+
</svg>
|
|
421
|
+
</span>
|
|
422
|
+
<h2 class="welcome-title">Norn REST Client</h2>
|
|
423
|
+
</div>
|
|
424
|
+
<p class="welcome-tagline">Test APIs with sequences, assertions, and environment management — all in VS Code.</p>
|
|
425
|
+
<div class="file-types">
|
|
426
|
+
<span class="file-pill norn" title="HTTP requests & test sequences">
|
|
427
|
+
.norn
|
|
428
|
+
<span class="pill-tooltip">HTTP requests & sequences</span>
|
|
429
|
+
</span>
|
|
430
|
+
<span class="file-pill nornapi" title="Reusable API definitions">
|
|
431
|
+
.nornapi
|
|
432
|
+
<span class="pill-tooltip">Reusable API definitions</span>
|
|
433
|
+
</span>
|
|
434
|
+
<span class="file-pill nornenv" title="Environment variables">
|
|
435
|
+
.nornenv
|
|
436
|
+
<span class="pill-tooltip">Environment variables</span>
|
|
437
|
+
</span>
|
|
438
|
+
<span class="file-pill nornsql" title="SQL queries & commands">
|
|
439
|
+
.nornsql
|
|
440
|
+
<span class="pill-tooltip">SQL queries & commands</span>
|
|
441
|
+
</span>
|
|
442
|
+
</div>
|
|
443
|
+
</div>
|
|
444
|
+
|
|
445
|
+
<!-- Project Setup Section -->
|
|
446
|
+
<section class="section">
|
|
447
|
+
<div id="setup-main" class="setup-view">
|
|
448
|
+
<div class="section-label">Project Setup</div>
|
|
449
|
+
<p class="section-desc">Create self-contained starter folders or configure MCP before you write requests and sequences.</p>
|
|
450
|
+
<div class="setup-buttons">
|
|
451
|
+
<button class="setup-button catalog" data-view="catalog">
|
|
452
|
+
<span class="button-title">Starter catalogue</span>
|
|
453
|
+
<span class="button-meta">Choose request, script, SQL, or advanced flow samples. Each sample gets its own folder.</span>
|
|
454
|
+
</button>
|
|
455
|
+
<button class="setup-button mcp" data-command="createMcpStarterConfig">
|
|
456
|
+
<span class="button-title">Create MCP starter config</span>
|
|
457
|
+
<span class="button-meta">Creates norn.config.json with MCP aliases, local vs remote servers, and optional settings.</span>
|
|
458
|
+
</button>
|
|
459
|
+
</div>
|
|
460
|
+
</div>
|
|
461
|
+
|
|
462
|
+
<div id="setup-catalog" class="setup-view" hidden>
|
|
463
|
+
<div class="setup-header">
|
|
464
|
+
<button class="back-button" data-view="main">Back</button>
|
|
465
|
+
<div>
|
|
466
|
+
<div class="section-label">Starter Catalogue</div>
|
|
467
|
+
<p class="section-desc">Pick a sample. Norn creates it in a new folder so existing files stay untouched.</p>
|
|
468
|
+
</div>
|
|
469
|
+
</div>
|
|
470
|
+
<div class="setup-buttons">
|
|
471
|
+
${this.getStarterCatalogButtonsHtml()}
|
|
472
|
+
</div>
|
|
473
|
+
</div>
|
|
474
|
+
</section>
|
|
475
|
+
|
|
476
|
+
<!-- Postman Imports Section -->
|
|
477
|
+
<section class="section">
|
|
478
|
+
<div class="section-label">Postman Imports</div>
|
|
479
|
+
<p class="section-desc">Convert Postman exports into Norn files with a review screen before anything is written.</p>
|
|
480
|
+
<div class="buttons">
|
|
481
|
+
<button class="primary" data-command="importCollection">Import Collection JSON</button>
|
|
482
|
+
<button data-command="importEnvironment">Import Environment JSON</button>
|
|
483
|
+
</div>
|
|
484
|
+
</section>
|
|
485
|
+
|
|
486
|
+
<!-- Links Section -->
|
|
487
|
+
<section class="section">
|
|
488
|
+
<div class="section-label">Resources</div>
|
|
489
|
+
<div class="links-section">
|
|
490
|
+
<a href="https://github.com/PeterCrest/Norn#readme" class="link-item">
|
|
491
|
+
<span class="link-icon"><svg viewBox="0 0 16 16" fill="currentColor"><path d="M1 2.5A1.5 1.5 0 0 1 2.5 1h11A1.5 1.5 0 0 1 15 2.5v11a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 13.5v-11zM2.5 2a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-11zM4 4h8v1H4V4zm0 3h8v1H4V7zm0 3h5v1H4v-1z"/></svg></span>
|
|
492
|
+
Documentation & README
|
|
493
|
+
</a>
|
|
494
|
+
<a href="https://github.com/PeterCrest/Norn/issues" class="link-item">
|
|
495
|
+
<span class="link-icon"><svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5zm0 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/></svg></span>
|
|
496
|
+
Report an Issue
|
|
497
|
+
</a>
|
|
498
|
+
</div>
|
|
499
|
+
</section>
|
|
500
|
+
|
|
501
|
+
<script>
|
|
502
|
+
const vscode = acquireVsCodeApi();
|
|
503
|
+
|
|
504
|
+
const setupMain = document.getElementById('setup-main');
|
|
505
|
+
const setupCatalog = document.getElementById('setup-catalog');
|
|
506
|
+
|
|
507
|
+
const showSetupView = (view) => {
|
|
508
|
+
setupMain.hidden = view !== 'main';
|
|
509
|
+
setupCatalog.hidden = view !== 'catalog';
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
document.querySelectorAll('button[data-view]').forEach((button) => {
|
|
513
|
+
button.addEventListener('click', () => {
|
|
514
|
+
showSetupView(button.getAttribute('data-view'));
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
document.querySelectorAll('button[data-command]').forEach((button) => {
|
|
519
|
+
button.addEventListener('click', () => {
|
|
520
|
+
vscode.postMessage({
|
|
521
|
+
command: button.getAttribute('data-command'),
|
|
522
|
+
starterId: button.getAttribute('data-starter-id') || undefined
|
|
523
|
+
});
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
</script>
|
|
527
|
+
</body>
|
|
528
|
+
</html>`;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
exports.HomeSidebarViewProvider = HomeSidebarViewProvider;
|
|
532
|
+
//# sourceMappingURL=postmanImportSidebarView.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeQuotedStringLiteral = decodeQuotedStringLiteral;
|
|
4
|
+
/**
|
|
5
|
+
* Decodes a quoted Norn string literal while preserving unknown escape sequences.
|
|
6
|
+
* Only the active quote character and backslashes are unescaped so paths like
|
|
7
|
+
* C:\temp keep their literal backslashes unless the user explicitly escapes them.
|
|
8
|
+
*/
|
|
9
|
+
function decodeQuotedStringLiteral(literal) {
|
|
10
|
+
if (literal.length < 2) {
|
|
11
|
+
return literal;
|
|
12
|
+
}
|
|
13
|
+
const quoteChar = literal[0];
|
|
14
|
+
if ((quoteChar !== '"' && quoteChar !== "'") || literal[literal.length - 1] !== quoteChar) {
|
|
15
|
+
return literal;
|
|
16
|
+
}
|
|
17
|
+
const inner = literal.slice(1, -1);
|
|
18
|
+
let decoded = '';
|
|
19
|
+
for (let i = 0; i < inner.length; i++) {
|
|
20
|
+
const char = inner[i];
|
|
21
|
+
if (char !== '\\' || i === inner.length - 1) {
|
|
22
|
+
decoded += char;
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const nextChar = inner[i + 1];
|
|
26
|
+
if (nextChar === '\\' || nextChar === quoteChar) {
|
|
27
|
+
decoded += nextChar;
|
|
28
|
+
i++;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
decoded += char;
|
|
32
|
+
}
|
|
33
|
+
return decoded;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=quotedString.js.map
|