eliscript 0.0.1
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/LICENSE +674 -0
- package/README.md +135 -0
- package/bin/eliscript +16 -0
- package/bin/eliscript-bootstrap +15 -0
- package/bin/eliscript-build +15 -0
- package/bin/eliscript-check +15 -0
- package/bin/eliscript-eval +15 -0
- package/bin/eliscript-format +15 -0
- package/bin/eliscript-org +10 -0
- package/bin/eliscript-portable +17 -0
- package/bin/eliscript-seed +10 -0
- package/bin/eliscript-seed-build +10 -0
- package/bin/eliscript-watch +15 -0
- package/bootstrap/README.md +100 -0
- package/bootstrap/compiler/analyzer.eli +1426 -0
- package/bootstrap/compiler/compiler.eli +472 -0
- package/bootstrap/compiler/emitter.eli +1745 -0
- package/bootstrap/compiler/expander.eli +2522 -0
- package/bootstrap/compiler/formatter.eli +359 -0
- package/bootstrap/compiler/ir.eli +297 -0
- package/bootstrap/compiler/lower.eli +661 -0
- package/bootstrap/compiler/project.eli +1120 -0
- package/bootstrap/compiler/reader.eli +321 -0
- package/bootstrap/compiler/source-map.eli +165 -0
- package/bootstrap/compiler/symbol.eli +92 -0
- package/bootstrap/compiler/syntax.eli +54 -0
- package/bootstrap/compiler/transient-analysis.eli +825 -0
- package/bootstrap/host/build.mjs +28 -0
- package/bootstrap/host/bun.mjs +282 -0
- package/bootstrap/host/check-cli.mjs +163 -0
- package/bootstrap/host/eliscript-cli.mjs +36 -0
- package/bootstrap/host/evaluation-cli.mjs +401 -0
- package/bootstrap/host/evaluation.mjs +560 -0
- package/bootstrap/host/format-cli.mjs +139 -0
- package/bootstrap/host/project-cli.mjs +295 -0
- package/bootstrap/host/project.mjs +1080 -0
- package/bootstrap/host/watch-cli.mjs +129 -0
- package/bootstrap/host/watch.mjs +267 -0
- package/browser/host.mjs +357 -0
- package/browser/worker.mjs +60 -0
- package/compiler/README.md +118 -0
- package/compiler/eliscript-analyzer.el +716 -0
- package/compiler/eliscript-cli.el +108 -0
- package/compiler/eliscript-diagnostic.el +158 -0
- package/compiler/eliscript-emitter.el +1351 -0
- package/compiler/eliscript-evaluation.el +259 -0
- package/compiler/eliscript-expander.el +1630 -0
- package/compiler/eliscript-form.el +79 -0
- package/compiler/eliscript-ir-emitter.el +1460 -0
- package/compiler/eliscript-ir.el +356 -0
- package/compiler/eliscript-lower.el +463 -0
- package/compiler/eliscript-macro-eval.el +811 -0
- package/compiler/eliscript-parameters.el +324 -0
- package/compiler/eliscript-portable.el +492 -0
- package/compiler/eliscript-project-cli.el +156 -0
- package/compiler/eliscript-project.el +1676 -0
- package/compiler/eliscript-reader.el +421 -0
- package/compiler/eliscript-source-map.el +192 -0
- package/compiler/eliscript-symbol.el +101 -0
- package/compiler/eliscript-transient-analysis.el +817 -0
- package/compiler/eliscript.el +239 -0
- package/dist/bootstrap/analyzer.mjs +968 -0
- package/dist/bootstrap/analyzer.mjs.map +1 -0
- package/dist/bootstrap/compiler.mjs +228 -0
- package/dist/bootstrap/compiler.mjs.map +1 -0
- package/dist/bootstrap/emitter.mjs +1173 -0
- package/dist/bootstrap/emitter.mjs.map +1 -0
- package/dist/bootstrap/expander.mjs +1469 -0
- package/dist/bootstrap/expander.mjs.map +1 -0
- package/dist/bootstrap/formatter.mjs +304 -0
- package/dist/bootstrap/formatter.mjs.map +1 -0
- package/dist/bootstrap/ir.mjs +193 -0
- package/dist/bootstrap/ir.mjs.map +1 -0
- package/dist/bootstrap/lower.mjs +344 -0
- package/dist/bootstrap/lower.mjs.map +1 -0
- package/dist/bootstrap/project.mjs +585 -0
- package/dist/bootstrap/project.mjs.map +1 -0
- package/dist/bootstrap/reader.mjs +259 -0
- package/dist/bootstrap/reader.mjs.map +1 -0
- package/dist/bootstrap/source-map.mjs +154 -0
- package/dist/bootstrap/source-map.mjs.map +1 -0
- package/dist/bootstrap/symbol.mjs +74 -0
- package/dist/bootstrap/symbol.mjs.map +1 -0
- package/dist/bootstrap/syntax.mjs +38 -0
- package/dist/bootstrap/syntax.mjs.map +1 -0
- package/dist/bootstrap/transient-analysis.mjs +660 -0
- package/dist/bootstrap/transient-analysis.mjs.map +1 -0
- package/dist/browser/compiler.js +6491 -0
- package/editor/README.md +83 -0
- package/editor/eliscript-mode.el +878 -0
- package/editor/eliscript-repl.el +501 -0
- package/package.json +163 -0
- package/platform/README.md +48 -0
- package/platform/browser.mjs +204 -0
- package/platform/worker.mjs +166 -0
- package/runtime/README.md +296 -0
- package/runtime/core/collection-internals.mjs +512 -0
- package/runtime/core/collection.mjs +645 -0
- package/runtime/core/data-text.mjs +532 -0
- package/runtime/core/data.mjs +268 -0
- package/runtime/core/identifier.mjs +314 -0
- package/runtime/core/lazy-sequence.mjs +244 -0
- package/runtime/core/list-internals.mjs +18 -0
- package/runtime/core/list.mjs +273 -0
- package/runtime/core/map-internals.mjs +793 -0
- package/runtime/core/map.mjs +394 -0
- package/runtime/core/metadata-internals.mjs +14 -0
- package/runtime/core/metadata.mjs +44 -0
- package/runtime/core/object-impl.mjs +65 -0
- package/runtime/core/object-impl.mjs.map +1 -0
- package/runtime/core/object.mjs +13 -0
- package/runtime/core/order.mjs +234 -0
- package/runtime/core/persistent-kind.mjs +43 -0
- package/runtime/core/protocol-error.mjs +36 -0
- package/runtime/core/protocol-impl.mjs +326 -0
- package/runtime/core/protocol-impl.mjs.map +1 -0
- package/runtime/core/protocol.mjs +14 -0
- package/runtime/core/queue-internals.mjs +27 -0
- package/runtime/core/queue.mjs +238 -0
- package/runtime/core/record.mjs +346 -0
- package/runtime/core/regex.mjs +184 -0
- package/runtime/core/sequence.mjs +632 -0
- package/runtime/core/set-algebra.mjs +287 -0
- package/runtime/core/set-internals.mjs +33 -0
- package/runtime/core/set.mjs +378 -0
- package/runtime/core/sorted-internals.mjs +215 -0
- package/runtime/core/sorted.mjs +598 -0
- package/runtime/core/text-impl.mjs +95 -0
- package/runtime/core/text-impl.mjs.map +1 -0
- package/runtime/core/text.mjs +15 -0
- package/runtime/core/transducer.mjs +668 -0
- package/runtime/core/transient-internals.mjs +38 -0
- package/runtime/core/transient.mjs +53 -0
- package/runtime/core/truth.mjs +3 -0
- package/runtime/core/type.mjs +262 -0
- package/runtime/core/value-internals.mjs +188 -0
- package/runtime/core/value.mjs +93 -0
- package/runtime/core/vector-internals.mjs +102 -0
- package/runtime/core/vector.mjs +951 -0
- package/runtime/literals.mjs +34 -0
- package/runtime/source-mapping.mjs +220 -0
- package/runtime/testing/list.mjs +52 -0
- package/runtime/testing/map.mjs +145 -0
- package/runtime/testing/queue.mjs +49 -0
- package/runtime/testing/set.mjs +61 -0
- package/runtime/testing/sorted.mjs +105 -0
- package/runtime/testing/value.mjs +17 -0
- package/runtime/testing/vector.mjs +102 -0
- package/runtime/worker-value-codec.mjs +565 -0
- package/runtime/worker-value-stream.mjs +786 -0
- package/runtime/worker.mjs +975 -0
- package/stdlib/README.md +774 -0
- package/stdlib/bit.eli +36 -0
- package/stdlib/core/collection.eli +134 -0
- package/stdlib/core/data-text.eli +16 -0
- package/stdlib/core/data.eli +306 -0
- package/stdlib/core/identifier.eli +32 -0
- package/stdlib/core/lazy-sequence.eli +63 -0
- package/stdlib/core/metadata.eli +20 -0
- package/stdlib/core/object.eli +89 -0
- package/stdlib/core/order.eli +133 -0
- package/stdlib/core/protocol.eli +387 -0
- package/stdlib/core/record.eli +16 -0
- package/stdlib/core/regex.eli +17 -0
- package/stdlib/core/seq.eli +701 -0
- package/stdlib/core/set.eli +312 -0
- package/stdlib/core/sorted.eli +53 -0
- package/stdlib/core/text.eli +103 -0
- package/stdlib/core/transducer.eli +59 -0
- package/stdlib/core/transient.eli +24 -0
- package/stdlib/core/type.eli +19 -0
- package/stdlib/core/walk.eli +195 -0
- package/stdlib/core/zipper.eli +508 -0
- package/stdlib/data-text.eli +1092 -0
- package/stdlib/data.eli +42 -0
- package/stdlib/deferred.eli +70 -0
- package/stdlib/function.eli +120 -0
- package/stdlib/hierarchy.eli +245 -0
- package/stdlib/identifier.eli +147 -0
- package/stdlib/interop/js.eli +616 -0
- package/stdlib/json.eli +870 -0
- package/stdlib/metadata.eli +56 -0
- package/stdlib/multimethod.eli +464 -0
- package/stdlib/numeric.eli +193 -0
- package/stdlib/object.eli +96 -0
- package/stdlib/persistent-list.eli +145 -0
- package/stdlib/persistent-map.eli +724 -0
- package/stdlib/persistent-queue.eli +32 -0
- package/stdlib/persistent-set.eli +236 -0
- package/stdlib/persistent-vector.eli +342 -0
- package/stdlib/result.eli +141 -0
- package/stdlib/sequence.eli +106 -0
- package/stdlib/state/atom.eli +265 -0
- package/stdlib/text.eli +88 -0
- package/stdlib/value.eli +325 -0
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
3
|
+
|
|
4
|
+
const project_plan_format = "eliscript-project-plan";
|
|
5
|
+
const project_plan_version = 1;
|
|
6
|
+
const project_plan_max_iterations = 100000;
|
|
7
|
+
const project_build_report_format = "eliscript-build-report";
|
|
8
|
+
const project_build_report_version = 1;
|
|
9
|
+
const project_build_report_multi_version = 2;
|
|
10
|
+
const project_request_format = "eliscript-project-request";
|
|
11
|
+
const project_request_version = 1;
|
|
12
|
+
const project_request_multi_version = 2;
|
|
13
|
+
const project_configuration_version = 1;
|
|
14
|
+
const project_configuration_multi_version = 2;
|
|
15
|
+
const build_operation_format = "eliscript-build-operation";
|
|
16
|
+
const build_operation_version = 1;
|
|
17
|
+
const build_operation_multi_version = 2;
|
|
18
|
+
const check_operation_format = "eliscript-check-operation";
|
|
19
|
+
const check_operation_version = 1;
|
|
20
|
+
const project_check_report_format = "eliscript-check-report";
|
|
21
|
+
const project_check_report_version = 1;
|
|
22
|
+
const project_cache_format = "eliscript-project-cache";
|
|
23
|
+
const project_cache_version = 2;
|
|
24
|
+
const project_cache_legacy_version = 1;
|
|
25
|
+
const fail = (message) => { const error = new Error(message); error.eliscriptDiagnostic = { format: 'eliscript-diagnostic', version: 1, code: 'ELI-B0003', severity: 'error', phase: 'project-plan', message }; throw error; };
|
|
26
|
+
const array_p = Array.isArray;
|
|
27
|
+
const object_p = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
28
|
+
const sorted_set_values = (values) => Array.from(values).sort();
|
|
29
|
+
const nonnegative_number_p = (value) => typeof value === 'number' && Number.isFinite(value) && value >= 0;
|
|
30
|
+
const boolean_p = (value) => typeof value === 'boolean';
|
|
31
|
+
const safe_relative_path_p = (value) => typeof value === 'string' && value.length > 0 && !/^(?:[\\/]|[A-Za-z]:[\\/])/.test(value) && !value.split(/[\\/]+/u).includes('..');
|
|
32
|
+
const project_request_fail = (message) => { const error = new Error(message); error.eliscriptDiagnostic = { format: 'eliscript-diagnostic', version: 1, code: 'ELI-B0001', severity: 'error', phase: 'project-build', message }; throw error; };
|
|
33
|
+
const project_configuration_fail = (message, filename) => { const error = new Error(message); error.eliscriptDiagnostic = { format: 'eliscript-diagnostic', version: 1, code: 'ELI-B0002', severity: 'error', phase: 'project-config', message, ...(filename ? { location: { file: filename } } : {}) }; throw error; };
|
|
34
|
+
const project_configuration_keys_v1 = ["schemaVersion", "sourceRoot", "entry", "outDir", "portableEntries", "macroCapabilities", "macroFileDependencies", "cache"];
|
|
35
|
+
const project_configuration_keys_v2 = ["schemaVersion", "sourceRoot", "entries", "outDir", "portableEntries", "macroCapabilities", "macroFileDependencies", "cache"];
|
|
36
|
+
const supported_macro_capabilities = ["read-file"];
|
|
37
|
+
function require_string(value, label) {
|
|
38
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_1) => (__eliscript_truthy(__eliscript_value_1) ? ((value)["length"] > 0) : __eliscript_value_1))((typeof value === "string"))))) ? fail((String(label) + String(" must be a non-empty string"))) : null);
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
function report_milliseconds(value, label) {
|
|
42
|
+
(__eliscript_truthy((!__eliscript_truthy(nonnegative_number_p(value)))) ? fail((String(label) + String(" must be a non-negative finite number"))) : null);
|
|
43
|
+
return ((globalThis.Math)["round"]((value * 1000)) / 1000);
|
|
44
|
+
}
|
|
45
|
+
function same_string_arrays(left, right) {
|
|
46
|
+
return ((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? ((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? ((index, same) => {
|
|
47
|
+
(() => {
|
|
48
|
+
while (__eliscript_truthy(((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? (index < (left)["length"]) : __eliscript_value_5))(same))) {
|
|
49
|
+
(__eliscript_truthy((!__eliscript_truthy((((((left) ?? [])[index]) ?? null) === ((((right) ?? [])[index]) ?? null))))) ? ((same = false)) : null);
|
|
50
|
+
((index = (index + 1)));
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
})();
|
|
54
|
+
return same;
|
|
55
|
+
})(0, true) : __eliscript_value_4))(((left)["length"] === (right)["length"])) : __eliscript_value_3))(array_p(right)) : __eliscript_value_2))(array_p(left));
|
|
56
|
+
}
|
|
57
|
+
function normalize_strings(values, label, require_entry) {
|
|
58
|
+
(__eliscript_truthy((!__eliscript_truthy(array_p(values)))) ? fail((String(label) + String(" must be an array"))) : null);
|
|
59
|
+
return ((seen, result) => {
|
|
60
|
+
(values)["forEach"]((value) => {
|
|
61
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? ((value)["length"] > 0) : __eliscript_value_6))((typeof value === "string"))))) ? fail((String(label) + String(" must contain only non-empty strings"))) : null);
|
|
62
|
+
return (__eliscript_truthy((!__eliscript_truthy((seen)["has"](value)))) ? (() => {
|
|
63
|
+
(seen)["add"](value);
|
|
64
|
+
return (result)["push"](value);
|
|
65
|
+
})() : null);
|
|
66
|
+
});
|
|
67
|
+
(__eliscript_truthy(((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ((result)["length"] === 0) : __eliscript_value_7))(require_entry)) ? fail((String(label) + String(" must not be empty"))) : null);
|
|
68
|
+
(result)["sort"]();
|
|
69
|
+
return result;
|
|
70
|
+
})(new globalThis.Set(), []);
|
|
71
|
+
}
|
|
72
|
+
function object_field(object, key, fallback) {
|
|
73
|
+
return (__eliscript_truthy((globalThis.Object)["hasOwn"](object, key)) ? (object)[key] : fallback);
|
|
74
|
+
}
|
|
75
|
+
function project_request(input) {
|
|
76
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(input)))) ? project_request_fail("project request must be an object") : null);
|
|
77
|
+
return ((entry) => {
|
|
78
|
+
return ((entries_input) => {
|
|
79
|
+
return ((multi) => {
|
|
80
|
+
return ((out_dir) => {
|
|
81
|
+
return ((root) => {
|
|
82
|
+
return ((portable_input) => {
|
|
83
|
+
return ((portable_entries) => {
|
|
84
|
+
return ((macro_capabilities_input) => {
|
|
85
|
+
return ((macro_file_dependencies_input) => {
|
|
86
|
+
return ((macro_capabilities) => {
|
|
87
|
+
return ((macro_file_dependencies) => {
|
|
88
|
+
return ((use_cache) => {
|
|
89
|
+
return (() => {
|
|
90
|
+
(__eliscript_truthy((!__eliscript_truthy(((macro_capabilities)["length"] === (macro_capabilities_input)["length"])))) ? project_request_fail("project request macro capabilities must not contain duplicates") : null);
|
|
91
|
+
(macro_capabilities)["forEach"]((capability) => {
|
|
92
|
+
return (__eliscript_truthy((!__eliscript_truthy((supported_macro_capabilities)["includes"](capability)))) ? project_request_fail((String("unsupported macro capability: ") + String(capability))) : null);
|
|
93
|
+
});
|
|
94
|
+
(__eliscript_truthy((!__eliscript_truthy(((macro_file_dependencies)["length"] === (macro_file_dependencies_input)["length"])))) ? project_request_fail("project request macro file dependencies must not contain duplicates") : null);
|
|
95
|
+
(macro_file_dependencies)["forEach"]((dependency) => {
|
|
96
|
+
return (__eliscript_truthy((!__eliscript_truthy(safe_relative_path_p(dependency)))) ? project_request_fail("project request macro file dependencies are invalid") : null);
|
|
97
|
+
});
|
|
98
|
+
(__eliscript_truthy(((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? (!__eliscript_truthy((macro_capabilities)["includes"]("read-file"))) : __eliscript_value_10))(((macro_file_dependencies)["length"] > 0))) ? project_request_fail("macro file dependencies require the read-file macro capability") : null);
|
|
99
|
+
(__eliscript_truthy(((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? (!__eliscript_truthy((entry === undefined))) : __eliscript_value_11))(multi)) ? project_request_fail("project request cannot contain entry and entries") : null);
|
|
100
|
+
(__eliscript_truthy(multi) ? (__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? (entries_input)["every"]((source) => {
|
|
101
|
+
return ((__eliscript_value_14) => (__eliscript_truthy(__eliscript_value_14) ? ((source)["length"] > 0) : __eliscript_value_14))((typeof source === "string"));
|
|
102
|
+
}) : __eliscript_value_13))(((entries_input)["length"] > 0)) : __eliscript_value_12))(array_p(entries_input))))) ? project_request_fail("project request entries must be a non-empty string array") : null) : null);
|
|
103
|
+
return ((entries) => {
|
|
104
|
+
(__eliscript_truthy(((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? (!__eliscript_truthy(((entries)["length"] === (entries_input)["length"]))) : __eliscript_value_16))(multi)) ? project_request_fail("project request entries must not contain duplicates") : null);
|
|
105
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_17) => (__eliscript_truthy(__eliscript_value_17) ? ((out_dir)["length"] > 0) : __eliscript_value_17))((typeof out_dir === "string"))))) ? project_request_fail("project request output is invalid") : null);
|
|
106
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? __eliscript_value_18 : ((__eliscript_value_19) => (__eliscript_truthy(__eliscript_value_19) ? ((root)["length"] > 0) : __eliscript_value_19))((typeof root === "string"))))((root === null))))) ? project_request_fail("project request root is invalid") : null);
|
|
107
|
+
(__eliscript_truthy((!__eliscript_truthy(boolean_p(use_cache)))) ? project_request_fail("project request cache is invalid") : null);
|
|
108
|
+
(__eliscript_truthy(((__eliscript_value_20) => (__eliscript_truthy(__eliscript_value_20) ? ((__eliscript_value_21) => (__eliscript_truthy(__eliscript_value_21) ? ((portable_entries)["length"] > 0) : __eliscript_value_21))(((entries)["length"] > 1)) : __eliscript_value_20))(multi)) ? project_request_fail("multi-entry portable project requests are not supported") : null);
|
|
109
|
+
(globalThis.Object)["freeze"](portable_entries);
|
|
110
|
+
(globalThis.Object)["freeze"](macro_capabilities);
|
|
111
|
+
(globalThis.Object)["freeze"](macro_file_dependencies);
|
|
112
|
+
(globalThis.Object)["freeze"](entries);
|
|
113
|
+
return (__eliscript_truthy(multi) ? (globalThis.Object)["freeze"](({"format": project_request_format, "version": project_request_multi_version, "entries": entries, "outDir": out_dir, "root": root, "portableEntries": portable_entries, "macroCapabilities": macro_capabilities, "macroFileDependencies": macro_file_dependencies, "useCache": use_cache})) : (globalThis.Object)["freeze"](({"format": project_request_format, "version": project_request_version, "entry": entry, "outDir": out_dir, "root": root, "portableEntries": portable_entries, "macroCapabilities": macro_capabilities, "macroFileDependencies": macro_file_dependencies, "useCache": use_cache})));
|
|
114
|
+
})((__eliscript_truthy(multi) ? normalize_strings(entries_input, "project request entries", true) : (() => {
|
|
115
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? ((entry)["length"] > 0) : __eliscript_value_15))((typeof entry === "string"))))) ? project_request_fail("project request entry is invalid") : null);
|
|
116
|
+
return [entry];
|
|
117
|
+
})()));
|
|
118
|
+
})();
|
|
119
|
+
})((input)["useCache"]);
|
|
120
|
+
})(normalize_strings(macro_file_dependencies_input, "project request macro file dependencies", false));
|
|
121
|
+
})(normalize_strings(macro_capabilities_input, "project request macro capabilities", false));
|
|
122
|
+
})(object_field(input, "macroFileDependencies", []));
|
|
123
|
+
})(object_field(input, "macroCapabilities", []));
|
|
124
|
+
})((() => {
|
|
125
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? (portable_input)["every"]((name) => {
|
|
126
|
+
return ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? ((name)["length"] > 0) : __eliscript_value_9))((typeof name === "string"));
|
|
127
|
+
}) : __eliscript_value_8))(array_p(portable_input))))) ? project_request_fail("project request portable entries are invalid") : null);
|
|
128
|
+
return normalize_strings(portable_input, "project request portable entries", false);
|
|
129
|
+
})());
|
|
130
|
+
})((input)["portableEntries"]);
|
|
131
|
+
})((input)["root"]);
|
|
132
|
+
})((input)["outDir"]);
|
|
133
|
+
})((!__eliscript_truthy((entries_input === undefined))));
|
|
134
|
+
})((input)["entries"]);
|
|
135
|
+
})((input)["entry"]);
|
|
136
|
+
}
|
|
137
|
+
function build_operation_request(input) {
|
|
138
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(input)))) ? project_request_fail("build operation request must be an object") : null);
|
|
139
|
+
return ((mode) => {
|
|
140
|
+
return (__eliscript_truthy((mode === "single")) ? ((source_input) => {
|
|
141
|
+
return ((raw_output) => {
|
|
142
|
+
return ((output) => {
|
|
143
|
+
return ((source_map) => {
|
|
144
|
+
return ((portable_input) => {
|
|
145
|
+
return (() => {
|
|
146
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_22) => (__eliscript_truthy(__eliscript_value_22) ? ((source_input)["length"] > 0) : __eliscript_value_22))((typeof source_input === "string"))))) ? project_request_fail("single-file input is invalid") : null);
|
|
147
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_23) => (__eliscript_truthy(__eliscript_value_23) ? __eliscript_value_23 : ((__eliscript_value_24) => (__eliscript_truthy(__eliscript_value_24) ? ((output)["length"] > 0) : __eliscript_value_24))((typeof output === "string"))))((output === null))))) ? project_request_fail("single-file output is invalid") : null);
|
|
148
|
+
(__eliscript_truthy((!__eliscript_truthy(boolean_p(source_map)))) ? project_request_fail("single-file source-map option is invalid") : null);
|
|
149
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_25) => (__eliscript_truthy(__eliscript_value_25) ? (portable_input)["every"]((name) => {
|
|
150
|
+
return ((__eliscript_value_26) => (__eliscript_truthy(__eliscript_value_26) ? ((name)["length"] > 0) : __eliscript_value_26))((typeof name === "string"));
|
|
151
|
+
}) : __eliscript_value_25))(array_p(portable_input))))) ? project_request_fail("single-file portable entries are invalid") : null);
|
|
152
|
+
(__eliscript_truthy(((__eliscript_value_27) => (__eliscript_truthy(__eliscript_value_27) ? (output === null) : __eliscript_value_27))(source_map)) ? project_request_fail("single-file source maps require an output") : null);
|
|
153
|
+
return ((portable_entries) => {
|
|
154
|
+
(globalThis.Object)["freeze"](portable_entries);
|
|
155
|
+
return (globalThis.Object)["freeze"](({"format": build_operation_format, "version": build_operation_version, "mode": "single", "input": source_input, "output": output, "sourceMap": source_map, "portableEntries": portable_entries}));
|
|
156
|
+
})(normalize_strings(portable_input, "single-file portable entries", false));
|
|
157
|
+
})();
|
|
158
|
+
})(object_field(input, "portableEntries", []));
|
|
159
|
+
})(object_field(input, "sourceMap", false));
|
|
160
|
+
})((__eliscript_truthy(raw_output === undefined) ? null : raw_output));
|
|
161
|
+
})(object_field(input, "output", undefined));
|
|
162
|
+
})(object_field(input, "input", undefined)) : (__eliscript_truthy((mode === "project")) ? ((request) => {
|
|
163
|
+
return (__eliscript_truthy(((request)["version"] === project_request_multi_version)) ? (globalThis.Object)["freeze"](({"format": build_operation_format, "version": build_operation_multi_version, "mode": "project", "entries": (request)["entries"], "outDir": (request)["outDir"], "root": (request)["root"], "portableEntries": (request)["portableEntries"], "macroCapabilities": (request)["macroCapabilities"], "macroFileDependencies": (request)["macroFileDependencies"], "useCache": (request)["useCache"]})) : (globalThis.Object)["freeze"](({"format": build_operation_format, "version": build_operation_version, "mode": "project", "entry": (request)["entry"], "outDir": (request)["outDir"], "root": (request)["root"], "portableEntries": (request)["portableEntries"], "macroCapabilities": (request)["macroCapabilities"], "macroFileDependencies": (request)["macroFileDependencies"], "useCache": (request)["useCache"]})));
|
|
164
|
+
})(project_request(input)) : project_request_fail("unsupported build operation mode")));
|
|
165
|
+
})((input)["mode"]);
|
|
166
|
+
}
|
|
167
|
+
function check_operation_request(input) {
|
|
168
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(input)))) ? project_request_fail("check operation request must be an object") : null);
|
|
169
|
+
return ((request) => {
|
|
170
|
+
return ((entries) => {
|
|
171
|
+
return (() => {
|
|
172
|
+
(globalThis.Object)["freeze"](entries);
|
|
173
|
+
return (globalThis.Object)["freeze"](({"format": check_operation_format, "version": check_operation_version, "mode": "project", "entries": entries, "root": (request)["root"], "portableEntries": (request)["portableEntries"], "macroCapabilities": (request)["macroCapabilities"], "macroFileDependencies": (request)["macroFileDependencies"]}));
|
|
174
|
+
})();
|
|
175
|
+
})((__eliscript_truthy(((request)["version"] === project_request_multi_version)) ? (request)["entries"] : [(request)["entry"]]));
|
|
176
|
+
})(project_request(({"entry": (input)["entry"], "entries": (input)["entries"], "outDir": ".", "root": object_field(input, "root", null), "portableEntries": object_field(input, "portableEntries", []), "macroCapabilities": object_field(input, "macroCapabilities", []), "macroFileDependencies": object_field(input, "macroFileDependencies", []), "useCache": false})));
|
|
177
|
+
}
|
|
178
|
+
function project_configuration(input, filename) {
|
|
179
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(input)))) ? project_configuration_fail("configuration root must be an object", filename) : null);
|
|
180
|
+
((schema_version) => {
|
|
181
|
+
return ((configuration_keys) => {
|
|
182
|
+
return ((unknown) => {
|
|
183
|
+
((globalThis.Object)["keys"](input))["forEach"]((key) => {
|
|
184
|
+
return (__eliscript_truthy((!__eliscript_truthy((configuration_keys)["includes"](key)))) ? (unknown)["push"](key) : null);
|
|
185
|
+
});
|
|
186
|
+
(unknown)["sort"]();
|
|
187
|
+
return (__eliscript_truthy(((unknown)["length"] > 0)) ? project_configuration_fail((String("unknown configuration key: ") + String(((((unknown) ?? [])[0]) ?? null))), filename) : null);
|
|
188
|
+
})([]);
|
|
189
|
+
})((__eliscript_truthy((schema_version === project_configuration_version)) ? project_configuration_keys_v1 : (__eliscript_truthy((schema_version === project_configuration_multi_version)) ? project_configuration_keys_v2 : project_configuration_fail((String("unsupported schemaVersion: ") + String(schema_version)), filename))));
|
|
190
|
+
})(object_field(input, "schemaVersion", undefined));
|
|
191
|
+
return ((schema_version) => {
|
|
192
|
+
return ((source_root) => {
|
|
193
|
+
return ((entry) => {
|
|
194
|
+
return ((entries_input) => {
|
|
195
|
+
return ((out_dir) => {
|
|
196
|
+
return ((portable_input) => {
|
|
197
|
+
return ((macro_capabilities_input) => {
|
|
198
|
+
return ((macro_file_dependencies_input) => {
|
|
199
|
+
return ((cache) => {
|
|
200
|
+
return (() => {
|
|
201
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_28) => (__eliscript_truthy(__eliscript_value_28) ? (portable_input)["every"]((name) => {
|
|
202
|
+
return ((__eliscript_value_29) => (__eliscript_truthy(__eliscript_value_29) ? ((name)["length"] > 0) : __eliscript_value_29))((typeof name === "string"));
|
|
203
|
+
}) : __eliscript_value_28))(array_p(portable_input))))) ? project_configuration_fail("portableEntries must be an array of non-empty strings", filename) : null);
|
|
204
|
+
return ((portable_entries) => {
|
|
205
|
+
return ((macro_capabilities) => {
|
|
206
|
+
return ((macro_file_dependencies) => {
|
|
207
|
+
return ((entries) => {
|
|
208
|
+
return (() => {
|
|
209
|
+
(__eliscript_truthy((!__eliscript_truthy(((portable_entries)["length"] === (portable_input)["length"])))) ? project_configuration_fail("portableEntries must not contain duplicates", filename) : null);
|
|
210
|
+
(__eliscript_truthy((!__eliscript_truthy(((macro_capabilities)["length"] === (macro_capabilities_input)["length"])))) ? project_configuration_fail("macroCapabilities must not contain duplicates", filename) : null);
|
|
211
|
+
(macro_capabilities)["forEach"]((capability) => {
|
|
212
|
+
return (__eliscript_truthy((!__eliscript_truthy((supported_macro_capabilities)["includes"](capability)))) ? project_configuration_fail((String("unsupported macro capability: ") + String(capability)), filename) : null);
|
|
213
|
+
});
|
|
214
|
+
(__eliscript_truthy((!__eliscript_truthy(((macro_file_dependencies)["length"] === (macro_file_dependencies_input)["length"])))) ? project_configuration_fail("macroFileDependencies must not contain duplicates", filename) : null);
|
|
215
|
+
(macro_file_dependencies)["forEach"]((dependency) => {
|
|
216
|
+
return (__eliscript_truthy((!__eliscript_truthy(safe_relative_path_p(dependency)))) ? project_configuration_fail("macroFileDependencies must contain only contained relative paths", filename) : null);
|
|
217
|
+
});
|
|
218
|
+
(__eliscript_truthy(((__eliscript_value_33) => (__eliscript_truthy(__eliscript_value_33) ? (!__eliscript_truthy((macro_capabilities)["includes"]("read-file"))) : __eliscript_value_33))(((macro_file_dependencies)["length"] > 0))) ? project_configuration_fail("macroFileDependencies require the read-file macro capability", filename) : null);
|
|
219
|
+
(__eliscript_truthy((!__eliscript_truthy(boolean_p(cache)))) ? project_configuration_fail("cache must be a boolean", filename) : null);
|
|
220
|
+
(__eliscript_truthy((!__eliscript_truthy(safe_relative_path_p(source_root)))) ? project_configuration_fail("sourceRoot must be a contained relative path", filename) : null);
|
|
221
|
+
(__eliscript_truthy((schema_version === project_configuration_multi_version)) ? (() => {
|
|
222
|
+
(__eliscript_truthy((!__eliscript_truthy(((entries)["length"] === (entries_input)["length"])))) ? project_configuration_fail("entries must not contain duplicates", filename) : null);
|
|
223
|
+
(entries)["forEach"]((source) => {
|
|
224
|
+
return (__eliscript_truthy((!__eliscript_truthy(safe_relative_path_p(source)))) ? project_configuration_fail("entries must contain only contained relative paths", filename) : null);
|
|
225
|
+
});
|
|
226
|
+
return (__eliscript_truthy(((__eliscript_value_34) => (__eliscript_truthy(__eliscript_value_34) ? ((portable_entries)["length"] > 0) : __eliscript_value_34))(((entries)["length"] > 1))) ? project_configuration_fail("multi-entry portable project configurations are not supported", filename) : null);
|
|
227
|
+
})() : (__eliscript_truthy((!__eliscript_truthy(safe_relative_path_p(entry)))) ? project_configuration_fail("entry must be a contained relative path", filename) : null));
|
|
228
|
+
(__eliscript_truthy((!__eliscript_truthy(safe_relative_path_p(out_dir)))) ? project_configuration_fail("outDir must be a contained relative path", filename) : null);
|
|
229
|
+
(globalThis.Object)["freeze"](portable_entries);
|
|
230
|
+
(globalThis.Object)["freeze"](macro_capabilities);
|
|
231
|
+
(globalThis.Object)["freeze"](macro_file_dependencies);
|
|
232
|
+
(globalThis.Object)["freeze"](entries);
|
|
233
|
+
return (__eliscript_truthy((schema_version === project_configuration_multi_version)) ? (globalThis.Object)["freeze"](({"format": project_request_format, "version": project_request_multi_version, "sourceRoot": source_root, "entries": entries, "outDir": out_dir, "portableEntries": portable_entries, "macroCapabilities": macro_capabilities, "macroFileDependencies": macro_file_dependencies, "cache": cache})) : (globalThis.Object)["freeze"](({"format": project_request_format, "version": project_request_version, "sourceRoot": source_root, "entry": entry, "outDir": out_dir, "portableEntries": portable_entries, "macroCapabilities": macro_capabilities, "macroFileDependencies": macro_file_dependencies, "cache": cache})));
|
|
234
|
+
})();
|
|
235
|
+
})((__eliscript_truthy((schema_version === project_configuration_multi_version)) ? (() => {
|
|
236
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_30) => (__eliscript_truthy(__eliscript_value_30) ? ((__eliscript_value_31) => (__eliscript_truthy(__eliscript_value_31) ? (entries_input)["every"]((source) => {
|
|
237
|
+
return ((__eliscript_value_32) => (__eliscript_truthy(__eliscript_value_32) ? ((source)["length"] > 0) : __eliscript_value_32))((typeof source === "string"));
|
|
238
|
+
}) : __eliscript_value_31))(((entries_input)["length"] > 0)) : __eliscript_value_30))(array_p(entries_input))))) ? project_configuration_fail("entries must be a non-empty string array", filename) : null);
|
|
239
|
+
return normalize_strings(entries_input, "configuration entries", true);
|
|
240
|
+
})() : [entry]));
|
|
241
|
+
})(normalize_strings(macro_file_dependencies_input, "configuration macro file dependencies", false));
|
|
242
|
+
})(normalize_strings(macro_capabilities_input, "configuration macro capabilities", false));
|
|
243
|
+
})(normalize_strings(portable_input, "configuration portable entries", false));
|
|
244
|
+
})();
|
|
245
|
+
})(object_field(input, "cache", true));
|
|
246
|
+
})(object_field(input, "macroFileDependencies", []));
|
|
247
|
+
})(object_field(input, "macroCapabilities", []));
|
|
248
|
+
})(object_field(input, "portableEntries", []));
|
|
249
|
+
})(object_field(input, "outDir", undefined));
|
|
250
|
+
})(object_field(input, "entries", undefined));
|
|
251
|
+
})(object_field(input, "entry", undefined));
|
|
252
|
+
})(object_field(input, "sourceRoot", "."));
|
|
253
|
+
})(object_field(input, "schemaVersion", undefined));
|
|
254
|
+
}
|
|
255
|
+
function freeze_request(request) {
|
|
256
|
+
(globalThis.Object)["freeze"]((request)["entries"]);
|
|
257
|
+
return (globalThis.Object)["freeze"](request);
|
|
258
|
+
}
|
|
259
|
+
function normalize_portable_requests(values, label, require_entry) {
|
|
260
|
+
(__eliscript_truthy((!__eliscript_truthy(array_p(values)))) ? fail((String(label) + String(" must be an array"))) : null);
|
|
261
|
+
return ((entries_by_module) => {
|
|
262
|
+
(values)["forEach"]((request) => {
|
|
263
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(request)))) ? fail((String(label) + String(" must contain only request objects"))) : null);
|
|
264
|
+
return ((module_id) => {
|
|
265
|
+
return ((entries) => {
|
|
266
|
+
return (() => {
|
|
267
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_35) => (__eliscript_truthy(__eliscript_value_35) ? ((module_id)["length"] > 0) : __eliscript_value_35))((typeof module_id === "string"))))) ? fail((String(label) + String(" id must be a non-empty string"))) : null);
|
|
268
|
+
return ((requested) => {
|
|
269
|
+
return (entries)["forEach"]((entry) => {
|
|
270
|
+
return (requested)["add"](entry);
|
|
271
|
+
});
|
|
272
|
+
})(((__eliscript_value_36) => (__eliscript_truthy(__eliscript_value_36) ? __eliscript_value_36 : ((created) => {
|
|
273
|
+
(entries_by_module)["set"](module_id, created);
|
|
274
|
+
return created;
|
|
275
|
+
})(new globalThis.Set())))((entries_by_module)["get"](module_id)));
|
|
276
|
+
})();
|
|
277
|
+
})(normalize_strings((request)["entries"], (String(label) + String(" entries")), true));
|
|
278
|
+
})((request)["id"]);
|
|
279
|
+
});
|
|
280
|
+
(__eliscript_truthy(((__eliscript_value_37) => (__eliscript_truthy(__eliscript_value_37) ? ((entries_by_module)["size"] === 0) : __eliscript_value_37))(require_entry)) ? fail((String(label) + String(" must not be empty"))) : null);
|
|
281
|
+
return ((result) => {
|
|
282
|
+
(sorted_set_values((entries_by_module)["keys"]()))["forEach"]((module_id) => {
|
|
283
|
+
return (result)["push"](freeze_request(({"id": module_id, "entries": sorted_set_values((entries_by_module)["get"](module_id))})));
|
|
284
|
+
});
|
|
285
|
+
return (globalThis.Object)["freeze"](result);
|
|
286
|
+
})([]);
|
|
287
|
+
})(new globalThis.Map());
|
|
288
|
+
}
|
|
289
|
+
function project_plan(entries, dependencies_for) {
|
|
290
|
+
(__eliscript_truthy((!__eliscript_truthy((typeof dependencies_for === "function")))) ? fail("project dependency resolver must be a function") : null);
|
|
291
|
+
return ((entry_list) => {
|
|
292
|
+
return ((pending) => {
|
|
293
|
+
return ((visited) => {
|
|
294
|
+
return ((records) => {
|
|
295
|
+
return ((iterations) => {
|
|
296
|
+
return (() => {
|
|
297
|
+
(() => {
|
|
298
|
+
while (__eliscript_truthy(((pending)["size"] > 0))) {
|
|
299
|
+
((iterations = (iterations + 1)));
|
|
300
|
+
(__eliscript_truthy((iterations > project_plan_max_iterations)) ? fail("project graph exceeded the planning iteration limit") : null);
|
|
301
|
+
((module_id) => {
|
|
302
|
+
(pending)["delete"](module_id);
|
|
303
|
+
return (__eliscript_truthy((!__eliscript_truthy((visited)["has"](module_id)))) ? (() => {
|
|
304
|
+
(visited)["add"](module_id);
|
|
305
|
+
return ((dependencies) => {
|
|
306
|
+
(records)["set"](module_id, (globalThis.Object)["freeze"](({"id": module_id, "dependencies": (globalThis.Object)["freeze"](dependencies)})));
|
|
307
|
+
return (dependencies)["forEach"]((dependency) => {
|
|
308
|
+
return (__eliscript_truthy((!__eliscript_truthy((visited)["has"](dependency)))) ? (pending)["add"](dependency) : null);
|
|
309
|
+
});
|
|
310
|
+
})(normalize_strings(dependencies_for(module_id), (String("dependencies for ") + String(module_id)), false));
|
|
311
|
+
})() : null);
|
|
312
|
+
})(((((sorted_set_values(pending)) ?? [])[0]) ?? null));
|
|
313
|
+
}
|
|
314
|
+
return null;
|
|
315
|
+
})();
|
|
316
|
+
return ((modules) => {
|
|
317
|
+
(sorted_set_values((records)["keys"]()))["forEach"]((module_id) => {
|
|
318
|
+
return (modules)["push"]((records)["get"](module_id));
|
|
319
|
+
});
|
|
320
|
+
(globalThis.Object)["freeze"](modules);
|
|
321
|
+
return (globalThis.Object)["freeze"](({"format": project_plan_format, "version": project_plan_version, "mode": "standard", "entries": (globalThis.Object)["freeze"](entry_list), "modules": modules}));
|
|
322
|
+
})([]);
|
|
323
|
+
})();
|
|
324
|
+
})(0);
|
|
325
|
+
})(new globalThis.Map());
|
|
326
|
+
})(new globalThis.Set());
|
|
327
|
+
})(new globalThis.Set(entry_list));
|
|
328
|
+
})(normalize_strings(entries, "project entries", true));
|
|
329
|
+
}
|
|
330
|
+
function add_portable_request(requests, pending, request) {
|
|
331
|
+
return ((module_id) => {
|
|
332
|
+
return ((requested) => {
|
|
333
|
+
return ((changed) => {
|
|
334
|
+
return (() => {
|
|
335
|
+
((request)["entries"])["forEach"]((entry) => {
|
|
336
|
+
return (__eliscript_truthy((!__eliscript_truthy((requested)["has"](entry)))) ? (() => {
|
|
337
|
+
(requested)["add"](entry);
|
|
338
|
+
return ((changed = true));
|
|
339
|
+
})() : null);
|
|
340
|
+
});
|
|
341
|
+
(__eliscript_truthy(changed) ? (pending)["add"](module_id) : null);
|
|
342
|
+
return changed;
|
|
343
|
+
})();
|
|
344
|
+
})(false);
|
|
345
|
+
})(((__eliscript_value_38) => (__eliscript_truthy(__eliscript_value_38) ? __eliscript_value_38 : ((created) => {
|
|
346
|
+
(requests)["set"](module_id, created);
|
|
347
|
+
return created;
|
|
348
|
+
})(new globalThis.Set())))((requests)["get"](module_id)));
|
|
349
|
+
})((request)["id"]);
|
|
350
|
+
}
|
|
351
|
+
function portable_project_plan(initial_requests, dependencies_for) {
|
|
352
|
+
(__eliscript_truthy((!__eliscript_truthy((typeof dependencies_for === "function")))) ? fail("portable dependency resolver must be a function") : null);
|
|
353
|
+
return ((initial) => {
|
|
354
|
+
return ((requests) => {
|
|
355
|
+
return ((pending) => {
|
|
356
|
+
return ((processed) => {
|
|
357
|
+
return ((records) => {
|
|
358
|
+
return ((iterations) => {
|
|
359
|
+
return (() => {
|
|
360
|
+
(initial)["forEach"]((request) => {
|
|
361
|
+
return add_portable_request(requests, pending, request);
|
|
362
|
+
});
|
|
363
|
+
(() => {
|
|
364
|
+
while (__eliscript_truthy(((pending)["size"] > 0))) {
|
|
365
|
+
((iterations = (iterations + 1)));
|
|
366
|
+
(__eliscript_truthy((iterations > project_plan_max_iterations)) ? fail("portable project graph exceeded the planning iteration limit") : null);
|
|
367
|
+
((module_id) => {
|
|
368
|
+
return ((entries) => {
|
|
369
|
+
return ((signature) => {
|
|
370
|
+
return (() => {
|
|
371
|
+
(pending)["delete"](module_id);
|
|
372
|
+
return (__eliscript_truthy((!__eliscript_truthy((signature === (processed)["get"](module_id))))) ? (() => {
|
|
373
|
+
(processed)["set"](module_id, signature);
|
|
374
|
+
return ((discovered) => {
|
|
375
|
+
return ((previous) => {
|
|
376
|
+
return ((dependencies) => {
|
|
377
|
+
return (() => {
|
|
378
|
+
(records)["set"](module_id, (globalThis.Object)["freeze"](({"id": module_id, "entries": (globalThis.Object)["freeze"](entries), "dependencies": dependencies})));
|
|
379
|
+
return (dependencies)["forEach"]((request) => {
|
|
380
|
+
return add_portable_request(requests, pending, request);
|
|
381
|
+
});
|
|
382
|
+
})();
|
|
383
|
+
})((__eliscript_truthy(previous) ? normalize_portable_requests(((previous)["dependencies"])["concat"](discovered), (String("portable dependencies for ") + String(module_id)), false) : discovered));
|
|
384
|
+
})((records)["get"](module_id));
|
|
385
|
+
})(normalize_portable_requests(dependencies_for(module_id, entries), (String("portable dependencies for ") + String(module_id)), false));
|
|
386
|
+
})() : null);
|
|
387
|
+
})();
|
|
388
|
+
})((entries)["join"]("\u0000"));
|
|
389
|
+
})(sorted_set_values((requests)["get"](module_id)));
|
|
390
|
+
})(((((sorted_set_values(pending)) ?? [])[0]) ?? null));
|
|
391
|
+
}
|
|
392
|
+
return null;
|
|
393
|
+
})();
|
|
394
|
+
return ((modules) => {
|
|
395
|
+
(sorted_set_values((records)["keys"]()))["forEach"]((module_id) => {
|
|
396
|
+
return (modules)["push"]((records)["get"](module_id));
|
|
397
|
+
});
|
|
398
|
+
(globalThis.Object)["freeze"](modules);
|
|
399
|
+
return (globalThis.Object)["freeze"](({"format": project_plan_format, "version": project_plan_version, "mode": "portable", "entries": initial, "modules": modules}));
|
|
400
|
+
})([]);
|
|
401
|
+
})();
|
|
402
|
+
})(0);
|
|
403
|
+
})(new globalThis.Map());
|
|
404
|
+
})(new globalThis.Map());
|
|
405
|
+
})(new globalThis.Set());
|
|
406
|
+
})(new globalThis.Map());
|
|
407
|
+
})(normalize_portable_requests(initial_requests, "portable project entries", true));
|
|
408
|
+
}
|
|
409
|
+
function project_cache_miss(reason) {
|
|
410
|
+
return (globalThis.Object)["freeze"](({"cache": null, "reason": reason}));
|
|
411
|
+
}
|
|
412
|
+
function project_cache_version_kind(cache) {
|
|
413
|
+
return (__eliscript_truthy(((__eliscript_value_39) => (__eliscript_truthy(__eliscript_value_39) ? ((cache)["version"] === project_cache_version) : __eliscript_value_39))(((cache)["format"] === project_cache_format))) ? "current" : (__eliscript_truthy(((__eliscript_value_40) => (__eliscript_truthy(__eliscript_value_40) ? ((cache)["version"] === project_cache_legacy_version) : __eliscript_value_40))(((cache)["format"] === undefined))) ? "legacy" : false));
|
|
414
|
+
}
|
|
415
|
+
function project_cache_records(identity_modules, cache_modules) {
|
|
416
|
+
return (__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_41) => (__eliscript_truthy(__eliscript_value_41) ? array_p(cache_modules) : __eliscript_value_41))(array_p(identity_modules))))) ? false : ((identities, metadata_by_source, records, valid) => {
|
|
417
|
+
(identity_modules)["forEach"]((identity) => {
|
|
418
|
+
return (__eliscript_truthy((!__eliscript_truthy(object_p(identity)))) ? ((valid = false)) : ((source) => {
|
|
419
|
+
return (__eliscript_truthy(((__eliscript_value_42) => (__eliscript_truthy(__eliscript_value_42) ? __eliscript_value_42 : ((__eliscript_value_43) => (__eliscript_truthy(__eliscript_value_43) ? __eliscript_value_43 : (identities)["has"](source)))(((source)["length"] === 0))))((!__eliscript_truthy((typeof source === "string"))))) ? ((valid = false)) : (identities)["set"](source, identity));
|
|
420
|
+
})((identity)["source"]));
|
|
421
|
+
});
|
|
422
|
+
(cache_modules)["forEach"]((metadata) => {
|
|
423
|
+
return (__eliscript_truthy((!__eliscript_truthy(object_p(metadata)))) ? ((valid = false)) : ((source) => {
|
|
424
|
+
return (__eliscript_truthy(((__eliscript_value_44) => (__eliscript_truthy(__eliscript_value_44) ? __eliscript_value_44 : ((__eliscript_value_45) => (__eliscript_truthy(__eliscript_value_45) ? __eliscript_value_45 : (metadata_by_source)["has"](source)))(((source)["length"] === 0))))((!__eliscript_truthy((typeof source === "string"))))) ? ((valid = false)) : (metadata_by_source)["set"](source, metadata));
|
|
425
|
+
})((metadata)["source"]));
|
|
426
|
+
});
|
|
427
|
+
(__eliscript_truthy(((__eliscript_value_46) => (__eliscript_truthy(__eliscript_value_46) ? __eliscript_value_46 : ((__eliscript_value_47) => (__eliscript_truthy(__eliscript_value_47) ? __eliscript_value_47 : (!__eliscript_truthy(((identities)["size"] === (metadata_by_source)["size"])))))((!__eliscript_truthy(((metadata_by_source)["size"] === (cache_modules)["length"]))))))((!__eliscript_truthy(((identities)["size"] === (identity_modules)["length"]))))) ? ((valid = false)) : null);
|
|
428
|
+
(__eliscript_truthy(valid) ? (sorted_set_values((identities)["keys"]()))["forEach"]((source) => {
|
|
429
|
+
return ((metadata) => {
|
|
430
|
+
return (__eliscript_truthy((metadata === undefined)) ? ((valid = false)) : (records)["push"]((globalThis.Object)["freeze"](({"source": source, "identity": (identities)["get"](source), "metadata": metadata}))));
|
|
431
|
+
})((metadata_by_source)["get"](source));
|
|
432
|
+
}) : null);
|
|
433
|
+
return (__eliscript_truthy(valid) ? (globalThis.Object)["freeze"](records) : false);
|
|
434
|
+
})(new globalThis.Map(), new globalThis.Map(), [], true));
|
|
435
|
+
}
|
|
436
|
+
function project_cache_lookup(input) {
|
|
437
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(input)))) ? fail("project cache lookup input must be an object") : null);
|
|
438
|
+
return ((enabled, manifest_status) => {
|
|
439
|
+
(__eliscript_truthy((!__eliscript_truthy(boolean_p(enabled)))) ? fail("project cache enabled must be a boolean") : null);
|
|
440
|
+
return (__eliscript_truthy((!__eliscript_truthy(enabled))) ? project_cache_miss("cache-disabled") : (__eliscript_truthy((manifest_status === "missing")) ? project_cache_miss("manifest-missing") : (__eliscript_truthy((manifest_status === "unreadable")) ? project_cache_miss("manifest-unreadable") : (__eliscript_truthy((!__eliscript_truthy((manifest_status === "readable")))) ? fail("project cache manifest status is invalid") : ((manifest) => {
|
|
441
|
+
return ((cache) => {
|
|
442
|
+
return ((identity_modules) => {
|
|
443
|
+
return ((cache_modules) => {
|
|
444
|
+
return ((version_kind) => {
|
|
445
|
+
return (__eliscript_truthy(((__eliscript_value_52) => (__eliscript_truthy(__eliscript_value_52) ? __eliscript_value_52 : ((__eliscript_value_53) => (__eliscript_truthy(__eliscript_value_53) ? __eliscript_value_53 : ((__eliscript_value_54) => (__eliscript_truthy(__eliscript_value_54) ? __eliscript_value_54 : (!__eliscript_truthy(array_p(identity_modules)))))((!__eliscript_truthy(((__eliscript_value_55) => (__eliscript_truthy(__eliscript_value_55) ? __eliscript_value_55 : ((manifest)["version"] === 2)))(((manifest)["version"] === 1)))))))((!__eliscript_truthy(((manifest)["format"] === "eliscript-project"))))))((!__eliscript_truthy(object_p(manifest))))) ? project_cache_miss("manifest-version-changed") : (__eliscript_truthy(((__eliscript_value_56) => (__eliscript_truthy(__eliscript_value_56) ? (!__eliscript_truthy(((manifest)["entry"] === (input)["expectedEntry"]))) : __eliscript_value_56))(((manifest)["version"] === 1))) ? project_cache_miss("entry-changed") : (__eliscript_truthy(((__eliscript_value_57) => (__eliscript_truthy(__eliscript_value_57) ? (!__eliscript_truthy(same_string_arrays((manifest)["entries"], (input)["expectedEntries"]))) : __eliscript_value_57))(((manifest)["version"] === 2))) ? project_cache_miss("entries-changed") : (__eliscript_truthy((!__eliscript_truthy(((input)["graphDigestValid"] === true)))) ? project_cache_miss("graph-digest-invalid") : (__eliscript_truthy((!__eliscript_truthy(object_p(cache)))) ? project_cache_miss("cache-missing") : (__eliscript_truthy((!__eliscript_truthy(version_kind))) ? project_cache_miss("cache-version-changed") : (__eliscript_truthy((!__eliscript_truthy(array_p(cache_modules)))) ? project_cache_miss("cache-records-invalid") : (__eliscript_truthy((!__eliscript_truthy(((input)["cacheDigestValid"] === true)))) ? project_cache_miss("cache-digest-invalid") : (__eliscript_truthy((!__eliscript_truthy(((cache)["compilerDigest"] === (input)["compilerDigest"])))) ? project_cache_miss("compiler-changed") : (__eliscript_truthy((!__eliscript_truthy(((cache)["mode"] === (input)["mode"])))) ? project_cache_miss("mode-changed") : (__eliscript_truthy((!__eliscript_truthy(same_string_arrays((cache)["portableEntries"], (input)["portableEntries"])))) ? project_cache_miss("portable-roots-changed") : ((records) => {
|
|
446
|
+
return (__eliscript_truthy((!__eliscript_truthy(records))) ? project_cache_miss("cache-records-invalid") : (globalThis.Object)["freeze"](({"cache": (globalThis.Object)["freeze"](({"sourceVersion": (cache)["version"], "manifestDigest": (manifest)["digest"], "records": records})), "reason": "verified"})));
|
|
447
|
+
})(project_cache_records(identity_modules, cache_modules)))))))))))));
|
|
448
|
+
})(((__eliscript_value_51) => (__eliscript_truthy(__eliscript_value_51) ? project_cache_version_kind(cache) : __eliscript_value_51))(object_p(cache)));
|
|
449
|
+
})(((__eliscript_value_50) => (__eliscript_truthy(__eliscript_value_50) ? (cache)["modules"] : __eliscript_value_50))(object_p(cache)));
|
|
450
|
+
})(((__eliscript_value_49) => (__eliscript_truthy(__eliscript_value_49) ? (manifest)["modules"] : __eliscript_value_49))(object_p(manifest)));
|
|
451
|
+
})(((__eliscript_value_48) => (__eliscript_truthy(__eliscript_value_48) ? (manifest)["cache"] : __eliscript_value_48))(object_p(manifest)));
|
|
452
|
+
})((input)["manifest"])))));
|
|
453
|
+
})((input)["enabled"], (input)["manifestStatus"]);
|
|
454
|
+
}
|
|
455
|
+
function project_cache_decision(input) {
|
|
456
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(input)))) ? fail("project cache decision input must be an object") : null);
|
|
457
|
+
return ((record) => {
|
|
458
|
+
return ((identity) => {
|
|
459
|
+
return ((metadata) => {
|
|
460
|
+
return ((expected_portable_entries) => {
|
|
461
|
+
return ((recorded_portable_entries) => {
|
|
462
|
+
return ((macro_dependencies_match) => {
|
|
463
|
+
return ((reason) => {
|
|
464
|
+
return (globalThis.Object)["freeze"](({"reused": (reason === "verified"), "reason": reason}));
|
|
465
|
+
})((__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_61) => (__eliscript_truthy(__eliscript_value_61) ? object_p(metadata) : __eliscript_value_61))(object_p(identity))))) ? "not-cached" : (__eliscript_truthy((!__eliscript_truthy(((identity)["output"] === (input)["output"])))) ? "output-path-changed" : (__eliscript_truthy((!__eliscript_truthy(((identity)["sourceMap"] === (input)["sourceMap"])))) ? "source-map-path-changed" : (__eliscript_truthy(((__eliscript_value_62) => (__eliscript_truthy(__eliscript_value_62) ? (!__eliscript_truthy(same_string_arrays(recorded_portable_entries, expected_portable_entries))) : __eliscript_value_62))((!__eliscript_truthy((expected_portable_entries === null))))) ? "portable-entries-changed" : (__eliscript_truthy((!__eliscript_truthy((macro_dependencies_match === true)))) ? "macro-dependencies-changed" : (__eliscript_truthy(((__eliscript_value_63) => (__eliscript_truthy(__eliscript_value_63) ? (!__eliscript_truthy(((input)["artifactFailure"] === null))) : __eliscript_value_63))((!__eliscript_truthy(((input)["artifactFailure"] === undefined))))) ? (input)["artifactFailure"] : (__eliscript_truthy((!__eliscript_truthy(((identity)["sourceDigest"] === (input)["sourceDigest"])))) ? "source-changed" : (__eliscript_truthy((!__eliscript_truthy(((input)["outputExists"] === true)))) ? "output-missing" : (__eliscript_truthy((!__eliscript_truthy(((input)["sourceMapExists"] === true)))) ? "source-map-missing" : (__eliscript_truthy((!__eliscript_truthy(((identity)["outputDigest"] === (input)["outputDigest"])))) ? "output-digest-changed" : (__eliscript_truthy((!__eliscript_truthy(((identity)["sourceMapDigest"] === (input)["sourceMapDigest"])))) ? "source-map-digest-changed" : (__eliscript_truthy((!__eliscript_truthy(((input)["dependenciesValid"] === true)))) ? "dependencies-invalid" : "verified")))))))))))));
|
|
466
|
+
})(object_field(input, "macroDependenciesMatch", true));
|
|
467
|
+
})(((__eliscript_value_60) => (__eliscript_truthy(__eliscript_value_60) ? (metadata)["portableEntries"] : __eliscript_value_60))(object_p(metadata)));
|
|
468
|
+
})((input)["expectedPortableEntries"]);
|
|
469
|
+
})(((__eliscript_value_59) => (__eliscript_truthy(__eliscript_value_59) ? (record)["metadata"] : __eliscript_value_59))(object_p(record)));
|
|
470
|
+
})(((__eliscript_value_58) => (__eliscript_truthy(__eliscript_value_58) ? (record)["identity"] : __eliscript_value_58))(object_p(record)));
|
|
471
|
+
})((input)["record"]);
|
|
472
|
+
}
|
|
473
|
+
function normalize_report_modules(values) {
|
|
474
|
+
(__eliscript_truthy((!__eliscript_truthy(array_p(values)))) ? fail("build report modules must be an array") : null);
|
|
475
|
+
return ((result, compiled, reused) => {
|
|
476
|
+
(values)["forEach"]((module) => {
|
|
477
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(module)))) ? fail("build report modules must contain only objects") : null);
|
|
478
|
+
return ((status) => {
|
|
479
|
+
return ((macro_dependencies) => {
|
|
480
|
+
return (() => {
|
|
481
|
+
(__eliscript_truthy((!__eliscript_truthy(array_p(macro_dependencies)))) ? fail("build report macro dependencies must be an array") : null);
|
|
482
|
+
(macro_dependencies)["forEach"]((dependency) => {
|
|
483
|
+
return (__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_64) => (__eliscript_truthy(__eliscript_value_64) ? ((__eliscript_value_65) => (__eliscript_truthy(__eliscript_value_65) ? ((__eliscript_value_66) => (__eliscript_truthy(__eliscript_value_66) ? ((__eliscript_value_67) => (__eliscript_truthy(__eliscript_value_67) ? (/^[0-9a-f]{64}$/)["test"]((dependency)["digest"]) : __eliscript_value_67))((typeof dependency.digest === "string")) : __eliscript_value_66))((((dependency)["path"])["length"] > 0)) : __eliscript_value_65))((typeof dependency.path === "string")) : __eliscript_value_64))(object_p(dependency))))) ? fail("build report macro dependency is invalid") : null);
|
|
484
|
+
});
|
|
485
|
+
(macro_dependencies)["sort"]((left, right) => {
|
|
486
|
+
return ((left)["path"])["localeCompare"]((right)["path"]);
|
|
487
|
+
});
|
|
488
|
+
(globalThis.Object)["freeze"](macro_dependencies);
|
|
489
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_68) => (__eliscript_truthy(__eliscript_value_68) ? __eliscript_value_68 : (status === "reused")))((status === "compiled"))))) ? fail("build report module status must be compiled or reused") : null);
|
|
490
|
+
(__eliscript_truthy((status === "compiled")) ? ((compiled = (compiled + 1))) : ((reused = (reused + 1))));
|
|
491
|
+
return ((normalized_module) => {
|
|
492
|
+
(__eliscript_truthy(((macro_dependencies)["length"] > 0)) ? ((normalized_module)["macroDependencies"] = macro_dependencies) : null);
|
|
493
|
+
return (result)["push"]((globalThis.Object)["freeze"](normalized_module));
|
|
494
|
+
})(({"source": require_string((module)["source"], "build report module source"), "output": require_string((module)["output"], "build report module output"), "sourceMap": require_string((module)["sourceMap"], "build report module source map"), "status": status, "reason": require_string((module)["reason"], "build report module reason"), "dependencies": (globalThis.Object)["freeze"](normalize_strings((module)["dependencies"], "build report module dependencies", false)), "portableEntries": (globalThis.Object)["freeze"](normalize_strings((module)["portableEntries"], "build report module portable entries", false))}));
|
|
495
|
+
})();
|
|
496
|
+
})(object_field(module, "macroDependencies", []));
|
|
497
|
+
})(require_string((module)["status"], "build report module status"));
|
|
498
|
+
});
|
|
499
|
+
(result)["sort"]((left, right) => {
|
|
500
|
+
return ((left)["source"])["localeCompare"]((right)["source"]);
|
|
501
|
+
});
|
|
502
|
+
(globalThis.Object)["freeze"](result);
|
|
503
|
+
return (globalThis.Object)["freeze"](({"modules": result, "compiled": compiled, "reused": reused}));
|
|
504
|
+
})([], 0, 0);
|
|
505
|
+
}
|
|
506
|
+
function project_build_report(build) {
|
|
507
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(build)))) ? fail("project build report input must be an object") : null);
|
|
508
|
+
return ((mode) => {
|
|
509
|
+
return ((multi) => {
|
|
510
|
+
return ((entries) => {
|
|
511
|
+
return ((entry_outputs) => {
|
|
512
|
+
return ((cache) => {
|
|
513
|
+
return ((timings) => {
|
|
514
|
+
return ((normalized) => {
|
|
515
|
+
return ((modules) => {
|
|
516
|
+
return ((compiled) => {
|
|
517
|
+
return ((reused) => {
|
|
518
|
+
return ((lookup_reason) => {
|
|
519
|
+
return ((cache_enabled) => {
|
|
520
|
+
return ((cache_status) => {
|
|
521
|
+
return ((cache_reason) => {
|
|
522
|
+
return (() => {
|
|
523
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_69) => (__eliscript_truthy(__eliscript_value_69) ? __eliscript_value_69 : (mode === "portable")))((mode === "standard"))))) ? fail("build report mode must be standard or portable") : null);
|
|
524
|
+
(__eliscript_truthy((!__eliscript_truthy(boolean_p(cache_enabled)))) ? fail("build report cache enabled must be a boolean") : null);
|
|
525
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(timings)))) ? fail("build report timings must be an object") : null);
|
|
526
|
+
(__eliscript_truthy(((__eliscript_value_70) => (__eliscript_truthy(__eliscript_value_70) ? (!__eliscript_truthy(((entries)["length"] === (entry_outputs)["length"]))) : __eliscript_value_70))(multi)) ? fail("build report entries and outputs must have the same length") : null);
|
|
527
|
+
(globalThis.Object)["freeze"](entries);
|
|
528
|
+
(globalThis.Object)["freeze"](entry_outputs);
|
|
529
|
+
return ((common) => {
|
|
530
|
+
(__eliscript_truthy(multi) ? (globalThis.Object)["assign"](common, ({"entries": entries, "entryOutputs": entry_outputs})) : (globalThis.Object)["assign"](common, ({"entry": require_string((build)["entry"], "build report entry"), "entryOutput": require_string((build)["entryOutput"], "build report entry output")})));
|
|
531
|
+
return (globalThis.Object)["freeze"](common);
|
|
532
|
+
})(({"format": project_build_report_format, "version": (__eliscript_truthy(multi) ? project_build_report_multi_version : project_build_report_version), "mode": mode, "root": require_string((build)["root"], "build report root"), "outDir": require_string((build)["outDir"], "build report output directory"), "manifest": require_string((build)["manifest"], "build report manifest"), "digest": require_string((build)["digest"], "build report digest"), "portableEntries": (globalThis.Object)["freeze"](normalize_strings((build)["portableEntries"], "build report portable entries", false)), "cache": (globalThis.Object)["freeze"](({"enabled": (__eliscript_truthy(cache_enabled) ? true : false), "status": cache_status, "reason": cache_reason})), "counts": (globalThis.Object)["freeze"](({"modules": (modules)["length"], "compiled": compiled, "reused": reused})), "timings": (globalThis.Object)["freeze"](({"cacheReadMs": report_milliseconds((timings)["cacheReadMs"], "build report cache read time"), "workMs": report_milliseconds((timings)["workMs"], "build report work time"), "manifestWriteMs": report_milliseconds((timings)["manifestWriteMs"], "build report manifest write time"), "totalMs": report_milliseconds((timings)["totalMs"], "build report total time")})), "modules": modules}));
|
|
533
|
+
})();
|
|
534
|
+
})((__eliscript_truthy((!__eliscript_truthy(cache_enabled))) ? "cache-disabled" : (__eliscript_truthy((cache_status === "hit")) ? "verified" : (__eliscript_truthy((cache_status === "partial")) ? "dirty-modules" : (__eliscript_truthy((lookup_reason === "verified")) ? "all-modules-dirty" : lookup_reason)))));
|
|
535
|
+
})((__eliscript_truthy((!__eliscript_truthy(cache_enabled))) ? "disabled" : (__eliscript_truthy((reused === 0)) ? "miss" : (__eliscript_truthy((compiled === 0)) ? "hit" : "partial"))));
|
|
536
|
+
})((cache)["enabled"]);
|
|
537
|
+
})((__eliscript_truthy(object_p(cache)) ? require_string((cache)["reason"], "build report cache reason") : fail("build report cache must be an object")));
|
|
538
|
+
})((normalized)["reused"]);
|
|
539
|
+
})((normalized)["compiled"]);
|
|
540
|
+
})((normalized)["modules"]);
|
|
541
|
+
})(normalize_report_modules((build)["modules"]));
|
|
542
|
+
})((build)["timings"]);
|
|
543
|
+
})((build)["cache"]);
|
|
544
|
+
})((__eliscript_truthy(multi) ? normalize_strings((build)["entryOutputs"], "build report entry outputs", true) : []));
|
|
545
|
+
})((__eliscript_truthy(multi) ? normalize_strings((build)["entries"], "build report entries", true) : []));
|
|
546
|
+
})((!__eliscript_truthy(((build)["entries"] === undefined))));
|
|
547
|
+
})(require_string((build)["mode"], "build report mode"));
|
|
548
|
+
}
|
|
549
|
+
function normalize_check_modules(modules) {
|
|
550
|
+
(__eliscript_truthy((!__eliscript_truthy(array_p(modules)))) ? fail("project check report modules must be an array") : null);
|
|
551
|
+
return ((seen, result) => {
|
|
552
|
+
(modules)["forEach"]((module) => {
|
|
553
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(module)))) ? fail("project check report modules must contain objects") : null);
|
|
554
|
+
return ((source) => {
|
|
555
|
+
(__eliscript_truthy((seen)["has"](source)) ? fail("project check report module sources must be unique") : null);
|
|
556
|
+
(seen)["add"](source);
|
|
557
|
+
return (result)["push"]((globalThis.Object)["freeze"](({"source": source, "dependencies": (globalThis.Object)["freeze"](normalize_strings((module)["dependencies"], "project check report module dependencies", false)), "portableEntries": (globalThis.Object)["freeze"](normalize_strings((module)["portableEntries"], "project check report module portable entries", false))})));
|
|
558
|
+
})(require_string((module)["source"], "project check report module source"));
|
|
559
|
+
});
|
|
560
|
+
(result)["sort"]((left, right) => {
|
|
561
|
+
return ((left)["source"])["localeCompare"]((right)["source"]);
|
|
562
|
+
});
|
|
563
|
+
return (globalThis.Object)["freeze"](result);
|
|
564
|
+
})(new globalThis.Set(), []);
|
|
565
|
+
}
|
|
566
|
+
function project_check_report(check) {
|
|
567
|
+
(__eliscript_truthy((!__eliscript_truthy(object_p(check)))) ? fail("project check report input must be an object") : null);
|
|
568
|
+
return ((mode) => {
|
|
569
|
+
return ((entries) => {
|
|
570
|
+
return ((portable_entries) => {
|
|
571
|
+
return ((modules) => {
|
|
572
|
+
return (() => {
|
|
573
|
+
(__eliscript_truthy((!__eliscript_truthy(((__eliscript_value_71) => (__eliscript_truthy(__eliscript_value_71) ? __eliscript_value_71 : (mode === "portable")))((mode === "standard"))))) ? fail("project check report mode must be standard or portable") : null);
|
|
574
|
+
(__eliscript_truthy(((__eliscript_value_72) => (__eliscript_truthy(__eliscript_value_72) ? ((portable_entries)["length"] > 0) : __eliscript_value_72))((mode === "standard"))) ? fail("standard project check cannot report portable entries") : null);
|
|
575
|
+
(globalThis.Object)["freeze"](entries);
|
|
576
|
+
(globalThis.Object)["freeze"](portable_entries);
|
|
577
|
+
return (globalThis.Object)["freeze"](({"format": project_check_report_format, "version": project_check_report_version, "status": "ok", "mode": mode, "root": require_string((check)["root"], "project check report root"), "entries": entries, "portableEntries": portable_entries, "counts": (globalThis.Object)["freeze"](({"modules": (modules)["length"]})), "modules": modules}));
|
|
578
|
+
})();
|
|
579
|
+
})(normalize_check_modules((check)["modules"]));
|
|
580
|
+
})(normalize_strings((check)["portableEntries"], "project check report portable entries", false));
|
|
581
|
+
})(normalize_strings((check)["entries"], "project check report entries", true));
|
|
582
|
+
})(require_string((check)["mode"], "project check report mode"));
|
|
583
|
+
}
|
|
584
|
+
export {project_plan_format, project_plan_version, project_plan, portable_project_plan, project_build_report_format, project_build_report_version, project_build_report_multi_version, project_build_report, project_request_format, project_request_version, project_request_multi_version, project_request, project_configuration, build_operation_format, build_operation_version, build_operation_multi_version, build_operation_request, check_operation_format, check_operation_version, check_operation_request, project_check_report_format, project_check_report_version, project_check_report, project_cache_format, project_cache_version, project_cache_lookup, project_cache_decision};
|
|
585
|
+
//# sourceMappingURL=project.mjs.map
|