ts-swc-transform 1.4.2 → 1.4.3
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/lib/loadSWC.js +15 -3
- package/dist/cjs/lib/loadSWC.js.map +1 -1
- package/dist/cjs/lib/transformVersion.js +20 -0
- package/dist/cjs/lib/transformVersion.js.map +1 -0
- package/dist/cjs/transformDirectory.js +19 -77
- package/dist/cjs/transformDirectory.js.map +1 -1
- package/dist/cjs/transformFile.js +22 -132
- package/dist/cjs/transformFile.js.map +1 -1
- package/dist/cjs/transformSync.js +3 -4
- package/dist/cjs/transformSync.js.map +1 -1
- package/dist/cjs/workers/transformDirectory.js +89 -0
- package/dist/cjs/workers/transformDirectory.js.map +1 -0
- package/dist/cjs/workers/transformFile.js +143 -0
- package/dist/cjs/workers/transformFile.js.map +1 -0
- package/dist/cjs/workers/transformSync.js +2 -2
- package/dist/cjs/workers/transformSync.js.map +1 -1
- package/dist/esm/lib/loadSWC.mjs +15 -3
- package/dist/esm/lib/loadSWC.mjs.map +1 -1
- package/dist/esm/lib/transformVersion.mjs +4 -0
- package/dist/esm/lib/transformVersion.mjs.map +1 -0
- package/dist/esm/transformDirectory.mjs +20 -26
- package/dist/esm/transformDirectory.mjs.map +1 -1
- package/dist/esm/transformFile.mjs +23 -105
- package/dist/esm/transformFile.mjs.map +1 -1
- package/dist/esm/transformSync.mjs +2 -4
- package/dist/esm/transformSync.mjs.map +1 -1
- package/dist/esm/workers/transformDirectory.mjs +22 -0
- package/dist/esm/workers/transformDirectory.mjs.map +1 -0
- package/dist/esm/workers/transformFile.mjs +100 -0
- package/dist/esm/workers/transformFile.mjs.map +1 -0
- package/dist/esm/workers/transformSync.mjs +1 -1
- package/dist/esm/workers/transformSync.mjs.map +1 -1
- package/dist/types/lib/loadSWC.d.ts +1 -1
- package/dist/types/lib/transformVersion.d.ts +2 -0
- package/dist/types/transformDirectory.d.ts +1 -1
- package/dist/types/transformFile.d.ts +4 -4
- package/dist/types/transformSync.d.ts +3 -1
- package/dist/types/workers/transformDirectory.d.ts +1 -0
- package/dist/types/workers/transformFile.d.ts +1 -0
- package/dist/types/workers/transformSync.d.ts +1 -1
- package/package.json +3 -3
package/dist/cjs/lib/loadSWC.js
CHANGED
|
@@ -15,10 +15,22 @@ function _interop_require_default(obj) {
|
|
|
15
15
|
default: obj
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var lazySWC = (0, _lazycjs.default)('@swc/core');
|
|
19
|
+
var swc = null;
|
|
20
|
+
var err = null;
|
|
19
21
|
function loadSWC(callback) {
|
|
20
|
-
(
|
|
21
|
-
|
|
22
|
+
if (swc) return callback(null, swc);
|
|
23
|
+
if (err) return callback(err);
|
|
24
|
+
(0, _installBindings.default)(function(err_) {
|
|
25
|
+
err = err || err_;
|
|
26
|
+
if (err) return callback(err);
|
|
27
|
+
try {
|
|
28
|
+
swc = swc || lazySWC();
|
|
29
|
+
return callback(null, swc);
|
|
30
|
+
} catch (err_) {
|
|
31
|
+
err = err || err_;
|
|
32
|
+
return callback(err);
|
|
33
|
+
}
|
|
22
34
|
});
|
|
23
35
|
}
|
|
24
36
|
/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["loadSWC.ts"],"sourcesContent":["import installBindings from './installBindings.js';\n// @ts-ignore\nimport lazy from './lazy.cjs';\nconst
|
|
1
|
+
{"version":3,"sources":["loadSWC.ts"],"sourcesContent":["import installBindings from './installBindings.js';\n// @ts-ignore\nimport lazy from './lazy.cjs';\nconst lazySWC = lazy('@swc/core');\n\nlet swc = null;\nlet err: Error = null;\nexport default function loadSWC(callback) {\n if (swc) return callback(null, swc);\n if (err) return callback(err);\n\n installBindings((err_) => {\n err = err || err_;\n if (err) return callback(err);\n try {\n swc = swc || lazySWC();\n return callback(null, swc);\n } catch (err_) {\n err = err || err_;\n return callback(err);\n }\n });\n}\n"],"names":["loadSWC","lazySWC","lazy","swc","err","callback","installBindings","err_"],"mappings":";;;;+BAOA;;;eAAwBA;;;sEAPI;8DAEX;;;;;;AACjB,IAAMC,UAAUC,IAAAA,gBAAI,EAAC;AAErB,IAAIC,MAAM;AACV,IAAIC,MAAa;AACF,SAASJ,QAAQK,QAAQ;IACtC,IAAIF,KAAK,OAAOE,SAAS,MAAMF;IAC/B,IAAIC,KAAK,OAAOC,SAASD;IAEzBE,IAAAA,wBAAe,EAAC,SAACC;QACfH,MAAMA,OAAOG;QACb,IAAIH,KAAK,OAAOC,SAASD;QACzB,IAAI;YACFD,MAAMA,OAAOF;YACb,OAAOI,SAAS,MAAMF;QACxB,EAAE,OAAOI,MAAM;YACbH,MAAMA,OAAOG;YACb,OAAOF,SAASD;QAClB;IACF;AACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return _default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _processcjs = /*#__PURE__*/ _interop_require_default(require("./process.js"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
var major = +_processcjs.default.versions.node.split('.')[0];
|
|
19
|
+
var _default = major < 14 ? '14' : 'local';
|
|
20
|
+
/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["transformVersion.ts"],"sourcesContent":["// @ts-ignore\nimport process from './process.cjs';\n\nconst major = +process.versions.node.split('.')[0];\nexport default major < 14 ? '14' : 'local';\n"],"names":["major","process","versions","node","split"],"mappings":"AAAA,aAAa;;;;;+BAIb;;;eAAA;;;iEAHoB;;;;;;AAEpB,IAAMA,QAAQ,CAACC,mBAAO,CAACC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;IAClD,WAAeJ,QAAQ,KAAK,OAAO"}
|
|
@@ -16,90 +16,29 @@ Object.defineProperty(exports, /**
|
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
var _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
function _define_property(obj, key, value) {
|
|
24
|
-
if (key in obj) {
|
|
25
|
-
Object.defineProperty(obj, key, {
|
|
26
|
-
value: value,
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true
|
|
30
|
-
});
|
|
31
|
-
} else {
|
|
32
|
-
obj[key] = value;
|
|
33
|
-
}
|
|
34
|
-
return obj;
|
|
35
|
-
}
|
|
19
|
+
var _url = /*#__PURE__*/ _interop_require_default(require("url"));
|
|
20
|
+
var _lazycjs = /*#__PURE__*/ _interop_require_default(require("./lib/lazy.js"));
|
|
21
|
+
var _packageRoot = /*#__PURE__*/ _interop_require_default(require("./lib/packageRoot.js"));
|
|
22
|
+
var _transformVersion = /*#__PURE__*/ _interop_require_default(require("./lib/transformVersion.js"));
|
|
36
23
|
function _interop_require_default(obj) {
|
|
37
24
|
return obj && obj.__esModule ? obj : {
|
|
38
25
|
default: obj
|
|
39
26
|
};
|
|
40
27
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
46
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
47
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
ownKeys.forEach(function(key) {
|
|
51
|
-
_define_property(target, key, source[key]);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return target;
|
|
55
|
-
}
|
|
56
|
-
function ownKeys(object, enumerableOnly) {
|
|
57
|
-
var keys = Object.keys(object);
|
|
58
|
-
if (Object.getOwnPropertySymbols) {
|
|
59
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
60
|
-
if (enumerableOnly) {
|
|
61
|
-
symbols = symbols.filter(function(sym) {
|
|
62
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
keys.push.apply(keys, symbols);
|
|
66
|
-
}
|
|
67
|
-
return keys;
|
|
68
|
-
}
|
|
69
|
-
function _object_spread_props(target, source) {
|
|
70
|
-
source = source != null ? source : {};
|
|
71
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
72
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
73
|
-
} else {
|
|
74
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
75
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
return target;
|
|
79
|
-
}
|
|
28
|
+
var __dirname = _path.default.dirname(typeof __filename !== 'undefined' ? __filename : _url.default.fileURLToPath(require("url").pathToFileURL(__filename).toString()));
|
|
29
|
+
var root = (0, _packageRoot.default)(__dirname);
|
|
30
|
+
var worker = _path.default.resolve(root, 'dist', 'cjs', 'workers', 'transformDirectory.js');
|
|
31
|
+
var call = (0, _lazycjs.default)('node-version-call');
|
|
80
32
|
function transformDirectoryCallback(src, dest, type, options, callback) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
33
|
+
try {
|
|
34
|
+
var res = call()({
|
|
35
|
+
version: _transformVersion.default,
|
|
36
|
+
callbacks: true
|
|
37
|
+
}, worker, src, dest, type, options);
|
|
38
|
+
return callback(null, res);
|
|
39
|
+
} catch (err) {
|
|
40
|
+
return callback(err);
|
|
84
41
|
}
|
|
85
|
-
options = options || {};
|
|
86
|
-
if (typeof src !== 'string') throw new Error('transformDirectory: unexpected source');
|
|
87
|
-
if (typeof dest !== 'string') throw new Error('transformDirectory: unexpected destination directory');
|
|
88
|
-
if (typeof type !== 'string') throw new Error('transformDirectory: unexpected type');
|
|
89
|
-
var tsconfig = options.tsconfig ? options.tsconfig : _gettsconfigcompat.default.getTsconfig(src);
|
|
90
|
-
var matcher = (0, _createMatcher.default)(tsconfig);
|
|
91
|
-
options = _object_spread_props(_object_spread({}, options), {
|
|
92
|
-
tsconfig: tsconfig
|
|
93
|
-
});
|
|
94
|
-
var iterator = new _fsiterator.default(src);
|
|
95
|
-
iterator.forEach(function(entry, cb) {
|
|
96
|
-
if (!entry.stats.isFile()) return cb();
|
|
97
|
-
if (!matcher(entry.fullPath)) return cb();
|
|
98
|
-
(0, _transformFile.default)(entry.fullPath, _path.default.dirname(_path.default.join(dest, entry.path)), type, options, cb);
|
|
99
|
-
}, {
|
|
100
|
-
callbacks: true,
|
|
101
|
-
concurrency: options.concurrency || 1024
|
|
102
|
-
}, callback);
|
|
103
42
|
}
|
|
104
43
|
function transformDirectory(src, dest, type, options, callback) {
|
|
105
44
|
if (typeof options === 'function') {
|
|
@@ -107,6 +46,9 @@ function transformDirectory(src, dest, type, options, callback) {
|
|
|
107
46
|
options = null;
|
|
108
47
|
}
|
|
109
48
|
options = options || {};
|
|
49
|
+
if (typeof src !== 'string') throw new Error('transformDirectory: unexpected source');
|
|
50
|
+
if (typeof dest !== 'string') throw new Error('transformDirectory: unexpected destination directory');
|
|
51
|
+
if (typeof type !== 'string') throw new Error('transformDirectory: unexpected type');
|
|
110
52
|
if (typeof callback === 'function') return transformDirectoryCallback(src, dest, type, options, callback);
|
|
111
53
|
return new Promise(function(resolve, reject) {
|
|
112
54
|
transformDirectoryCallback(src, dest, type, options, function compileCallback(err, result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport
|
|
1
|
+
{"version":3,"sources":["transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\n\n// @ts-ignore\nimport lazy from './lib/lazy.cjs';\nimport packageRoot from './lib/packageRoot.js';\nimport version from './lib/transformVersion.js';\n\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\nconst root = packageRoot(__dirname);\nconst worker = path.resolve(root, 'dist', 'cjs', 'workers', 'transformDirectory.js');\nconst call = lazy('node-version-call');\n\nfunction transformDirectoryCallback(src, dest, type, options, callback) {\n try {\n const res = call()({ version, callbacks: true }, worker, src, dest, type, options);\n return callback(null, res);\n } catch (err) {\n return callback(err);\n }\n}\n\n/**\n * @param {string} src The source directory to traverse.\n * @param {string} dest The output directory to write files to.\n * @param {string} type The type of transform ('esm' or 'cjs').\n * @param {{sourceMaps: boolean}} options Options to pass to swc.\n * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.\n * @returns {void | Promise<any>} Optional promise if callback not provided.\n */\nexport default function transformDirectory(src, dest, type, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n if (typeof src !== 'string') throw new Error('transformDirectory: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformDirectory: unexpected destination directory');\n if (typeof type !== 'string') throw new Error('transformDirectory: unexpected type');\n\n if (typeof callback === 'function') return transformDirectoryCallback(src, dest, type, options, callback);\n return new Promise((resolve, reject) => {\n transformDirectoryCallback(src, dest, type, options, function compileCallback(err, result) {\n err ? reject(err) : resolve(result);\n });\n });\n}\n"],"names":["transformDirectory","__dirname","path","dirname","__filename","url","fileURLToPath","root","packageRoot","worker","resolve","call","lazy","transformDirectoryCallback","src","dest","type","options","callback","res","version","callbacks","err","Error","Promise","reject","compileCallback","result"],"mappings":";;;;+BAsBA;;;;;;;CAOC,GACD;;;eAAwBA;;;2DA9BP;0DACD;8DAGC;kEACO;uEACJ;;;;;;AAEpB,IAAMC,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAClG,IAAMC,OAAOC,IAAAA,oBAAW,EAACP;AACzB,IAAMQ,SAASP,aAAI,CAACQ,OAAO,CAACH,MAAM,QAAQ,OAAO,WAAW;AAC5D,IAAMI,OAAOC,IAAAA,gBAAI,EAAC;AAElB,SAASC,2BAA2BC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACpE,IAAI;QACF,IAAMC,MAAMR,OAAO;YAAES,SAAAA,yBAAO;YAAEC,WAAW;QAAK,GAAGZ,QAAQK,KAAKC,MAAMC,MAAMC;QAC1E,OAAOC,SAAS,MAAMC;IACxB,EAAE,OAAOG,KAAK;QACZ,OAAOJ,SAASI;IAClB;AACF;AAUe,SAAStB,mBAAmBc,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC3E,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IACtB,IAAI,OAAOH,QAAQ,UAAU,MAAM,IAAIS,MAAM;IAC7C,IAAI,OAAOR,SAAS,UAAU,MAAM,IAAIQ,MAAM;IAC9C,IAAI,OAAOP,SAAS,UAAU,MAAM,IAAIO,MAAM;IAE9C,IAAI,OAAOL,aAAa,YAAY,OAAOL,2BAA2BC,KAAKC,MAAMC,MAAMC,SAASC;IAChG,OAAO,IAAIM,QAAQ,SAACd,SAASe;QAC3BZ,2BAA2BC,KAAKC,MAAMC,MAAMC,SAAS,SAASS,gBAAgBJ,GAAG,EAAEK,MAAM;YACvFL,MAAMG,OAAOH,OAAOZ,QAAQiB;QAC9B;IACF;AACF"}
|
|
@@ -4,154 +4,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, /**
|
|
6
6
|
* @param {string} src The source directory to traverse.
|
|
7
|
-
* @param {string} dest The output directory to write
|
|
7
|
+
* @param {string} dest The output directory to write files to.
|
|
8
8
|
* @param {string} type The type of transform ('esm' or 'cjs').
|
|
9
9
|
* @param {{sourceMaps: boolean}} options Options to pass to swc.
|
|
10
|
-
* @param {(err
|
|
11
|
-
* @returns {void | Promise<
|
|
10
|
+
* @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.
|
|
11
|
+
* @returns {void | Promise<any>} Optional promise if callback not provided.
|
|
12
12
|
*/ "default", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function() {
|
|
15
15
|
return transformFile;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
var _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
19
18
|
var _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var _transformSync = /*#__PURE__*/ _interop_require_default(require("./transformSync.js"));
|
|
25
|
-
function _define_property(obj, key, value) {
|
|
26
|
-
if (key in obj) {
|
|
27
|
-
Object.defineProperty(obj, key, {
|
|
28
|
-
value: value,
|
|
29
|
-
enumerable: true,
|
|
30
|
-
configurable: true,
|
|
31
|
-
writable: true
|
|
32
|
-
});
|
|
33
|
-
} else {
|
|
34
|
-
obj[key] = value;
|
|
35
|
-
}
|
|
36
|
-
return obj;
|
|
37
|
-
}
|
|
19
|
+
var _url = /*#__PURE__*/ _interop_require_default(require("url"));
|
|
20
|
+
var _lazycjs = /*#__PURE__*/ _interop_require_default(require("./lib/lazy.js"));
|
|
21
|
+
var _packageRoot = /*#__PURE__*/ _interop_require_default(require("./lib/packageRoot.js"));
|
|
22
|
+
var _transformVersion = /*#__PURE__*/ _interop_require_default(require("./lib/transformVersion.js"));
|
|
38
23
|
function _interop_require_default(obj) {
|
|
39
24
|
return obj && obj.__esModule ? obj : {
|
|
40
25
|
default: obj
|
|
41
26
|
};
|
|
42
27
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
48
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
49
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
ownKeys.forEach(function(key) {
|
|
53
|
-
_define_property(target, key, source[key]);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return target;
|
|
57
|
-
}
|
|
58
|
-
var matchingDeps = '\\s*[\'"`]([^\'"`]+)[\'"`]\\s*';
|
|
59
|
-
var matchingName = '\\s*(?:[\\w${},\\s*]+)\\s*';
|
|
60
|
-
var regexCJS = new RegExp("(?:(?:var|const|let)".concat(matchingName, "=\\s*)?require\\(").concat(matchingDeps, "\\);?"), 'g');
|
|
61
|
-
var regexESM = new RegExp("".concat(regexCJS, "|import(?:").concat(matchingName, "from\\s*)?").concat(matchingDeps, ";?|export(?:").concat(matchingName, "from\\s*)?").concat(matchingDeps, ";?"), 'g');
|
|
62
|
-
var importReplaceMJS = [
|
|
63
|
-
'.js',
|
|
64
|
-
'.ts',
|
|
65
|
-
'.tsx',
|
|
66
|
-
'.mts',
|
|
67
|
-
'.mjs'
|
|
68
|
-
];
|
|
69
|
-
var importReplaceCJS = [
|
|
70
|
-
'.cts'
|
|
71
|
-
];
|
|
72
|
-
var requireReplaceJS = [
|
|
73
|
-
'.mjs',
|
|
74
|
-
'.cjs',
|
|
75
|
-
'.ts',
|
|
76
|
-
'.tsx',
|
|
77
|
-
'.mts',
|
|
78
|
-
'.cts'
|
|
79
|
-
];
|
|
80
|
-
function makeReplacements(code, regex, extensions, extension) {
|
|
81
|
-
var _loop = function() {
|
|
82
|
-
var dependency = match[1] || match[2] || match[3] || match[4];
|
|
83
|
-
var ext = extensions.find(function(x) {
|
|
84
|
-
return dependency.slice(-x.length) === x;
|
|
85
|
-
});
|
|
86
|
-
if (ext) matches.push({
|
|
87
|
-
ext: ext,
|
|
88
|
-
match: match,
|
|
89
|
-
dependency: dependency
|
|
90
|
-
});
|
|
91
|
-
match = regex.exec(code);
|
|
92
|
-
};
|
|
93
|
-
var matches = [];
|
|
94
|
-
var match = regex.exec(code);
|
|
95
|
-
while(match)_loop();
|
|
96
|
-
matches = matches.reverse();
|
|
97
|
-
for(var index in matches){
|
|
98
|
-
var match1 = matches[index];
|
|
99
|
-
var start = match1.match.index + match1.match[0].indexOf(match1.dependency) + match1.dependency.indexOf(match1.ext);
|
|
100
|
-
code = code.substring(0, start) + extension + code.substring(start + match1.ext.length);
|
|
101
|
-
}
|
|
102
|
-
return code;
|
|
103
|
-
}
|
|
104
|
-
// https://github.com/vercel/next.js/blob/20b63e13ab2631d6043277895d373aa31a1b327c/packages/next/taskfile-swc.js#L118-L125
|
|
105
|
-
var interopClientDefaultExport = "/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }";
|
|
28
|
+
var __dirname = _path.default.dirname(typeof __filename !== 'undefined' ? __filename : _url.default.fileURLToPath(require("url").pathToFileURL(__filename).toString()));
|
|
29
|
+
var root = (0, _packageRoot.default)(__dirname);
|
|
30
|
+
var worker = _path.default.resolve(root, 'dist', 'cjs', 'workers', 'transformFile.js');
|
|
31
|
+
var call = (0, _lazycjs.default)('node-version-call');
|
|
106
32
|
function transformFileCallback(src, dest, type, options, callback) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
33
|
+
try {
|
|
34
|
+
var res = call()({
|
|
35
|
+
version: _transformVersion.default,
|
|
36
|
+
callbacks: true
|
|
37
|
+
}, worker, src, dest, type, options);
|
|
38
|
+
return callback(null, res);
|
|
39
|
+
} catch (err) {
|
|
40
|
+
return callback(err);
|
|
110
41
|
}
|
|
111
|
-
options = options || {};
|
|
112
|
-
if (typeof src !== 'string') throw new Error('transformFile: unexpected source');
|
|
113
|
-
if (typeof dest !== 'string') throw new Error('transformFile: unexpected destination directory');
|
|
114
|
-
if (typeof type !== 'string') throw new Error('transformFile: unexpected type');
|
|
115
|
-
_fs.default.readFile(src, 'utf8', function(err, contents) {
|
|
116
|
-
if (err) return callback(err);
|
|
117
|
-
callback = (0, _calloncefn.default)(callback);
|
|
118
|
-
try {
|
|
119
|
-
var tsconfig = options.tsconfig ? options.tsconfig : _gettsconfigcompat.default.getTsconfig(src);
|
|
120
|
-
// overrides for cjs
|
|
121
|
-
if (type === 'cjs') {
|
|
122
|
-
tsconfig = _object_spread({}, tsconfig);
|
|
123
|
-
tsconfig.tsconfig = _object_spread({}, tsconfig.config || {});
|
|
124
|
-
tsconfig.config.compilerOptions = _object_spread({}, tsconfig.config.compilerOptions || {});
|
|
125
|
-
tsconfig.config.compilerOptions.module = 'CommonJS';
|
|
126
|
-
tsconfig.config.compilerOptions.target = 'ES5';
|
|
127
|
-
}
|
|
128
|
-
var basename = _path.default.basename(src);
|
|
129
|
-
var output = (0, _transformSync.default)(contents, basename, tsconfig);
|
|
130
|
-
// infer extension and patch .mjs imports
|
|
131
|
-
var ext = _path.default.extname(basename);
|
|
132
|
-
if (type === 'esm') {
|
|
133
|
-
ext = importReplaceMJS.indexOf(ext) >= 0 ? '.mjs' : ext;
|
|
134
|
-
output.code = makeReplacements(output.code, regexESM, importReplaceMJS, '.mjs');
|
|
135
|
-
ext = importReplaceCJS.indexOf(ext) >= 0 ? '.cjs' : ext;
|
|
136
|
-
output.code = makeReplacements(output.code, regexESM, importReplaceCJS, '.cjs');
|
|
137
|
-
} else {
|
|
138
|
-
ext = requireReplaceJS.indexOf(ext) >= 0 ? '.js' : ext;
|
|
139
|
-
output.code = makeReplacements(output.code, regexCJS, requireReplaceJS, '.js');
|
|
140
|
-
output.code += interopClientDefaultExport;
|
|
141
|
-
}
|
|
142
|
-
var destFilePath = _path.default.join(dest, basename.replace(/\.[^/.]+$/, '') + ext);
|
|
143
|
-
(0, _mkdirpclassic.default)(_path.default.dirname(destFilePath), function() {
|
|
144
|
-
var queue = new _queuecb.default();
|
|
145
|
-
queue.defer(_fs.default.writeFile.bind(null, destFilePath, output.code, 'utf8'));
|
|
146
|
-
!options.sourceMaps || queue.defer(_fs.default.writeFile.bind(null, "".concat(destFilePath, ".map"), output.map, 'utf8'));
|
|
147
|
-
queue.await(function() {
|
|
148
|
-
return err ? callback(err) : callback(null, destFilePath);
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
} catch (err) {
|
|
152
|
-
callback(err);
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
42
|
}
|
|
156
43
|
function transformFile(src, dest, type, options, callback) {
|
|
157
44
|
if (typeof options === 'function') {
|
|
@@ -159,6 +46,9 @@ function transformFile(src, dest, type, options, callback) {
|
|
|
159
46
|
options = null;
|
|
160
47
|
}
|
|
161
48
|
options = options || {};
|
|
49
|
+
if (typeof src !== 'string') throw new Error('transformFile: unexpected source');
|
|
50
|
+
if (typeof dest !== 'string') throw new Error('transformFile: unexpected destination directory');
|
|
51
|
+
if (typeof type !== 'string') throw new Error('transformFile: unexpected type');
|
|
162
52
|
if (typeof callback === 'function') return transformFileCallback(src, dest, type, options, callback);
|
|
163
53
|
return new Promise(function(resolve, reject) {
|
|
164
54
|
transformFileCallback(src, dest, type, options, function compileCallback(err, result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["transformFile.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["transformFile.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\n\n// @ts-ignore\nimport lazy from './lib/lazy.cjs';\nimport packageRoot from './lib/packageRoot.js';\nimport version from './lib/transformVersion.js';\n\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\nconst root = packageRoot(__dirname);\nconst worker = path.resolve(root, 'dist', 'cjs', 'workers', 'transformFile.js');\nconst call = lazy('node-version-call');\n\nfunction transformFileCallback(src, dest, type, options, callback) {\n try {\n const res = call()({ version, callbacks: true }, worker, src, dest, type, options);\n return callback(null, res);\n } catch (err) {\n return callback(err);\n }\n}\n\n/**\n * @param {string} src The source directory to traverse.\n * @param {string} dest The output directory to write files to.\n * @param {string} type The type of transform ('esm' or 'cjs').\n * @param {{sourceMaps: boolean}} options Options to pass to swc.\n * @param {(err?: Error) =>} [callback] Optional callback. Uses promise if callback not provided.\n * @returns {void | Promise<any>} Optional promise if callback not provided.\n */\nexport default function transformFile(src, dest, type, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n if (typeof src !== 'string') throw new Error('transformFile: unexpected source');\n if (typeof dest !== 'string') throw new Error('transformFile: unexpected destination directory');\n if (typeof type !== 'string') throw new Error('transformFile: unexpected type');\n\n if (typeof callback === 'function') return transformFileCallback(src, dest, type, options, callback);\n return new Promise((resolve, reject) => {\n transformFileCallback(src, dest, type, options, function compileCallback(err, result) {\n err ? reject(err) : resolve(result);\n });\n });\n}\n"],"names":["transformFile","__dirname","path","dirname","__filename","url","fileURLToPath","root","packageRoot","worker","resolve","call","lazy","transformFileCallback","src","dest","type","options","callback","res","version","callbacks","err","Error","Promise","reject","compileCallback","result"],"mappings":";;;;+BAsBA;;;;;;;CAOC,GACD;;;eAAwBA;;;2DA9BP;0DACD;8DAGC;kEACO;uEACJ;;;;;;AAEpB,IAAMC,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAClG,IAAMC,OAAOC,IAAAA,oBAAW,EAACP;AACzB,IAAMQ,SAASP,aAAI,CAACQ,OAAO,CAACH,MAAM,QAAQ,OAAO,WAAW;AAC5D,IAAMI,OAAOC,IAAAA,gBAAI,EAAC;AAElB,SAASC,sBAAsBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC/D,IAAI;QACF,IAAMC,MAAMR,OAAO;YAAES,SAAAA,yBAAO;YAAEC,WAAW;QAAK,GAAGZ,QAAQK,KAAKC,MAAMC,MAAMC;QAC1E,OAAOC,SAAS,MAAMC;IACxB,EAAE,OAAOG,KAAK;QACZ,OAAOJ,SAASI;IAClB;AACF;AAUe,SAAStB,cAAcc,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACtE,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IACtB,IAAI,OAAOH,QAAQ,UAAU,MAAM,IAAIS,MAAM;IAC7C,IAAI,OAAOR,SAAS,UAAU,MAAM,IAAIQ,MAAM;IAC9C,IAAI,OAAOP,SAAS,UAAU,MAAM,IAAIO,MAAM;IAE9C,IAAI,OAAOL,aAAa,YAAY,OAAOL,sBAAsBC,KAAKC,MAAMC,MAAMC,SAASC;IAC3F,OAAO,IAAIM,QAAQ,SAACd,SAASe;QAC3BZ,sBAAsBC,KAAKC,MAAMC,MAAMC,SAAS,SAASS,gBAAgBJ,GAAG,EAAEK,MAAM;YAClFL,MAAMG,OAAOH,OAAOZ,QAAQiB;QAC9B;IACF;AACF"}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
Object.defineProperty(exports, /**
|
|
6
6
|
* @param {string} contents The file contents.
|
|
7
7
|
* @param {string} fileName The filename.
|
|
8
|
+
* @param {TsConfigResult} config The configuration.
|
|
8
9
|
* @returns {{ code: string, map?: string }} Returns object with the transformed code and source map if option sourceMaps was provided.
|
|
9
10
|
*/ "default", {
|
|
10
11
|
enumerable: true,
|
|
@@ -16,21 +17,19 @@ var _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
|
16
17
|
var _url = /*#__PURE__*/ _interop_require_default(require("url"));
|
|
17
18
|
var _lazycjs = /*#__PURE__*/ _interop_require_default(require("./lib/lazy.js"));
|
|
18
19
|
var _packageRoot = /*#__PURE__*/ _interop_require_default(require("./lib/packageRoot.js"));
|
|
19
|
-
var
|
|
20
|
+
var _transformVersion = /*#__PURE__*/ _interop_require_default(require("./lib/transformVersion.js"));
|
|
20
21
|
function _interop_require_default(obj) {
|
|
21
22
|
return obj && obj.__esModule ? obj : {
|
|
22
23
|
default: obj
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
var __dirname = _path.default.dirname(typeof __filename !== 'undefined' ? __filename : _url.default.fileURLToPath(require("url").pathToFileURL(__filename).toString()));
|
|
26
|
-
var major = +_processcjs.default.versions.node.split('.')[0];
|
|
27
|
-
var version = major < 14 ? '14' : 'local';
|
|
28
27
|
var root = (0, _packageRoot.default)(__dirname);
|
|
29
28
|
var worker = _path.default.resolve(root, 'dist', 'cjs', 'workers', 'transformSync.js');
|
|
30
29
|
var call = (0, _lazycjs.default)('node-version-call');
|
|
31
30
|
function transformSync(contents, fileName, config) {
|
|
32
31
|
return call()({
|
|
33
|
-
version:
|
|
32
|
+
version: _transformVersion.default,
|
|
34
33
|
callbacks: true
|
|
35
34
|
}, worker, contents, fileName, config);
|
|
36
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["transformSync.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\n\n// @ts-ignore\nimport lazy from './lib/lazy.cjs';\nimport packageRoot from './lib/packageRoot.js';\
|
|
1
|
+
{"version":3,"sources":["transformSync.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport type { TsConfigResult } from 'get-tsconfig-compat';\n\n// @ts-ignore\nimport lazy from './lib/lazy.cjs';\nimport packageRoot from './lib/packageRoot.js';\nimport version from './lib/transformVersion.js';\n\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\nconst root = packageRoot(__dirname);\nconst worker = path.resolve(root, 'dist', 'cjs', 'workers', 'transformSync.js');\nconst call = lazy('node-version-call');\n\n/**\n * @param {string} contents The file contents.\n * @param {string} fileName The filename.\n * @param {TsConfigResult} config The configuration.\n * @returns {{ code: string, map?: string }} Returns object with the transformed code and source map if option sourceMaps was provided.\n */\nexport default function transformSync(contents: string, fileName: string, config: TsConfigResult) {\n return call()({ version, callbacks: true }, worker, contents, fileName, config);\n}\n"],"names":["transformSync","__dirname","path","dirname","__filename","url","fileURLToPath","root","packageRoot","worker","resolve","call","lazy","contents","fileName","config","version","callbacks"],"mappings":";;;;+BAcA;;;;;CAKC,GACD;;;eAAwBA;;;2DApBP;0DACD;8DAIC;kEACO;uEACJ;;;;;;AAEpB,IAAMC,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAClG,IAAMC,OAAOC,IAAAA,oBAAW,EAACP;AACzB,IAAMQ,SAASP,aAAI,CAACQ,OAAO,CAACH,MAAM,QAAQ,OAAO,WAAW;AAC5D,IAAMI,OAAOC,IAAAA,gBAAI,EAAC;AAQH,SAASZ,cAAca,QAAgB,EAAEC,QAAgB,EAAEC,MAAsB;IAC9F,OAAOJ,OAAO;QAAEK,SAAAA,yBAAO;QAAEC,WAAW;IAAK,GAAGR,QAAQI,UAAUC,UAAUC;AAC1E"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return transformDirectoryWorker;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
12
|
+
var _fsiterator = /*#__PURE__*/ _interop_require_default(require("fs-iterator"));
|
|
13
|
+
var _gettsconfigcompat = /*#__PURE__*/ _interop_require_default(require("get-tsconfig-compat"));
|
|
14
|
+
var _createMatcher = /*#__PURE__*/ _interop_require_default(require("../createMatcher.js"));
|
|
15
|
+
var _transformFile = /*#__PURE__*/ _interop_require_default(require("../transformFile.js"));
|
|
16
|
+
function _define_property(obj, key, value) {
|
|
17
|
+
if (key in obj) {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
value: value,
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
obj[key] = value;
|
|
26
|
+
}
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
29
|
+
function _interop_require_default(obj) {
|
|
30
|
+
return obj && obj.__esModule ? obj : {
|
|
31
|
+
default: obj
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function _object_spread(target) {
|
|
35
|
+
for(var i = 1; i < arguments.length; i++){
|
|
36
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
37
|
+
var ownKeys = Object.keys(source);
|
|
38
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
39
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
40
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
ownKeys.forEach(function(key) {
|
|
44
|
+
_define_property(target, key, source[key]);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return target;
|
|
48
|
+
}
|
|
49
|
+
function ownKeys(object, enumerableOnly) {
|
|
50
|
+
var keys = Object.keys(object);
|
|
51
|
+
if (Object.getOwnPropertySymbols) {
|
|
52
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
53
|
+
if (enumerableOnly) {
|
|
54
|
+
symbols = symbols.filter(function(sym) {
|
|
55
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
keys.push.apply(keys, symbols);
|
|
59
|
+
}
|
|
60
|
+
return keys;
|
|
61
|
+
}
|
|
62
|
+
function _object_spread_props(target, source) {
|
|
63
|
+
source = source != null ? source : {};
|
|
64
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
65
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
66
|
+
} else {
|
|
67
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
68
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return target;
|
|
72
|
+
}
|
|
73
|
+
function transformDirectoryWorker(src, dest, type, options, callback) {
|
|
74
|
+
var tsconfig = options.tsconfig ? options.tsconfig : _gettsconfigcompat.default.getTsconfig(src);
|
|
75
|
+
var matcher = (0, _createMatcher.default)(tsconfig);
|
|
76
|
+
options = _object_spread_props(_object_spread({}, options), {
|
|
77
|
+
tsconfig: tsconfig
|
|
78
|
+
});
|
|
79
|
+
var iterator = new _fsiterator.default(src);
|
|
80
|
+
iterator.forEach(function(entry, cb) {
|
|
81
|
+
if (!entry.stats.isFile()) return cb();
|
|
82
|
+
if (!matcher(entry.fullPath)) return cb();
|
|
83
|
+
(0, _transformFile.default)(entry.fullPath, _path.default.dirname(_path.default.join(dest, entry.path)), type, options, cb);
|
|
84
|
+
}, {
|
|
85
|
+
callbacks: true,
|
|
86
|
+
concurrency: options.concurrency || 1024
|
|
87
|
+
}, callback);
|
|
88
|
+
}
|
|
89
|
+
/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["transformDirectory.ts"],"sourcesContent":["import path from 'path';\nimport Iterator from 'fs-iterator';\nimport getTS from 'get-tsconfig-compat';\n\nimport createMatcher from '../createMatcher.js';\nimport transformFile from '../transformFile.js';\n\nexport default function transformDirectoryWorker(src, dest, type, options, callback) {\n const tsconfig = options.tsconfig ? options.tsconfig : getTS.getTsconfig(src);\n const matcher = createMatcher(tsconfig);\n\n options = { ...options, tsconfig };\n const iterator = new Iterator(src);\n iterator.forEach(\n (entry, cb) => {\n if (!entry.stats.isFile()) return cb();\n if (!matcher(entry.fullPath)) return cb();\n transformFile(entry.fullPath, path.dirname(path.join(dest, entry.path)), type, options, cb);\n },\n { callbacks: true, concurrency: options.concurrency || 1024 },\n callback\n );\n}\n"],"names":["transformDirectoryWorker","src","dest","type","options","callback","tsconfig","getTS","getTsconfig","matcher","createMatcher","iterator","Iterator","forEach","entry","cb","stats","isFile","fullPath","transformFile","path","dirname","join","callbacks","concurrency"],"mappings":";;;;+BAOA;;;eAAwBA;;;2DAPP;iEACI;wEACH;oEAEQ;oEACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEX,SAASA,yBAAyBC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACjF,IAAMC,WAAWF,QAAQE,QAAQ,GAAGF,QAAQE,QAAQ,GAAGC,0BAAK,CAACC,WAAW,CAACP;IACzE,IAAMQ,UAAUC,IAAAA,sBAAa,EAACJ;IAE9BF,UAAU,wCAAKA;QAASE,UAAAA;;IACxB,IAAMK,WAAW,IAAIC,mBAAQ,CAACX;IAC9BU,SAASE,OAAO,CACd,SAACC,OAAOC;QACN,IAAI,CAACD,MAAME,KAAK,CAACC,MAAM,IAAI,OAAOF;QAClC,IAAI,CAACN,QAAQK,MAAMI,QAAQ,GAAG,OAAOH;QACrCI,IAAAA,sBAAa,EAACL,MAAMI,QAAQ,EAAEE,aAAI,CAACC,OAAO,CAACD,aAAI,CAACE,IAAI,CAACpB,MAAMY,MAAMM,IAAI,IAAIjB,MAAMC,SAASW;IAC1F,GACA;QAAEQ,WAAW;QAAMC,aAAapB,QAAQoB,WAAW,IAAI;IAAK,GAC5DnB;AAEJ"}
|