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,52 @@
|
|
|
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.hasEnabledNornBreakpoints = hasEnabledNornBreakpoints;
|
|
37
|
+
const vscode = __importStar(require("vscode"));
|
|
38
|
+
function hasEnabledNornBreakpoints() {
|
|
39
|
+
return vscode.debug.breakpoints.some((breakpoint) => {
|
|
40
|
+
if (!(breakpoint instanceof vscode.SourceBreakpoint)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
if (!breakpoint.enabled) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (breakpoint.location.uri.scheme !== 'file') {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return breakpoint.location.uri.fsPath.toLowerCase().endsWith('.norn');
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -0,0 +1,166 @@
|
|
|
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.NornDebugAdapterDescriptorFactory = exports.NornDebugConfigurationProvider = void 0;
|
|
37
|
+
const fs = __importStar(require("fs/promises"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const vscode = __importStar(require("vscode"));
|
|
40
|
+
const sequenceRunner_1 = require("../sequenceRunner");
|
|
41
|
+
const nornDebugSession_1 = require("./nornDebugSession");
|
|
42
|
+
const NORN_DEBUG_TYPE = 'norn';
|
|
43
|
+
function getDefaultFileFromEditor() {
|
|
44
|
+
const activeEditor = vscode.window.activeTextEditor;
|
|
45
|
+
if (!activeEditor) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
if (activeEditor.document.languageId !== 'norn' || activeEditor.document.uri.scheme !== 'file') {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return activeEditor.document.uri.fsPath;
|
|
52
|
+
}
|
|
53
|
+
function getDefaultSequenceFromEditor() {
|
|
54
|
+
const activeEditor = vscode.window.activeTextEditor;
|
|
55
|
+
if (!activeEditor) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
if (activeEditor.document.languageId !== 'norn') {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
const sequence = (0, sequenceRunner_1.getSequenceAtLine)(activeEditor.document.getText(), activeEditor.selection.active.line);
|
|
62
|
+
return sequence?.name;
|
|
63
|
+
}
|
|
64
|
+
function resolveFilePath(folder, filePath) {
|
|
65
|
+
if (path.isAbsolute(filePath)) {
|
|
66
|
+
return filePath;
|
|
67
|
+
}
|
|
68
|
+
if (folder) {
|
|
69
|
+
return path.resolve(folder.uri.fsPath, filePath);
|
|
70
|
+
}
|
|
71
|
+
return path.resolve(filePath);
|
|
72
|
+
}
|
|
73
|
+
class NornDebugConfigurationProvider {
|
|
74
|
+
provideDebugConfigurations(folder) {
|
|
75
|
+
const activeFile = getDefaultFileFromEditor();
|
|
76
|
+
const activeSequence = getDefaultSequenceFromEditor();
|
|
77
|
+
return [
|
|
78
|
+
{
|
|
79
|
+
type: NORN_DEBUG_TYPE,
|
|
80
|
+
request: 'launch',
|
|
81
|
+
name: 'Debug Norn Sequence',
|
|
82
|
+
file: activeFile ?? '${file}',
|
|
83
|
+
sequence: activeSequence ?? 'YourSequenceName',
|
|
84
|
+
stopOnEntry: true
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
resolveDebugConfiguration(folder, debugConfiguration) {
|
|
89
|
+
const normalized = {
|
|
90
|
+
...debugConfiguration,
|
|
91
|
+
type: NORN_DEBUG_TYPE,
|
|
92
|
+
request: 'launch',
|
|
93
|
+
name: debugConfiguration.name || 'Debug Norn Sequence',
|
|
94
|
+
stopOnEntry: debugConfiguration.stopOnEntry ?? true,
|
|
95
|
+
file: typeof debugConfiguration.file === 'string' && debugConfiguration.file.trim() !== ''
|
|
96
|
+
? debugConfiguration.file
|
|
97
|
+
: getDefaultFileFromEditor() || '',
|
|
98
|
+
sequence: typeof debugConfiguration.sequence === 'string'
|
|
99
|
+
? debugConfiguration.sequence
|
|
100
|
+
: ''
|
|
101
|
+
};
|
|
102
|
+
if (!normalized.file) {
|
|
103
|
+
vscode.window.showErrorMessage('Norn debug launch requires a file path.');
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
if (!normalized.sequence || normalized.sequence.trim() === '') {
|
|
107
|
+
vscode.window.showErrorMessage('Norn debug launch requires a sequence name.');
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
normalized.file = resolveFilePath(folder, normalized.file);
|
|
111
|
+
normalized.sequence = normalized.sequence.trim();
|
|
112
|
+
return normalized;
|
|
113
|
+
}
|
|
114
|
+
async resolveDebugConfigurationWithSubstitutedVariables(folder, debugConfiguration) {
|
|
115
|
+
const resolvedMaybe = await Promise.resolve(this.resolveDebugConfiguration(folder, debugConfiguration));
|
|
116
|
+
if (!resolvedMaybe) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
const resolved = resolvedMaybe;
|
|
120
|
+
const filePath = resolved.file;
|
|
121
|
+
try {
|
|
122
|
+
await fs.access(filePath);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
vscode.window.showErrorMessage(`Norn debug file not found: ${filePath}`);
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
return resolved;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.NornDebugConfigurationProvider = NornDebugConfigurationProvider;
|
|
132
|
+
class NornInlineDebugAdapter {
|
|
133
|
+
didSendMessageEmitter = new vscode.EventEmitter();
|
|
134
|
+
debugSession;
|
|
135
|
+
disposed = false;
|
|
136
|
+
onDidSendMessage = this.didSendMessageEmitter.event;
|
|
137
|
+
constructor(extensionUri) {
|
|
138
|
+
this.debugSession = new nornDebugSession_1.NornDebugSession(extensionUri, (message) => {
|
|
139
|
+
this.didSendMessageEmitter.fire(message);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
handleMessage(message) {
|
|
143
|
+
if (this.disposed) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (message.type !== 'request') {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
void this.debugSession.handleRequest(message);
|
|
150
|
+
}
|
|
151
|
+
dispose() {
|
|
152
|
+
this.disposed = true;
|
|
153
|
+
this.didSendMessageEmitter.dispose();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
class NornDebugAdapterDescriptorFactory {
|
|
157
|
+
extensionUri;
|
|
158
|
+
constructor(extensionUri) {
|
|
159
|
+
this.extensionUri = extensionUri;
|
|
160
|
+
}
|
|
161
|
+
createDebugAdapterDescriptor() {
|
|
162
|
+
return new vscode.DebugAdapterInlineImplementation(new NornInlineDebugAdapter(this.extensionUri));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.NornDebugAdapterDescriptorFactory = NornDebugAdapterDescriptorFactory;
|
|
166
|
+
//# sourceMappingURL=nornDebugAdapter.js.map
|