@cashscript/utils 0.10.3 → 0.10.5
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/dist/artifact.d.ts +3 -3
- package/dist/artifact.js +3 -1
- package/package.json +2 -2
package/dist/artifact.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ export interface AbiFunction {
|
|
|
11
11
|
export interface DebugInformation {
|
|
12
12
|
bytecode: string;
|
|
13
13
|
sourceMap: string;
|
|
14
|
-
logs: LogEntry[];
|
|
15
|
-
requires: RequireStatement[];
|
|
14
|
+
logs: readonly LogEntry[];
|
|
15
|
+
requires: readonly RequireStatement[];
|
|
16
16
|
}
|
|
17
17
|
export interface LogEntry {
|
|
18
18
|
ip: number;
|
|
19
19
|
line: number;
|
|
20
|
-
data:
|
|
20
|
+
data: readonly LogData[];
|
|
21
21
|
}
|
|
22
22
|
export interface StackItem {
|
|
23
23
|
type: string;
|
package/dist/artifact.js
CHANGED
|
@@ -8,7 +8,9 @@ export function exportArtifact(artifact, targetFile, format) {
|
|
|
8
8
|
}
|
|
9
9
|
export function formatArtifact(artifact, format) {
|
|
10
10
|
if (format === 'ts') {
|
|
11
|
-
|
|
11
|
+
// We remove any undefined values to make the artifact serializable using stringifyAsTs
|
|
12
|
+
const normalisedArtifact = JSON.parse(JSON.stringify(artifact));
|
|
13
|
+
return `export default ${stringifyAsTs(normalisedArtifact)} as const;\n`;
|
|
12
14
|
}
|
|
13
15
|
return JSON.stringify(artifact, null, 2);
|
|
14
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cashscript/utils",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"description": "CashScript utilities and types",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitcoin cash",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"jest": "^29.4.1",
|
|
49
49
|
"typescript": "^5.5.4"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "08b93f1457b8b2c54169cfd9ba72004124a65b8e"
|
|
52
52
|
}
|