ticbuild 1.0.19 → 1.0.21
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/README.md +35 -0
- package/dist/backend/importers/LuaCodeImporter.d.ts +4 -1
- package/dist/backend/importers/LuaCodeImporter.d.ts.map +1 -1
- package/dist/backend/importers/LuaCodeImporter.js +18 -8
- package/dist/backend/importers/LuaCodeImporter.js.map +1 -1
- package/dist/buildInfo.d.ts +4 -4
- package/dist/buildInfo.js +4 -4
- package/dist/frontend/build.d.ts +2 -1
- package/dist/frontend/build.d.ts.map +1 -1
- package/dist/frontend/build.js +66 -2
- package/dist/frontend/build.js.map +1 -1
- package/dist/frontend/buildReporter.d.ts +86 -0
- package/dist/frontend/buildReporter.d.ts.map +1 -0
- package/dist/frontend/buildReporter.js +64 -0
- package/dist/frontend/buildReporter.js.map +1 -0
- package/dist/frontend/buildReporter.test.d.ts +2 -0
- package/dist/frontend/buildReporter.test.d.ts.map +1 -0
- package/dist/frontend/buildReporter.test.js +360 -0
- package/dist/frontend/buildReporter.test.js.map +1 -0
- package/dist/frontend/core.d.ts +2 -1
- package/dist/frontend/core.d.ts.map +1 -1
- package/dist/frontend/core.js +294 -68
- package/dist/frontend/core.js.map +1 -1
- package/dist/frontend/parseOptions.d.ts +1 -0
- package/dist/frontend/parseOptions.d.ts.map +1 -1
- package/dist/frontend/parseOptions.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/console.d.ts +7 -0
- package/dist/utils/console.d.ts.map +1 -1
- package/dist/utils/console.js +32 -9
- package/dist/utils/console.js.map +1 -1
- package/dist/utils/lua/lua_alias_expressions.d.ts +2 -0
- package/dist/utils/lua/lua_alias_expressions.d.ts.map +1 -1
- package/dist/utils/lua/lua_alias_expressions.js +29 -94
- package/dist/utils/lua/lua_alias_expressions.js.map +1 -1
- package/dist/utils/lua/lua_alias_expressions.test.d.ts +2 -0
- package/dist/utils/lua/lua_alias_expressions.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_alias_expressions.test.js +212 -0
- package/dist/utils/lua/lua_alias_expressions.test.js.map +1 -0
- package/dist/utils/lua/lua_alias_literals.d.ts +2 -0
- package/dist/utils/lua/lua_alias_literals.d.ts.map +1 -1
- package/dist/utils/lua/lua_alias_literals.js +12 -79
- package/dist/utils/lua/lua_alias_literals.js.map +1 -1
- package/dist/utils/lua/lua_alias_shared.d.ts +49 -14
- package/dist/utils/lua/lua_alias_shared.d.ts.map +1 -1
- package/dist/utils/lua/lua_alias_shared.js +661 -184
- package/dist/utils/lua/lua_alias_shared.js.map +1 -1
- package/dist/utils/lua/lua_local_budget.test.d.ts +2 -0
- package/dist/utils/lua/lua_local_budget.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_local_budget.test.js +167 -0
- package/dist/utils/lua/lua_local_budget.test.js.map +1 -0
- package/dist/utils/lua/lua_processor.d.ts +6 -0
- package/dist/utils/lua/lua_processor.d.ts.map +1 -1
- package/dist/utils/lua/lua_processor.js +18 -9
- package/dist/utils/lua/lua_processor.js.map +1 -1
- package/dist/utils/lua/lua_processor.test.js +36 -0
- package/dist/utils/lua/lua_processor.test.js.map +1 -1
- package/dist/utils/lua/lua_simplify.d.ts.map +1 -1
- package/dist/utils/lua/lua_simplify.js +5 -1
- package/dist/utils/lua/lua_simplify.js.map +1 -1
- package/package.json +1 -1
- package/templates/help/build.txt +9 -7
package/README.md
CHANGED
|
@@ -114,6 +114,41 @@ ticbuild init
|
|
|
114
114
|
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
## Machine-readable build output
|
|
118
|
+
|
|
119
|
+
`ticbuild build` uses the human-readable reporter by default. Use the JSONL
|
|
120
|
+
reporter when another program needs to consume build messages:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
ticbuild build --reporter jsonl
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Every build also produces `build.jsonl` in the obj dir.
|
|
127
|
+
|
|
128
|
+
The JSONL reporter writes one JSON object per line. Lines look like:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{"version":1,"type":"comment","data":{"message":"Loading imported resources..."}}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
- `version` is the schema/contract version.
|
|
135
|
+
- `type` determines the shape of `data`.
|
|
136
|
+
- `data` contains raw values such as byte counts, durations, resolved paths...
|
|
137
|
+
Human-readable formatting is not part of the JSONL contract.
|
|
138
|
+
|
|
139
|
+
Version 1 defines these message types:
|
|
140
|
+
|
|
141
|
+
- `project.loadedFrom`: resolved source manifest path.
|
|
142
|
+
- `manifest.resolved`: path of the generated resolved manifest.
|
|
143
|
+
- `comment`: display-only text. Readers must not derive build semantics from it.
|
|
144
|
+
- `diagnostic`: a warning or error message.
|
|
145
|
+
- `lua.codeSize`: raw Lua chunk sizes, capacities, and bank usage.
|
|
146
|
+
- `lua.minification`: emitted when Lua's 200-active-local limit causes profitable aliases to be omitted;
|
|
147
|
+
includes the constrained function, peak existing/generated locals, per-rule omissions, and estimated bytes not saved.
|
|
148
|
+
- `cart.usage`: raw emitted-cart chunk and total-size information.
|
|
149
|
+
- `build.completed`: successful terminal message with duration, log path, and cart path.
|
|
150
|
+
- `build.failed`: failed terminal message with the error text.
|
|
151
|
+
|
|
117
152
|
## REPL mode (interactive preprocessing/minification)
|
|
118
153
|
|
|
119
154
|
Interactive Lua processing on the command line, using the same context as
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AliasPassReport } from "../../utils/lua/lua_alias_shared";
|
|
1
2
|
import { Tic80CartChunkTypeKey } from "../../utils/tic80/tic80";
|
|
2
3
|
import { ChunkDataResult, ExternalDependency, ImportedResourceBase, ResourceViewBase } from "../ImportedResourceTypes";
|
|
3
4
|
import { LuaPreprocessResult } from "../luaPreprocessor";
|
|
@@ -7,6 +8,7 @@ export type LuaCodeArtifacts = {
|
|
|
7
8
|
inputSource: string;
|
|
8
9
|
preprocessedSource: string;
|
|
9
10
|
minifiedSource: string;
|
|
11
|
+
minificationReport: AliasPassReport;
|
|
10
12
|
};
|
|
11
13
|
export type LuaCodeSizeStats = {
|
|
12
14
|
inputBytes: number;
|
|
@@ -18,6 +20,7 @@ export declare class LuaCodeResourceView extends ResourceViewBase {
|
|
|
18
20
|
preprocessedSource: string;
|
|
19
21
|
minifyAllowedGlobalNames: string[];
|
|
20
22
|
private cachedMinifiedSource;
|
|
23
|
+
private cachedMinificationReport;
|
|
21
24
|
private cachedCompressedBytes;
|
|
22
25
|
private cachedCompressedSource;
|
|
23
26
|
private cachedCompressionMode;
|
|
@@ -28,7 +31,7 @@ export declare class LuaCodeResourceView extends ResourceViewBase {
|
|
|
28
31
|
getParallelChunkTypes(): Tic80CartChunkTypeKey[];
|
|
29
32
|
getArtifacts(project: TicbuildProjectCore): LuaCodeArtifacts;
|
|
30
33
|
getSizeStats(project: TicbuildProjectCore): LuaCodeSizeStats;
|
|
31
|
-
private
|
|
34
|
+
private getMinifiedResult;
|
|
32
35
|
private getCompressedBytes;
|
|
33
36
|
private injectGlobals;
|
|
34
37
|
private injectMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LuaCodeImporter.d.ts","sourceRoot":"","sources":["../../../src/backend/importers/LuaCodeImporter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LuaCodeImporter.d.ts","sourceRoot":"","sources":["../../../src/backend/importers/LuaCodeImporter.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAA8B,MAAM,kCAAkC,CAAC;AAE/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACvH,OAAO,EAAqB,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAA6C,MAAM,kBAAkB,CAAC;AACpH,OAAO,EA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vD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,mBAAmB,CAAC;gBAGpC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,YAAY,EAAE,MAAM,EAAE,EACtB,gBAAgB,EAAE,mBAAmB;IASvC,IAAI,IAAI,IAAI;IAQZ,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,gBAAgB;IAIhE,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,gBAAgB;IAIhE,OAAO,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,qBAAqB,EAAE;IAUtE,iBAAiB,IAAI,kBAAkB,EAAE;IAQzC,mBAAmB,IAAI,mBAAmB;CAG3C;AAGD,wBAAsB,aAAa,CAAC,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAQlH"}
|
|
@@ -8,6 +8,7 @@ const node_zlib_1 = require("node:zlib");
|
|
|
8
8
|
const zopfli_1 = require("@gfx/zopfli");
|
|
9
9
|
const fileSystem_1 = require("../../utils/fileSystem");
|
|
10
10
|
const lua_fundamentals_1 = require("../../utils/lua/lua_fundamentals");
|
|
11
|
+
const lua_alias_shared_1 = require("../../utils/lua/lua_alias_shared");
|
|
11
12
|
const lua_processor_1 = require("../../utils/lua/lua_processor");
|
|
12
13
|
const utils_1 = require("../../utils/utils");
|
|
13
14
|
const ImportedResourceTypes_1 = require("../ImportedResourceTypes");
|
|
@@ -42,6 +43,7 @@ class LuaCodeResourceView extends ImportedResourceTypes_1.ResourceViewBase {
|
|
|
42
43
|
constructor(inputSource, preprocessedSource, minifyAllowedGlobalNames = []) {
|
|
43
44
|
super();
|
|
44
45
|
this.cachedMinifiedSource = null;
|
|
46
|
+
this.cachedMinificationReport = null;
|
|
45
47
|
this.cachedCompressedBytes = null;
|
|
46
48
|
this.cachedCompressedSource = null;
|
|
47
49
|
this.cachedCompressionMode = null;
|
|
@@ -58,7 +60,7 @@ class LuaCodeResourceView extends ImportedResourceTypes_1.ResourceViewBase {
|
|
|
58
60
|
}
|
|
59
61
|
const minifyEnabled = (0, utils_1.CoalesceBool)(project.manifest.assembly.lua?.minify, true);
|
|
60
62
|
const emitGlobals = options?.emitGlobals !== false;
|
|
61
|
-
const minifiedSource = this.
|
|
63
|
+
const minifiedSource = this.getMinifiedResult(project, minifyEnabled, emitGlobals).source;
|
|
62
64
|
if (chunkType === "CODE_COMPRESSED") {
|
|
63
65
|
const compressionMode = normalizeCompressionMode(options?.compressionMode);
|
|
64
66
|
const compressed = this.getCompressedBytes(minifiedSource, compressionMode);
|
|
@@ -79,11 +81,12 @@ class LuaCodeResourceView extends ImportedResourceTypes_1.ResourceViewBase {
|
|
|
79
81
|
}
|
|
80
82
|
getArtifacts(project) {
|
|
81
83
|
const minifyEnabled = (0, utils_1.CoalesceBool)(project.manifest.assembly.lua?.minify, true);
|
|
82
|
-
const
|
|
84
|
+
const minified = this.getMinifiedResult(project, minifyEnabled, true);
|
|
83
85
|
return {
|
|
84
86
|
inputSource: this.inputSource,
|
|
85
87
|
preprocessedSource: this.preprocessedSource,
|
|
86
|
-
minifiedSource,
|
|
88
|
+
minifiedSource: minified.source,
|
|
89
|
+
minificationReport: minified.report,
|
|
87
90
|
};
|
|
88
91
|
}
|
|
89
92
|
getSizeStats(project) {
|
|
@@ -95,24 +98,31 @@ class LuaCodeResourceView extends ImportedResourceTypes_1.ResourceViewBase {
|
|
|
95
98
|
minifiedBytes: encoder.encode(artifacts.minifiedSource).length,
|
|
96
99
|
};
|
|
97
100
|
}
|
|
98
|
-
|
|
99
|
-
if (this.cachedMinifyEnabled === minifyEnabled &&
|
|
100
|
-
|
|
101
|
+
getMinifiedResult(project, minifyEnabled, emitGlobals) {
|
|
102
|
+
if (this.cachedMinifyEnabled === minifyEnabled &&
|
|
103
|
+
this.cachedMinifiedSource !== null &&
|
|
104
|
+
this.cachedMinificationReport !== null &&
|
|
105
|
+
emitGlobals) {
|
|
106
|
+
return { source: this.cachedMinifiedSource, report: this.cachedMinificationReport };
|
|
101
107
|
}
|
|
102
108
|
let code = emitGlobals ? this.injectGlobals(project, this.preprocessedSource) : this.preprocessedSource;
|
|
109
|
+
let report = (0, lua_alias_shared_1.createEmptyAliasPassReport)();
|
|
103
110
|
if (minifyEnabled) {
|
|
104
111
|
const options = buildMinificationOptions(project.manifest.assembly.lua?.minification, this.minifyAllowedGlobalNames);
|
|
105
|
-
|
|
112
|
+
const processed = (0, lua_processor_1.processLuaWithReport)(code, options);
|
|
113
|
+
code = processed.code;
|
|
114
|
+
report = processed.report;
|
|
106
115
|
}
|
|
107
116
|
code = this.injectMetadata(project, code);
|
|
108
117
|
if (emitGlobals) {
|
|
109
118
|
this.cachedMinifyEnabled = minifyEnabled;
|
|
110
119
|
this.cachedMinifiedSource = code;
|
|
120
|
+
this.cachedMinificationReport = report;
|
|
111
121
|
this.cachedCompressedBytes = null;
|
|
112
122
|
this.cachedCompressedSource = null;
|
|
113
123
|
this.cachedCompressionMode = null;
|
|
114
124
|
}
|
|
115
|
-
return code;
|
|
125
|
+
return { source: code, report };
|
|
116
126
|
}
|
|
117
127
|
getCompressedBytes(minifiedSource, compressionMode) {
|
|
118
128
|
if (this.cachedCompressedBytes &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LuaCodeImporter.js","sourceRoot":"","sources":["../../../src/backend/importers/LuaCodeImporter.ts"],"names":[],"mappings":";AAAA,yBAAyB;AACzB,gCAAgC;;;
|
|
1
|
+
{"version":3,"file":"LuaCodeImporter.js","sourceRoot":"","sources":["../../../src/backend/importers/LuaCodeImporter.ts"],"names":[],"mappings":";AAAA,yBAAyB;AACzB,gCAAgC;;;AA6UhC,sCAQC;AAnVD,yCAAoE;AACpE,wCAA0E;AAC1E,uDAA2D;A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E,gBAAgB,CAAC,CAAC;AACrH,CAAC"}
|
package/dist/buildInfo.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const buildInfo: {
|
|
2
|
-
readonly version: "1.0.
|
|
2
|
+
readonly version: "1.0.21";
|
|
3
3
|
readonly dirty: false;
|
|
4
|
-
readonly buildDate: "2026-07-
|
|
5
|
-
readonly lastCommitDate: "2026-07-
|
|
6
|
-
readonly commitHash: "
|
|
4
|
+
readonly buildDate: "2026-07-30T22:50:34.289Z";
|
|
5
|
+
readonly lastCommitDate: "2026-07-31T00:49:55+02:00";
|
|
6
|
+
readonly commitHash: "8c11ac1";
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=buildInfo.d.ts.map
|
package/dist/buildInfo.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.buildInfo = void 0;
|
|
4
4
|
// Auto-generated by scripts/gen-build-info.js. Do not edit.
|
|
5
5
|
exports.buildInfo = {
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.21",
|
|
7
7
|
"dirty": false,
|
|
8
|
-
"buildDate": "2026-07-
|
|
9
|
-
"lastCommitDate": "2026-07-
|
|
10
|
-
"commitHash": "
|
|
8
|
+
"buildDate": "2026-07-30T22:50:34.289Z",
|
|
9
|
+
"lastCommitDate": "2026-07-31T00:49:55+02:00",
|
|
10
|
+
"commitHash": "8c11ac1"
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=buildInfo.js.map
|
package/dist/frontend/build.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { CommandLineOptions } from "./parseOptions";
|
|
2
|
-
|
|
2
|
+
import { BuildReporter } from "./buildReporter";
|
|
3
|
+
export declare function buildCommand(manifestPath?: string, options?: CommandLineOptions, reporterOverride?: BuildReporter): Promise<void>;
|
|
3
4
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/frontend/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/frontend/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAuB,MAAM,iBAAiB,CAAC;AAOrE,wBAAsB,YAAY,CAChC,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,kBAAkB,EAC5B,gBAAgB,CAAC,EAAE,aAAa,GAC/B,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
package/dist/frontend/build.js
CHANGED
|
@@ -1,8 +1,72 @@
|
|
|
1
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.buildCommand = buildCommand;
|
|
4
37
|
const core_1 = require("./core");
|
|
5
|
-
|
|
6
|
-
|
|
38
|
+
const buildReporter_1 = require("./buildReporter");
|
|
39
|
+
const cons = __importStar(require("../utils/console"));
|
|
40
|
+
function getErrorMessage(error) {
|
|
41
|
+
return error instanceof Error ? error.message : String(error);
|
|
42
|
+
}
|
|
43
|
+
async function buildCommand(manifestPath, options, reporterOverride) {
|
|
44
|
+
let reporter;
|
|
45
|
+
try {
|
|
46
|
+
reporter = reporterOverride ?? (0, buildReporter_1.createBuildReporter)(options?.reporter);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
cons.error(getErrorMessage(error));
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
await (0, core_1.buildCore)(manifestPath, options, reporter);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
const message = getErrorMessage(error);
|
|
58
|
+
// important to output a deterministic msg for machine readers.
|
|
59
|
+
reporter.message({
|
|
60
|
+
type: "build.failed",
|
|
61
|
+
data: {
|
|
62
|
+
message,
|
|
63
|
+
},
|
|
64
|
+
humanReadable: () => {
|
|
65
|
+
cons.error("Build failed:");
|
|
66
|
+
cons.error(message);
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
process.exitCode = 1;
|
|
70
|
+
}
|
|
7
71
|
}
|
|
8
72
|
//# sourceMappingURL=build.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/frontend/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/frontend/build.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,oCA+BC;AAxCD,iCAAmC;AAEnC,mDAAqE;AACrE,uDAAyC;AAEzC,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAEM,KAAK,UAAU,YAAY,CAChC,YAAqB,EACrB,OAA4B,EAC5B,gBAAgC;IAEhC,IAAI,QAAuB,CAAC;IAC5B,IAAI,CAAC;QACH,QAAQ,GAAG,gBAAgB,IAAI,IAAA,mCAAmB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACxE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;QACnC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,IAAA,gBAAS,EAAC,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;QACvC,+DAA+D;QAC/D,QAAQ,CAAC,OAAO,CAAC;YACf,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE;gBACJ,OAAO;aACR;YACD,aAAa,EAAE,GAAG,EAAE;gBAClB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;gBAC5B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACtB,CAAC;SACF,CAAC,CAAC;QACH,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { AliasFunctionReport } from "../utils/lua/lua_alias_shared";
|
|
2
|
+
import type { ConsoleMessageLevel } from "../utils/console";
|
|
3
|
+
export declare const buildReportVersion = 1;
|
|
4
|
+
export declare const buildReportFileName = "build.jsonl";
|
|
5
|
+
export type BuildReporterName = "human" | "jsonl";
|
|
6
|
+
export type BuildDiagnosticSeverity = "warning" | "error";
|
|
7
|
+
export type LuaCodeSizeEntry = {
|
|
8
|
+
chunkType: "CODE" | "CODE_COMPRESSED";
|
|
9
|
+
sizeBytes: number;
|
|
10
|
+
capacityBytes: number;
|
|
11
|
+
banksUsed: number;
|
|
12
|
+
banksAvailable: number;
|
|
13
|
+
compressionMode?: string;
|
|
14
|
+
};
|
|
15
|
+
export type CartChunkUsageEntry = {
|
|
16
|
+
chunkType: string;
|
|
17
|
+
bank: number;
|
|
18
|
+
sizeBytes: number;
|
|
19
|
+
capacityBytes: number | null;
|
|
20
|
+
};
|
|
21
|
+
export type BuildMessageDataByType = {
|
|
22
|
+
"project.loadedFrom": {
|
|
23
|
+
manifestPath: string;
|
|
24
|
+
};
|
|
25
|
+
"manifest.resolved": {
|
|
26
|
+
resolvedManifestPath: string;
|
|
27
|
+
};
|
|
28
|
+
comment: {
|
|
29
|
+
message: string;
|
|
30
|
+
};
|
|
31
|
+
diagnostic: {
|
|
32
|
+
severity: BuildDiagnosticSeverity;
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
"lua.codeSize": {
|
|
36
|
+
importName: string;
|
|
37
|
+
chunks: LuaCodeSizeEntry[];
|
|
38
|
+
};
|
|
39
|
+
"lua.minification": {
|
|
40
|
+
importName: string;
|
|
41
|
+
localLimit: number;
|
|
42
|
+
constrainedFunctions: AliasFunctionReport[];
|
|
43
|
+
};
|
|
44
|
+
"cart.usage": {
|
|
45
|
+
chunks: CartChunkUsageEntry[];
|
|
46
|
+
totalSizeBytes: number;
|
|
47
|
+
};
|
|
48
|
+
"build.completed": {
|
|
49
|
+
durationMs: number;
|
|
50
|
+
logPath: string;
|
|
51
|
+
cartPath: string;
|
|
52
|
+
};
|
|
53
|
+
"build.failed": {
|
|
54
|
+
message: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export type StructuredBuildMessage = {
|
|
58
|
+
[Type in keyof BuildMessageDataByType]: {
|
|
59
|
+
type: Type;
|
|
60
|
+
data: BuildMessageDataByType[Type];
|
|
61
|
+
humanReadable: () => void;
|
|
62
|
+
};
|
|
63
|
+
}[keyof BuildMessageDataByType];
|
|
64
|
+
export type HumanOnlyBuildMessage = {
|
|
65
|
+
type: null;
|
|
66
|
+
humanReadable: () => void;
|
|
67
|
+
};
|
|
68
|
+
export type BuildMessage = StructuredBuildMessage | HumanOnlyBuildMessage;
|
|
69
|
+
export interface BuildReporter {
|
|
70
|
+
readonly name: BuildReporterName;
|
|
71
|
+
message(message: BuildMessage): void;
|
|
72
|
+
}
|
|
73
|
+
export declare class HumanBuildReporter implements BuildReporter {
|
|
74
|
+
readonly name: "human";
|
|
75
|
+
message(message: BuildMessage): void;
|
|
76
|
+
}
|
|
77
|
+
export type JsonlWriter = (line: string) => void;
|
|
78
|
+
export declare class JsonlBuildReporter implements BuildReporter {
|
|
79
|
+
private readonly writeLine;
|
|
80
|
+
readonly name: "jsonl";
|
|
81
|
+
constructor(writeLine?: JsonlWriter);
|
|
82
|
+
message(message: BuildMessage): void;
|
|
83
|
+
}
|
|
84
|
+
export declare function createBuildReporter(name: string | undefined, writeJsonlLine?: JsonlWriter): BuildReporter;
|
|
85
|
+
export declare function reportCapturedConsoleMessage(reporter: BuildReporter, level: ConsoleMessageLevel, message: string): void;
|
|
86
|
+
//# sourceMappingURL=buildReporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildReporter.d.ts","sourceRoot":"","sources":["../../src/frontend/buildReporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,oBAAoB,EAAE;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,mBAAmB,EAAE;QACnB,oBAAoB,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,UAAU,EAAE;QACV,QAAQ,EAAE,uBAAuB,CAAC;QAClC,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,cAAc,EAAE;QACd,UAAU,EAAE,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qBAAa,kBAAmB,YAAW,aAAa;IAG1C,OAAO,CAAC,QAAQ,CAAC,SAAS;IAFtC,QAAQ,CAAC,IAAI,EAAG,OAAO,CAAU;gBAEJ,SAAS,GAAE,WAAyD;IAEjG,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;CAarC;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,cAAc,CAAC,EAAE,WAAW,GAAG,aAAa,CASzG;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,MAAM,GACd,IAAI,CAoBN"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JsonlBuildReporter = exports.HumanBuildReporter = exports.buildReportFileName = exports.buildReportVersion = void 0;
|
|
4
|
+
exports.createBuildReporter = createBuildReporter;
|
|
5
|
+
exports.reportCapturedConsoleMessage = reportCapturedConsoleMessage;
|
|
6
|
+
exports.buildReportVersion = 1;
|
|
7
|
+
exports.buildReportFileName = "build.jsonl";
|
|
8
|
+
class HumanBuildReporter {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.name = "human";
|
|
11
|
+
}
|
|
12
|
+
message(message) {
|
|
13
|
+
message.humanReadable();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.HumanBuildReporter = HumanBuildReporter;
|
|
17
|
+
class JsonlBuildReporter {
|
|
18
|
+
constructor(writeLine = (line) => process.stdout.write(`${line}\n`)) {
|
|
19
|
+
this.writeLine = writeLine;
|
|
20
|
+
this.name = "jsonl";
|
|
21
|
+
}
|
|
22
|
+
message(message) {
|
|
23
|
+
if (message.type === null) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
this.writeLine(JSON.stringify({
|
|
27
|
+
version: exports.buildReportVersion,
|
|
28
|
+
type: message.type,
|
|
29
|
+
data: message.data,
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.JsonlBuildReporter = JsonlBuildReporter;
|
|
34
|
+
function createBuildReporter(name, writeJsonlLine) {
|
|
35
|
+
switch (name ?? "human") {
|
|
36
|
+
case "human":
|
|
37
|
+
return new HumanBuildReporter();
|
|
38
|
+
case "jsonl":
|
|
39
|
+
return new JsonlBuildReporter(writeJsonlLine);
|
|
40
|
+
default:
|
|
41
|
+
throw new Error(`Unsupported build reporter '${name}'. Expected 'human' or 'jsonl'.`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function reportCapturedConsoleMessage(reporter, level, message) {
|
|
45
|
+
if (level === "warning" || level === "error") {
|
|
46
|
+
reporter.message({
|
|
47
|
+
type: "diagnostic",
|
|
48
|
+
data: {
|
|
49
|
+
severity: level,
|
|
50
|
+
message,
|
|
51
|
+
},
|
|
52
|
+
humanReadable: () => undefined,
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
reporter.message({
|
|
57
|
+
type: "comment",
|
|
58
|
+
data: {
|
|
59
|
+
message,
|
|
60
|
+
},
|
|
61
|
+
humanReadable: () => undefined,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=buildReporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildReporter.js","sourceRoot":"","sources":["../../src/frontend/buildReporter.ts"],"names":[],"mappings":";;;AAiHA,kDASC;AAED,oEAwBC;AAjJY,QAAA,kBAAkB,GAAG,CAAC,CAAC;AACvB,QAAA,mBAAmB,GAAG,aAAa,CAAC;AA+EjD,MAAa,kBAAkB;IAA/B;QACW,SAAI,GAAG,OAAgB,CAAC;IAKnC,CAAC;IAHC,OAAO,CAAC,OAAqB;QAC3B,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC;CACF;AAND,gDAMC;AAID,MAAa,kBAAkB;IAG7B,YA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