@markw65/monkeyc-optimizer 1.1.91 → 1.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -80
- package/LICENSE.txt +18 -0
- package/build/api.cjs +40 -40
- package/build/{chunk-OCIRSLOJ.cjs → chunk-BPXB3WQQ.cjs} +685 -3634
- package/build/{chunk-KHQPCXSJ.cjs → chunk-IJS7AYMN.cjs} +217 -82
- package/build/optimizer.cjs +20 -20
- package/build/sdk-util.cjs +15 -15
- package/build/src/cftinfo.d.ts +0 -1
- package/build/src/optimizer.d.ts +1 -1
- package/build/src/readprg/bytecode.d.ts +5 -1
- package/build/src/readprg/opcodes.d.ts +11 -11
- package/build/src/readprg/signer.d.ts +3 -5
- package/build/src/readprg/symbols.d.ts +1 -2
- package/build/src/readprg.d.ts +8 -6
- package/build/src/unzip7.d.ts +6 -3
- package/build/src/worker-task.d.ts +3 -4
- package/build/util.cjs +26 -26
- package/build/worker-thread.cjs +4 -4
- package/package.json +7 -10
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_IJS7AYMN_exports = {};
|
|
30
|
+
__export(chunk_IJS7AYMN_exports, {
|
|
31
31
|
AwaitedError: () => AwaitedError,
|
|
32
32
|
GenericQueue: () => GenericQueue,
|
|
33
33
|
bumpLogging: () => bumpLogging,
|
|
@@ -55,7 +55,7 @@ __export(chunk_KHQPCXSJ_exports, {
|
|
|
55
55
|
spawnByLine: () => spawnByLine,
|
|
56
56
|
wouldLog: () => wouldLog
|
|
57
57
|
});
|
|
58
|
-
module.exports = __toCommonJS(
|
|
58
|
+
module.exports = __toCommonJS(chunk_IJS7AYMN_exports);
|
|
59
59
|
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
60
60
|
var child_process = __toESM(require("child_process"));
|
|
61
61
|
var fsc = __toESM(require("fs"));
|
|
@@ -125,10 +125,15 @@ var require_path = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
125
125
|
"node_modules/fast-glob/out/utils/path.js"(exports2) {
|
|
126
126
|
"use strict";
|
|
127
127
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
128
|
-
exports2.
|
|
128
|
+
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
129
|
+
var os = (0, import_chunk_VS2QQHAK.__require)("os");
|
|
129
130
|
var path2 = (0, import_chunk_VS2QQHAK.__require)("path");
|
|
131
|
+
var IS_WINDOWS_PLATFORM = os.platform() === "win32";
|
|
130
132
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
131
|
-
var
|
|
133
|
+
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
134
|
+
var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
135
|
+
var DOS_DEVICE_PATH_RE = /^\\\\([.?])/;
|
|
136
|
+
var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g;
|
|
132
137
|
function unixify(filepath) {
|
|
133
138
|
return filepath.replace(/\\/g, "/");
|
|
134
139
|
}
|
|
@@ -137,10 +142,6 @@ var require_path = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
137
142
|
return path2.resolve(cwd, filepath);
|
|
138
143
|
}
|
|
139
144
|
exports2.makeAbsolute = makeAbsolute;
|
|
140
|
-
function escape(pattern) {
|
|
141
|
-
return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
142
|
-
}
|
|
143
|
-
exports2.escape = escape;
|
|
144
145
|
function removeLeadingDotSegment(entry) {
|
|
145
146
|
if (entry.charAt(0) === ".") {
|
|
146
147
|
const secondCharactery = entry.charAt(1);
|
|
@@ -151,6 +152,24 @@ var require_path = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
151
152
|
return entry;
|
|
152
153
|
}
|
|
153
154
|
exports2.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
155
|
+
exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
156
|
+
function escapeWindowsPath(pattern) {
|
|
157
|
+
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
158
|
+
}
|
|
159
|
+
exports2.escapeWindowsPath = escapeWindowsPath;
|
|
160
|
+
function escapePosixPath(pattern) {
|
|
161
|
+
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
162
|
+
}
|
|
163
|
+
exports2.escapePosixPath = escapePosixPath;
|
|
164
|
+
exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
165
|
+
function convertWindowsPathToPattern(filepath) {
|
|
166
|
+
return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
|
|
167
|
+
}
|
|
168
|
+
exports2.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
169
|
+
function convertPosixPathToPattern(filepath) {
|
|
170
|
+
return escapePosixPath(filepath);
|
|
171
|
+
}
|
|
172
|
+
exports2.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
154
173
|
}
|
|
155
174
|
});
|
|
156
175
|
var require_is_extglob = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
@@ -3047,7 +3066,7 @@ var require_pattern = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
3047
3066
|
"node_modules/fast-glob/out/utils/pattern.js"(exports2) {
|
|
3048
3067
|
"use strict";
|
|
3049
3068
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3050
|
-
exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
3069
|
+
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
3051
3070
|
var path2 = (0, import_chunk_VS2QQHAK.__require)("path");
|
|
3052
3071
|
var globParent = require_glob_parent();
|
|
3053
3072
|
var micromatch = require_micromatch();
|
|
@@ -3058,6 +3077,7 @@ var require_pattern = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
3058
3077
|
var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
|
|
3059
3078
|
var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
|
|
3060
3079
|
var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
|
|
3080
|
+
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
3061
3081
|
function isStaticPattern(pattern, options = {}) {
|
|
3062
3082
|
return !isDynamicPattern(pattern, options);
|
|
3063
3083
|
}
|
|
@@ -3153,10 +3173,9 @@ var require_pattern = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
3153
3173
|
}
|
|
3154
3174
|
exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
3155
3175
|
function expandBraceExpansion(pattern) {
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
});
|
|
3176
|
+
const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
|
|
3177
|
+
patterns.sort((a, b) => a.length - b.length);
|
|
3178
|
+
return patterns.filter((pattern2) => pattern2 !== "");
|
|
3160
3179
|
}
|
|
3161
3180
|
exports2.expandBraceExpansion = expandBraceExpansion;
|
|
3162
3181
|
function getPatternParts(pattern, options) {
|
|
@@ -3183,6 +3202,27 @@ var require_pattern = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
3183
3202
|
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
3184
3203
|
}
|
|
3185
3204
|
exports2.matchAny = matchAny;
|
|
3205
|
+
function removeDuplicateSlashes(pattern) {
|
|
3206
|
+
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3207
|
+
}
|
|
3208
|
+
exports2.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3209
|
+
function partitionAbsoluteAndRelative(patterns) {
|
|
3210
|
+
const absolute = [];
|
|
3211
|
+
const relative = [];
|
|
3212
|
+
for (const pattern of patterns) {
|
|
3213
|
+
if (isAbsolute(pattern)) {
|
|
3214
|
+
absolute.push(pattern);
|
|
3215
|
+
} else {
|
|
3216
|
+
relative.push(pattern);
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3219
|
+
return [absolute, relative];
|
|
3220
|
+
}
|
|
3221
|
+
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
3222
|
+
function isAbsolute(pattern) {
|
|
3223
|
+
return path2.isAbsolute(pattern);
|
|
3224
|
+
}
|
|
3225
|
+
exports2.isAbsolute = isAbsolute;
|
|
3186
3226
|
}
|
|
3187
3227
|
});
|
|
3188
3228
|
var require_merge2 = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
@@ -3365,9 +3405,11 @@ var require_tasks = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
3365
3405
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3366
3406
|
exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
|
|
3367
3407
|
var utils = require_utils3();
|
|
3368
|
-
function generate(
|
|
3408
|
+
function generate(input, settings) {
|
|
3409
|
+
const patterns = processPatterns(input, settings);
|
|
3410
|
+
const ignore = processPatterns(settings.ignore, settings);
|
|
3369
3411
|
const positivePatterns = getPositivePatterns(patterns);
|
|
3370
|
-
const negativePatterns = getNegativePatternsAsPositive(patterns,
|
|
3412
|
+
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
|
|
3371
3413
|
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
|
|
3372
3414
|
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
|
|
3373
3415
|
const staticTasks = convertPatternsToTasks(
|
|
@@ -3385,6 +3427,16 @@ var require_tasks = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
3385
3427
|
return staticTasks.concat(dynamicTasks);
|
|
3386
3428
|
}
|
|
3387
3429
|
exports2.generate = generate;
|
|
3430
|
+
function processPatterns(input, settings) {
|
|
3431
|
+
let patterns = input;
|
|
3432
|
+
if (settings.braceExpansion) {
|
|
3433
|
+
patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
|
|
3434
|
+
}
|
|
3435
|
+
if (settings.baseNameMatch) {
|
|
3436
|
+
patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
|
|
3437
|
+
}
|
|
3438
|
+
return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
|
|
3439
|
+
}
|
|
3388
3440
|
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
3389
3441
|
const tasks = [];
|
|
3390
3442
|
const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
|
|
@@ -3441,22 +3493,6 @@ var require_tasks = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
3441
3493
|
exports2.convertPatternGroupToTask = convertPatternGroupToTask;
|
|
3442
3494
|
}
|
|
3443
3495
|
});
|
|
3444
|
-
var require_patterns = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
3445
|
-
"node_modules/fast-glob/out/managers/patterns.js"(exports2) {
|
|
3446
|
-
"use strict";
|
|
3447
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3448
|
-
exports2.removeDuplicateSlashes = exports2.transform = void 0;
|
|
3449
|
-
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
3450
|
-
function transform(patterns) {
|
|
3451
|
-
return patterns.map((pattern) => removeDuplicateSlashes(pattern));
|
|
3452
|
-
}
|
|
3453
|
-
exports2.transform = transform;
|
|
3454
|
-
function removeDuplicateSlashes(pattern) {
|
|
3455
|
-
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3456
|
-
}
|
|
3457
|
-
exports2.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3458
|
-
}
|
|
3459
|
-
});
|
|
3460
3496
|
var require_async = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
3461
3497
|
"node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) {
|
|
3462
3498
|
"use strict";
|
|
@@ -3993,14 +4029,14 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
3993
4029
|
"node_modules/fastq/queue.js"(exports2, module2) {
|
|
3994
4030
|
"use strict";
|
|
3995
4031
|
var reusify = require_reusify();
|
|
3996
|
-
function fastqueue(context, worker,
|
|
4032
|
+
function fastqueue(context, worker, _concurrency) {
|
|
3997
4033
|
if (typeof context === "function") {
|
|
3998
|
-
|
|
4034
|
+
_concurrency = worker;
|
|
3999
4035
|
worker = context;
|
|
4000
4036
|
context = null;
|
|
4001
4037
|
}
|
|
4002
|
-
if (
|
|
4003
|
-
throw new Error("fastqueue concurrency must be greater than 1");
|
|
4038
|
+
if (!(_concurrency >= 1)) {
|
|
4039
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
4004
4040
|
}
|
|
4005
4041
|
var cache = reusify(Task);
|
|
4006
4042
|
var queueHead = null;
|
|
@@ -4013,7 +4049,20 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4013
4049
|
saturated: noop,
|
|
4014
4050
|
pause,
|
|
4015
4051
|
paused: false,
|
|
4016
|
-
concurrency
|
|
4052
|
+
get concurrency() {
|
|
4053
|
+
return _concurrency;
|
|
4054
|
+
},
|
|
4055
|
+
set concurrency(value) {
|
|
4056
|
+
if (!(value >= 1)) {
|
|
4057
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
4058
|
+
}
|
|
4059
|
+
_concurrency = value;
|
|
4060
|
+
if (self.paused) return;
|
|
4061
|
+
for (; queueHead && _running < _concurrency; ) {
|
|
4062
|
+
_running++;
|
|
4063
|
+
release();
|
|
4064
|
+
}
|
|
4065
|
+
},
|
|
4017
4066
|
running,
|
|
4018
4067
|
resume,
|
|
4019
4068
|
idle,
|
|
@@ -4023,7 +4072,8 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4023
4072
|
empty: noop,
|
|
4024
4073
|
kill,
|
|
4025
4074
|
killAndDrain,
|
|
4026
|
-
error
|
|
4075
|
+
error,
|
|
4076
|
+
abort
|
|
4027
4077
|
};
|
|
4028
4078
|
return self;
|
|
4029
4079
|
function running() {
|
|
@@ -4053,7 +4103,12 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4053
4103
|
function resume() {
|
|
4054
4104
|
if (!self.paused) return;
|
|
4055
4105
|
self.paused = false;
|
|
4056
|
-
|
|
4106
|
+
if (queueHead === null) {
|
|
4107
|
+
_running++;
|
|
4108
|
+
release();
|
|
4109
|
+
return;
|
|
4110
|
+
}
|
|
4111
|
+
for (; queueHead && _running < _concurrency; ) {
|
|
4057
4112
|
_running++;
|
|
4058
4113
|
release();
|
|
4059
4114
|
}
|
|
@@ -4068,7 +4123,7 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4068
4123
|
current.value = value;
|
|
4069
4124
|
current.callback = done || noop;
|
|
4070
4125
|
current.errorHandler = errorHandler;
|
|
4071
|
-
if (_running
|
|
4126
|
+
if (_running >= _concurrency || self.paused) {
|
|
4072
4127
|
if (queueTail) {
|
|
4073
4128
|
queueTail.next = current;
|
|
4074
4129
|
queueTail = current;
|
|
@@ -4088,7 +4143,8 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4088
4143
|
current.release = release;
|
|
4089
4144
|
current.value = value;
|
|
4090
4145
|
current.callback = done || noop;
|
|
4091
|
-
|
|
4146
|
+
current.errorHandler = errorHandler;
|
|
4147
|
+
if (_running >= _concurrency || self.paused) {
|
|
4092
4148
|
if (queueHead) {
|
|
4093
4149
|
current.next = queueHead;
|
|
4094
4150
|
queueHead = current;
|
|
@@ -4107,7 +4163,7 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4107
4163
|
cache.release(holder);
|
|
4108
4164
|
}
|
|
4109
4165
|
var next = queueHead;
|
|
4110
|
-
if (next) {
|
|
4166
|
+
if (next && _running <= _concurrency) {
|
|
4111
4167
|
if (!self.paused) {
|
|
4112
4168
|
if (queueTail === queueHead) {
|
|
4113
4169
|
queueTail = null;
|
|
@@ -4136,6 +4192,28 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4136
4192
|
self.drain();
|
|
4137
4193
|
self.drain = noop;
|
|
4138
4194
|
}
|
|
4195
|
+
function abort() {
|
|
4196
|
+
var current = queueHead;
|
|
4197
|
+
queueHead = null;
|
|
4198
|
+
queueTail = null;
|
|
4199
|
+
while (current) {
|
|
4200
|
+
var next = current.next;
|
|
4201
|
+
var callback = current.callback;
|
|
4202
|
+
var errorHandler2 = current.errorHandler;
|
|
4203
|
+
var val = current.value;
|
|
4204
|
+
var context2 = current.context;
|
|
4205
|
+
current.value = null;
|
|
4206
|
+
current.callback = noop;
|
|
4207
|
+
current.errorHandler = null;
|
|
4208
|
+
if (errorHandler2) {
|
|
4209
|
+
errorHandler2(new Error("abort"), val);
|
|
4210
|
+
}
|
|
4211
|
+
callback.call(context2, new Error("abort"));
|
|
4212
|
+
current.release(current);
|
|
4213
|
+
current = next;
|
|
4214
|
+
}
|
|
4215
|
+
self.drain = noop;
|
|
4216
|
+
}
|
|
4139
4217
|
function error(handler) {
|
|
4140
4218
|
errorHandler = handler;
|
|
4141
4219
|
}
|
|
@@ -4163,9 +4241,9 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4163
4241
|
self.release(self);
|
|
4164
4242
|
};
|
|
4165
4243
|
}
|
|
4166
|
-
function queueAsPromised(context, worker,
|
|
4244
|
+
function queueAsPromised(context, worker, _concurrency) {
|
|
4167
4245
|
if (typeof context === "function") {
|
|
4168
|
-
|
|
4246
|
+
_concurrency = worker;
|
|
4169
4247
|
worker = context;
|
|
4170
4248
|
context = null;
|
|
4171
4249
|
}
|
|
@@ -4174,7 +4252,7 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4174
4252
|
cb(null, res);
|
|
4175
4253
|
}, cb);
|
|
4176
4254
|
}
|
|
4177
|
-
var queue = fastqueue(context, asyncWrapper,
|
|
4255
|
+
var queue = fastqueue(context, asyncWrapper, _concurrency);
|
|
4178
4256
|
var pushCb = queue.push;
|
|
4179
4257
|
var unshiftCb = queue.unshift;
|
|
4180
4258
|
queue.push = push;
|
|
@@ -4208,17 +4286,19 @@ var require_queue = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4208
4286
|
return p;
|
|
4209
4287
|
}
|
|
4210
4288
|
function drained() {
|
|
4211
|
-
if (queue.idle()) {
|
|
4212
|
-
return new Promise(function(resolve) {
|
|
4213
|
-
resolve();
|
|
4214
|
-
});
|
|
4215
|
-
}
|
|
4216
|
-
var previousDrain = queue.drain;
|
|
4217
4289
|
var p = new Promise(function(resolve) {
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4290
|
+
process.nextTick(function() {
|
|
4291
|
+
if (queue.idle()) {
|
|
4292
|
+
resolve();
|
|
4293
|
+
} else {
|
|
4294
|
+
var previousDrain = queue.drain;
|
|
4295
|
+
queue.drain = function() {
|
|
4296
|
+
if (typeof previousDrain === "function") previousDrain();
|
|
4297
|
+
resolve();
|
|
4298
|
+
queue.drain = previousDrain;
|
|
4299
|
+
};
|
|
4300
|
+
}
|
|
4301
|
+
});
|
|
4222
4302
|
});
|
|
4223
4303
|
return p;
|
|
4224
4304
|
}
|
|
@@ -4739,8 +4819,7 @@ var require_matcher = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4739
4819
|
this._fillStorage();
|
|
4740
4820
|
}
|
|
4741
4821
|
_fillStorage() {
|
|
4742
|
-
const
|
|
4743
|
-
for (const pattern of patterns) {
|
|
4822
|
+
for (const pattern of this._patterns) {
|
|
4744
4823
|
const segments = this._getPatternSegments(pattern);
|
|
4745
4824
|
const sections = this._splitSegmentsIntoSections(segments);
|
|
4746
4825
|
this._storage.push({
|
|
@@ -4885,33 +4964,37 @@ var require_entry = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4885
4964
|
this.index = /* @__PURE__ */ new Map();
|
|
4886
4965
|
}
|
|
4887
4966
|
getFilter(positive, negative) {
|
|
4888
|
-
const
|
|
4889
|
-
const
|
|
4890
|
-
|
|
4967
|
+
const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
|
|
4968
|
+
const patterns = {
|
|
4969
|
+
positive: {
|
|
4970
|
+
all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
|
|
4971
|
+
},
|
|
4972
|
+
negative: {
|
|
4973
|
+
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
|
|
4974
|
+
relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
|
|
4975
|
+
}
|
|
4976
|
+
};
|
|
4977
|
+
return (entry) => this._filter(entry, patterns);
|
|
4891
4978
|
}
|
|
4892
|
-
_filter(entry,
|
|
4893
|
-
|
|
4979
|
+
_filter(entry, patterns) {
|
|
4980
|
+
const filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
4981
|
+
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
4894
4982
|
return false;
|
|
4895
4983
|
}
|
|
4896
4984
|
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
4897
4985
|
return false;
|
|
4898
4986
|
}
|
|
4899
|
-
|
|
4900
|
-
return false;
|
|
4901
|
-
}
|
|
4902
|
-
const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
|
|
4903
|
-
const isDirectory = entry.dirent.isDirectory();
|
|
4904
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(entry.path, negativeRe, isDirectory);
|
|
4987
|
+
const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
|
|
4905
4988
|
if (this._settings.unique && isMatched) {
|
|
4906
|
-
this._createIndexRecord(
|
|
4989
|
+
this._createIndexRecord(filepath);
|
|
4907
4990
|
}
|
|
4908
4991
|
return isMatched;
|
|
4909
4992
|
}
|
|
4910
|
-
_isDuplicateEntry(
|
|
4911
|
-
return this.index.has(
|
|
4993
|
+
_isDuplicateEntry(filepath) {
|
|
4994
|
+
return this.index.has(filepath);
|
|
4912
4995
|
}
|
|
4913
|
-
_createIndexRecord(
|
|
4914
|
-
this.index.set(
|
|
4996
|
+
_createIndexRecord(filepath) {
|
|
4997
|
+
this.index.set(filepath, void 0);
|
|
4915
4998
|
}
|
|
4916
4999
|
_onlyFileFilter(entry) {
|
|
4917
5000
|
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
@@ -4919,15 +5002,32 @@ var require_entry = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
4919
5002
|
_onlyDirectoryFilter(entry) {
|
|
4920
5003
|
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
4921
5004
|
}
|
|
4922
|
-
|
|
4923
|
-
|
|
5005
|
+
_isMatchToPatternsSet(filepath, patterns, isDirectory) {
|
|
5006
|
+
const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory);
|
|
5007
|
+
if (!isMatched) {
|
|
5008
|
+
return false;
|
|
5009
|
+
}
|
|
5010
|
+
const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory);
|
|
5011
|
+
if (isMatchedByRelativeNegative) {
|
|
5012
|
+
return false;
|
|
5013
|
+
}
|
|
5014
|
+
const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory);
|
|
5015
|
+
if (isMatchedByAbsoluteNegative) {
|
|
5016
|
+
return false;
|
|
5017
|
+
}
|
|
5018
|
+
return true;
|
|
5019
|
+
}
|
|
5020
|
+
_isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) {
|
|
5021
|
+
if (patternsRe.length === 0) {
|
|
4924
5022
|
return false;
|
|
4925
5023
|
}
|
|
4926
|
-
const fullpath = utils.path.makeAbsolute(this._settings.cwd,
|
|
4927
|
-
return
|
|
5024
|
+
const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
|
|
5025
|
+
return this._isMatchToPatterns(fullpath, patternsRe, isDirectory);
|
|
4928
5026
|
}
|
|
4929
|
-
_isMatchToPatterns(
|
|
4930
|
-
|
|
5027
|
+
_isMatchToPatterns(filepath, patternsRe, isDirectory) {
|
|
5028
|
+
if (patternsRe.length === 0) {
|
|
5029
|
+
return false;
|
|
5030
|
+
}
|
|
4931
5031
|
const isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
4932
5032
|
if (!isMatched && isDirectory) {
|
|
4933
5033
|
return utils.pattern.matchAny(filepath + "/", patternsRe);
|
|
@@ -5217,6 +5317,7 @@ var require_settings4 = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
5217
5317
|
if (this.stats) {
|
|
5218
5318
|
this.objectMode = true;
|
|
5219
5319
|
}
|
|
5320
|
+
this.ignore = [].concat(this.ignore);
|
|
5220
5321
|
}
|
|
5221
5322
|
_getValue(option, value) {
|
|
5222
5323
|
return option === void 0 ? value : option;
|
|
@@ -5232,7 +5333,6 @@ var require_out4 = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
5232
5333
|
"node_modules/fast-glob/out/index.js"(exports2, module2) {
|
|
5233
5334
|
"use strict";
|
|
5234
5335
|
var taskManager = require_tasks();
|
|
5235
|
-
var patternManager = require_patterns();
|
|
5236
5336
|
var async_1 = require_async6();
|
|
5237
5337
|
var stream_1 = require_stream4();
|
|
5238
5338
|
var sync_1 = require_sync6();
|
|
@@ -5245,6 +5345,10 @@ var require_out4 = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
5245
5345
|
return utils.array.flatten(result);
|
|
5246
5346
|
}
|
|
5247
5347
|
(function(FastGlob2) {
|
|
5348
|
+
FastGlob2.glob = FastGlob2;
|
|
5349
|
+
FastGlob2.globSync = sync;
|
|
5350
|
+
FastGlob2.globStream = stream;
|
|
5351
|
+
FastGlob2.async = FastGlob2;
|
|
5248
5352
|
function sync(source, options) {
|
|
5249
5353
|
assertPatternsInput(source);
|
|
5250
5354
|
const works = getWorks(source, sync_1.default, options);
|
|
@@ -5259,7 +5363,7 @@ var require_out4 = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
5259
5363
|
FastGlob2.stream = stream;
|
|
5260
5364
|
function generateTasks(source, options) {
|
|
5261
5365
|
assertPatternsInput(source);
|
|
5262
|
-
const patterns =
|
|
5366
|
+
const patterns = [].concat(source);
|
|
5263
5367
|
const settings = new settings_1.default(options);
|
|
5264
5368
|
return taskManager.generate(patterns, settings);
|
|
5265
5369
|
}
|
|
@@ -5275,9 +5379,40 @@ var require_out4 = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
|
5275
5379
|
return utils.path.escape(source);
|
|
5276
5380
|
}
|
|
5277
5381
|
FastGlob2.escapePath = escapePath;
|
|
5382
|
+
function convertPathToPattern(source) {
|
|
5383
|
+
assertPatternsInput(source);
|
|
5384
|
+
return utils.path.convertPathToPattern(source);
|
|
5385
|
+
}
|
|
5386
|
+
FastGlob2.convertPathToPattern = convertPathToPattern;
|
|
5387
|
+
let posix;
|
|
5388
|
+
(function(posix2) {
|
|
5389
|
+
function escapePath2(source) {
|
|
5390
|
+
assertPatternsInput(source);
|
|
5391
|
+
return utils.path.escapePosixPath(source);
|
|
5392
|
+
}
|
|
5393
|
+
posix2.escapePath = escapePath2;
|
|
5394
|
+
function convertPathToPattern2(source) {
|
|
5395
|
+
assertPatternsInput(source);
|
|
5396
|
+
return utils.path.convertPosixPathToPattern(source);
|
|
5397
|
+
}
|
|
5398
|
+
posix2.convertPathToPattern = convertPathToPattern2;
|
|
5399
|
+
})(posix = FastGlob2.posix || (FastGlob2.posix = {}));
|
|
5400
|
+
let win32;
|
|
5401
|
+
(function(win322) {
|
|
5402
|
+
function escapePath2(source) {
|
|
5403
|
+
assertPatternsInput(source);
|
|
5404
|
+
return utils.path.escapeWindowsPath(source);
|
|
5405
|
+
}
|
|
5406
|
+
win322.escapePath = escapePath2;
|
|
5407
|
+
function convertPathToPattern2(source) {
|
|
5408
|
+
assertPatternsInput(source);
|
|
5409
|
+
return utils.path.convertWindowsPathToPattern(source);
|
|
5410
|
+
}
|
|
5411
|
+
win322.convertPathToPattern = convertPathToPattern2;
|
|
5412
|
+
})(win32 = FastGlob2.win32 || (FastGlob2.win32 = {}));
|
|
5278
5413
|
})(FastGlob || (FastGlob = {}));
|
|
5279
5414
|
function getWorks(source, _Provider, options) {
|
|
5280
|
-
const patterns =
|
|
5415
|
+
const patterns = [].concat(source);
|
|
5281
5416
|
const settings = new settings_1.default(options);
|
|
5282
5417
|
const tasks = taskManager.generate(patterns, settings);
|
|
5283
5418
|
const provider = new _Provider(settings);
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,30 +18,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var optimizer_exports = {};
|
|
20
20
|
__export(optimizer_exports, {
|
|
21
|
-
StateNodeAttributes: () =>
|
|
22
|
-
buildConfigDescription: () =>
|
|
23
|
-
buildOptimizedProject: () =>
|
|
24
|
-
copyRecursiveAsNeeded: () =>
|
|
25
|
-
defaultConfig: () =>
|
|
26
|
-
display: () =>
|
|
27
|
-
generateOneConfig: () =>
|
|
28
|
-
generateOptimizedProject: () =>
|
|
29
|
-
getConfig: () =>
|
|
30
|
-
getFnMapAnalysis: () =>
|
|
31
|
-
getProjectAnalysis: () =>
|
|
32
|
-
get_jungle: () =>
|
|
33
|
-
isErrorWithLocation: () =>
|
|
34
|
-
launchSimulator: () =>
|
|
35
|
-
manifestProducts: () =>
|
|
36
|
-
mctree: () =>
|
|
37
|
-
simulateProgram: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_BPXB3WQQ.StateNodeAttributes,
|
|
22
|
+
buildConfigDescription: () => import_chunk_BPXB3WQQ.buildConfigDescription,
|
|
23
|
+
buildOptimizedProject: () => import_chunk_BPXB3WQQ.buildOptimizedProject,
|
|
24
|
+
copyRecursiveAsNeeded: () => import_chunk_IJS7AYMN.copyRecursiveAsNeeded,
|
|
25
|
+
defaultConfig: () => import_chunk_BPXB3WQQ.defaultConfig,
|
|
26
|
+
display: () => import_chunk_BPXB3WQQ.display,
|
|
27
|
+
generateOneConfig: () => import_chunk_BPXB3WQQ.generateOneConfig,
|
|
28
|
+
generateOptimizedProject: () => import_chunk_BPXB3WQQ.generateOptimizedProject,
|
|
29
|
+
getConfig: () => import_chunk_BPXB3WQQ.getConfig,
|
|
30
|
+
getFnMapAnalysis: () => import_chunk_BPXB3WQQ.getFnMapAnalysis,
|
|
31
|
+
getProjectAnalysis: () => import_chunk_BPXB3WQQ.getProjectAnalysis,
|
|
32
|
+
get_jungle: () => import_chunk_BPXB3WQQ.get_jungle,
|
|
33
|
+
isErrorWithLocation: () => import_chunk_BPXB3WQQ.isErrorWithLocation,
|
|
34
|
+
launchSimulator: () => import_chunk_BPXB3WQQ.launchSimulator,
|
|
35
|
+
manifestProducts: () => import_chunk_BPXB3WQQ.manifestProducts,
|
|
36
|
+
mctree: () => import_chunk_BPXB3WQQ.mctree,
|
|
37
|
+
simulateProgram: () => import_chunk_BPXB3WQQ.simulateProgram
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(optimizer_exports);
|
|
40
|
-
var
|
|
41
|
-
var
|
|
40
|
+
var import_chunk_BPXB3WQQ = require("./chunk-BPXB3WQQ.cjs");
|
|
41
|
+
var import_chunk_IJS7AYMN = require("./chunk-IJS7AYMN.cjs");
|
|
42
42
|
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
43
43
|
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
44
|
-
(0,
|
|
44
|
+
(0, import_chunk_BPXB3WQQ.init_optimizer)();
|
|
45
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
46
|
0 && (module.exports = {
|
|
47
47
|
StateNodeAttributes,
|
package/build/sdk-util.cjs
CHANGED
|
@@ -18,25 +18,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var sdk_util_exports = {};
|
|
20
20
|
__export(sdk_util_exports, {
|
|
21
|
-
SectionKinds: () =>
|
|
22
|
-
appSupport: () =>
|
|
23
|
-
connectiq: () =>
|
|
24
|
-
getDeviceInfo: () =>
|
|
25
|
-
getFunctionDocumentation: () =>
|
|
26
|
-
getLanguages: () =>
|
|
27
|
-
getSdkPath: () =>
|
|
28
|
-
isWin: () =>
|
|
29
|
-
optimizeProgram: () =>
|
|
30
|
-
readPrg: () =>
|
|
31
|
-
readPrgWithOffsets: () =>
|
|
32
|
-
xmlUtil: () =>
|
|
21
|
+
SectionKinds: () => import_chunk_BPXB3WQQ.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_BPXB3WQQ.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_BPXB3WQQ.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_BPXB3WQQ.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_BPXB3WQQ.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_BPXB3WQQ.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_BPXB3WQQ.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_BPXB3WQQ.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_BPXB3WQQ.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_BPXB3WQQ.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_BPXB3WQQ.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_BPXB3WQQ.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
36
|
-
var
|
|
35
|
+
var import_chunk_BPXB3WQQ = require("./chunk-BPXB3WQQ.cjs");
|
|
36
|
+
var import_chunk_IJS7AYMN = require("./chunk-IJS7AYMN.cjs");
|
|
37
37
|
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
38
38
|
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
39
|
-
(0,
|
|
39
|
+
(0, import_chunk_BPXB3WQQ.init_sdk_util)();
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
41
|
0 && (module.exports = {
|
|
42
42
|
SectionKinds,
|
package/build/src/cftinfo.d.ts
CHANGED
package/build/src/optimizer.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ export declare function generateOneConfig(buildConfig: JungleQualifier, manifest
|
|
|
89
89
|
}>;
|
|
90
90
|
export declare function getProjectAnalysis(targets: Target[], analysis: PreAnalysis | null, manifestXML: xmlUtil.Document, options: BuildConfig): Promise<Analysis | PreAnalysis>;
|
|
91
91
|
export declare function getFnMapAnalysis(fnMap: FilesToOptimizeMap, resourcesMap: Record<string, JungleResourceMap>, manifestXML: xmlUtil.Document, options: BuildConfig): Promise<{
|
|
92
|
-
fnMap:
|
|
92
|
+
fnMap: Analysis["fnMap"];
|
|
93
93
|
state: ProgramStateAnalysis;
|
|
94
94
|
typeMap: TypeMap | null;
|
|
95
95
|
}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import * as crypto from "node:crypto";
|
|
3
2
|
import { BuildConfig } from "../optimizer-types";
|
|
4
3
|
import { xmlUtil } from "../sdk-util";
|
|
@@ -11,6 +10,7 @@ export declare const enum SectionKinds {
|
|
|
11
10
|
HEADER = -805253120,
|
|
12
11
|
HEADER_VERSIONED = -805253107,
|
|
13
12
|
TEXT = -1059145026,
|
|
13
|
+
EXTENDED = -1059188563,
|
|
14
14
|
DATA = -629491010,
|
|
15
15
|
SYMBOLS = 1461170197,
|
|
16
16
|
LINENUM = -1059161423,
|
|
@@ -18,6 +18,10 @@ export declare const enum SectionKinds {
|
|
|
18
18
|
SIGNATURE = -507453934,
|
|
19
19
|
STORE_SIG = 20833
|
|
20
20
|
}
|
|
21
|
+
export declare const TEXT_SECTION_PC = 268435456;
|
|
22
|
+
export declare const EXTENDED_SECTION_BASE = 1342177280;
|
|
23
|
+
export declare const SECTION_PC_MASK = 4026531840;
|
|
24
|
+
export declare const PC_OFFSET_MASK = 16777215;
|
|
21
25
|
export type SectionInfo = {
|
|
22
26
|
offset: number;
|
|
23
27
|
length: number;
|