bun-dev-server 1.0.2 → 1.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/index.js +1395 -706
- package/dist/index.js.map +29 -0
- package/package.json +9 -5
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/picocolors/picocolors.js", "../node_modules/ejs/ejs.js", "../node_modules/eventemitter3/index.js", "../src/server.ts", "../src/httpHandler.ts", "../src/utils/cors.ts", "../src/utils/filesystem.ts", "../src/staticAssets.ts", "../src/fileWatcher.ts", "../src/buildManager.ts", "../node_modules/eventemitter3/index.mjs", "../node_modules/p-timeout/index.js", "../node_modules/p-queue/dist/lower-bound.js", "../node_modules/p-queue/dist/priority-queue.js", "../node_modules/p-queue/dist/index.js", "../src/tsChecker.ts", "../src/bunManifest.ts", "../src/configManager.ts", "../src/bunClientHmr.ts", "../src/bunHmrPlugin.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"let p = process || {}, argv = p.argv || [], env = p.env || {}\nlet isColorSupported =\n\t!(!!env.NO_COLOR || argv.includes(\"--no-color\")) &&\n\t(!!env.FORCE_COLOR || argv.includes(\"--color\") || p.platform === \"win32\" || ((p.stdout || {}).isTTY && env.TERM !== \"dumb\") || !!env.CI)\n\nlet formatter = (open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input, index = string.indexOf(close, open.length)\n\t\treturn ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet result = \"\", cursor = 0\n\tdo {\n\t\tresult += string.substring(cursor, index) + replace\n\t\tcursor = index + close.length\n\t\tindex = string.indexOf(close, cursor)\n\t} while (~index)\n\treturn result + string.substring(cursor)\n}\n\nlet createColors = (enabled = isColorSupported) => {\n\tlet f = enabled ? formatter : () => String\n\treturn {\n\t\tisColorSupported: enabled,\n\t\treset: f(\"\\x1b[0m\", \"\\x1b[0m\"),\n\t\tbold: f(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\"),\n\t\tdim: f(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\"),\n\t\titalic: f(\"\\x1b[3m\", \"\\x1b[23m\"),\n\t\tunderline: f(\"\\x1b[4m\", \"\\x1b[24m\"),\n\t\tinverse: f(\"\\x1b[7m\", \"\\x1b[27m\"),\n\t\thidden: f(\"\\x1b[8m\", \"\\x1b[28m\"),\n\t\tstrikethrough: f(\"\\x1b[9m\", \"\\x1b[29m\"),\n\n\t\tblack: f(\"\\x1b[30m\", \"\\x1b[39m\"),\n\t\tred: f(\"\\x1b[31m\", \"\\x1b[39m\"),\n\t\tgreen: f(\"\\x1b[32m\", \"\\x1b[39m\"),\n\t\tyellow: f(\"\\x1b[33m\", \"\\x1b[39m\"),\n\t\tblue: f(\"\\x1b[34m\", \"\\x1b[39m\"),\n\t\tmagenta: f(\"\\x1b[35m\", \"\\x1b[39m\"),\n\t\tcyan: f(\"\\x1b[36m\", \"\\x1b[39m\"),\n\t\twhite: f(\"\\x1b[37m\", \"\\x1b[39m\"),\n\t\tgray: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\n\t\tbgBlack: f(\"\\x1b[40m\", \"\\x1b[49m\"),\n\t\tbgRed: f(\"\\x1b[41m\", \"\\x1b[49m\"),\n\t\tbgGreen: f(\"\\x1b[42m\", \"\\x1b[49m\"),\n\t\tbgYellow: f(\"\\x1b[43m\", \"\\x1b[49m\"),\n\t\tbgBlue: f(\"\\x1b[44m\", \"\\x1b[49m\"),\n\t\tbgMagenta: f(\"\\x1b[45m\", \"\\x1b[49m\"),\n\t\tbgCyan: f(\"\\x1b[46m\", \"\\x1b[49m\"),\n\t\tbgWhite: f(\"\\x1b[47m\", \"\\x1b[49m\"),\n\n\t\tblackBright: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\t\tredBright: f(\"\\x1b[91m\", \"\\x1b[39m\"),\n\t\tgreenBright: f(\"\\x1b[92m\", \"\\x1b[39m\"),\n\t\tyellowBright: f(\"\\x1b[93m\", \"\\x1b[39m\"),\n\t\tblueBright: f(\"\\x1b[94m\", \"\\x1b[39m\"),\n\t\tmagentaBright: f(\"\\x1b[95m\", \"\\x1b[39m\"),\n\t\tcyanBright: f(\"\\x1b[96m\", \"\\x1b[39m\"),\n\t\twhiteBright: f(\"\\x1b[97m\", \"\\x1b[39m\"),\n\n\t\tbgBlackBright: f(\"\\x1b[100m\", \"\\x1b[49m\"),\n\t\tbgRedBright: f(\"\\x1b[101m\", \"\\x1b[49m\"),\n\t\tbgGreenBright: f(\"\\x1b[102m\", \"\\x1b[49m\"),\n\t\tbgYellowBright: f(\"\\x1b[103m\", \"\\x1b[49m\"),\n\t\tbgBlueBright: f(\"\\x1b[104m\", \"\\x1b[49m\"),\n\t\tbgMagentaBright: f(\"\\x1b[105m\", \"\\x1b[49m\"),\n\t\tbgCyanBright: f(\"\\x1b[106m\", \"\\x1b[49m\"),\n\t\tbgWhiteBright: f(\"\\x1b[107m\", \"\\x1b[49m\"),\n\t}\n}\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n",
|
|
6
|
+
"(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.ejs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n/*\n * EJS Embedded JavaScript templates\n * Copyright 2112 Matthew Eernisse (mde@fleegix.org)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n*/\n'use strict';\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar fs_1 = __importDefault(require(\"fs\"));\nvar path_1 = __importDefault(require(\"path\"));\nvar utils_js_1 = __importDefault(require(\"./utils.js\"));\n/**\n * @file Embedded JavaScript templating engine. {@link http://ejs.co}\n * @author Matthew Eernisse <mde@fleegix.org>\n * @project EJS\n * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}\n */\n/**\n * EJS internal functions.\n *\n * Technically this \"module\" lies in the same file as {@link module:ejs}, for\n * the sake of organization all the private functions re grouped into this\n * module.\n *\n * @module ejs-internal\n * @private\n */\n/**\n * Embedded JavaScript templating engine.\n *\n * @module ejs\n * @public\n */\n// Keyword used in code generation -- updated to 'var' in CJS build\nvar DECLARATION_KEYWORD = 'var';\nvar ejs = {};\n/** @type {string} */\nvar _DEFAULT_OPEN_DELIMITER = '<';\nvar _DEFAULT_CLOSE_DELIMITER = '>';\nvar _DEFAULT_DELIMITER = '%';\nvar _DEFAULT_LOCALS_NAME = 'locals';\nvar _REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)';\nvar _OPTS_PASSABLE_WITH_DATA = ['delimiter', 'scope', 'context', 'debug', 'compileDebug',\n '_with', 'rmWhitespace', 'strict', 'filename', 'async'];\n// We don't allow 'cache' option to be passed in the data obj for\n// the normal `render` call, but this is where Express 2 & 3 put it\n// so we make an exception for `renderFile`\nvar _OPTS_PASSABLE_WITH_DATA_EXPRESS = _OPTS_PASSABLE_WITH_DATA.concat('cache');\nvar _BOM = /^\\uFEFF/;\nvar _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;\n/**\n * EJS template function cache. This can be a LRU object from lru-cache NPM\n * module. By default, it is {@link module:utils.cache}, a simple in-process\n * cache that grows continuously.\n *\n * @type {Cache}\n */\nejs.cache = utils_js_1.default.cache;\n/**\n * Custom file loader. Useful for template preprocessing or restricting access\n * to a certain part of the filesystem.\n *\n * @type {fileLoader}\n */\nejs.fileLoader = fs_1.default.readFileSync;\n/**\n * Name of the object containing the locals.\n *\n * This variable is overridden by {@link Options}`.localsName` if it is not\n * `undefined`.\n *\n * @type {String}\n * @public\n */\nejs.localsName = _DEFAULT_LOCALS_NAME;\n/**\n * Promise implementation -- defaults to the native implementation if available\n * This is mostly just for testability\n *\n * @type {PromiseConstructorLike}\n * @public\n */\nejs.promiseImpl = (new Function('return this;'))().Promise;\n/**\n * Get the path to the included file from the parent file path and the\n * specified path.\n *\n * @param {String} name specified path\n * @param {String} filename parent file path\n * @param {Boolean} [isDir=false] whether the parent file path is a directory\n * @return {String}\n */\nejs.resolveInclude = function (name, filename, isDir) {\n var dirname = path_1.default.dirname;\n var extname = path_1.default.extname;\n var resolve = path_1.default.resolve;\n var includePath = resolve(isDir ? filename : dirname(filename), name);\n var ext = extname(name);\n if (!ext) {\n includePath += '.ejs';\n }\n return includePath;\n};\n/**\n * Try to resolve file path on multiple directories\n *\n * @param {String} name specified path\n * @param {Array<String>} paths list of possible parent directory paths\n * @return {String}\n */\nfunction resolvePaths(name, paths) {\n var filePath;\n if (paths.some(function (v) {\n filePath = ejs.resolveInclude(name, v, true);\n return fs_1.default.existsSync(filePath);\n })) {\n return filePath;\n }\n}\n/**\n * Get the path to the included file by Options\n *\n * @param {String} path specified path\n * @param {Options} options compilation options\n * @return {String}\n */\nfunction getIncludePath(path, options) {\n var includePath;\n var filePath;\n var views = options.views;\n var match = /^[A-Za-z]+:\\\\|^\\//.exec(path);\n // Abs path\n if (match && match.length) {\n path = path.replace(/^\\/*/, '');\n if (Array.isArray(options.root)) {\n includePath = resolvePaths(path, options.root);\n }\n else {\n includePath = ejs.resolveInclude(path, options.root || '/', true);\n }\n }\n // Relative paths\n else {\n // Look relative to a passed filename first\n if (options.filename) {\n filePath = ejs.resolveInclude(path, options.filename);\n if (fs_1.default.existsSync(filePath)) {\n includePath = filePath;\n }\n }\n // Then look in any views directories\n if (!includePath && Array.isArray(views)) {\n includePath = resolvePaths(path, views);\n }\n if (!includePath && typeof options.includer !== 'function') {\n throw new Error('Could not find the include file \"' +\n options.escapeFunction(path) + '\"');\n }\n }\n return includePath;\n}\n/**\n * Get the template from a string or a file, either compiled on-the-fly or\n * read from cache (if enabled), and cache the template if needed.\n *\n * If `template` is not set, the file specified in `options.filename` will be\n * read.\n *\n * If `options.cache` is true, this function reads the file from\n * `options.filename` so it must be set prior to calling this function.\n *\n * @memberof module:ejs-internal\n * @param {Options} options compilation options\n * @param {String} [template] template source\n * @return {TemplateFunction}\n * @static\n */\nfunction handleCache(options, template) {\n var func;\n var filename = options.filename;\n var hasTemplate = arguments.length > 1;\n if (options.cache) {\n if (!filename) {\n throw new Error('cache option requires a filename');\n }\n func = ejs.cache.get(filename);\n if (func) {\n return func;\n }\n if (!hasTemplate) {\n template = fileLoader(filename).toString().replace(_BOM, '');\n }\n }\n else if (!hasTemplate) {\n // istanbul ignore if: should not happen at all\n if (!filename) {\n throw new Error('Internal EJS error: no file name or template '\n + 'provided');\n }\n template = fileLoader(filename).toString().replace(_BOM, '');\n }\n func = ejs.compile(template, options);\n if (options.cache) {\n ejs.cache.set(filename, func);\n }\n return func;\n}\n/**\n * Try calling handleCache with the given options and data and call the\n * callback with the result. If an error occurs, call the callback with\n * the error. Used by renderFile().\n *\n * @memberof module:ejs-internal\n * @param {Options} options compilation options\n * @param {Object} data template data\n * @param {RenderFileCallback} cb callback\n * @static\n */\nfunction tryHandleCache(options, data, cb) {\n var result;\n if (!cb) {\n if (typeof ejs.promiseImpl == 'function') {\n return new ejs.promiseImpl(function (resolve, reject) {\n try {\n result = handleCache(options)(data);\n resolve(result);\n }\n catch (err) {\n reject(err);\n }\n });\n }\n else {\n throw new Error('Please provide a callback function');\n }\n }\n else {\n try {\n result = handleCache(options)(data);\n }\n catch (err) {\n return cb(err);\n }\n cb(null, result);\n }\n}\n/**\n * fileLoader is independent\n *\n * @param {String} filePath ejs file path.\n * @return {String} The contents of the specified file.\n * @static\n */\nfunction fileLoader(filePath) {\n return ejs.fileLoader(filePath);\n}\n/**\n * Get the template function.\n *\n * If `options.cache` is `true`, then the template is cached.\n *\n * @memberof module:ejs-internal\n * @param {String} path path for the specified file\n * @param {Options} options compilation options\n * @return {TemplateFunction}\n * @static\n */\nfunction includeFile(path, options) {\n var opts = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), options);\n opts.filename = getIncludePath(path, opts);\n if (typeof options.includer === 'function') {\n var includerResult = options.includer(path, opts.filename);\n if (includerResult) {\n if (includerResult.filename) {\n opts.filename = includerResult.filename;\n }\n if (includerResult.template) {\n return handleCache(opts, includerResult.template);\n }\n }\n }\n return handleCache(opts);\n}\n/**\n * Re-throw the given `err` in context to the `str` of ejs, `filename`, and\n * `lineno`.\n *\n * @implements {RethrowCallback}\n * @memberof module:ejs-internal\n * @param {Error} err Error object\n * @param {String} str EJS source\n * @param {String} flnm file name of the EJS file\n * @param {Number} lineno line number of the error\n * @param {EscapeCallback} esc\n * @static\n */\nfunction rethrow(err, str, flnm, lineno, esc) {\n var lines = str.split('\\n');\n var start = Math.max(lineno - 3, 0);\n var end = Math.min(lines.length, lineno + 3);\n var filename = esc(flnm);\n // Error context\n var context = lines.slice(start, end).map(function (line, i) {\n var curr = i + start + 1;\n return (curr == lineno ? ' >> ' : ' ')\n + curr\n + '| '\n + line;\n }).join('\\n');\n // Alter exception message\n err.path = filename;\n err.message = (filename || 'ejs') + ':'\n + lineno + '\\n'\n + context + '\\n\\n'\n + err.message;\n throw err;\n}\nfunction stripSemi(str) {\n return str.replace(/;(\\s*$)/, '$1');\n}\n/**\n * Compile the given `str` of ejs into a template function.\n *\n * @param {String} template EJS template\n *\n * @param {Options} [opts] compilation options\n *\n * @return {TemplateFunction}\n * Note that the return type of the function depends on the value of `opts.async`.\n * @public\n */\nejs.compile = function compile(template, opts) {\n var templ;\n // v1 compat\n // 'scope' is 'context'\n // FIXME: Remove this in a future version\n if (opts && opts.scope) {\n console.warn('`scope` option is deprecated and will be removed in future EJS');\n if (!opts.context) {\n opts.context = opts.scope;\n }\n delete opts.scope;\n }\n templ = new Template(template, opts);\n return templ.compile();\n};\n/**\n * Render the given `template` of ejs.\n *\n * If you would like to include options but not data, you need to explicitly\n * call this function with `data` being an empty object or `null`.\n *\n * @param {String} template EJS template\n * @param {Object} [data={}] template data\n * @param {Options} [opts={}] compilation and rendering options\n * @return {(String|Promise<String>)}\n * Return value type depends on `opts.async`.\n * @public\n */\nejs.render = function (template, d, o) {\n var data = d || utils_js_1.default.createNullProtoObjWherePossible();\n var opts = o || utils_js_1.default.createNullProtoObjWherePossible();\n // No options object -- if there are optiony names\n // in the data, copy them to options\n if (arguments.length == 2) {\n utils_js_1.default.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA);\n }\n return handleCache(opts, template)(data);\n};\n/**\n * Render an EJS file at the given `path` and callback `cb(err, str)`.\n *\n * If you would like to include options but not data, you need to explicitly\n * call this function with `data` being an empty object or `null`.\n *\n * @param {String} path path to the EJS file\n * @param {Object} [data={}] template data\n * @param {Options} [opts={}] compilation and rendering options\n * @param {RenderFileCallback} cb callback\n * @public\n */\nejs.renderFile = function () {\n var args = Array.prototype.slice.call(arguments);\n var filename = args.shift();\n var cb;\n var opts = { filename: filename };\n var data;\n var viewOpts;\n // Do we have a callback?\n if (typeof arguments[arguments.length - 1] == 'function') {\n cb = args.pop();\n }\n // Do we have data/opts?\n if (args.length) {\n // Should always have data obj\n data = args.shift();\n // Normal passed opts (data obj + opts obj)\n if (args.length) {\n // Use shallowCopy so we don't pollute passed in opts obj with new vals\n utils_js_1.default.shallowCopy(opts, args.pop());\n }\n // Special casing for Express (settings + opts-in-data)\n else {\n // Express 3 and 4\n if (data.settings) {\n // Pull a few things from known locations\n if (data.settings.views) {\n opts.views = data.settings.views;\n }\n if (data.settings['view cache']) {\n opts.cache = true;\n }\n // Undocumented after Express 2, but still usable, esp. for\n // items that are unsafe to be passed along with data, like `root`\n viewOpts = data.settings['view options'];\n if (viewOpts) {\n utils_js_1.default.shallowCopy(opts, viewOpts);\n }\n }\n // Express 2 and lower, values set in app.locals, or people who just\n // want to pass options in their data. NOTE: These values will override\n // anything previously set in settings or settings['view options']\n utils_js_1.default.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS);\n }\n opts.filename = filename;\n }\n else {\n data = utils_js_1.default.createNullProtoObjWherePossible();\n }\n return tryHandleCache(opts, data, cb);\n};\n/**\n * Clear intermediate JavaScript cache. Calls {@link Cache#reset}.\n * @public\n */\n/**\n * EJS template class\n * @public\n */\nejs.Template = Template;\nejs.clearCache = function () {\n ejs.cache.reset();\n};\nfunction Template(text, optsParam) {\n var opts = utils_js_1.default.hasOwnOnlyObject(optsParam);\n var options = utils_js_1.default.createNullProtoObjWherePossible();\n this.templateText = text;\n /** @type {string | null} */\n this.mode = null;\n this.truncate = false;\n this.currentLine = 1;\n this.source = '';\n options.escapeFunction = opts.escape || opts.escapeFunction || utils_js_1.default.escapeXML;\n options.compileDebug = opts.compileDebug !== false;\n options.debug = !!opts.debug;\n options.filename = opts.filename;\n options.openDelimiter = opts.openDelimiter || ejs.openDelimiter || _DEFAULT_OPEN_DELIMITER;\n options.closeDelimiter = opts.closeDelimiter || ejs.closeDelimiter || _DEFAULT_CLOSE_DELIMITER;\n options.delimiter = opts.delimiter || ejs.delimiter || _DEFAULT_DELIMITER;\n options.strict = opts.strict || false;\n options.context = opts.context;\n options.cache = opts.cache || false;\n options.rmWhitespace = opts.rmWhitespace;\n options.root = opts.root;\n options.includer = opts.includer;\n options.outputFunctionName = opts.outputFunctionName;\n options.localsName = opts.localsName || ejs.localsName || _DEFAULT_LOCALS_NAME;\n options.views = opts.views;\n options.async = opts.async;\n options.destructuredLocals = opts.destructuredLocals;\n options.legacyInclude = typeof opts.legacyInclude != 'undefined' ? !!opts.legacyInclude : true;\n if (options.strict) {\n options._with = false;\n }\n else {\n options._with = typeof opts._with != 'undefined' ? opts._with : true;\n }\n this.opts = options;\n this.regex = this.createRegex();\n}\nTemplate.modes = {\n EVAL: 'eval',\n ESCAPED: 'escaped',\n RAW: 'raw',\n COMMENT: 'comment',\n LITERAL: 'literal'\n};\nTemplate.prototype = {\n createRegex: function () {\n var str = _REGEX_STRING;\n var delim = utils_js_1.default.escapeRegExpChars(this.opts.delimiter);\n var open = utils_js_1.default.escapeRegExpChars(this.opts.openDelimiter);\n var close = utils_js_1.default.escapeRegExpChars(this.opts.closeDelimiter);\n str = str.replace(/%/g, delim)\n .replace(/</g, open)\n .replace(/>/g, close);\n return new RegExp(str);\n },\n compile: function () {\n /** @type {string} */\n var src;\n var fn;\n var opts = this.opts;\n var prepended = '';\n var appended = '';\n /** @type {EscapeCallback} */\n var escapeFn = opts.escapeFunction;\n /** @type {FunctionConstructor} */\n var ctor;\n /** @type {string} */\n var sanitizedFilename = opts.filename ? JSON.stringify(opts.filename) : 'undefined';\n if (!this.source) {\n this.generateSource();\n prepended +=\n \" \".concat(DECLARATION_KEYWORD, \" __output = \\\"\\\";\\n\") +\n ' function __append(s) { if (s !== undefined && s !== null) __output += s }\\n';\n if (opts.outputFunctionName) {\n if (!_JS_IDENTIFIER.test(opts.outputFunctionName)) {\n throw new Error('outputFunctionName is not a valid JS identifier.');\n }\n prepended += \" \".concat(DECLARATION_KEYWORD, \" \") + opts.outputFunctionName + ' = __append;' + '\\n';\n }\n if (opts.localsName && !_JS_IDENTIFIER.test(opts.localsName)) {\n throw new Error('localsName is not a valid JS identifier.');\n }\n if (opts.destructuredLocals && opts.destructuredLocals.length) {\n var destructuring = \" \".concat(DECLARATION_KEYWORD, \" __locals = (\") + opts.localsName + ' || {}),\\n';\n for (var i = 0; i < opts.destructuredLocals.length; i++) {\n var name_1 = opts.destructuredLocals[i];\n if (!_JS_IDENTIFIER.test(name_1)) {\n throw new Error('destructuredLocals[' + i + '] is not a valid JS identifier.');\n }\n if (i > 0) {\n destructuring += ',\\n ';\n }\n destructuring += name_1 + ' = __locals.' + name_1;\n }\n prepended += destructuring + ';\\n';\n }\n if (opts._with !== false) {\n prepended += ' with (' + opts.localsName + ' || {}) {' + '\\n';\n appended += ' }' + '\\n';\n }\n appended += ' return __output;' + '\\n';\n this.source = prepended + this.source + appended;\n }\n if (opts.compileDebug) {\n src = \"\".concat(DECLARATION_KEYWORD, \" __line = 1\") + '\\n'\n + ' , __lines = ' + JSON.stringify(this.templateText) + '\\n'\n + ' , __filename = ' + sanitizedFilename + ';' + '\\n'\n + 'try {' + '\\n'\n + this.source\n + '} catch (e) {' + '\\n'\n + ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\\n'\n + '}' + '\\n';\n }\n else {\n src = this.source;\n }\n if (opts.strict) {\n src = '\"use strict\";\\n' + src;\n }\n if (opts.debug) {\n console.log(src);\n }\n if (opts.compileDebug && opts.filename) {\n src = src + '\\n'\n + '//# sourceURL=' + sanitizedFilename + '\\n';\n }\n try {\n if (opts.async) {\n // Have to use generated function for this, since in envs without support,\n // it breaks in parsing\n try {\n ctor = (new Function('return (async function(){}).constructor;'))();\n }\n catch (e) {\n if (e instanceof SyntaxError) {\n throw new Error('This environment does not support async/await');\n }\n else {\n throw e;\n }\n }\n }\n else {\n ctor = Function;\n }\n fn = new ctor(opts.localsName + ', escapeFn, include, rethrow', src);\n }\n catch (e) {\n // istanbul ignore else\n if (e instanceof SyntaxError) {\n if (opts.filename) {\n e.message += ' in ' + opts.filename;\n }\n e.message += ' while compiling ejs\\n\\n';\n e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\\n';\n e.message += 'https://github.com/RyanZim/EJS-Lint';\n if (!opts.async) {\n e.message += '\\n';\n e.message += 'Or, if you meant to create an async function, pass `async: true` as an option.';\n }\n }\n throw e;\n }\n // Return a callable function which will execute the function\n // created by the source-code, with the passed data as locals\n // Adds a local `include` function which allows full recursive include\n var returnedFn = function anonymous(data) {\n var include = function (path, includeData) {\n var d = utils_js_1.default.shallowCopy(utils_js_1.default.createNullProtoObjWherePossible(), data);\n if (includeData) {\n d = utils_js_1.default.shallowCopy(d, includeData);\n }\n return includeFile(path, opts)(d);\n };\n return fn.apply(opts.context, [data || utils_js_1.default.createNullProtoObjWherePossible(), escapeFn, include, rethrow]);\n };\n if (opts.filename && typeof Object.defineProperty === 'function') {\n var filename = opts.filename;\n var basename = path_1.default.basename(filename, path_1.default.extname(filename));\n try {\n Object.defineProperty(returnedFn, 'name', {\n value: basename,\n writable: false,\n enumerable: false,\n configurable: true\n });\n }\n catch (e) { /* ignore */ }\n }\n return returnedFn;\n },\n generateSource: function () {\n var opts = this.opts;\n if (opts.rmWhitespace) {\n // Have to use two separate replace here as `^` and `$` operators don't\n // work well with `\\r` and empty lines don't work well with the `m` flag.\n this.templateText =\n this.templateText.replace(/[\\r\\n]+/g, '\\n').replace(/^\\s+|\\s+$/gm, '');\n }\n var self = this;\n var d = this.opts.delimiter;\n var o = this.opts.openDelimiter;\n var c = this.opts.closeDelimiter;\n // Slurp spaces and tabs before opening whitespace slurp tag and after closing whitespace slurp tag\n // Build the tags using custom delimiters: openDelimiter + delimiter + '_' and '_' + delimiter + closeDelimiter\n var openWhitespaceSlurpTag = utils_js_1.default.escapeRegExpChars(o + d + '_');\n var closeWhitespaceSlurpTag = utils_js_1.default.escapeRegExpChars('_' + d + c);\n var openWhitespaceSlurpReplacement = o + d + '_';\n var closeWhitespaceSlurpReplacement = '_' + d + c;\n this.templateText =\n this.templateText.replace(new RegExp('[ \\\\t]*' + openWhitespaceSlurpTag, 'gm'), openWhitespaceSlurpReplacement)\n .replace(new RegExp(closeWhitespaceSlurpTag + '[ \\\\t]*', 'gm'), closeWhitespaceSlurpReplacement);\n var matches = this.parseTemplateText();\n if (matches && matches.length) {\n matches.forEach(function (line, index) {\n var closing;\n // If this is an opening tag, check for closing tags\n // FIXME: May end up with some false positives here\n // Better to store modes as k/v with openDelimiter + delimiter as key\n // Then this can simply check against the map\n if (line.indexOf(o + d) === 0 // If it is a tag\n && line.indexOf(o + d + d) !== 0) { // and is not escaped\n closing = matches[index + 2];\n if (!(closing == d + c || closing == '-' + d + c || closing == '_' + d + c)) {\n throw new Error('Could not find matching close tag for \"' + line + '\".');\n }\n }\n self.scanLine(line);\n });\n }\n },\n parseTemplateText: function () {\n var str = this.templateText;\n var pat = this.regex;\n var result = pat.exec(str);\n var arr = [];\n var firstPos;\n while (result) {\n firstPos = result.index;\n if (firstPos !== 0) {\n arr.push(str.substring(0, firstPos));\n str = str.slice(firstPos);\n }\n arr.push(result[0]);\n str = str.slice(result[0].length);\n result = pat.exec(str);\n }\n if (str) {\n arr.push(str);\n }\n return arr;\n },\n _addOutput: function (line) {\n if (this.truncate) {\n // Only replace single leading linebreak in the line after\n // -%> tag -- this is the single, trailing linebreak\n // after the tag that the truncation mode replaces\n // Handle Win / Unix / old Mac linebreaks -- do the \\r\\n\n // combo first in the regex-or\n line = line.replace(/^(?:\\r\\n|\\r|\\n)/, '');\n this.truncate = false;\n }\n if (!line) {\n return line;\n }\n // Preserve literal slashes\n line = line.replace(/\\\\/g, '\\\\\\\\');\n // Convert linebreaks\n line = line.replace(/\\n/g, '\\\\n');\n line = line.replace(/\\r/g, '\\\\r');\n // Escape double-quotes\n // - this will be the delimiter during execution\n line = line.replace(/\"/g, '\\\\\"');\n this.source += ' ; __append(\"' + line + '\")' + '\\n';\n },\n scanLine: function (line) {\n var self = this;\n var d = this.opts.delimiter;\n var o = this.opts.openDelimiter;\n var c = this.opts.closeDelimiter;\n var newLineCount = 0;\n newLineCount = (line.split('\\n').length - 1);\n switch (line) {\n case o + d:\n case o + d + '_':\n this.mode = Template.modes.EVAL;\n break;\n case o + d + '=':\n this.mode = Template.modes.ESCAPED;\n break;\n case o + d + '-':\n this.mode = Template.modes.RAW;\n break;\n case o + d + '#':\n this.mode = Template.modes.COMMENT;\n break;\n case o + d + d:\n this.mode = Template.modes.LITERAL;\n this.source += ' ; __append(\"' + line.replace(o + d + d, o + d) + '\")' + '\\n';\n break;\n case d + d + c:\n this.mode = Template.modes.LITERAL;\n this.source += ' ; __append(\"' + line.replace(d + d + c, d + c) + '\")' + '\\n';\n break;\n case d + c:\n case '-' + d + c:\n case '_' + d + c:\n if (this.mode == Template.modes.LITERAL) {\n this._addOutput(line);\n }\n this.mode = null;\n this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;\n break;\n default:\n // In script mode, depends on type of tag\n if (this.mode) {\n // If '//' is found without a line break, add a line break.\n switch (this.mode) {\n case Template.modes.EVAL:\n case Template.modes.ESCAPED:\n case Template.modes.RAW:\n if (line.lastIndexOf('//') > line.lastIndexOf('\\n')) {\n line += '\\n';\n }\n }\n switch (this.mode) {\n // Just executing code\n case Template.modes.EVAL:\n this.source += ' ; ' + line + '\\n';\n break;\n // Exec, esc, and output\n case Template.modes.ESCAPED:\n this.source += ' ; __append(escapeFn(' + stripSemi(line) + '))' + '\\n';\n break;\n // Exec and output\n case Template.modes.RAW:\n this.source += ' ; __append(' + stripSemi(line) + ')' + '\\n';\n break;\n case Template.modes.COMMENT:\n // Do nothing\n break;\n // Literal <%% mode, append as raw output\n case Template.modes.LITERAL:\n this._addOutput(line);\n break;\n }\n }\n // In string mode, just add the output\n else {\n this._addOutput(line);\n }\n }\n if (self.opts.compileDebug && newLineCount) {\n this.currentLine += newLineCount;\n this.source += ' ; __line = ' + this.currentLine + '\\n';\n }\n }\n};\n/**\n * Escape characters reserved in XML.\n *\n * This is simply an export of {@link module:utils.escapeXML}.\n *\n * If `markup` is `undefined` or `null`, the empty string is returned.\n *\n * @param {String} markup Input string\n * @return {String} Escaped string\n * @public\n * @func\n * */\nejs.escapeXML = utils_js_1.default.escapeXML;\n/**\n * Express.js support.\n *\n * This is an alias for {@link module:ejs.renderFile}, in order to support\n * Express.js out-of-the-box.\n *\n * @func\n */\nejs.__express = ejs.renderFile;\n/* istanbul ignore if */\nif (typeof window != 'undefined') {\n window.ejs = ejs;\n}\nif (typeof module != 'undefined') {\n module.exports = ejs;\n}\nexports.default = ejs;\n\n},{\"./utils.js\":2,\"fs\":3,\"path\":4}],2:[function(require,module,exports){\n/*\n * EJS Embedded JavaScript templates\n * Copyright 2112 Matthew Eernisse (mde@fleegix.org)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n*/\n/**\n * Private utility functions\n * @module utils\n * @private\n */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils = {};\nvar regExpChars = /[|\\\\{}()[\\]^$+*?.]/g;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar hasOwn = function (obj, key) { return hasOwnProperty.apply(obj, [key]); };\n/**\n * Escape characters reserved in regular expressions.\n *\n * If `string` is `undefined` or `null`, the empty string is returned.\n *\n * @param {String} string Input string\n * @return {String} Escaped string\n * @static\n * @private\n */\nutils.escapeRegExpChars = function (string) {\n // istanbul ignore if\n if (!string) {\n return '';\n }\n return String(string).replace(regExpChars, '\\\\$&');\n};\nvar _ENCODE_HTML_RULES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\nvar _MATCH_HTML = /[&<>'\"]/g;\nfunction encode_char(c) {\n return _ENCODE_HTML_RULES[c] || c;\n}\n/**\n * Stringified version of constants used by {@link module:utils.escapeXML}.\n *\n * @readonly\n * @type {String}\n */\nvar escapeFuncStr = 'var _ENCODE_HTML_RULES = {\\n'\n + ' \"&\": \"&\"\\n'\n + ' , \"<\": \"<\"\\n'\n + ' , \">\": \">\"\\n'\n + ' , \\'\"\\': \""\"\\n'\n + ' , \"\\'\": \"'\"\\n'\n + ' }\\n'\n + ' , _MATCH_HTML = /[&<>\\'\"]/g;\\n'\n + 'function encode_char(c) {\\n'\n + ' return _ENCODE_HTML_RULES[c] || c;\\n'\n + '};\\n';\n/**\n * Escape characters reserved in XML.\n *\n * If `markup` is `undefined` or `null`, the empty string is returned.\n *\n * @implements {EscapeCallback}\n * @param {String} markup Input string\n * @return {String} Escaped string\n * @static\n * @private\n */\nutils.escapeXML = function (markup) {\n return markup == undefined\n ? ''\n : String(markup)\n .replace(_MATCH_HTML, encode_char);\n};\nfunction escapeXMLToString() {\n return Function.prototype.toString.call(this) + ';\\n' + escapeFuncStr;\n}\ntry {\n if (typeof Object.defineProperty === 'function') {\n // If the Function prototype is frozen, the \"toString\" property is non-writable. This means that any objects which inherit this property\n // cannot have the property changed using an assignment. If using strict mode, attempting that will cause an error. If not using strict\n // mode, attempting that will be silently ignored.\n // However, we can still explicitly shadow the prototype's \"toString\" property by defining a new \"toString\" property on this object.\n Object.defineProperty(utils.escapeXML, 'toString', { value: escapeXMLToString });\n }\n else {\n // If Object.defineProperty() doesn't exist, attempt to shadow this property using the assignment operator.\n utils.escapeXML.toString = escapeXMLToString;\n }\n}\ncatch (err) {\n console.warn('Unable to set escapeXML.toString (is the Function prototype frozen?)');\n}\n/**\n * Naive copy of properties from one object to another.\n * Does not recurse into non-scalar properties\n * Does not check to see if the property has a value before copying\n *\n * @param {Object} to Destination object\n * @param {Object} from Source object\n * @return {Object} Destination object\n * @static\n * @private\n */\nutils.shallowCopy = function (to, from) {\n from = from || {};\n if ((to !== null) && (to !== undefined)) {\n for (var p in from) {\n if (!hasOwn(from, p)) {\n continue;\n }\n if (p === '__proto__' || p === 'constructor') {\n continue;\n }\n to[p] = from[p];\n }\n }\n return to;\n};\n/**\n * Naive copy of a list of key names, from one object to another.\n * Only copies property if it is actually defined\n * Does not recurse into non-scalar properties\n *\n * @param {Object} to Destination object\n * @param {Object} from Source object\n * @param {Array} list List of properties to copy\n * @return {Object} Destination object\n * @static\n * @private\n */\nutils.shallowCopyFromList = function (to, from, list) {\n list = list || [];\n from = from || {};\n if ((to !== null) && (to !== undefined)) {\n for (var i = 0; i < list.length; i++) {\n var p = list[i];\n if (typeof from[p] != 'undefined') {\n if (!hasOwn(from, p)) {\n continue;\n }\n if (p === '__proto__' || p === 'constructor') {\n continue;\n }\n to[p] = from[p];\n }\n }\n }\n return to;\n};\n/**\n * Simple in-process cache implementation. Does not implement limits of any\n * sort.\n *\n * @implements {Cache}\n * @static\n * @private\n */\nutils.cache = {\n _data: {},\n set: function (key, val) {\n this._data[key] = val;\n },\n get: function (key) {\n return this._data[key];\n },\n remove: function (key) {\n delete this._data[key];\n },\n reset: function () {\n this._data = {};\n }\n};\n/**\n * Transforms hyphen case variable into camel case.\n *\n * @param {String} string Hyphen case string\n * @return {String} Camel case string\n * @static\n * @private\n */\nutils.hyphenToCamel = function (str) {\n return str.replace(/-[a-z]/g, function (match) { return match[1].toUpperCase(); });\n};\n/**\n * Returns a null-prototype object in runtimes that support it\n *\n * @return {Object} Object, prototype will be set to null where possible\n * @static\n * @private\n */\nutils.createNullProtoObjWherePossible = (function () {\n if (typeof Object.create == 'function') {\n return function () {\n return Object.create(null);\n };\n }\n if (!({ __proto__: null } instanceof Object)) {\n return function () {\n return { __proto__: null };\n };\n }\n // Not possible, just pass through\n return function () {\n return {};\n };\n})();\n/**\n * Copies own-properties from one object to a null-prototype object for basic\n * protection against prototype pollution\n *\n * @return {Object} Object with own-properties of input object\n * @static\n * @private\n */\nutils.hasOwnOnlyObject = function (obj) {\n var o = utils.createNullProtoObjWherePossible();\n for (var p in obj) {\n if (hasOwn(obj, p)) {\n o[p] = obj[p];\n }\n }\n return o;\n};\nif (typeof exports != 'undefined') {\n module.exports = utils;\n}\nexports.default = utils;\n\n},{}],3:[function(require,module,exports){\n\n},{}],4:[function(require,module,exports){\n(function (process){(function (){\n// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n\n}).call(this)}).call(this,require('_process'))\n},{\"_process\":5}],5:[function(require,module,exports){\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}]},{},[1])(1)\n});\n",
|
|
7
|
+
"'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n",
|
|
8
|
+
"import { type ServerWebSocket } from \"bun\";\r\nimport pc from \"picocolors\";\r\nimport { type BunDevServerConfig } from \"./bunServeConfig\";\r\nimport { handlePathRequest } from \"./httpHandler\";\r\nimport { staticAssetRoutes } from \"./staticAssets\";\r\nimport { withCORSHeaders } from \"./utils/cors\";\r\nimport { startFileWatcher } from \"./fileWatcher\";\r\nimport { prepareConfiguration } from \"./configManager\";\r\nimport { ensureDestinationDirectory } from \"./utils/filesystem\";\r\n\r\n\r\nexport async function startBunDevServer(serverConfig: BunDevServerConfig, importMeta: ImportMeta) {\r\n // Prepare and validate configuration\r\n const { finalConfig, buildCfg, ...paths } = await prepareConfiguration(serverConfig, importMeta);\r\n\r\n const protocol = finalConfig.tls ? 'https' : 'http';\r\n const serverUrl = `${protocol}://localhost:${finalConfig.port}`;\r\n // Only log server startup if not in test mode (check if NODE_ENV or if bun test is running)\r\n const isTestMode = process.env.NODE_ENV === 'test' || process.env.BUN_TEST === 'true' ||\r\n (typeof Bun !== 'undefined' && Bun.main.includes('test'));\r\n if (!isTestMode) {\r\n console.log(pc.bold(pc.green(\"🚀 Server running at\")) + \" \" + pc.cyan(pc.underline(serverUrl)));\r\n console.log(pc.bold(pc.green(\"📁 Serving files from\")) + \" \" + pc.cyan(pc.underline(paths.serveDestination)));\r\n }\r\n await ensureDestinationDirectory(paths.serveDestination);\r\n let bunServer;\r\n try {\r\n bunServer = Bun.serve({\r\n port: finalConfig.port,\r\n development: {\r\n console: true,\r\n hmr: true,\r\n chromeDevToolsAutomaticWorkspaceFolders: true,\r\n },\r\n tls: finalConfig.tls,\r\n routes: {\r\n \"/favicon.ico\": withCORSHeaders(new Response(\"\", { status: 404 })),\r\n ...finalConfig.routes,\r\n ...staticAssetRoutes,\r\n },\r\n\r\n async fetch(req, server) {\r\n if (req.method === \"OPTIONS\") {\r\n finalConfig.logRequests && console.log(`${200} ${req.url} OPTIONS`);\r\n return withCORSHeaders(new Response(\"\", { status: 200 }), req);\r\n }\r\n if (req.url.toLowerCase().endsWith(finalConfig.websocketPath!)) {\r\n finalConfig.logRequests && console.log(`${req.url} Socket Upgrade`);\r\n if (server.upgrade(req)) {\r\n return withCORSHeaders(new Response(\"\", { status: 200 }), req);\r\n }\r\n }\r\n const url = new URL(req.url);\r\n let requestPath = url.pathname;\r\n\r\n return handlePathRequest(requestPath, req, finalConfig, paths.serveDestination);\r\n },\r\n\r\n\r\n websocket: {\r\n open(ws: ServerWebSocket) {\r\n ws.subscribe(\"message\");\r\n },\r\n message(ws: ServerWebSocket, message: string | Buffer) {\r\n },\r\n sendPings: true,\r\n\r\n }\r\n });\r\n } catch (error: any) {\r\n // Handle server startup errors (e.g., TLS errors, port in use)\r\n if (isTestMode) {\r\n // In test mode, silently fail and return without starting the server\r\n return;\r\n }\r\n // In production mode, re-throw the error\r\n throw error;\r\n }\r\n\r\n // Start file watcher with initial build (only if server started successfully)\r\n if (bunServer) {\r\n await startFileWatcher(paths.watchDestination, importMeta, finalConfig, paths, buildCfg, bunServer);\r\n }\r\n}\r\n",
|
|
9
|
+
"/**\r\n * HTTP request handling\r\n */\r\n//@ts-ignore\r\nimport ejs from \"../node_modules/ejs/ejs\";\r\nimport { readFile, readdir } from \"fs/promises\";\r\nimport { type BunDevServerConfig } from \"./bunServeConfig\";\r\nimport { withCORSHeaders } from \"./utils/cors\";\r\nimport { checkObjectExists } from \"./utils/filesystem\";\r\n\r\n/**\r\n * Handle HTTP error responses\r\n * @param req - The Request object\r\n * @param err - The error that occurred\r\n * @returns A Response with status 500\r\n */\r\nexport function handleErrorResponse(req: Request, err: unknown): Response {\r\n const msg = `Error while processing request ${req.url}`;\r\n console.error(msg, err);\r\n return withCORSHeaders(new Response(msg, { status: 500 }), req);\r\n}\r\n\r\n/**\r\n * Handle a path request to the server\r\n * @param requestPath - The request path\r\n * @param req - The Request object\r\n * @param finalConfig - The final server configuration\r\n * @param destinationPath - The absolute path to the output directory\r\n * @returns A Response object\r\n */\r\nexport async function handlePathRequest(\r\n requestPath: string,\r\n req: Request,\r\n finalConfig: BunDevServerConfig,\r\n destinationPath: string\r\n): Promise<Response> {\r\n let fsPath = destinationPath + requestPath;\r\n const objThere = await checkObjectExists(fsPath);\r\n let isDirectory = false;\r\n\r\n if (objThere) {\r\n try {\r\n await readFile(fsPath);\r\n } catch (e) {\r\n if ((e as ErrnoException).code === \"EISDIR\") {\r\n isDirectory = true;\r\n } else {\r\n throw e;\r\n }\r\n }\r\n } else {\r\n if (requestPath.toLowerCase() !== \"/index.html\") {\r\n finalConfig.logRequests && console.log(`${404} ${req.url}`);\r\n return withCORSHeaders(new Response(\"\", { status: 404 }), req);\r\n }\r\n requestPath = \"/\";\r\n isDirectory = true;\r\n fsPath = destinationPath + requestPath;\r\n }\r\n\r\n if (!isDirectory) {\r\n return handleFileRequest(fsPath, req, finalConfig);\r\n }\r\n\r\n return handleDirectoryRequest(fsPath, requestPath, req, finalConfig);\r\n}\r\n\r\n/**\r\n * Handle a file request\r\n * @param fsPath - The file system path\r\n * @param req - The Request object\r\n * @param finalConfig - The final server configuration\r\n * @returns A Response object\r\n */\r\nasync function handleFileRequest(\r\n fsPath: string,\r\n req: Request,\r\n finalConfig: BunDevServerConfig\r\n): Promise<Response> {\r\n try {\r\n const fl = Bun.file(fsPath);\r\n finalConfig.logRequests && console.log(`${200} ${req.url}`);\r\n return withCORSHeaders(new Response(fl), req);\r\n } catch (e) {\r\n if ((e as ErrnoException)?.code === \"ENOENT\") {\r\n finalConfig.logRequests && console.log(`${404} ${req.url}`);\r\n return withCORSHeaders(new Response(\"\", { status: 404 }), req);\r\n } else {\r\n return handleErrorResponse(req, e);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Handle a directory listing request\r\n * @param fsPath - The file system path\r\n * @param requestPath - The request path\r\n * @param req - The Request object\r\n * @param finalConfig - The final server configuration\r\n * @returns A Response object with directory listing HTML\r\n */\r\nasync function handleDirectoryRequest(\r\n fsPath: string,\r\n requestPath: string,\r\n req: Request,\r\n finalConfig: BunDevServerConfig\r\n): Promise<Response> {\r\n try {\r\n const allEntries = await readdir(fsPath, {\r\n withFileTypes: true,\r\n });\r\n\r\n const dirs = allEntries\r\n .filter((entry) => entry.isDirectory())\r\n .map((entry) => {\r\n return {\r\n requestPath: requestPath === \"/\" ? \"\" : requestPath,\r\n name: entry.name,\r\n };\r\n });\r\n\r\n const files = allEntries\r\n .filter((entry) => entry.isFile())\r\n .map((entry) => {\r\n return {\r\n requestPath: requestPath === \"/\" ? \"\" : requestPath,\r\n name: entry.name,\r\n };\r\n });\r\n\r\n const templatePath = requestPath === \"/\" ? \"\" : requestPath;\r\n const rnd = ejs.render(finalConfig.serveOutputEjs!, {\r\n dirs,\r\n files,\r\n requestPath: templatePath,\r\n });\r\n\r\n finalConfig.logRequests && console.log(`${200} ${req.url}`);\r\n return withCORSHeaders(\r\n new Response(rnd, { headers: { \"Content-Type\": \"text/html\" } }),\r\n req\r\n );\r\n } catch (err) {\r\n return handleErrorResponse(req, err);\r\n }\r\n}\r\n",
|
|
10
|
+
"/**\r\n * CORS (Cross-Origin Resource Sharing) utilities\r\n */\r\n\r\n/**\r\n * Add CORS headers to a Response object\r\n * @param response - The Response object to add headers to\r\n * @param request - Optional Request object to get origin from\r\n * @returns The Response with CORS headers added\r\n */\r\nexport function withCORSHeaders(response: Response, request?: Request): Response {\r\n response.headers.set(\"Access-Control-Allow-Origin\", request?.headers.get(\"origin\") ?? \"*\");\r\n response.headers.set(\"Access-Control-Allow-Methods\", \"GET, POST, PUT, DELETE, PATCH, OPTIONS\");\r\n response.headers.set(\"Access-Control-Allow-Credentials\", \"true\");\r\n response.headers.set(\"Cache-Control\", \"no-store, no-cache, must-revalidate\");\r\n return response;\r\n}\r\n",
|
|
11
|
+
"/**\r\n * File system utilities\r\n */\r\nimport { $ } from \"bun\";\r\nimport { access, constants } from \"fs/promises\";\r\nimport { mkdir } from \"fs/promises\"\r\n\r\n/**\r\n * Ensure the destination directory exists, create if it doesn't\r\n * @param destinationPath - The absolute path to the destination directory\r\n */\r\nexport async function ensureDestinationDirectory(destinationPath: string): Promise<void> {\r\n try {\r\n await mkdir(destinationPath, { recursive: true });\r\n } catch (e) {\r\n console.error(\"Unable to create directory\", e);\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Clean a directory by removing all its contents\r\n * @param dst - The absolute path to the directory to clean\r\n */\r\nexport async function cleanDirectory(dst: string): Promise<void> {\r\n const { stderr, exitCode } = await $`rm -rf ${dst}/*`.nothrow();\r\n if (exitCode !== 0) {\r\n if (stderr.indexOf(\"no matches found\") > -1) {\r\n console.log(\"Directory is empty\");\r\n } else {\r\n console.warn(\"Unable to clean directory\", stderr.toString(\"utf8\"));\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Convert bytes to human-readable format\r\n * @param bytes - Number of bytes to convert\r\n * @returns A formatted string (e.g., \"1.5 MB\")\r\n */\r\nexport function convertBytes(bytes: number): string {\r\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\"];\r\n\r\n if (bytes == 0) {\r\n return \"n/a\";\r\n }\r\n const floored = Math.floor(Math.log(bytes) / Math.log(1024));\r\n const i = floored;\r\n\r\n if (i == 0) {\r\n return bytes + \" \" + sizes[i];\r\n }\r\n\r\n return (bytes / Math.pow(1024, i)).toFixed(1) + \" \" + sizes[i];\r\n}\r\n\r\n/**\r\n * Check if a file or directory exists and is readable\r\n * @param fsPath - The absolute path to check\r\n * @returns true if the object exists and is readable, false otherwise\r\n */\r\nexport async function checkObjectExists(fsPath: string): Promise<boolean> {\r\n try {\r\n await access(fsPath, constants.R_OK);\r\n return true;\r\n } catch (e) {\r\n if ((e as ErrnoException)?.code === \"ENOENT\") {\r\n return false;\r\n }\r\n const msg = `Error while accessing path ${fsPath}`;\r\n console.error(msg, e);\r\n return false;\r\n }\r\n}\r\n",
|
|
12
|
+
"/**\r\n * Static assets management\r\n */\r\nimport { resolve } from \"path\";\r\nimport listingStylePath from \"./static/serveOutputStyles.css\";\r\nimport fileSvgPath from \"./static/file.svg\";\r\nimport folderSvgPath from \"./static/folder.svg\";\r\nimport parentSvgPath from \"./static/parent.svg\";\r\n\r\n/**\r\n * Static assets loaded as Bun.file instances\r\n */\r\nexport const staticAssets = {\r\n listingStyle: Bun.file(resolve(import.meta.dir, listingStylePath)),\r\n fileSvg: Bun.file(resolve(import.meta.dir, fileSvgPath)),\r\n folderSvg: Bun.file(resolve(import.meta.dir, folderSvgPath)),\r\n parentSvg: Bun.file(resolve(import.meta.dir, parentSvgPath)),\r\n};\r\n\r\n/**\r\n * Routes for static assets\r\n */\r\nexport const staticAssetRoutes = {\r\n \"/__bun_dev_server__/serveOutputStyles.css\": staticAssets.listingStyle,\r\n \"/__bun_dev_server__/file.svg\": staticAssets.fileSvg,\r\n \"/__bun_dev_server__/folder.svg\": staticAssets.folderSvg,\r\n \"/__bun_dev_server__/parent.svg\": staticAssets.parentSvg,\r\n};\r\n",
|
|
13
|
+
"/**\r\n * File system watcher management\r\n */\r\nimport { watch } from \"fs/promises\";\r\nimport { type BuildConfig, type Server } from \"bun\";\r\nimport { type BunDevServerConfig } from \"./bunServeConfig\";\r\nimport { cleanBuildAndNotify, getThrottledBuildQueue, type BuildEnvPaths } from \"./buildManager\";\r\n\r\n/**\r\n * Start watching a directory for changes and trigger builds\r\n * @param srcWatch - The absolute path to watch for changes\r\n * @param importMeta - The ImportMeta object from the caller\r\n * @param finalConfig - The final server configuration\r\n * @param buildDestination - The absolute path to the output directory\r\n * @param buildCfg - The build configuration\r\n * @param bunServer - The Bun server instance\r\n */\r\nexport async function startFileWatcher(\r\n srcWatch: string,\r\n importMeta: ImportMeta,\r\n finalConfig: BunDevServerConfig,\r\n paths: BuildEnvPaths,\r\n buildCfg: BuildConfig,\r\n bunServer: Server<any>\r\n): Promise<void> {\r\n // Create throttled build queue and perform initial build\r\n const queue = getThrottledBuildQueue(finalConfig);\r\n await queue.add(async () => {\r\n await cleanBuildAndNotify(importMeta, finalConfig, paths, buildCfg, bunServer, { filename: \"Initial\", eventType: \"change\" });\r\n });\r\n\r\n // Start watching for file changes\r\n const watcher = watch(srcWatch, { recursive: true });\r\n\r\n try {\r\n for await (const event of watcher) {\r\n if (queue.pending > 0) {\r\n continue;\r\n }\r\n try {\r\n if (queue.size > 0) {\r\n queue.clear();\r\n }\r\n queue.add(async () => {\r\n await cleanBuildAndNotify(importMeta, finalConfig, paths, buildCfg, bunServer, event);\r\n });\r\n } catch (e) {\r\n console.error(\"Error while processing file change\", e);\r\n }\r\n }\r\n } catch (e: any) {\r\n // Silently ignore EPERM errors - these happen when directory is deleted during test cleanup\r\n if (e?.code !== 'EPERM') {\r\n console.error(\"Error in file watcher\", e);\r\n }\r\n }\r\n}\r\n",
|
|
14
|
+
"/**\r\n * Build and notification management\r\n */\r\n//@ts-ignore\r\nimport ejs from \"../node_modules/ejs/ejs\";\r\nimport { build, type BuildConfig, type BuildOutput, type Server } from \"bun\";\r\nimport { type FileChangeInfo } from \"fs/promises\";\r\nimport pqueue from \"p-queue\";\r\nimport pc from \"picocolors\";\r\nimport { type BunDevServerConfig } from \"./bunServeConfig\";\r\nimport { convertBytes, ensureDestinationDirectory } from \"./utils/filesystem\";\r\nimport { performTSC } from \"./tsChecker\";\r\nimport { writeManifest } from \"./bunManifest\";\r\nimport { checkObjectExists } from \"./utils/filesystem\";\r\n\r\n/**\r\n * Create a throttled build queue to prevent excessive rebuilds\r\n * @param serverConfig - The server configuration\r\n * @returns A p-queue instance configured for throttled builds\r\n */\r\nexport function getThrottledBuildQueue(serverConfig: BunDevServerConfig): pqueue {\r\n return new pqueue({\r\n concurrency: 1,\r\n intervalCap: 1,\r\n interval: serverConfig.watchDelay ?? 1000,\r\n carryoverConcurrencyCount: true,\r\n });\r\n}\r\n\r\nexport interface BuildEnvPaths {\r\n buildDestination: string;\r\n serveDestination: string;\r\n watchDestination: string;\r\n}\r\n\r\n/**\r\n * Build and notify clients about the build result\r\n * @param importerMeta - The ImportMeta object from the caller\r\n * @param finalConfig - The final server configuration\r\n * @param buildDestination - The absolute path to the output directory\r\n * @param buildCfg - The build configuration\r\n * @param bunServer - The Bun server instance\r\n * @param event - The file change event that triggered the build\r\n */\r\nexport async function cleanBuildAndNotify(\r\n importerMeta: ImportMeta,\r\n finalConfig: BunDevServerConfig,\r\n paths: BuildEnvPaths,\r\n buildCfg: BuildConfig,\r\n bunServer: Server<any>,\r\n event: FileChangeInfo<string>\r\n): Promise<void> {\r\n\r\n const buildEnv = {\r\n importerMeta,\r\n finalConfig,\r\n ...paths,\r\n buildCfg,\r\n bunServer,\r\n event\r\n };\r\n\r\n await finalConfig.beforeBuild?.(buildEnv);\r\n\r\n try {\r\n // Check if the outdir exists before attempting to build (prevents errors from test cleanup)\r\n await ensureDestinationDirectory(paths.buildDestination);\r\n\r\n const output = await build(buildCfg);\r\n publishOutputLogs(bunServer, output, finalConfig, event);\r\n\r\n if (finalConfig.createIndexHTML) {\r\n publishIndexHTML(paths, finalConfig.serveIndexHtmlEjs!, output, event);\r\n }\r\n\r\n if (finalConfig.writeManifest) {\r\n writeManifest(output, paths.serveDestination, finalConfig.manifestWithHash, finalConfig.manifestName);\r\n }\r\n\r\n await finalConfig.afterBuild?.(output, buildEnv);\r\n\r\n if (finalConfig.reloadOnChange && !finalConfig.waitForTSCSuccessBeforeReload) {\r\n bunServer.publish(\"message\", JSON.stringify({ type: \"reload\" }));\r\n }\r\n\r\n const tscSuccess = await performTSC(finalConfig, importerMeta);\r\n\r\n if (finalConfig.reloadOnChange && finalConfig.waitForTSCSuccessBeforeReload && !tscSuccess.error) {\r\n bunServer.publish(\"message\", JSON.stringify({ type: \"reload\" }));\r\n }\r\n\r\n if (tscSuccess.error && finalConfig.broadcastTSCErrorToClient) {\r\n bunServer.publish(\"message\", JSON.stringify({ type: \"tscerror\", message: tscSuccess.message }));\r\n }\r\n } catch (e) {\r\n // Silently ignore FileNotFound errors for test directories (from background watchers during tests)\r\n const errorMessage = e instanceof Error ? e.message : String(e);\r\n if (errorMessage.includes('test-file-watcher') || errorMessage.includes('test-build') || errorMessage.includes('test-watch-dir')) {\r\n // Skip logging errors from test directories\r\n return;\r\n }\r\n console.error(e);\r\n }\r\n}\r\n\r\n/**\r\n * Publish build output logs to console and clients\r\n * @param bunServer - The Bun server instance\r\n * @param output - The build output\r\n * @param config - The server configuration\r\n * @param event - The file change event that triggered the build\r\n */\r\nfunction publishOutputLogs(\r\n bunServer: Server<any>,\r\n output: BuildOutput,\r\n config: BunDevServerConfig,\r\n event: FileChangeInfo<string>\r\n): void {\r\n output.logs.forEach(console.log);\r\n bunServer.publish(\"message\", JSON.stringify({\r\n type: \"message\",\r\n message: `[Bun HMR] ${event.filename} ${event.eventType}`\r\n }));\r\n\r\n const outTable = output.outputs.filter(o => o.kind !== \"sourcemap\").map(o => {\r\n const a = Bun.pathToFileURL(o.path);\r\n const distPath = Bun.pathToFileURL(config.buildConfig.outdir ?? \"./dist\");\r\n const distPathHref = distPath.href;\r\n const lastDistIdx = distPathHref.lastIndexOf(\"/\") + 1;\r\n const fileName = a.href.substring(a.href.lastIndexOf(\"/\") + 1);\r\n const fileWithPath = a.href.substring(lastDistIdx);\r\n return {\r\n name: fileName,\r\n path: fileWithPath,\r\n size: convertBytes(o.size)\r\n };\r\n });\r\n\r\n if (config.broadcastBuildOutputToConsole) {\r\n printPrettyBuildOutput(outTable);\r\n }\r\n\r\n if (config.broadcastBuildOutputToClient) {\r\n bunServer.publish(\"message\", JSON.stringify({ type: \"output\", message: outTable }));\r\n }\r\n}\r\n\r\n/**\r\n * Generate and write index.html file based on build output\r\n * @param destinationPath - The absolute path to the output directory\r\n * @param template - The EJS template string\r\n * @param output - The build output\r\n * @param _event - The file change event (unused, kept for consistency)\r\n */\r\nfunction publishIndexHTML(\r\n paths: BuildEnvPaths,\r\n template: string,\r\n output: BuildOutput,\r\n _event: FileChangeInfo<string>\r\n): void {\r\n const eps = output.outputs.filter(o => o.kind === \"entry-point\");\r\n const hashedImports: string[] = [];\r\n const cssFiles: string[] = [];\r\n\r\n const basePathUrl = Bun.pathToFileURL(paths.serveDestination);\r\n for (const ep of eps) {\r\n const epUrl = Bun.pathToFileURL(ep.path);\r\n const hashedImport = `${epUrl.href.replace(`${basePathUrl.href}/`, \"./\")}?${ep.hash}`;\r\n hashedImports.push(hashedImport);\r\n }\r\n\r\n // Collect CSS files from build output\r\n const cssOutputs = output.outputs.filter(o => o.path.endsWith(\".css\"));\r\n for (const cssFile of cssOutputs) {\r\n const cssUrl = Bun.pathToFileURL(cssFile.path);\r\n const hashedCss = `${cssUrl.href.replace(`${basePathUrl.href}/`, \"./\")}?${cssFile.hash}`;\r\n cssFiles.push(hashedCss);\r\n }\r\n\r\n Bun.write(paths.buildDestination + \"/index.html\", ejs.render(template, { hashedImports, cssFiles }));\r\n}\r\n\r\n/**\r\n * Print a pretty formatted build output to console\r\n * @param outTable - Array of output file information\r\n */\r\nfunction printPrettyBuildOutput(outTable: Array<{ name: string; path: string; size: string }>): void {\r\n if (outTable.length === 0) return;\r\n\r\n const totalFiles = outTable.length;\r\n const fileWord = totalFiles === 1 ? 'file' : 'files';\r\n\r\n // Header with emoji and count\r\n console.log(\"\\n\" + pc.bold(pc.cyan(`📦 Build Output (${totalFiles} ${fileWord})`)));\r\n\r\n // List each file with checkmark\r\n outTable.forEach((row) => {\r\n const checkmark = pc.green(\" ✓\");\r\n const filePath = pc.white(row.path);\r\n const size = pc.dim(`(${row.size})`);\r\n console.log(`${checkmark} ${filePath} ${size}`);\r\n });\r\n\r\n console.log(\"\"); // Empty line for spacing\r\n}\r\n",
|
|
15
|
+
"import EventEmitter from './index.js'\n\nexport { EventEmitter }\nexport default EventEmitter\n",
|
|
16
|
+
"export class TimeoutError extends Error {\n\tname = 'TimeoutError';\n\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tError.captureStackTrace?.(this, TimeoutError);\n\t}\n}\n\nconst getAbortedReason = signal => signal.reason ?? new DOMException('This operation was aborted.', 'AbortError');\n\nexport default function pTimeout(promise, options) {\n\tconst {\n\t\tmilliseconds,\n\t\tfallback,\n\t\tmessage,\n\t\tcustomTimers = {setTimeout, clearTimeout},\n\t\tsignal,\n\t} = options;\n\n\tlet timer;\n\tlet abortHandler;\n\n\tconst wrappedPromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (signal?.aborted) {\n\t\t\treject(getAbortedReason(signal));\n\t\t\treturn;\n\t\t}\n\n\t\tif (signal) {\n\t\t\tabortHandler = () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t};\n\n\t\t\tsignal.addEventListener('abort', abortHandler, {once: true});\n\t\t}\n\n\t\t// Use .then() instead of async IIFE to preserve stack traces\n\t\t// eslint-disable-next-line promise/prefer-await-to-then, promise/prefer-catch\n\t\tpromise.then(resolve, reject);\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We create the error outside of `setTimeout` to preserve the stack trace.\n\t\tconst timeoutError = new TimeoutError();\n\n\t\t// `.call(undefined, ...)` is needed for custom timers to avoid context issues\n\t\ttimer = customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (fallback) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\tif (message === false) {\n\t\t\t\tresolve();\n\t\t\t} else if (message instanceof Error) {\n\t\t\t\treject(message);\n\t\t\t} else {\n\t\t\t\ttimeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\t\treject(timeoutError);\n\t\t\t}\n\t\t}, milliseconds);\n\t});\n\n\t// eslint-disable-next-line promise/prefer-await-to-then\n\tconst cancelablePromise = wrappedPromise.finally(() => {\n\t\tcancelablePromise.clear();\n\t\tif (abortHandler && signal) {\n\t\t\tsignal.removeEventListener('abort', abortHandler);\n\t\t}\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\t// `.call(undefined, ...)` is needed for custom timers to avoid context issues\n\t\tcustomTimers.clearTimeout.call(undefined, timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n",
|
|
17
|
+
"// Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound\n// Used to compute insertion index to keep queue sorted after insertion\nexport default function lowerBound(array, value, comparator) {\n let first = 0;\n let count = array.length;\n while (count > 0) {\n const step = Math.trunc(count / 2);\n let it = first + step;\n if (comparator(array[it], value) <= 0) {\n first = ++it;\n count -= step + 1;\n }\n else {\n count = step;\n }\n }\n return first;\n}\n",
|
|
18
|
+
"import lowerBound from './lower-bound.js';\nexport default class PriorityQueue {\n #queue = [];\n enqueue(run, options) {\n const { priority = 0, id, } = options ?? {};\n const element = {\n priority,\n id,\n run,\n };\n if (this.size === 0 || this.#queue[this.size - 1].priority >= priority) {\n this.#queue.push(element);\n return;\n }\n const index = lowerBound(this.#queue, element, (a, b) => b.priority - a.priority);\n this.#queue.splice(index, 0, element);\n }\n setPriority(id, priority) {\n const index = this.#queue.findIndex((element) => element.id === id);\n if (index === -1) {\n throw new ReferenceError(`No promise function with the id \"${id}\" exists in the queue.`);\n }\n const [item] = this.#queue.splice(index, 1);\n this.enqueue(item.run, { priority, id });\n }\n dequeue() {\n const item = this.#queue.shift();\n return item?.run;\n }\n filter(options) {\n return this.#queue.filter((element) => element.priority === options.priority).map((element) => element.run);\n }\n get size() {\n return this.#queue.length;\n }\n}\n",
|
|
19
|
+
"import { EventEmitter } from 'eventemitter3';\nimport pTimeout from 'p-timeout';\nimport PriorityQueue from './priority-queue.js';\n/**\nPromise queue with concurrency control.\n*/\nexport default class PQueue extends EventEmitter {\n #carryoverIntervalCount;\n #isIntervalIgnored;\n #intervalCount = 0;\n #intervalCap;\n #rateLimitedInInterval = false;\n #rateLimitFlushScheduled = false;\n #interval;\n #intervalEnd = 0;\n #lastExecutionTime = 0;\n #intervalId;\n #timeoutId;\n #strict;\n // Circular buffer implementation for better performance\n #strictTicks = [];\n #strictTicksStartIndex = 0;\n #queue;\n #queueClass;\n #pending = 0;\n // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194\n #concurrency;\n #isPaused;\n // Use to assign a unique identifier to a promise function, if not explicitly specified\n #idAssigner = 1n;\n // Track currently running tasks for debugging\n #runningTasks = new Map();\n /**\n Get or set the default timeout for all tasks. Can be changed at runtime.\n\n Operations will throw a `TimeoutError` if they don't complete within the specified time.\n\n The timeout begins when the operation is dequeued and starts execution, not while it's waiting in the queue.\n\n @example\n ```\n const queue = new PQueue({timeout: 5000});\n\n // Change timeout for all future tasks\n queue.timeout = 10000;\n ```\n */\n timeout;\n constructor(options) {\n super();\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n options = {\n carryoverIntervalCount: false,\n intervalCap: Number.POSITIVE_INFINITY,\n interval: 0,\n concurrency: Number.POSITIVE_INFINITY,\n autoStart: true,\n queueClass: PriorityQueue,\n strict: false,\n ...options,\n };\n if (!(typeof options.intervalCap === 'number' && options.intervalCap >= 1)) {\n throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${options.intervalCap?.toString() ?? ''}\\` (${typeof options.intervalCap})`);\n }\n if (options.interval === undefined || !(Number.isFinite(options.interval) && options.interval >= 0)) {\n throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${options.interval?.toString() ?? ''}\\` (${typeof options.interval})`);\n }\n if (options.strict && options.interval === 0) {\n throw new TypeError('The `strict` option requires a non-zero `interval`');\n }\n if (options.strict && options.intervalCap === Number.POSITIVE_INFINITY) {\n throw new TypeError('The `strict` option requires a finite `intervalCap`');\n }\n // TODO: Remove this fallback in the next major version\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.#carryoverIntervalCount = options.carryoverIntervalCount ?? options.carryoverConcurrencyCount ?? false;\n this.#isIntervalIgnored = options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0;\n this.#intervalCap = options.intervalCap;\n this.#interval = options.interval;\n this.#strict = options.strict;\n this.#queue = new options.queueClass();\n this.#queueClass = options.queueClass;\n this.concurrency = options.concurrency;\n if (options.timeout !== undefined && !(Number.isFinite(options.timeout) && options.timeout > 0)) {\n throw new TypeError(`Expected \\`timeout\\` to be a positive finite number, got \\`${options.timeout}\\` (${typeof options.timeout})`);\n }\n this.timeout = options.timeout;\n this.#isPaused = options.autoStart === false;\n this.#setupRateLimitTracking();\n }\n #cleanupStrictTicks(now) {\n // Remove ticks outside the current interval window using circular buffer approach\n while (this.#strictTicksStartIndex < this.#strictTicks.length) {\n const oldestTick = this.#strictTicks[this.#strictTicksStartIndex];\n if (oldestTick !== undefined && now - oldestTick >= this.#interval) {\n this.#strictTicksStartIndex++;\n }\n else {\n break;\n }\n }\n // Compact the array when it becomes inefficient or fully consumed\n // Compact when: (start index is large AND more than half wasted) OR all ticks expired\n const shouldCompact = (this.#strictTicksStartIndex > 100 && this.#strictTicksStartIndex > this.#strictTicks.length / 2)\n || this.#strictTicksStartIndex === this.#strictTicks.length;\n if (shouldCompact) {\n this.#strictTicks = this.#strictTicks.slice(this.#strictTicksStartIndex);\n this.#strictTicksStartIndex = 0;\n }\n }\n // Helper methods for interval consumption\n #consumeIntervalSlot(now) {\n if (this.#strict) {\n this.#strictTicks.push(now);\n }\n else {\n this.#intervalCount++;\n }\n }\n #rollbackIntervalSlot() {\n if (this.#strict) {\n // Pop from the end of the actual data (not from start index)\n if (this.#strictTicks.length > this.#strictTicksStartIndex) {\n this.#strictTicks.pop();\n }\n }\n else if (this.#intervalCount > 0) {\n this.#intervalCount--;\n }\n }\n #getActiveTicksCount() {\n return this.#strictTicks.length - this.#strictTicksStartIndex;\n }\n get #doesIntervalAllowAnother() {\n if (this.#isIntervalIgnored) {\n return true;\n }\n if (this.#strict) {\n // Cleanup already done by #isIntervalPausedAt before this is called\n return this.#getActiveTicksCount() < this.#intervalCap;\n }\n return this.#intervalCount < this.#intervalCap;\n }\n get #doesConcurrentAllowAnother() {\n return this.#pending < this.#concurrency;\n }\n #next() {\n this.#pending--;\n if (this.#pending === 0) {\n this.emit('pendingZero');\n }\n this.#tryToStartAnother();\n this.emit('next');\n }\n #onResumeInterval() {\n // Clear timeout ID before processing to prevent race condition\n // Must clear before #onInterval to allow new timeouts to be scheduled\n this.#timeoutId = undefined;\n this.#onInterval();\n this.#initializeIntervalIfNeeded();\n }\n #isIntervalPausedAt(now) {\n // Strict mode: check if we need to wait for oldest tick to age out\n if (this.#strict) {\n this.#cleanupStrictTicks(now);\n // If at capacity, need to wait for oldest tick to age out\n const activeTicksCount = this.#getActiveTicksCount();\n if (activeTicksCount >= this.#intervalCap) {\n const oldestTick = this.#strictTicks[this.#strictTicksStartIndex];\n // After cleanup, remaining ticks are within interval, so delay is always > 0\n const delay = this.#interval - (now - oldestTick);\n this.#createIntervalTimeout(delay);\n return true;\n }\n return false;\n }\n // Fixed window mode (original logic)\n if (this.#intervalId === undefined) {\n const delay = this.#intervalEnd - now;\n if (delay < 0) {\n // If the interval has expired while idle, check if we should enforce the interval\n // from the last task execution. This ensures proper spacing between tasks even\n // when the queue becomes empty and then new tasks are added.\n if (this.#lastExecutionTime > 0) {\n const timeSinceLastExecution = now - this.#lastExecutionTime;\n if (timeSinceLastExecution < this.#interval) {\n // Not enough time has passed since the last task execution\n this.#createIntervalTimeout(this.#interval - timeSinceLastExecution);\n return true;\n }\n }\n // Enough time has passed or no previous execution, allow execution\n this.#intervalCount = (this.#carryoverIntervalCount) ? this.#pending : 0;\n }\n else {\n // Act as the interval is pending\n this.#createIntervalTimeout(delay);\n return true;\n }\n }\n return false;\n }\n #createIntervalTimeout(delay) {\n if (this.#timeoutId !== undefined) {\n return;\n }\n this.#timeoutId = setTimeout(() => {\n this.#onResumeInterval();\n }, delay);\n }\n #clearIntervalTimer() {\n if (this.#intervalId) {\n clearInterval(this.#intervalId);\n this.#intervalId = undefined;\n }\n }\n #clearTimeoutTimer() {\n if (this.#timeoutId) {\n clearTimeout(this.#timeoutId);\n this.#timeoutId = undefined;\n }\n }\n #tryToStartAnother() {\n if (this.#queue.size === 0) {\n // We can clear the interval (\"pause\")\n // Because we can redo it later (\"resume\")\n this.#clearIntervalTimer();\n this.emit('empty');\n if (this.#pending === 0) {\n // Clear timeout as well when completely idle\n this.#clearTimeoutTimer();\n // Compact strict ticks when idle to free memory\n if (this.#strict && this.#strictTicksStartIndex > 0) {\n const now = Date.now();\n this.#cleanupStrictTicks(now);\n }\n this.emit('idle');\n }\n return false;\n }\n let taskStarted = false;\n if (!this.#isPaused) {\n const now = Date.now();\n const canInitializeInterval = !this.#isIntervalPausedAt(now);\n if (this.#doesIntervalAllowAnother && this.#doesConcurrentAllowAnother) {\n const job = this.#queue.dequeue();\n if (!this.#isIntervalIgnored) {\n this.#consumeIntervalSlot(now);\n this.#scheduleRateLimitUpdate();\n }\n this.emit('active');\n job();\n if (canInitializeInterval) {\n this.#initializeIntervalIfNeeded();\n }\n taskStarted = true;\n }\n }\n return taskStarted;\n }\n #initializeIntervalIfNeeded() {\n if (this.#isIntervalIgnored || this.#intervalId !== undefined) {\n return;\n }\n // Strict mode uses timeouts instead of interval timers\n if (this.#strict) {\n return;\n }\n this.#intervalId = setInterval(() => {\n this.#onInterval();\n }, this.#interval);\n this.#intervalEnd = Date.now() + this.#interval;\n }\n #onInterval() {\n // Non-strict mode uses interval timers and intervalCount\n if (!this.#strict) {\n if (this.#intervalCount === 0 && this.#pending === 0 && this.#intervalId) {\n this.#clearIntervalTimer();\n }\n this.#intervalCount = this.#carryoverIntervalCount ? this.#pending : 0;\n }\n this.#processQueue();\n this.#scheduleRateLimitUpdate();\n }\n /**\n Executes all queued functions until it reaches the limit.\n */\n #processQueue() {\n // eslint-disable-next-line no-empty\n while (this.#tryToStartAnother()) { }\n }\n get concurrency() {\n return this.#concurrency;\n }\n set concurrency(newConcurrency) {\n if (!(typeof newConcurrency === 'number' && newConcurrency >= 1)) {\n throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${newConcurrency}\\` (${typeof newConcurrency})`);\n }\n this.#concurrency = newConcurrency;\n this.#processQueue();\n }\n /**\n Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.\n\n For example, this can be used to prioritize a promise function to run earlier.\n\n ```js\n import PQueue from 'p-queue';\n\n const queue = new PQueue({concurrency: 1});\n\n queue.add(async () => '🦄', {priority: 1});\n queue.add(async () => '🦀', {priority: 0, id: '🦀'});\n queue.add(async () => '🦄', {priority: 1});\n queue.add(async () => '🦄', {priority: 1});\n\n queue.setPriority('🦀', 2);\n ```\n\n In this case, the promise function with `id: '🦀'` runs second.\n\n You can also deprioritize a promise function to delay its execution:\n\n ```js\n import PQueue from 'p-queue';\n\n const queue = new PQueue({concurrency: 1});\n\n queue.add(async () => '🦄', {priority: 1});\n queue.add(async () => '🦀', {priority: 1, id: '🦀'});\n queue.add(async () => '🦄');\n queue.add(async () => '🦄', {priority: 0});\n\n queue.setPriority('🦀', -1);\n ```\n Here, the promise function with `id: '🦀'` executes last.\n */\n setPriority(id, priority) {\n if (typeof priority !== 'number' || !Number.isFinite(priority)) {\n throw new TypeError(`Expected \\`priority\\` to be a finite number, got \\`${priority}\\` (${typeof priority})`);\n }\n this.#queue.setPriority(id, priority);\n }\n async add(function_, options = {}) {\n // Create a copy to avoid mutating the original options object\n options = {\n timeout: this.timeout,\n ...options,\n // Assign unique ID if not provided\n id: options.id ?? (this.#idAssigner++).toString(),\n };\n return new Promise((resolve, reject) => {\n // Create a unique symbol for tracking this task\n const taskSymbol = Symbol(`task-${options.id}`);\n this.#queue.enqueue(async () => {\n this.#pending++;\n // Track this running task\n this.#runningTasks.set(taskSymbol, {\n id: options.id,\n priority: options.priority ?? 0, // Match priority-queue default\n startTime: Date.now(),\n timeout: options.timeout,\n });\n let eventListener;\n try {\n // Check abort signal - if aborted, need to decrement the counter\n // that was incremented in tryToStartAnother\n try {\n options.signal?.throwIfAborted();\n }\n catch (error) {\n this.#rollbackIntervalConsumption();\n // Clean up tracking before throwing\n this.#runningTasks.delete(taskSymbol);\n throw error;\n }\n this.#lastExecutionTime = Date.now();\n let operation = function_({ signal: options.signal });\n if (options.timeout) {\n operation = pTimeout(Promise.resolve(operation), {\n milliseconds: options.timeout,\n message: `Task timed out after ${options.timeout}ms (queue has ${this.#pending} running, ${this.#queue.size} waiting)`,\n });\n }\n if (options.signal) {\n const { signal } = options;\n operation = Promise.race([operation, new Promise((_resolve, reject) => {\n eventListener = () => {\n reject(signal.reason);\n };\n signal.addEventListener('abort', eventListener, { once: true });\n })]);\n }\n const result = await operation;\n resolve(result);\n this.emit('completed', result);\n }\n catch (error) {\n reject(error);\n this.emit('error', error);\n }\n finally {\n // Clean up abort event listener\n if (eventListener) {\n options.signal?.removeEventListener('abort', eventListener);\n }\n // Remove from running tasks\n this.#runningTasks.delete(taskSymbol);\n // Use queueMicrotask to prevent deep recursion while maintaining timing\n queueMicrotask(() => {\n this.#next();\n });\n }\n }, options);\n this.emit('add');\n this.#tryToStartAnother();\n });\n }\n async addAll(functions, options) {\n return Promise.all(functions.map(async (function_) => this.add(function_, options)));\n }\n /**\n Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)\n */\n start() {\n if (!this.#isPaused) {\n return this;\n }\n this.#isPaused = false;\n this.#processQueue();\n return this;\n }\n /**\n Put queue execution on hold.\n */\n pause() {\n this.#isPaused = true;\n }\n /**\n Clear the queue.\n */\n clear() {\n this.#queue = new this.#queueClass();\n // Clear interval timer since queue is now empty (consistent with #tryToStartAnother)\n this.#clearIntervalTimer();\n // Note: We preserve strict mode rate-limiting state (ticks and timeout)\n // because clear() only clears queued tasks, not rate limit history.\n // This ensures that rate limits are still enforced after clearing the queue.\n // Note: We don't clear #runningTasks as those tasks are still running\n // They will be removed when they complete in the finally block\n // Force synchronous update since clear() should have immediate effect\n this.#updateRateLimitState();\n // Emit events so waiters (onEmpty, onIdle, onSizeLessThan) can resolve\n this.emit('empty');\n if (this.#pending === 0) {\n this.#clearTimeoutTimer();\n this.emit('idle');\n }\n this.emit('next');\n }\n /**\n Can be called multiple times. Useful if you for example add additional items at a later time.\n\n @returns A promise that settles when the queue becomes empty.\n */\n async onEmpty() {\n // Instantly resolve if the queue is empty\n if (this.#queue.size === 0) {\n return;\n }\n await this.#onEvent('empty');\n }\n /**\n @returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.\n\n If you want to avoid having the queue grow beyond a certain size you can `await queue.onSizeLessThan()` before adding a new item.\n\n Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation.\n */\n async onSizeLessThan(limit) {\n // Instantly resolve if the queue is empty.\n if (this.#queue.size < limit) {\n return;\n }\n await this.#onEvent('next', () => this.#queue.size < limit);\n }\n /**\n The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.\n\n @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.\n */\n async onIdle() {\n // Instantly resolve if none pending and if nothing else is queued\n if (this.#pending === 0 && this.#queue.size === 0) {\n return;\n }\n await this.#onEvent('idle');\n }\n /**\n The difference with `.onIdle` is that `.onPendingZero` only waits for currently running tasks to finish, ignoring queued tasks.\n\n @returns A promise that settles when all currently running tasks have completed; `queue.pending === 0`.\n */\n async onPendingZero() {\n if (this.#pending === 0) {\n return;\n }\n await this.#onEvent('pendingZero');\n }\n /**\n @returns A promise that settles when the queue becomes rate-limited due to intervalCap.\n */\n async onRateLimit() {\n if (this.isRateLimited) {\n return;\n }\n await this.#onEvent('rateLimit');\n }\n /**\n @returns A promise that settles when the queue is no longer rate-limited.\n */\n async onRateLimitCleared() {\n if (!this.isRateLimited) {\n return;\n }\n await this.#onEvent('rateLimitCleared');\n }\n /**\n @returns A promise that rejects when any task in the queue errors.\n\n Use with `Promise.race([queue.onError(), queue.onIdle()])` to fail fast on the first error while still resolving normally when the queue goes idle.\n\n Important: The promise returned by `add()` still rejects. You must handle each `add()` promise (for example, `.catch(() => {})`) to avoid unhandled rejections.\n\n @example\n ```\n import PQueue from 'p-queue';\n\n const queue = new PQueue({concurrency: 2});\n\n queue.add(() => fetchData(1)).catch(() => {});\n queue.add(() => fetchData(2)).catch(() => {});\n queue.add(() => fetchData(3)).catch(() => {});\n\n // Stop processing on first error\n try {\n await Promise.race([\n queue.onError(),\n queue.onIdle()\n ]);\n } catch (error) {\n queue.pause(); // Stop processing remaining tasks\n console.error('Queue failed:', error);\n }\n ```\n */\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n onError() {\n return new Promise((_resolve, reject) => {\n const handleError = (error) => {\n this.off('error', handleError);\n reject(error);\n };\n this.on('error', handleError);\n });\n }\n async #onEvent(event, filter) {\n return new Promise(resolve => {\n const listener = () => {\n if (filter && !filter()) {\n return;\n }\n this.off(event, listener);\n resolve();\n };\n this.on(event, listener);\n });\n }\n /**\n Size of the queue, the number of queued items waiting to run.\n */\n get size() {\n return this.#queue.size;\n }\n /**\n Size of the queue, filtered by the given options.\n\n For example, this can be used to find the number of items remaining in the queue with a specific priority level.\n */\n sizeBy(options) {\n // eslint-disable-next-line unicorn/no-array-callback-reference\n return this.#queue.filter(options).length;\n }\n /**\n Number of running items (no longer in the queue).\n */\n get pending() {\n return this.#pending;\n }\n /**\n Whether the queue is currently paused.\n */\n get isPaused() {\n return this.#isPaused;\n }\n #setupRateLimitTracking() {\n // Only schedule updates when rate limiting is enabled\n if (this.#isIntervalIgnored) {\n return;\n }\n // Wire up to lifecycle events that affect rate limit state\n // Only 'add' and 'next' can actually change rate limit state\n this.on('add', () => {\n if (this.#queue.size > 0) {\n this.#scheduleRateLimitUpdate();\n }\n });\n this.on('next', () => {\n this.#scheduleRateLimitUpdate();\n });\n }\n #scheduleRateLimitUpdate() {\n // Skip if rate limiting is not enabled or already scheduled\n if (this.#isIntervalIgnored || this.#rateLimitFlushScheduled) {\n return;\n }\n this.#rateLimitFlushScheduled = true;\n queueMicrotask(() => {\n this.#rateLimitFlushScheduled = false;\n this.#updateRateLimitState();\n });\n }\n #rollbackIntervalConsumption() {\n if (this.#isIntervalIgnored) {\n return;\n }\n this.#rollbackIntervalSlot();\n this.#scheduleRateLimitUpdate();\n }\n #updateRateLimitState() {\n const previous = this.#rateLimitedInInterval;\n // Early exit if rate limiting is disabled or queue is empty\n if (this.#isIntervalIgnored || this.#queue.size === 0) {\n if (previous) {\n this.#rateLimitedInInterval = false;\n this.emit('rateLimitCleared');\n }\n return;\n }\n // Get the current count based on mode\n let count;\n if (this.#strict) {\n const now = Date.now();\n this.#cleanupStrictTicks(now);\n count = this.#getActiveTicksCount();\n }\n else {\n count = this.#intervalCount;\n }\n const shouldBeRateLimited = count >= this.#intervalCap;\n if (shouldBeRateLimited !== previous) {\n this.#rateLimitedInInterval = shouldBeRateLimited;\n this.emit(shouldBeRateLimited ? 'rateLimit' : 'rateLimitCleared');\n }\n }\n /**\n Whether the queue is currently rate-limited due to intervalCap.\n */\n get isRateLimited() {\n return this.#rateLimitedInInterval;\n }\n /**\n Whether the queue is saturated. Returns `true` when:\n - All concurrency slots are occupied and tasks are waiting, OR\n - The queue is rate-limited and tasks are waiting\n\n Useful for detecting backpressure and potential hanging tasks.\n\n ```js\n import PQueue from 'p-queue';\n\n const queue = new PQueue({concurrency: 2});\n\n // Backpressure handling\n if (queue.isSaturated) {\n console.log('Queue is saturated, waiting for capacity...');\n await queue.onSizeLessThan(queue.concurrency);\n }\n\n // Monitoring for stuck tasks\n setInterval(() => {\n if (queue.isSaturated) {\n console.warn(`Queue saturated: ${queue.pending} running, ${queue.size} waiting`);\n }\n }, 60000);\n ```\n */\n get isSaturated() {\n return (this.#pending === this.#concurrency && this.#queue.size > 0)\n || (this.isRateLimited && this.#queue.size > 0);\n }\n /**\n The tasks currently being executed. Each task includes its `id`, `priority`, `startTime`, and `timeout` (if set).\n\n Returns an array of task info objects.\n\n ```js\n import PQueue from 'p-queue';\n\n const queue = new PQueue({concurrency: 2});\n\n // Add tasks with IDs for better debugging\n queue.add(() => fetchUser(123), {id: 'user-123'});\n queue.add(() => fetchPosts(456), {id: 'posts-456', priority: 1});\n\n // Check what's running\n console.log(queue.runningTasks);\n // => [{\n // id: 'user-123',\n // priority: 0,\n // startTime: 1759253001716,\n // timeout: undefined\n // }, {\n // id: 'posts-456',\n // priority: 1,\n // startTime: 1759253001916,\n // timeout: undefined\n // }]\n ```\n */\n get runningTasks() {\n // Return fresh array with fresh objects to prevent mutations\n return [...this.#runningTasks.values()].map(task => ({ ...task }));\n }\n}\n/**\nError thrown when a task times out.\n\n@example\n```\nimport PQueue, {TimeoutError} from 'p-queue';\n\nconst queue = new PQueue({timeout: 1000});\n\ntry {\n await queue.add(() => someTask());\n} catch (error) {\n if (error instanceof TimeoutError) {\n console.log('Task timed out');\n }\n}\n```\n*/\nexport { TimeoutError } from 'p-timeout';\n",
|
|
20
|
+
"import type { BunDevServerConfig } from \"./bunServeConfig\";\r\nimport pc from \"picocolors\";\r\nimport { $ } from \"bun\";\r\nconst success = {\r\n error: false,\r\n message: \"\"\r\n};\r\nexport async function performTSC(finalConfig: BunDevServerConfig, importMeta: ImportMeta) {\r\n if (finalConfig.enableTSC) {\r\n console.log(\"Performing TSC check\");\r\n const tsc = (await $`tsc --noEmit --noErrorTruncation -p ${finalConfig.tscConfigPath}`.cwd(importMeta.dir).quiet().nothrow());\r\n if (tsc.exitCode === 0) {\r\n console.log(pc.bgGreen(\"✔ [SUCCESS]\"), \"TSC check passed\");\r\n return success;\r\n } else {\r\n const errOutput = tsc.stdout.toString();\r\n console.log(pc.bgRed(\"✘ [ERROR]\"), `\\r\\n${errOutput}`);\r\n return {\r\n error: true,\r\n message: errOutput\r\n };\r\n }\r\n }\r\n return success;\r\n}",
|
|
21
|
+
"import { type BuildOutput, write, pathToFileURL } from \"bun\";\r\nexport function writeManifest(output: BuildOutput, outdir: string, withHash = false, manifestName = \"bun_server_manifest.json\") {\r\n const entryPoints = output.outputs.filter(o => o.kind === \"entry-point\");\r\n const epTable: string[] = [];\r\n for (const ep of entryPoints) {\r\n const basePathUrl = pathToFileURL(outdir);\r\n const epUrl = pathToFileURL(ep.path);\r\n const relativePath = epUrl.href.replace(`${basePathUrl.href}/`, \"./\");\r\n // const nameNoJs = relativePath.replace(\".js\", \"\");\r\n const hashedImport = `${relativePath}${withHash ? `?${ep.hash}` : ``}`;\r\n epTable.push(hashedImport);\r\n }\r\n const outObj = { js: epTable };\r\n // for (const element of epTable) {\r\n // Object.assign(outObj, { [element.name]: { js: [`${element.path}`] } });\r\n // }\r\n write(`${outdir}/${manifestName}`, JSON.stringify(outObj));\r\n}",
|
|
22
|
+
"/**\r\n * Configuration management and validation\r\n */\r\nimport { type BuildConfig } from \"bun\";\r\nimport { resolve } from \"path\";\r\nimport serveTemplatePath from \"./templates/output.ejs\" //with { type: \"text\" };\r\nimport indexTemplatePath from \"./templates/index.ejs\" //with { type: \"text\" };\r\nimport { bunHotReloadPlugin, getBunHMRFooter } from \"./bunHmrPlugin\";\r\nimport { type BunDevServerConfig, type BuildEnv } from \"./bunServeConfig\";\r\nimport { DEFAULT_HMR_PATH } from \"./bunClientHmr\";\r\nimport { cleanDirectory, ensureDestinationDirectory } from \"./utils/filesystem\";\r\n\r\nexport interface PreparedConfig {\r\n finalConfig: BunDevServerConfig;\r\n serveDestination: string;\r\n buildDestination: string;\r\n watchDestination: string;\r\n buildCfg: BuildConfig;\r\n}\r\n\r\nconst serveTemplate = await Bun.file(Bun.fileURLToPath(import.meta.resolve(serveTemplatePath))).text();\r\nconst indexTemplate = await Bun.file(Bun.fileURLToPath(import.meta.resolve(indexTemplatePath))).text();\r\n\r\n/**\r\n * Prepare and validate the server configuration\r\n * @param serverConfig - The user-provided server configuration\r\n * @param importMeta - The ImportMeta object from the caller\r\n * @returns The prepared configuration with resolved paths and build config\r\n */\r\nexport async function prepareConfiguration(\r\n serverConfig: BunDevServerConfig,\r\n importMeta: ImportMeta\r\n): Promise<PreparedConfig> {\r\n // Merge with default configuration\r\n const defaultConfig: Partial<BunDevServerConfig> = {\r\n port: 3000,\r\n websocketPath: DEFAULT_HMR_PATH,\r\n serveOutputEjs: serveTemplate,\r\n serveIndexHtmlEjs: indexTemplate,\r\n createIndexHTML: true,\r\n tscConfigPath: resolve(importMeta.dir, \"./tsconfig.json\"),\r\n broadcastBuildOutputToConsole: true,\r\n broadcastBuildOutputToClient: true\r\n };\r\n\r\n const finalConfig: BunDevServerConfig = { ...defaultConfig, ...serverConfig };\r\n\r\n if (serverConfig.tscConfigPath) {\r\n finalConfig.tscConfigPath = resolve(importMeta.dir, serverConfig.tscConfigPath);\r\n }\r\n\r\n if (!finalConfig.watchDir) {\r\n throw new Error(\"watchDir must be set\");\r\n }\r\n\r\n\r\n // Resolve paths\r\n const defaultBuildDir = finalConfig.buildConfig.outdir ?? \"./dist\";\r\n const servePart = finalConfig.servePath ?? defaultBuildDir;\r\n const serveDestination = resolve(importMeta.dir, servePart);\r\n const watchDestination = resolve(importMeta.dir, finalConfig.watchDir);\r\n const buildDestination = resolve(importMeta.dir, defaultBuildDir);\r\n\r\n // Resolve entry points\r\n const allEntries = serverConfig.buildConfig.entrypoints.splice(0, serverConfig.buildConfig.entrypoints.length);\r\n const resolvedEntries = allEntries.map(e => resolve(importMeta.dir, e));\r\n serverConfig.buildConfig.entrypoints = resolvedEntries;\r\n\r\n\r\n // Ensure destination directory exists\r\n await ensureDestinationDirectory(buildDestination);\r\n await ensureDestinationDirectory(serveDestination);\r\n\r\n // Prepare build configuration\r\n const buncfg = {\r\n port: finalConfig.port,\r\n tls: finalConfig.tls,\r\n websocketPath: finalConfig.websocketPath,\r\n secure: finalConfig.tls !== undefined\r\n };\r\n\r\n const buildCfg: BuildConfig = {\r\n ...serverConfig.buildConfig,\r\n outdir: buildDestination,\r\n };\r\n\r\n // Add hot reload configuration\r\n if (finalConfig.hotReload === \"footer\") {\r\n if (!buildCfg.footer) {\r\n buildCfg.footer = \"\";\r\n }\r\n buildCfg.footer += getBunHMRFooter(buncfg);\r\n }\r\n\r\n if (finalConfig.hotReload === \"plugin\") {\r\n if (!buildCfg.plugins) {\r\n buildCfg.plugins = [];\r\n }\r\n buildCfg.plugins.push(bunHotReloadPlugin(buncfg));\r\n }\r\n\r\n const userBeforeBuild = finalConfig.beforeBuild;\r\n finalConfig.beforeBuild = async (env: BuildEnv) => {\r\n const buildDirOverOfServe = serveDestination.indexOf(buildDestination) !== -1;\r\n const serveDirOverOfBuild = buildDestination.indexOf(serveDestination) !== -1;\r\n if (serverConfig.cleanBuildPath && buildDirOverOfServe) {\r\n await cleanDirectory(env.buildDestination);\r\n };\r\n if (serverConfig.cleanServePath && serveDirOverOfBuild) {\r\n await cleanDirectory(env.serveDestination);\r\n };\r\n await userBeforeBuild?.(env);\r\n }\r\n\r\n return {\r\n finalConfig,\r\n serveDestination,\r\n buildDestination,\r\n watchDestination,\r\n buildCfg\r\n };\r\n}\r\n\r\n\r\n",
|
|
23
|
+
"import type { BunHMROptions } from \"./bunHmrPlugin\";\r\n\r\n// Export the hotReload function for testing\r\nexport function hotReload() {\r\n if (!(window as any).BUN_DEV_SERVER) {\r\n (window as any).BUN_DEV_SERVER = [];\r\n }\r\n const devServer = \"[Bun Dev Server]\";\r\n const connectAddress = \"[REPLACE_ENDPOINT]\";\r\n let foundServer = (window as any).BUN_DEV_SERVER.find((server: any) => server.url === connectAddress);\r\n if (!foundServer) {\r\n foundServer = { url: connectAddress, socket: null };\r\n }\r\n if (foundServer.socket) {\r\n return;\r\n }\r\n console.log(devServer, \"Connecting to Bun Dev Server at\", connectAddress);\r\n foundServer.socket = new WebSocket(connectAddress);\r\n (window as any).BUN_DEV_SERVER.push(foundServer);\r\n\r\n function errorHandler(err: Event) {\r\n console.error(devServer, \"ERROR\", err);\r\n }\r\n function messageHandler(msg: MessageEvent<any>) {\r\n let parsed = msg.data;\r\n try {\r\n parsed = JSON.parse(msg.data);\r\n } catch (e) { }\r\n if (parsed?.type === \"message\") {\r\n console.log(devServer, parsed.message);\r\n return;\r\n }\r\n if (parsed?.type === \"output\") {\r\n console.table(devServer, parsed.message);\r\n return;\r\n }\r\n if (parsed?.type === \"reload\") {\r\n window.location.reload();\r\n return;\r\n }\r\n if (parsed?.type === \"tscerror\") {\r\n console.error(parsed.message);\r\n return;\r\n }\r\n if (parsed?.type === \"error\") {\r\n console.error(parsed.message);\r\n let newDiv = window.document.getElementById(\"bun-hmr-error\")\r\n const divExists = !!newDiv;\r\n if (!newDiv) {\r\n newDiv = window.document.createElement(\"div\");\r\n }\r\n newDiv.id = \"bun-hmr-error\";\r\n newDiv.innerText += parsed.message;\r\n if (!divExists) {\r\n\r\n window.document.body.appendChild(newDiv);\r\n }\r\n return;\r\n }\r\n }\r\n\r\n function closeHandler(ev: CloseEvent) {\r\n console.warn(devServer, \"Connection closed. Will retry in 5 seconds...\");\r\n foundServer.socket?.removeEventListener(\"error\", errorHandler);\r\n foundServer.socket?.removeEventListener(\"message\", messageHandler);\r\n foundServer.socket?.removeEventListener(\"open\", messageHandler);\r\n foundServer.socket?.removeEventListener(\"close\", closeHandler);\r\n foundServer.socket = null;\r\n setTimeout(function () {\r\n console.log(devServer, \"Attempting to reconnect...\");\r\n hotReload();\r\n }, 5000);\r\n }\r\n function openHandler(ev: Event) {\r\n console.log(devServer, \"Connected to Bun Dev Server\");\r\n }\r\n\r\n\r\n foundServer.socket.addEventListener(\"error\", errorHandler)\r\n foundServer.socket.addEventListener(\"message\", messageHandler);\r\n foundServer.socket.addEventListener(\"close\", closeHandler);\r\n foundServer.socket.addEventListener(\"open\", openHandler)\r\n\r\n}\r\n\r\nexport const DEFAULT_HMR_PATH = \"/hmr-ws\";\r\nexport function bunHotReload(bunServerConfig: BunHMROptions) {\r\n const socketPath = bunServerConfig.websocketPath || DEFAULT_HMR_PATH;\r\n const endPath = socketPath.startsWith(\"/\") ? socketPath : `/${socketPath}`;\r\n const path = `${(bunServerConfig.secure ? \"wss\" : \"ws\")}://localhost:${bunServerConfig.port}${endPath}`;\r\n return hotReload.toString().replace(\"[REPLACE_ENDPOINT]\", path);\r\n}\r\n",
|
|
24
|
+
"import type { BunPlugin, Loader } from \"bun\";\r\nimport { bunHotReload } from \"./bunClientHmr\";\r\nimport { readFile } from \"fs/promises\";\r\n\r\nexport interface BunHMROptions {\r\n secure?: boolean;\r\n port: number;\r\n websocketPath?: string;\r\n }\r\n\r\nexport function bunHotReloadPlugin(config: BunHMROptions) {\r\n const bunHMRPlugin: BunPlugin = {\r\n name: \"hmr\",\r\n target: \"browser\",\r\n setup(build) {\r\n const entryPoints: string[] = [];\r\n const addedEnryPoints = new Set<string>();\r\n build.config.entrypoints.forEach(entry => {\r\n let entryPath = entry.replace(/^\\.*/, \"\");\r\n if (process.platform === \"win32\") {\r\n entryPath = entryPath.replace(/\\//g, \"\\\\\");\r\n }\r\n entryPoints.push(entryPath);\r\n })\r\n build.onLoad({ filter: /\\.m?(t|j)sx?/ }, async (args) => {\r\n const contents = await readFile(args.path, { encoding: \"utf-8\" });\r\n const isTSx = /\\.m?tsx$/.test(args.path);\r\n const isJSx = /\\.m?jsx$/.test(args.path);\r\n const isJS = /\\.m?js$/.test(args.path);\r\n const isTS = /\\.m?ts$/.test(args.path);\r\n const loader: Loader = isTSx ? \"tsx\" : isJSx ? \"jsx\" : isTS ? \"ts\" : isJS ? \"js\" : \"text\";\r\n const isEntry = entryPoints.some(entry => args.path.endsWith(entry))\r\n if (!addedEnryPoints.has(args.path) && isEntry) {\r\n addedEnryPoints.add(args.path);\r\n return { contents: `import \"bun-hot-reload\"\\n` + contents, loader };\r\n }\r\n return { contents, loader };\r\n });\r\n build.onLoad({ filter: /./, namespace: \"bun-hot-reload\" }, async (args) => {\r\n\r\n return { contents: `(${bunHotReload(config)})()\\n`, loader: \"ts\" };\r\n });\r\n build.onResolve({ filter: /^bun-hot-reload$/ }, (args) => {\r\n return { path: args.path, namespace: \"bun-hot-reload\" };\r\n })\r\n },\r\n }\r\n return bunHMRPlugin;\r\n}\r\n\r\nexport function getBunHMRFooter(config: BunHMROptions) {\r\n return `;(${bunHotReload(config)})();`;\r\n}"
|
|
25
|
+
],
|
|
26
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAI,IAAI,WAAW,CAAC;AAAA,EAApB,IAAuB,OAAO,EAAE,QAAQ,CAAC;AAAA,EAAzC,IAA4C,MAAM,EAAE,OAAO,CAAC;AAAA,EAC5D,IAAI,mBACH,EAAE,CAAC,CAAC,IAAI,YAAY,KAAK,SAAS,YAAY,OAC7C,CAAC,CAAC,IAAI,eAAe,KAAK,SAAS,SAAS,KAAK,EAAE,aAAa,YAAa,EAAE,UAAU,CAAC,GAAG,SAAS,IAAI,SAAS,UAAW,CAAC,CAAC,IAAI;AAA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AI,CAAC,GAAG,GAAG;AAAA,QAC/D;AAAA,QACA,IAAI,IAAI,IAAI,YAAY,EAAE,SAAS,YAAY,aAAc,GAAG;AAAA,UAC9D,YAAY,eAAe,QAAQ,IAAI,GAAG,IAAI,oBAAoB;AAAA,UAClE,IAAI,OAAO,QAAQ,GAAG,GAAG;AAAA,YACvB,OAAO,gBAAgB,IAAI,SAAS,IAAI,EAAE,QAAQ,IAAI,CAAC,GAAG,GAAG;AAAA,UAC/D;AAAA,QACF;AAAA,QACA,MAAM,MAAM,IAAI,IAAI,IAAI,GAAG;AAAA,QAC3B,IAAI,cAAc,IAAI;AAAA,QAEtB,OAAO,kBAAkB,aAAa,KAAK,aAAa,MAAM,gBAAgB;AAAA;AAAA,MAIhF,WAAW;AAAA,QACT,IAAI,CAAC,IAAqB;AAAA,UACxB,GAAG,UAAU,SAAS;AAAA;AAAA,QAExB,OAAO,CAAC,IAAqB,SAA0B;AAAA,QAEvD,WAAW;AAAA,MAEb;AAAA,IACF,CAAC;AAAA,IACD,OAAO,OAAY;AAAA,IAEnB,IAAI,YAAY;AAAA,MAEd;AAAA,IACF;AAAA,IAEA,MAAM;AAAA;AAAA,EAIR,IAAI,WAAW;AAAA,IACb,MAAM,iBAAiB,MAAM,kBAAkB,YAAY,aAAa,OAAO,UAAU,SAAS;AAAA,EACpG;AAAA;",
|
|
27
|
+
"debugId": "CBC8475BE6C83F4364756E2164756E21",
|
|
28
|
+
"names": []
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"author": "SPWizard01 (https://github.com/SPWizard01/bun-dev-server)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/SPWizard01/bun-dev-server"
|
|
7
|
+
"url": "git+https://github.com/SPWizard01/bun-dev-server.git"
|
|
8
8
|
},
|
|
9
9
|
"keywords": [
|
|
10
10
|
"bun",
|
|
@@ -24,7 +24,11 @@
|
|
|
24
24
|
"exports": {
|
|
25
25
|
".": "./dist/index.js"
|
|
26
26
|
},
|
|
27
|
-
"
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"provenance": true
|
|
30
|
+
},
|
|
31
|
+
"version": "1.0.4",
|
|
28
32
|
"module": "index.ts",
|
|
29
33
|
"type": "module",
|
|
30
34
|
"license": "MIT",
|
|
@@ -35,15 +39,15 @@
|
|
|
35
39
|
"test:coverage": "bun test --coverage"
|
|
36
40
|
},
|
|
37
41
|
"devDependencies": {
|
|
38
|
-
"@types/bun": "^1.3.
|
|
42
|
+
"@types/bun": "^1.3.11"
|
|
39
43
|
},
|
|
40
44
|
"peerDependencies": {
|
|
41
45
|
"typescript": "^5.9.3"
|
|
42
46
|
},
|
|
43
47
|
"dependencies": {
|
|
44
48
|
"@types/ejs": "^3.1.5",
|
|
45
|
-
"ejs": "^
|
|
46
|
-
"p-queue": "^9.0
|
|
49
|
+
"ejs": "^5.0.1",
|
|
50
|
+
"p-queue": "^9.1.0",
|
|
47
51
|
"picocolors": "^1.1.1"
|
|
48
52
|
}
|
|
49
53
|
}
|