@typesol/cli 0.45.0 → 0.47.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/CHANGELOG.md +250 -0
- package/README.md +63 -17
- package/SECURITY.md +9 -7
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +9 -0
- package/dist/cli.js +33 -15
- package/dist/compiler/analyze.js +57 -6
- package/dist/compiler/diagnostics.d.ts +4 -3
- package/dist/compiler/diagnostics.js +10 -6
- package/dist/compiler/emit/base.d.ts +1 -1
- package/dist/compiler/emit/calls.js +18 -5
- package/dist/compiler/emit/cpi-core.d.ts +3 -1
- package/dist/compiler/emit/cpi-core.js +8 -4
- package/dist/compiler/emit/expressions.d.ts +14 -0
- package/dist/compiler/emit/expressions.js +52 -4
- package/dist/compiler/emit/shared.d.ts +8 -1
- package/dist/compiler/emit/shared.js +8 -1
- package/dist/compiler/emit/statements.d.ts +8 -3
- package/dist/compiler/emit/statements.js +68 -3
- package/dist/compiler/emit/storage.js +5 -1
- package/dist/compiler/hints.d.ts +7 -0
- package/dist/compiler/hints.js +58 -9
- package/dist/compiler/index.d.ts +5 -0
- package/dist/compiler/index.js +10 -1
- package/dist/compiler/model.js +3 -2
- package/dist/compiler/toolchain.d.ts +50 -2
- package/dist/compiler/toolchain.js +96 -11
- package/dist/idl-coder.d.ts +110 -0
- package/dist/idl-coder.js +529 -0
- package/dist/node-version.d.ts +4 -0
- package/dist/node-version.js +12 -0
- package/dist/testing.d.ts +44 -7
- package/dist/testing.js +30 -19
- package/dist/tools/doctor.d.ts +41 -0
- package/dist/tools/doctor.js +96 -14
- package/dist/workspace.d.ts +9 -2
- package/dist/workspace.js +13 -4
- package/docker/deps/0.46.0.lock.json +1206 -0
- package/docker/deps/0.47.0.lock.json +1206 -0
- package/docs/ai.md +2 -1
- package/docs/architecture.md +7 -3
- package/docs/audit.md +6 -6
- package/docs/case-study-phoenix.md +1 -1
- package/docs/case-study-raydium-amm.md +1 -1
- package/docs/case-study-spl-stake-pool.md +1 -1
- package/docs/cli.md +42 -4
- package/docs/errors.md +22 -8
- package/docs/glossary.md +210 -0
- package/docs/language-accounts.md +499 -0
- package/docs/language-basics.md +389 -0
- package/docs/language-builtins.md +411 -0
- package/docs/language-chain.md +198 -0
- package/docs/language-cpi.md +470 -0
- package/docs/language-errors-events.md +184 -0
- package/docs/language-native.md +493 -0
- package/docs/language-pdas.md +198 -0
- package/docs/language-statements.md +620 -0
- package/docs/language-types.md +601 -0
- package/docs/language.md +190 -467
- package/docs/mainnet.md +18 -3
- package/docs/migrate-from-anchor.md +7 -6
- package/docs/security-model.md +3 -3
- package/docs/stability.md +3 -1
- package/docs/test-your-program.md +54 -15
- package/docs/troubleshooting.md +222 -100
- package/lib/typesol.d.ts +67 -22
- package/llms-full.txt +4920 -638
- package/llms.txt +12 -1
- package/package.json +2 -6
- package/releases/0.45.0.json +732 -0
- package/releases/0.46.0.json +817 -0
- package/ts-plugin/index.js +16 -5
package/ts-plugin/index.js
CHANGED
|
@@ -111,14 +111,25 @@ function init({ typescript: ts }) {
|
|
|
111
111
|
try {
|
|
112
112
|
hint = compiler.typescriptHint(d);
|
|
113
113
|
} catch {
|
|
114
|
-
|
|
114
|
+
hint = undefined;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
// The compiler's message in place of TypeScript's where TypeScript's advice points the wrong way, with a hint
|
|
117
|
+
// or without one (`window`, `document`), as the CLI prints it (older packages have no typescriptMessage:
|
|
118
|
+
// TypeScript's message stays).
|
|
119
|
+
let own;
|
|
120
|
+
try {
|
|
121
|
+
own = compiler.typescriptMessage && compiler.typescriptMessage(d);
|
|
122
|
+
} catch {
|
|
123
|
+
own = undefined;
|
|
124
|
+
}
|
|
125
|
+
if (!hint && !own) return d;
|
|
126
|
+
const base = own || d.messageText;
|
|
127
|
+
if (!hint) return { ...d, messageText: base };
|
|
117
128
|
const text = `hint: ${hint}`;
|
|
118
129
|
const messageText =
|
|
119
|
-
typeof
|
|
120
|
-
? `${
|
|
121
|
-
: { ...
|
|
130
|
+
typeof base === "string"
|
|
131
|
+
? `${base}\n${text}`
|
|
132
|
+
: { ...base, next: [...(base.next || []), { messageText: text, category: d.category, code: d.code, next: undefined }] };
|
|
122
133
|
return { ...d, messageText };
|
|
123
134
|
});
|
|
124
135
|
}
|