@cxl/build 0.0.1 → 0.2.0

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.
File without changes
package/amd-static.js ADDED
@@ -0,0 +1,56 @@
1
+ (function (window) {
2
+ function _require(path, resolve, reject) {
3
+ if (Array.isArray(path)) {
4
+ path = path[0];
5
+ return Promise.resolve()
6
+ .then(function () { return _require(path); })
7
+ .then(resolve, reject);
8
+ }
9
+ else {
10
+ var mod = define.modules[path];
11
+ if (!mod) {
12
+ try {
13
+ mod = module.require(path);
14
+ }
15
+ catch (e) {
16
+ throw new Error("Module \"".concat(path, "\" not found"));
17
+ }
18
+ }
19
+ return mod;
20
+ }
21
+ }
22
+ window.define = window.define || define;
23
+ function define(name, injects, module) {
24
+ window.require = window.require || _require;
25
+ if (arguments.length === 2 && Array.isArray(name)) {
26
+ module = injects;
27
+ injects = name;
28
+ name = new Error().fileName;
29
+ }
30
+ else if (arguments.length === 1) {
31
+ module = name;
32
+ injects = [];
33
+ name = new Error().fileName;
34
+ }
35
+ var modules = define.modules || (define.modules = window.require.modules || {});
36
+ var moduleExports = (name && modules[name]) || {};
37
+ if (name)
38
+ modules[name] = moduleExports;
39
+ function findModule(name) {
40
+ if (name === 'exports')
41
+ return moduleExports;
42
+ if (name === 'require')
43
+ return window.require;
44
+ var id = name.replace(/\.js$/, '');
45
+ return modules[id] || _require(name);
46
+ }
47
+ var args = injects.map(findModule);
48
+ var oldModule = window.module;
49
+ window.module = { exports: moduleExports };
50
+ module.apply(void 0, args);
51
+ if (name && window.module.exports !== moduleExports)
52
+ modules[name] = window.module.exports;
53
+ window.module = oldModule;
54
+ define.amd = true;
55
+ }
56
+ })(typeof self === 'undefined' ? global : self);
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.d.ts","../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../node_modules/typescript/lib/lib.scripthost.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../build/amd.js","../../node_modules/@types/codemirror/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/eslint/lib/rules/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/linkify-it/index.d.ts","../../node_modules/@types/mdurl/encode.d.ts","../../node_modules/@types/mdurl/decode.d.ts","../../node_modules/@types/mdurl/parse.d.ts","../../node_modules/@types/mdurl/format.d.ts","../../node_modules/@types/mdurl/index.d.ts","../../node_modules/@types/markdown-it/lib/common/utils.d.ts","../../node_modules/@types/markdown-it/lib/token.d.ts","../../node_modules/@types/markdown-it/lib/rules_inline/state_inline.d.ts","../../node_modules/@types/markdown-it/lib/helpers/parse_link_label.d.ts","../../node_modules/@types/markdown-it/lib/helpers/parse_link_destination.d.ts","../../node_modules/@types/markdown-it/lib/helpers/parse_link_title.d.ts","../../node_modules/@types/markdown-it/lib/helpers/index.d.ts","../../node_modules/@types/markdown-it/lib/ruler.d.ts","../../node_modules/@types/markdown-it/lib/rules_block/state_block.d.ts","../../node_modules/@types/markdown-it/lib/parser_block.d.ts","../../node_modules/@types/markdown-it/lib/rules_core/state_core.d.ts","../../node_modules/@types/markdown-it/lib/parser_core.d.ts","../../node_modules/@types/markdown-it/lib/parser_inline.d.ts","../../node_modules/@types/markdown-it/lib/renderer.d.ts","../../node_modules/@types/markdown-it/lib/index.d.ts","../../node_modules/@types/markdown-it/index.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/undici-types/header.d.ts","../../node_modules/undici-types/readable.d.ts","../../node_modules/undici-types/file.d.ts","../../node_modules/undici-types/fetch.d.ts","../../node_modules/undici-types/formdata.d.ts","../../node_modules/undici-types/connector.d.ts","../../node_modules/undici-types/client.d.ts","../../node_modules/undici-types/errors.d.ts","../../node_modules/undici-types/dispatcher.d.ts","../../node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/undici-types/global-origin.d.ts","../../node_modules/undici-types/pool-stats.d.ts","../../node_modules/undici-types/pool.d.ts","../../node_modules/undici-types/handlers.d.ts","../../node_modules/undici-types/balanced-pool.d.ts","../../node_modules/undici-types/agent.d.ts","../../node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/undici-types/mock-agent.d.ts","../../node_modules/undici-types/mock-client.d.ts","../../node_modules/undici-types/mock-pool.d.ts","../../node_modules/undici-types/mock-errors.d.ts","../../node_modules/undici-types/proxy-agent.d.ts","../../node_modules/undici-types/api.d.ts","../../node_modules/undici-types/cookies.d.ts","../../node_modules/undici-types/patch.d.ts","../../node_modules/undici-types/filereader.d.ts","../../node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/undici-types/websocket.d.ts","../../node_modules/undici-types/content-type.d.ts","../../node_modules/undici-types/cache.d.ts","../../node_modules/undici-types/interceptors.d.ts","../../node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@types/pngjs/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/tern/lib/tern/index.d.ts","../../node_modules/@types/tern/lib/infer/index.d.ts","../../node_modules/@types/tern/index.d.ts","../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":["a7297ff837fcdf174a9524925966429eb8e5feecc2cc55cc06574e6b092c1eaa","44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","8183509758c17d0c70da9b81f7737a74323ada9c0f46d177143389af452a5bfe","f4584e95c63371b5d507749924d94e324c7e041f964975a92e7c8a1abc840328","64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","0133ebdd17a823ae56861948870cde4dac18dd8818ab641039c85bbb720429e0","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","ade6e6c42087188b5c56f0384651c32736b2df192dadd3c8617e9845b76fd41b","874d84ca5699231d5af2868fef01fc63f948bd83be928881479db48508f92ca0","6503fb6addf62f9b10f8564d9869ad824565a914ec1ac3dd7d13da14a3f57036","f313731860257325f13351575f381fef333d4dfe30daf5a2e72f894208feea08","951b37f7d86f6012f09e6b35f1de57c69d75f16908cb0adaa56b93675ea0b853","3816fc03ffd9cbd1a7a3362a264756a4a1d547caabea50ca68303046be40e376","0c417b4ec46b88fb62a43ec00204700b560d01eb5677c7faa8ecd34610f096a8","13d29cdeb64e8496424edf42749bbb47de5e42d201cf958911a4638cbcffbd3f","0f9e381eecc5860f693c31fe463b3ca20a64ca9b8db0cf6208cd4a053f064809","95902d5561c6aac5dfc40568a12b0aca324037749dcd32a81f23423bfde69bab","5dfb2aca4136abdc5a2740f14be8134a6e6b66fd53470bb2e954e40f8abfaf3e","577463167dd69bd81f76697dfc3f7b22b77a6152f60a602a9218e52e3183ad67","b8396e9024d554b611cbe31a024b176ba7116063d19354b5a02dccd8f0118989","4b28e1c5bf88d891e07a1403358b81a51b3ba2eae1ffada51cca7476b5ac6407","7150ad575d28bf98fae321a1c0f10ad17b127927811f488ded6ff1d88d4244e5","8b155c4757d197969553de3762c8d23d5866710301de41e1b66b97c9ed867003","93733466609dd8bf72eace502a24ca7574bd073d934216e628f1b615c8d3cb3c","45e9228761aabcadb79c82fb3008523db334491525bdb8e74e0f26eaf7a4f7f4","aeacac2778c9821512b6b889da79ac31606a863610c8f28da1e483579627bf90","569fdb354062fc098a6a3ba93a029edf22d6fe480cf72b231b3c07832b2e7c97","bf9876e62fb7f4237deafab8c7444770ef6e82b4cad2d5dc768664ff340feeb2","6cf60e76d37faf0fbc2f80a873eab0fd545f6b1bf300e7f0823f956ddb3083e9","6adaa6103086f931e3eee20f0987e86e8879e9d13aa6bd6075ccfc58b9c5681c","ee0af0f2b8d3b4d0baf669f2ff6fcef4a8816a473c894cc7c905029f7505fed0","2db0dd3aaa2ed285950273ce96ae8a450b45423aa9da2d10e194570f1233fa6b","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1","e7be367719c613d580d4b27fdf8fe64c9736f48217f4b322c0d63b2971460918","3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","392eadc2af403dd10b4debfbc655c089a7fa6a9750caeb770cfb30051e55e848","62f1c00d3d246e0e3cf0224f91e122d560428ec1ccc36bb51d4574a84f1dbad0","53f0960fdcc53d097918adfd8861ffbe0db989c56ffc16c052197bf115da5ed6","662163e5327f260b23ca0a1a1ad8a74078aabb587c904fcb5ef518986987eaff","a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","c48c503c6b3f63baf18257e9a87559b5602a4e960107c762586d2a6a62b64a18","b0c0d1d13be149f790a75b381b413490f98558649428bb916fd2d71a3f47a134","3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","0364f8bb461d6e84252412d4e5590feda4eb582f77d47f7a024a7a9ff105dfdc","5433f7f77cd1fd53f45bd82445a4e437b2f6a72a32070e907530a4fea56c30c8","d0ca5d7df114035258a9d01165be309371fcccf0cccd9d57b1453204686d1ed0","ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","9a30b7fefd7f8abbca4828d481c61c18e40fe5ff107e113b1c1fcd2c8dcf2743","173b6275a81ebdb283b180654890f46516c21199734fed01a773b1c168b8c45c","304f66274aa8119e8d65a49b1cff84cbf803def6afe1b2cc987386e9a9890e22","1b9adafe8a7fefaeaf9099a0e06f602903f6268438147b843a33a5233ac71745","98273274f2dbb79b0b2009b20f74eca4a7146a3447c912d580cd5d2d94a7ae30","c933f7ba4b201c98b14275fd11a14abb950178afd2074703250fe3654fc10cd2","2eaa31492906bc8525aff3c3ec2236e22d90b0dfeee77089f196cd0adf0b3e3b","ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","8f5814f29dbaf8bacd1764aebdf1c8a6eb86381f6a188ddbac0fcbaab855ce52","a63d03de72adfb91777784015bd3b4125abd2f5ef867fc5a13920b5649e8f52b","d20e003f3d518a7c1f749dbe27c6ab5e3be7b3c905a48361b04a9557de4a6900","1d4d78c8b23c9ddaaaa49485e6adc2ec01086dfe5d8d4d36ca4cdc98d2f7e74a","44fc16356b81c0463cc7d7b2b35dcf324d8144136f5bc5ce73ced86f2b3475b5","575fb200043b11b464db8e42cc64379c5fd322b6d787638e005b5ee98a64486d","6de2f225d942562733e231a695534b30039bdf1875b377bb7255881f0df8ede8","56249fd3ef1f6b90888e606f4ea648c43978ef43a7263aafad64f8d83cd3b8aa","139ad1dc93a503da85b7a0d5f615bddbae61ad796bc68fedd049150db67a1e26","7b166975fdbd3b37afb64707b98bca88e46577bbc6c59871f9383a7df2daacd1","9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","81505c54d7cad0009352eaa21bd923ab7cdee7ec3405357a54d9a5da033a2084","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","3c1f19c7abcda6b3a4cf9438a15c7307a080bd3b51dfd56b198d9f86baf19447","2ee1645e0df9d84467cfe1d67b0ad3003c2f387de55874d565094464ee6f2927","071d4b4af5755e1a081aa3b785b5526d09276af5a50e4725dea26edd4e7deb31","9cf780e96b687e4bdfd1907ed26a688c18b89797490a00598fa8b8ab683335dd","98e00f3613402504bc2a2c9a621800ab48e0a463d1eed062208a4ae98ad8f84c","9ae88ce9f73446c24b2d2452e993b676da1b31fca5ceb7276e7f36279f693ed1","e49d7625faff2a7842e4e7b9b197f972633fca685afcf6b4403400c97d087c36","b82c38abc53922b1b3670c3af6f333c21b735722a8f156e7d357a2da7c53a0a0","b423f53647708043299ded4daa68d95c967a2ac30aa1437adc4442129d7d0a6c","7245af181218216bacb01fbdf51095617a51661f20d77178c69a377e16fb69ed","4f0fc7b7f54422bd97cfaf558ddb4bca86893839367b746a8f86b60ac7619673","4cdd8b6b51599180a387cc7c1c50f49eca5ce06595d781638fd0216520d98246","d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","8704423bf338bff381ebc951ed819935d0252d90cd6de7dffe5b0a5debb65d07","7c6929fd7cbf38499b6a600b91c3b603d1d78395046dc3499b2b92d01418b94b","ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc","68aef7344b608c22e2e6b3a5a386cb215568e1689923e5c04a89d9a62bfe2aaf","5b5337f28573ffdbc95c3653c4a7961d0f02fdf4788888253bf74a3b5a05443e","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","85f8ebd7f245e8bf29da270e8b53dcdd17528826ffd27176c5fc7e426213ef5a","0ad2a04de2246300db5468491b6d76f1f8de510822eaa0c89b46ada60f4f2cbe","7c1e19aaac1f980bf5842da2f40b19b50aa5d9429be97384a82219680ef70498","8868835a248a95ee97085831014d989ccfc87c0bc3dcffc2d628809d9648815f","65dfa4bc49ccd1355789abb6ae215b302a5b050fdee9651124fe7e826f33113c"],"root":[50],"options":{"allowJs":true,"composite":true,"declaration":true,"outFile":"./amd-static.js"},"outSignature":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","latestChangedDtsFile":"./amd-static.d.ts"},"version":"5.5.3"}
package/amd.js ADDED
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ ((window) => {
3
+ const __require = window.process ? require : undefined;
4
+ const define = (window.define || (window.define = _define));
5
+ const modules = (_require.modules = define.modules = define.modules || {});
6
+ const modulePromise = {};
7
+ const BASENAME_REGEX = /\/?([^/]+)$/;
8
+ const windowRequire = (window.require || _require);
9
+ function dirname(path) {
10
+ return path.replace(BASENAME_REGEX, '');
11
+ }
12
+ function normalize(path, basePath) {
13
+ return new URL(basePath + '/' + (path.endsWith('.js') ? path : `${path}.js`), 'https://localhost').pathname.slice(1);
14
+ }
15
+ async function _requireAsync(path) {
16
+ await Promise.resolve();
17
+ const mod = modules[path] || modulePromise[path];
18
+ if (mod)
19
+ return mod;
20
+ const modulePath = windowRequire.replace
21
+ ? windowRequire.replace(path)
22
+ : path;
23
+ return (modulePromise[path] = _import(modulePath, path));
24
+ }
25
+ function _require(path, resolve, reject, basePath) {
26
+ let actualPath = Array.isArray(path) ? path[0] : path;
27
+ let mod = modules[actualPath];
28
+ if (!mod) {
29
+ if (__require) {
30
+ try {
31
+ mod = __require(actualPath);
32
+ }
33
+ catch (e) {
34
+ }
35
+ }
36
+ if (!mod) {
37
+ if (basePath)
38
+ actualPath = normalize(actualPath, basePath);
39
+ mod = _requireAsync(actualPath);
40
+ }
41
+ }
42
+ if (resolve) {
43
+ if (mod instanceof Promise)
44
+ mod.then(resolve, reject);
45
+ else
46
+ resolve(mod);
47
+ }
48
+ return mod;
49
+ }
50
+ function defineAsync(name, injects, module) {
51
+ let isAsync = false;
52
+ const moduleExports = {};
53
+ const args = [];
54
+ function resolve(newargs) {
55
+ const hasModule = !!window.module;
56
+ const mod = (window.module = {
57
+ exports: moduleExports,
58
+ });
59
+ const result = module(...newargs);
60
+ const resultMod = (modules[name] =
61
+ result || mod.exports || moduleExports);
62
+ delete modulePromise[name];
63
+ if (hasModule)
64
+ delete window.module;
65
+ return resultMod;
66
+ }
67
+ function findModule(modname) {
68
+ if (modname === 'exports')
69
+ return moduleExports;
70
+ if (modname === 'require')
71
+ return _require;
72
+ if (modname.startsWith('.'))
73
+ return _require(modname, undefined, undefined, dirname(name));
74
+ return _require(modname);
75
+ }
76
+ for (const inject of injects) {
77
+ const mod = findModule(inject);
78
+ if (mod instanceof Promise)
79
+ isAsync = true;
80
+ args.push(mod);
81
+ }
82
+ return isAsync ? Promise.all(args).then(resolve) : resolve(args);
83
+ }
84
+ function defineNormalized(name, injects, module) {
85
+ if (!modules[name])
86
+ modulePromise[name] = defineAsync(name, injects, module);
87
+ else
88
+ throw new Error(`Module "${name}" already defined`);
89
+ }
90
+ function _define(name, injects, module) {
91
+ if (Array.isArray(name) && injects && !Array.isArray(injects)) {
92
+ defineNormalized(define.moduleName, name, injects);
93
+ }
94
+ else if (typeof name === 'function') {
95
+ defineNormalized(define.moduleName, [], name);
96
+ }
97
+ else if (typeof name === 'string' && Array.isArray(injects) && module)
98
+ defineNormalized(name, injects, module);
99
+ else
100
+ throw new Error('Invalid define');
101
+ }
102
+ function _import(url, moduleName) {
103
+ return fetch(url)
104
+ .then(res => (res.status === 200 ? res.text() : ''))
105
+ .then(__src => {
106
+ if (!__src)
107
+ return (modules[moduleName] = {});
108
+ define.moduleName = moduleName;
109
+ delete modulePromise[moduleName];
110
+ define.eval(`${__src}\n//# sourceURL=${moduleName}`);
111
+ return modules[moduleName] || modulePromise[moduleName] || {};
112
+ });
113
+ }
114
+ if (typeof window.require !== 'undefined')
115
+ _require.resolve = window.require.resolve;
116
+ window.require = window.require || _require;
117
+ _define.amd = true;
118
+ })(typeof self === 'undefined' ? global : self);
119
+ define.eval || (define.eval = function (__source) {
120
+ eval(__source);
121
+ });
package/builder.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { SpawnOptions } from 'child_process';
2
+ import { Observable } from '@cxl/rx';
3
+ import { Output } from '@cxl/source';
4
+ export interface BuildConfiguration {
5
+ target?: string;
6
+ outputDir: string;
7
+ tasks: Task[];
8
+ }
9
+ export type Task = Observable<Output>;
10
+ export declare const appLog: (...args: unknown[]) => void;
11
+ export declare function build(...targets: BuildConfiguration[]): Promise<void>;
12
+ export declare function exec(cmd: string): Observable<never, "none">;
13
+ export declare function shell(cmd: string, options?: SpawnOptions): Observable<Buffer, "none">;
14
+ export declare function run(cmd: string, params: Record<string, string | number | boolean | string[] | undefined>, options?: SpawnOptions): Promise<string>;
package/builder.js ADDED
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.appLog = void 0;
4
+ exports.build = build;
5
+ exports.exec = exec;
6
+ exports.shell = shell;
7
+ exports.run = run;
8
+ const path_1 = require("path");
9
+ const fs_1 = require("fs");
10
+ const child_process_1 = require("child_process");
11
+ const program_1 = require("@cxl/program");
12
+ const rx_1 = require("@cxl/rx");
13
+ const tsc_js_1 = require("./tsc.js");
14
+ const package_js_1 = require("./package.js");
15
+ const AppName = program_1.colors.green('build');
16
+ exports.appLog = program_1.log.bind(null, AppName);
17
+ function kb(bytes) {
18
+ return (bytes / 1000).toFixed(2) + 'kb';
19
+ }
20
+ class Build {
21
+ constructor(log, config) {
22
+ this.log = log;
23
+ this.config = config;
24
+ this.outputDir = config.outputDir || '.';
25
+ }
26
+ async runTask(task) {
27
+ await task.tap(result => {
28
+ const outFile = (0, path_1.resolve)(this.outputDir, result.path);
29
+ const source = result.source;
30
+ const outputDir = (0, path_1.dirname)(outFile);
31
+ if (!(0, fs_1.existsSync)(outputDir))
32
+ (0, child_process_1.execSync)(`mkdir -p ${outputDir}`);
33
+ (0, fs_1.writeFileSync)(outFile, source);
34
+ if (result.mtime)
35
+ (0, fs_1.utimesSync)(outFile, result.mtime, result.mtime);
36
+ const printPath = (0, path_1.relative)(process.cwd(), outFile);
37
+ this.log(`${printPath} ${kb((result.source || '').length)}`);
38
+ });
39
+ }
40
+ async build() {
41
+ try {
42
+ const target = this.config.target || '';
43
+ if (target)
44
+ this.log(`target ${target}`);
45
+ (0, child_process_1.execSync)(`mkdir -p ${this.outputDir}`);
46
+ await Promise.all(this.config.tasks.map(task => this.runTask(task)));
47
+ }
48
+ catch (e) {
49
+ console.log('BUILD: ', e);
50
+ throw 'Build finished with errors';
51
+ }
52
+ }
53
+ }
54
+ async function build(...targets) {
55
+ if (!targets)
56
+ throw new Error('Invalid configuration');
57
+ if (package_js_1.BASEDIR !== process.cwd()) {
58
+ process.chdir(package_js_1.BASEDIR);
59
+ (0, exports.appLog)(`chdir "${package_js_1.BASEDIR}"`);
60
+ }
61
+ const pkg = (0, package_js_1.readPackage)();
62
+ (0, exports.appLog)(`${pkg.name} ${pkg.version}`);
63
+ (0, exports.appLog)(`typescript ${tsc_js_1.tscVersion}`);
64
+ const runTargets = [undefined, ...process.argv];
65
+ try {
66
+ for (const targetId of runTargets) {
67
+ for (const target of targets)
68
+ if (target.target === targetId)
69
+ await new Build(exports.appLog, target).build();
70
+ }
71
+ }
72
+ catch (e) {
73
+ console.error(e);
74
+ process.exit(1);
75
+ }
76
+ }
77
+ function formatTime(time) {
78
+ const s = Number(time) / 1e9, str = s.toFixed(4) + 's';
79
+ return s > 0.1 ? (s > 0.5 ? program_1.colors.red(str) : program_1.colors.yellow(str)) : str;
80
+ }
81
+ function exec(cmd) {
82
+ return new rx_1.Observable(subs => {
83
+ (0, exports.appLog)(`sh ${cmd}`);
84
+ (0, program_1.operation)((0, program_1.sh)(cmd, {})).then(result => {
85
+ (0, exports.appLog)(`sh ${cmd}`, formatTime(result.time));
86
+ if (result.result)
87
+ console.log(result.result);
88
+ subs.complete();
89
+ }, e => {
90
+ subs.error(e);
91
+ });
92
+ });
93
+ }
94
+ function shell(cmd, options = {}) {
95
+ return new rx_1.Observable(subs => {
96
+ const proc = (0, child_process_1.spawn)(cmd, [], { shell: true, ...options });
97
+ let output;
98
+ let error;
99
+ proc.stdout?.on('data', data => (output = output
100
+ ? Buffer.concat([output, Buffer.from(data)])
101
+ : Buffer.from(data)));
102
+ proc.stderr?.on('data', data => (error = error
103
+ ? Buffer.concat([error, Buffer.from(data)])
104
+ : Buffer.from(data)));
105
+ proc.on('close', code => {
106
+ if (code)
107
+ subs.error(error || output);
108
+ else {
109
+ subs.next(output);
110
+ subs.complete();
111
+ }
112
+ });
113
+ });
114
+ }
115
+ function run(cmd, params, options) {
116
+ const args = [cmd];
117
+ for (const p in params) {
118
+ const val = params[p];
119
+ if (val === false || val === undefined)
120
+ continue;
121
+ if (Array.isArray(val)) {
122
+ val.forEach(v => args.push(`--${p} "${v}"`));
123
+ }
124
+ else
125
+ args.push(typeof val === 'boolean' ? `--${p}` : `--${p} "${val}"`);
126
+ }
127
+ console.log(args.join(' '));
128
+ return (0, program_1.sh)(args.join(' '), options);
129
+ }
package/cxl.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { Output } from '@cxl/source';
2
+ import { BuildConfiguration } from './builder.js';
3
+ export declare function minifyIf(filename: string): (source: import("@cxl/rx").Observable<Output, "none">) => import("@cxl/rx").Observable<Output, "none">;
4
+ export declare function generateTestFile(dirName: string, pkgName: string, testFile: string): string;
5
+ export declare function buildCxl(...extra: BuildConfiguration[]): Promise<void>;
package/cxl.js ADDED
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.minifyIf = minifyIf;
4
+ exports.generateTestFile = generateTestFile;
5
+ exports.buildCxl = buildCxl;
6
+ const path_1 = require("path");
7
+ const child_process_1 = require("child_process");
8
+ const fs_1 = require("fs");
9
+ const rx_1 = require("@cxl/rx");
10
+ const builder_js_1 = require("./builder.js");
11
+ const package_js_1 = require("./package.js");
12
+ const file_js_1 = require("./file.js");
13
+ const lint_js_1 = require("./lint.js");
14
+ const tsc_js_1 = require("./tsc.js");
15
+ function minifyIf(filename) {
16
+ return (0, rx_1.mergeMap)((out) => out.path === filename
17
+ ? (0, rx_1.concat)((0, rx_1.of)(out), (0, file_js_1.file)(out.path).pipe((0, file_js_1.minify)()))
18
+ : (0, rx_1.of)(out));
19
+ }
20
+ function generateTestFile(dirName, pkgName, testFile) {
21
+ return `<!DOCTYPE html>
22
+ <title>${pkgName} Test Suite</title>
23
+ <script type="module" src="/cxl/dist/tester/require-browser.js"></script>
24
+ <script type="module">
25
+ require.replace = function (path) {
26
+ return path.replace(
27
+ /^@j5g3\\/(.+)/,
28
+ (str, p1) =>
29
+ \`/j5g3/dist/\${str.endsWith('.js') ? p1 : p1 + '/index.js'}\`
30
+ )
31
+ .replace(
32
+ /^@cxl\\/workspace\\.(.+)/,
33
+ (str, p1) =>
34
+ \`/cxl.app/dist/$\{
35
+ str.endsWith('.js') ? p1 : p1 + '/index.js'
36
+ }\`
37
+ )
38
+ .replace(
39
+ /^@cxl\\/gbc\.(.*)/,
40
+ (str, p1) =>
41
+ \`/gbc/dist/$\{
42
+ str.endsWith('.js') ? p1 : p1 + '/index.js'
43
+ }\`
44
+ )
45
+ .replace(
46
+ /^@cxl\\/(ui.*)/,
47
+ (str, p1) =>
48
+ \`/ui/dist/$\{
49
+ str.endsWith('.js') ? p1 : p1 + '/index.js'
50
+ }\`
51
+ )
52
+ .replace(
53
+ /^@cxl\\/(.+)/,
54
+ (str, p1) =>
55
+ \`/cxl/dist/$\{
56
+ str.endsWith('.js') ? p1 : p1 + '/index.js'
57
+ }\`
58
+ );
59
+ };
60
+ const browserRunner = require('/cxl/dist/tester/browser-runner.js').default;
61
+
62
+ const suite = require('${testFile}').default;
63
+ browserRunner.run([suite], '../../${dirName}/spec');
64
+ </script>`;
65
+ }
66
+ function buildCxl(...extra) {
67
+ const packageJson = (0, package_js_1.readPackage)();
68
+ const cwd = process.cwd();
69
+ const tsconfigFile = require(cwd + '/tsconfig.json');
70
+ const outputDir = tsconfigFile?.compilerOptions?.outDir;
71
+ if (!outputDir)
72
+ throw new Error('No outDir field set in tsconfig.json');
73
+ const dirName = (0, path_1.basename)(outputDir);
74
+ const tester = (0, path_1.join)(__dirname, '../tester');
75
+ const isBrowser = !!packageJson.browser;
76
+ return (0, builder_js_1.build)({
77
+ target: 'clean',
78
+ outputDir,
79
+ tasks: [
80
+ (0, rx_1.observable)(() => {
81
+ (0, child_process_1.execSync)(`rm -rf ${outputDir}`);
82
+ }),
83
+ ],
84
+ }, {
85
+ outputDir,
86
+ tasks: [
87
+ (0, file_js_1.file)('index.html', 'index.html').catchError(() => rx_1.EMPTY),
88
+ (0, file_js_1.file)('debug.html', 'debug.html').catchError(() => rx_1.EMPTY),
89
+ (0, file_js_1.file)('icons.svg', 'icons.svg').catchError(() => rx_1.EMPTY),
90
+ (0, file_js_1.file)('favicon.ico', 'favicon.ico').catchError(() => rx_1.EMPTY),
91
+ (0, file_js_1.file)('test.html', 'test.html').catchError(() => (0, rx_1.of)({
92
+ path: 'test.html',
93
+ source: Buffer.from(generateTestFile(dirName, packageJson.name, './test.js')),
94
+ })),
95
+ (0, tsc_js_1.tsconfig)('tsconfig.test.json'),
96
+ ],
97
+ }, {
98
+ target: 'test',
99
+ outputDir,
100
+ tasks: [
101
+ (0, builder_js_1.exec)(`cd ${outputDir} && node ${tester} --baselinePath=../../${dirName}/spec${isBrowser ? '' : ' --node'}`),
102
+ ],
103
+ }, {
104
+ target: 'package',
105
+ outputDir: '.',
106
+ tasks: [(0, package_js_1.readme)()],
107
+ }, {
108
+ target: 'package',
109
+ outputDir,
110
+ tasks: [
111
+ (0, lint_js_1.eslint)({ resolvePluginsRelativeTo: __dirname }),
112
+ packageJson.browser
113
+ ? (0, file_js_1.file)(`${outputDir}/index.js`).pipe((0, file_js_1.minify)())
114
+ : rx_1.EMPTY,
115
+ (0, package_js_1.pkg)(),
116
+ ],
117
+ }, ...((0, fs_1.existsSync)('tsconfig.amd.json')
118
+ ? [
119
+ {
120
+ target: 'package',
121
+ outputDir: outputDir + '/amd',
122
+ tasks: [
123
+ (0, rx_1.concat)((0, tsc_js_1.tsconfig)('tsconfig.amd.json'), (0, file_js_1.minifyDir)(outputDir + '/amd', {
124
+ sourceMap: false,
125
+ changePath: false,
126
+ })),
127
+ ],
128
+ },
129
+ ]
130
+ : []), ...((0, fs_1.existsSync)('tsconfig.mjs.json')
131
+ ? [
132
+ {
133
+ target: 'package',
134
+ outputDir: outputDir + '/mjs',
135
+ tasks: [
136
+ (0, rx_1.concat)((0, tsc_js_1.tsconfig)('tsconfig.mjs.json'), (0, file_js_1.minifyDir)(outputDir + '/mjs', {
137
+ sourceMap: false,
138
+ changePath: false,
139
+ })),
140
+ ],
141
+ },
142
+ ]
143
+ : []), ...((0, fs_1.existsSync)('tsconfig.server.json')
144
+ ? [
145
+ {
146
+ outputDir: outputDir,
147
+ tasks: [(0, tsc_js_1.tsconfig)('tsconfig.server.json')],
148
+ },
149
+ ]
150
+ : []), ...((0, fs_1.existsSync)('tsconfig.worker.json')
151
+ ? [
152
+ {
153
+ outputDir: outputDir,
154
+ tasks: [
155
+ (0, tsc_js_1.tsconfig)('tsconfig.worker.json', undefined, outputDir),
156
+ ],
157
+ },
158
+ ]
159
+ : []), ...((0, fs_1.existsSync)('tsconfig.bundle.json')
160
+ ? [
161
+ {
162
+ target: 'package',
163
+ outputDir: outputDir,
164
+ tasks: [
165
+ (0, rx_1.concat)((0, tsc_js_1.tsconfig)('tsconfig.bundle.json'), (0, file_js_1.file)(`${outputDir}/index.bundle.js`).pipe((0, file_js_1.minify)({ changePath: false }))),
166
+ ],
167
+ },
168
+ ]
169
+ : []), {
170
+ target: 'docs-dev',
171
+ outputDir: '.',
172
+ tasks: [(0, package_js_1.docs)(dirName, true)],
173
+ }, ...extra, {
174
+ target: 'docs',
175
+ outputDir: '.',
176
+ tasks: [(0, package_js_1.docs)(dirName)],
177
+ });
178
+ }
package/file.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ import * as Terser from 'terser';
2
+ import { Observable } from '@cxl/rx';
3
+ import { Output } from '@cxl/source';
4
+ interface MinifyConfig extends Terser.MinifyOptions {
5
+ sourceMap?: false | {
6
+ content?: string;
7
+ url: string;
8
+ };
9
+ changePath?: boolean;
10
+ }
11
+ export declare function ls(dir: string): Observable<string, "none">;
12
+ export declare function read(source: string): Promise<Output>;
13
+ export declare function filterPath(matchPath: string): import("@cxl/rx").Operator<Output, Output>;
14
+ export declare function file(source: string, out?: string): Observable<{
15
+ path: string;
16
+ source: Buffer;
17
+ }, "none">;
18
+ export declare function basename(replace?: string): import("@cxl/rx").Operator<Output, Output>;
19
+ export declare function concatFile(outName: string, separator?: string): import("@cxl/rx").Operator<Output, {
20
+ path: string;
21
+ source: Buffer;
22
+ }>;
23
+ export declare function files(sources: string[]): Observable<Output, "none">;
24
+ export declare function matchStat(fromPath: string, toPath: string): Promise<boolean>;
25
+ export declare function copyDir(fromPath: string, toPath: string, glob?: string): Observable<never, "none">;
26
+ export declare function getSourceMap(out: Output): Output | undefined;
27
+ export declare const MinifyDefault: MinifyConfig;
28
+ export declare function minify(op?: MinifyConfig): (source: Observable<Output, "none">) => Observable<Output, "none">;
29
+ export declare function minifyDir(dir: string, op?: MinifyConfig): Observable<Output, "none">;
30
+ export declare function zip(src: string[], path: string): Observable<Output>;
31
+ export {};