@gjsify/esbuild-plugin-gjsify 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +402 -351
- package/dist/esm/index.mjs +130 -79
- package/package.json +8 -8
- package/src/plugin.ts +1 -2
package/dist/esm/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
9
9
|
}) : x)(function(x) {
|
|
10
10
|
if (typeof require !== "undefined")
|
|
11
11
|
return require.apply(this, arguments);
|
|
12
|
-
throw
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
13
|
});
|
|
14
14
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
15
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
@@ -101,10 +101,15 @@ var require_path = __commonJS({
|
|
|
101
101
|
"../../../node_modules/fast-glob/out/utils/path.js"(exports) {
|
|
102
102
|
"use strict";
|
|
103
103
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
104
|
-
exports.
|
|
104
|
+
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
105
|
+
var os = __require("os");
|
|
105
106
|
var path = __require("path");
|
|
107
|
+
var IS_WINDOWS_PLATFORM = os.platform() === "win32";
|
|
106
108
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
107
|
-
var
|
|
109
|
+
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
110
|
+
var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
111
|
+
var DOS_DEVICE_PATH_RE = /^\\\\([.?])/;
|
|
112
|
+
var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g;
|
|
108
113
|
function unixify(filepath) {
|
|
109
114
|
return filepath.replace(/\\/g, "/");
|
|
110
115
|
}
|
|
@@ -113,10 +118,6 @@ var require_path = __commonJS({
|
|
|
113
118
|
return path.resolve(cwd, filepath);
|
|
114
119
|
}
|
|
115
120
|
exports.makeAbsolute = makeAbsolute;
|
|
116
|
-
function escape(pattern) {
|
|
117
|
-
return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
118
|
-
}
|
|
119
|
-
exports.escape = escape;
|
|
120
121
|
function removeLeadingDotSegment(entry) {
|
|
121
122
|
if (entry.charAt(0) === ".") {
|
|
122
123
|
const secondCharactery = entry.charAt(1);
|
|
@@ -127,6 +128,24 @@ var require_path = __commonJS({
|
|
|
127
128
|
return entry;
|
|
128
129
|
}
|
|
129
130
|
exports.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
131
|
+
exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
132
|
+
function escapeWindowsPath(pattern) {
|
|
133
|
+
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
134
|
+
}
|
|
135
|
+
exports.escapeWindowsPath = escapeWindowsPath;
|
|
136
|
+
function escapePosixPath(pattern) {
|
|
137
|
+
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
138
|
+
}
|
|
139
|
+
exports.escapePosixPath = escapePosixPath;
|
|
140
|
+
exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
141
|
+
function convertWindowsPathToPattern(filepath) {
|
|
142
|
+
return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
|
|
143
|
+
}
|
|
144
|
+
exports.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
145
|
+
function convertPosixPathToPattern(filepath) {
|
|
146
|
+
return escapePosixPath(filepath);
|
|
147
|
+
}
|
|
148
|
+
exports.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
130
149
|
}
|
|
131
150
|
});
|
|
132
151
|
|
|
@@ -3106,7 +3125,7 @@ var require_pattern = __commonJS({
|
|
|
3106
3125
|
"../../../node_modules/fast-glob/out/utils/pattern.js"(exports) {
|
|
3107
3126
|
"use strict";
|
|
3108
3127
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3109
|
-
exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
3128
|
+
exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
3110
3129
|
var path = __require("path");
|
|
3111
3130
|
var globParent = require_glob_parent();
|
|
3112
3131
|
var micromatch = require_micromatch();
|
|
@@ -3117,6 +3136,7 @@ var require_pattern = __commonJS({
|
|
|
3117
3136
|
var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
|
|
3118
3137
|
var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
|
|
3119
3138
|
var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
|
|
3139
|
+
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
3120
3140
|
function isStaticPattern(pattern, options = {}) {
|
|
3121
3141
|
return !isDynamicPattern(pattern, options);
|
|
3122
3142
|
}
|
|
@@ -3212,10 +3232,9 @@ var require_pattern = __commonJS({
|
|
|
3212
3232
|
}
|
|
3213
3233
|
exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
3214
3234
|
function expandBraceExpansion(pattern) {
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
});
|
|
3235
|
+
const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
|
|
3236
|
+
patterns.sort((a, b) => a.length - b.length);
|
|
3237
|
+
return patterns.filter((pattern2) => pattern2 !== "");
|
|
3219
3238
|
}
|
|
3220
3239
|
exports.expandBraceExpansion = expandBraceExpansion;
|
|
3221
3240
|
function getPatternParts(pattern, options) {
|
|
@@ -3242,6 +3261,10 @@ var require_pattern = __commonJS({
|
|
|
3242
3261
|
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
3243
3262
|
}
|
|
3244
3263
|
exports.matchAny = matchAny;
|
|
3264
|
+
function removeDuplicateSlashes(pattern) {
|
|
3265
|
+
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3266
|
+
}
|
|
3267
|
+
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3245
3268
|
}
|
|
3246
3269
|
});
|
|
3247
3270
|
|
|
@@ -3434,9 +3457,11 @@ var require_tasks = __commonJS({
|
|
|
3434
3457
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3435
3458
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
|
3436
3459
|
var utils = require_utils3();
|
|
3437
|
-
function generate(
|
|
3460
|
+
function generate(input, settings) {
|
|
3461
|
+
const patterns = processPatterns(input, settings);
|
|
3462
|
+
const ignore = processPatterns(settings.ignore, settings);
|
|
3438
3463
|
const positivePatterns = getPositivePatterns(patterns);
|
|
3439
|
-
const negativePatterns = getNegativePatternsAsPositive(patterns,
|
|
3464
|
+
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
|
|
3440
3465
|
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
|
|
3441
3466
|
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
|
|
3442
3467
|
const staticTasks = convertPatternsToTasks(
|
|
@@ -3454,6 +3479,16 @@ var require_tasks = __commonJS({
|
|
|
3454
3479
|
return staticTasks.concat(dynamicTasks);
|
|
3455
3480
|
}
|
|
3456
3481
|
exports.generate = generate;
|
|
3482
|
+
function processPatterns(input, settings) {
|
|
3483
|
+
let patterns = input;
|
|
3484
|
+
if (settings.braceExpansion) {
|
|
3485
|
+
patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
|
|
3486
|
+
}
|
|
3487
|
+
if (settings.baseNameMatch) {
|
|
3488
|
+
patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
|
|
3489
|
+
}
|
|
3490
|
+
return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
|
|
3491
|
+
}
|
|
3457
3492
|
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
3458
3493
|
const tasks = [];
|
|
3459
3494
|
const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
|
|
@@ -3511,24 +3546,6 @@ var require_tasks = __commonJS({
|
|
|
3511
3546
|
}
|
|
3512
3547
|
});
|
|
3513
3548
|
|
|
3514
|
-
// ../../../node_modules/fast-glob/out/managers/patterns.js
|
|
3515
|
-
var require_patterns = __commonJS({
|
|
3516
|
-
"../../../node_modules/fast-glob/out/managers/patterns.js"(exports) {
|
|
3517
|
-
"use strict";
|
|
3518
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3519
|
-
exports.removeDuplicateSlashes = exports.transform = void 0;
|
|
3520
|
-
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
3521
|
-
function transform(patterns) {
|
|
3522
|
-
return patterns.map((pattern) => removeDuplicateSlashes(pattern));
|
|
3523
|
-
}
|
|
3524
|
-
exports.transform = transform;
|
|
3525
|
-
function removeDuplicateSlashes(pattern) {
|
|
3526
|
-
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3527
|
-
}
|
|
3528
|
-
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3529
|
-
}
|
|
3530
|
-
});
|
|
3531
|
-
|
|
3532
3549
|
// ../../../node_modules/@nodelib/fs.stat/out/providers/async.js
|
|
3533
3550
|
var require_async = __commonJS({
|
|
3534
3551
|
"../../../node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) {
|
|
@@ -4876,8 +4893,7 @@ var require_matcher = __commonJS({
|
|
|
4876
4893
|
this._fillStorage();
|
|
4877
4894
|
}
|
|
4878
4895
|
_fillStorage() {
|
|
4879
|
-
const
|
|
4880
|
-
for (const pattern of patterns) {
|
|
4896
|
+
for (const pattern of this._patterns) {
|
|
4881
4897
|
const segments = this._getPatternSegments(pattern);
|
|
4882
4898
|
const sections = this._splitSegmentsIntoSections(segments);
|
|
4883
4899
|
this._storage.push({
|
|
@@ -5029,32 +5045,32 @@ var require_entry = __commonJS({
|
|
|
5029
5045
|
}
|
|
5030
5046
|
getFilter(positive, negative) {
|
|
5031
5047
|
const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
|
|
5032
|
-
const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
|
|
5048
|
+
const negativeRe = utils.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
|
|
5033
5049
|
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
|
5034
5050
|
}
|
|
5035
5051
|
_filter(entry, positiveRe, negativeRe) {
|
|
5036
|
-
|
|
5052
|
+
const filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
5053
|
+
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
5037
5054
|
return false;
|
|
5038
5055
|
}
|
|
5039
5056
|
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
5040
5057
|
return false;
|
|
5041
5058
|
}
|
|
5042
|
-
if (this._isSkippedByAbsoluteNegativePatterns(
|
|
5059
|
+
if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
|
|
5043
5060
|
return false;
|
|
5044
5061
|
}
|
|
5045
|
-
const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
|
|
5046
5062
|
const isDirectory = entry.dirent.isDirectory();
|
|
5047
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(
|
|
5063
|
+
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
|
|
5048
5064
|
if (this._settings.unique && isMatched) {
|
|
5049
|
-
this._createIndexRecord(
|
|
5065
|
+
this._createIndexRecord(filepath);
|
|
5050
5066
|
}
|
|
5051
5067
|
return isMatched;
|
|
5052
5068
|
}
|
|
5053
|
-
_isDuplicateEntry(
|
|
5054
|
-
return this.index.has(
|
|
5069
|
+
_isDuplicateEntry(filepath) {
|
|
5070
|
+
return this.index.has(filepath);
|
|
5055
5071
|
}
|
|
5056
|
-
_createIndexRecord(
|
|
5057
|
-
this.index.set(
|
|
5072
|
+
_createIndexRecord(filepath) {
|
|
5073
|
+
this.index.set(filepath, void 0);
|
|
5058
5074
|
}
|
|
5059
5075
|
_onlyFileFilter(entry) {
|
|
5060
5076
|
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
@@ -5069,8 +5085,7 @@ var require_entry = __commonJS({
|
|
|
5069
5085
|
const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
|
|
5070
5086
|
return utils.pattern.matchAny(fullpath, patternsRe);
|
|
5071
5087
|
}
|
|
5072
|
-
_isMatchToPatterns(
|
|
5073
|
-
const filepath = utils.path.removeLeadingDotSegment(entryPath);
|
|
5088
|
+
_isMatchToPatterns(filepath, patternsRe, isDirectory) {
|
|
5074
5089
|
const isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
5075
5090
|
if (!isMatched && isDirectory) {
|
|
5076
5091
|
return utils.pattern.matchAny(filepath + "/", patternsRe);
|
|
@@ -5376,6 +5391,7 @@ var require_settings4 = __commonJS({
|
|
|
5376
5391
|
if (this.stats) {
|
|
5377
5392
|
this.objectMode = true;
|
|
5378
5393
|
}
|
|
5394
|
+
this.ignore = [].concat(this.ignore);
|
|
5379
5395
|
}
|
|
5380
5396
|
_getValue(option, value) {
|
|
5381
5397
|
return option === void 0 ? value : option;
|
|
@@ -5393,7 +5409,6 @@ var require_out4 = __commonJS({
|
|
|
5393
5409
|
"../../../node_modules/fast-glob/out/index.js"(exports, module) {
|
|
5394
5410
|
"use strict";
|
|
5395
5411
|
var taskManager = require_tasks();
|
|
5396
|
-
var patternManager = require_patterns();
|
|
5397
5412
|
var async_1 = require_async6();
|
|
5398
5413
|
var stream_1 = require_stream4();
|
|
5399
5414
|
var sync_1 = require_sync6();
|
|
@@ -5406,6 +5421,10 @@ var require_out4 = __commonJS({
|
|
|
5406
5421
|
return utils.array.flatten(result);
|
|
5407
5422
|
}
|
|
5408
5423
|
(function(FastGlob2) {
|
|
5424
|
+
FastGlob2.glob = FastGlob2;
|
|
5425
|
+
FastGlob2.globSync = sync;
|
|
5426
|
+
FastGlob2.globStream = stream;
|
|
5427
|
+
FastGlob2.async = FastGlob2;
|
|
5409
5428
|
function sync(source, options) {
|
|
5410
5429
|
assertPatternsInput(source);
|
|
5411
5430
|
const works = getWorks(source, sync_1.default, options);
|
|
@@ -5420,7 +5439,7 @@ var require_out4 = __commonJS({
|
|
|
5420
5439
|
FastGlob2.stream = stream;
|
|
5421
5440
|
function generateTasks(source, options) {
|
|
5422
5441
|
assertPatternsInput(source);
|
|
5423
|
-
const patterns =
|
|
5442
|
+
const patterns = [].concat(source);
|
|
5424
5443
|
const settings = new settings_1.default(options);
|
|
5425
5444
|
return taskManager.generate(patterns, settings);
|
|
5426
5445
|
}
|
|
@@ -5436,9 +5455,40 @@ var require_out4 = __commonJS({
|
|
|
5436
5455
|
return utils.path.escape(source);
|
|
5437
5456
|
}
|
|
5438
5457
|
FastGlob2.escapePath = escapePath;
|
|
5458
|
+
function convertPathToPattern(source) {
|
|
5459
|
+
assertPatternsInput(source);
|
|
5460
|
+
return utils.path.convertPathToPattern(source);
|
|
5461
|
+
}
|
|
5462
|
+
FastGlob2.convertPathToPattern = convertPathToPattern;
|
|
5463
|
+
let posix;
|
|
5464
|
+
(function(posix2) {
|
|
5465
|
+
function escapePath2(source) {
|
|
5466
|
+
assertPatternsInput(source);
|
|
5467
|
+
return utils.path.escapePosixPath(source);
|
|
5468
|
+
}
|
|
5469
|
+
posix2.escapePath = escapePath2;
|
|
5470
|
+
function convertPathToPattern2(source) {
|
|
5471
|
+
assertPatternsInput(source);
|
|
5472
|
+
return utils.path.convertPosixPathToPattern(source);
|
|
5473
|
+
}
|
|
5474
|
+
posix2.convertPathToPattern = convertPathToPattern2;
|
|
5475
|
+
})(posix = FastGlob2.posix || (FastGlob2.posix = {}));
|
|
5476
|
+
let win32;
|
|
5477
|
+
(function(win322) {
|
|
5478
|
+
function escapePath2(source) {
|
|
5479
|
+
assertPatternsInput(source);
|
|
5480
|
+
return utils.path.escapeWindowsPath(source);
|
|
5481
|
+
}
|
|
5482
|
+
win322.escapePath = escapePath2;
|
|
5483
|
+
function convertPathToPattern2(source) {
|
|
5484
|
+
assertPatternsInput(source);
|
|
5485
|
+
return utils.path.convertWindowsPathToPattern(source);
|
|
5486
|
+
}
|
|
5487
|
+
win322.convertPathToPattern = convertPathToPattern2;
|
|
5488
|
+
})(win32 = FastGlob2.win32 || (FastGlob2.win32 = {}));
|
|
5439
5489
|
})(FastGlob || (FastGlob = {}));
|
|
5440
5490
|
function getWorks(source, _Provider, options) {
|
|
5441
|
-
const patterns =
|
|
5491
|
+
const patterns = [].concat(source);
|
|
5442
5492
|
const settings = new settings_1.default(options);
|
|
5443
5493
|
const tasks = taskManager.generate(patterns, settings);
|
|
5444
5494
|
const provider = new _Provider(settings);
|
|
@@ -5494,37 +5544,38 @@ var require_cjs = __commonJS({
|
|
|
5494
5544
|
build.onResolve({ filter: re }, async (args) => {
|
|
5495
5545
|
let resolvedAliasPath = aliasObj[args.path];
|
|
5496
5546
|
let namespace = args.namespace;
|
|
5497
|
-
if (resolvedAliasPath) {
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5547
|
+
if (!resolvedAliasPath) {
|
|
5548
|
+
return null;
|
|
5549
|
+
}
|
|
5550
|
+
if (resolvedAliasPath.startsWith("http://")) {
|
|
5551
|
+
namespace = "http";
|
|
5552
|
+
resolvedAliasPath = resolvedAliasPath.slice(5);
|
|
5553
|
+
} else if (resolvedAliasPath.startsWith("https://")) {
|
|
5554
|
+
namespace = "https";
|
|
5555
|
+
resolvedAliasPath = resolvedAliasPath.slice(6);
|
|
5556
|
+
} else {
|
|
5557
|
+
const resolvedAlias = await build.resolve(resolvedAliasPath, {
|
|
5558
|
+
importer: args.importer,
|
|
5559
|
+
kind: args.kind,
|
|
5560
|
+
namespace,
|
|
5561
|
+
resolveDir: args.resolveDir,
|
|
5562
|
+
pluginData: args.pluginData
|
|
5563
|
+
});
|
|
5564
|
+
if (resolvedAlias.errors.length > 0) {
|
|
5565
|
+
console.error(resolvedAlias.errors);
|
|
5566
|
+
return resolvedAlias;
|
|
5504
5567
|
} else {
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
kind: args.kind,
|
|
5508
|
-
namespace,
|
|
5509
|
-
resolveDir: args.resolveDir,
|
|
5510
|
-
pluginData: args.pluginData
|
|
5511
|
-
});
|
|
5512
|
-
if (resolvedAlias.errors) {
|
|
5513
|
-
return resolvedAlias;
|
|
5514
|
-
} else {
|
|
5515
|
-
resolvedAliasPath = resolvedAlias.path;
|
|
5516
|
-
namespace = resolvedAlias.namespace;
|
|
5517
|
-
}
|
|
5568
|
+
resolvedAliasPath = resolvedAlias.path;
|
|
5569
|
+
namespace = resolvedAlias.namespace;
|
|
5518
5570
|
}
|
|
5519
|
-
if ((0, import_fs.existsSync)(resolvedAliasPath)) {
|
|
5520
|
-
resolvedAliasPath = await (0, import_promises.realpath)(resolvedAliasPath);
|
|
5521
|
-
}
|
|
5522
|
-
return {
|
|
5523
|
-
path: resolvedAliasPath,
|
|
5524
|
-
namespace
|
|
5525
|
-
};
|
|
5526
5571
|
}
|
|
5527
|
-
|
|
5572
|
+
if ((0, import_fs.existsSync)(resolvedAliasPath)) {
|
|
5573
|
+
resolvedAliasPath = await (0, import_promises.realpath)(resolvedAliasPath);
|
|
5574
|
+
}
|
|
5575
|
+
return {
|
|
5576
|
+
path: resolvedAliasPath,
|
|
5577
|
+
namespace
|
|
5578
|
+
};
|
|
5528
5579
|
});
|
|
5529
5580
|
}
|
|
5530
5581
|
};
|
|
@@ -6267,7 +6318,7 @@ var require_lodash = __commonJS({
|
|
|
6267
6318
|
}
|
|
6268
6319
|
return new LodashWrapper(value);
|
|
6269
6320
|
}
|
|
6270
|
-
var baseCreate = function() {
|
|
6321
|
+
var baseCreate = /* @__PURE__ */ function() {
|
|
6271
6322
|
function object() {
|
|
6272
6323
|
}
|
|
6273
6324
|
return function(proto) {
|
|
@@ -9574,7 +9625,7 @@ var require_lodash = __commonJS({
|
|
|
9574
9625
|
var gte = createRelationalOperation(function(value, other) {
|
|
9575
9626
|
return value >= other;
|
|
9576
9627
|
});
|
|
9577
|
-
var isArguments = baseIsArguments(function() {
|
|
9628
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
9578
9629
|
return arguments;
|
|
9579
9630
|
}()) ? baseIsArguments : function(value) {
|
|
9580
9631
|
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/esbuild-plugin-gjsify",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Deepkit type compiler plugin for esbuild",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.cjs",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"esbuild"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@gjsify/esbuild-plugin-alias": "^0.0.
|
|
24
|
-
"@gjsify/esbuild-plugin-deepkit": "^0.0.
|
|
25
|
-
"@gjsify/esbuild-plugin-deno-loader": "^0.0.
|
|
26
|
-
"@gjsify/esbuild-plugin-transform-ext": "^0.0.
|
|
27
|
-
"fast-glob": "^3.2
|
|
23
|
+
"@gjsify/esbuild-plugin-alias": "^0.0.4",
|
|
24
|
+
"@gjsify/esbuild-plugin-deepkit": "^0.0.4",
|
|
25
|
+
"@gjsify/esbuild-plugin-deno-loader": "^0.0.4",
|
|
26
|
+
"@gjsify/esbuild-plugin-transform-ext": "^0.0.4",
|
|
27
|
+
"fast-glob": "^3.3.2",
|
|
28
28
|
"lodash": "^4.17.21"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"esbuild": "^0.
|
|
32
|
-
"typescript": "^5.
|
|
31
|
+
"esbuild": "^0.19.10",
|
|
32
|
+
"typescript": "^5.3.3"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/plugin.ts
CHANGED
|
@@ -7,7 +7,6 @@ export const gjsifyPlugin = (pluginOptions: PluginOptions = {}) => {
|
|
|
7
7
|
const plugin: Plugin = {
|
|
8
8
|
name: 'gjsify',
|
|
9
9
|
async setup(build) {
|
|
10
|
-
|
|
11
10
|
// Library mode
|
|
12
11
|
if(pluginOptions.library) {
|
|
13
12
|
switch (pluginOptions.library) {
|
|
@@ -19,7 +18,7 @@ export const gjsifyPlugin = (pluginOptions: PluginOptions = {}) => {
|
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
pluginOptions.app ||= 'gjs'
|
|
21
|
+
pluginOptions.app ||= 'gjs'
|
|
23
22
|
|
|
24
23
|
// End user applications or tests
|
|
25
24
|
switch (pluginOptions.app) {
|