@delance/builder 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@delance/builder",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
+ "description": "A spear to the Python language server built with black magic",
5
+ "license": "0BSD",
4
6
  "author": "mochaaP <npm@mochaa.ws>",
7
+ "type": "module",
5
8
  "main": "dist/index.js",
6
9
  "bin": {
7
10
  "delance-builder": "dist/cli.js"
@@ -9,26 +12,15 @@
9
12
  "files": [
10
13
  "dist"
11
14
  ],
12
- "devDependencies": {
13
- "@types/babel__generator": "^7",
14
- "@types/babel__helper-validator-identifier": "^7",
15
- "@types/babel__template": "^7",
16
- "@types/babel__traverse": "^7",
17
- "@types/bun": "^1.0.0",
18
- "@types/debug": "^4",
19
- "typescript": "^5.3",
20
- "webcrack": "https://gitpkg.vercel.app/j4k0xb/webcrack/packages/webcrack",
21
- "xo": "^0.56.0"
22
- },
23
- "description": "A spear to the Python language server built with black magic",
24
- "engines": {
25
- "node": ">=18"
26
- },
27
15
  "eslintConfig": {
28
16
  "env": {
29
17
  "es2024": true,
30
18
  "node": true
31
19
  },
20
+ "parserOptions": {
21
+ "ecmaVersion": "latest",
22
+ "sourceType": "module"
23
+ },
32
24
  "extends": "./node_modules/xo/config/plugins.cjs",
33
25
  "overrides": [
34
26
  {
@@ -40,9 +32,10 @@
40
32
  "xo-typescript"
41
33
  ],
42
34
  "rules": {
43
- "@typescript-eslint/naming-convention": "off",
44
35
  "@typescript-eslint/consistent-type-definitions": "warn",
36
+ "@typescript-eslint/naming-convention": "off",
45
37
  "import/extensions": "off",
38
+ "import/no-named-as-default-member": "off",
46
39
  "unicorn/prefer-regexp-test": "off",
47
40
  "n/prefer-global/process": "off"
48
41
  }
@@ -52,43 +45,72 @@
52
45
  "utils/matchers/*.ts"
53
46
  ],
54
47
  "rules": {
55
- "unicorn/prevent-abbreviations": "off",
56
- "unicorn/filename-case": "off"
48
+ "unicorn/filename-case": "off",
49
+ "unicorn/prevent-abbreviations": "off"
57
50
  }
58
51
  }
59
52
  ],
60
- "parserOptions": {
61
- "ecmaVersion": "latest",
62
- "sourceType": "module"
63
- },
64
53
  "ignorePatterns": [
65
54
  "dist"
66
55
  ]
67
56
  },
68
- "license": "0BSD",
69
- "type": "module",
57
+ "dependencies": {
58
+ "@babel/code-frame": "esm",
59
+ "@babel/core": "esm",
60
+ "@babel/generator": "esm",
61
+ "@babel/helper-validator-identifier": "esm",
62
+ "@babel/parser": "esm",
63
+ "@babel/template": "esm",
64
+ "@babel/traverse": "esm",
65
+ "@babel/types": "esm",
66
+ "quickjs-emscripten": "^0.25.1"
67
+ },
68
+ "devDependencies": {
69
+ "@codemod/core": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/core&commit=f7526b4223cf97415c635b445271dee907d1401e&scripts.postinstall=rimraf tsconfig.json",
70
+ "@codemod/matchers": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/matchers&commit=f7526b4223cf97415c635b445271dee907d1401e&scripts.postinstall=rimraf tsconfig.json",
71
+ "@codemod/parser": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/parser&commit=f7526b4223cf97415c635b445271dee907d1401e&scripts.postinstall=rimraf tsconfig.json",
72
+ "@codemod/utils": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/utils&commit=f7526b4223cf97415c635b445271dee907d1401e&scripts.postinstall=rimraf tsconfig.json",
73
+ "@types/babel__core": "^7",
74
+ "@types/babel__generator": "^7",
75
+ "@types/babel__helper-validator-identifier": "^7",
76
+ "@types/babel__template": "^7",
77
+ "@types/babel__traverse": "^7",
78
+ "@types/bun": "^1.0.0",
79
+ "@types/debug": "^4",
80
+ "bun": "^1.0.20",
81
+ "rimraf": "^5.0.5",
82
+ "typescript": "^5.3",
83
+ "webcrack": "https://gitpkg.vercel.app/api/pkg.tgz?url=j4k0xb/webcrack/packages/webcrack&commit=fdf21377287e6b492a152c3c588e6614d59af212&scripts.postinstall=rimraf tsconfig.json",
84
+ "xo": "^0.56.0"
85
+ },
70
86
  "peerDependencies": {
71
- "@babel/generator": "^7",
72
- "@babel/helper-validator-identifier": "^7",
73
- "@babel/parser": "^7",
74
- "@babel/template": "^7",
75
- "@babel/traverse": "^7",
76
- "@babel/types": "^7",
77
- "@codemod/matchers": "^1.7.0",
78
87
  "debug": "^4"
79
88
  },
80
- "dependencies": {
81
- "quickjs-emscripten": "^0.25.1"
89
+ "packageManager": "pnpm@8.12.1",
90
+ "engines": {
91
+ "node": ">=18"
82
92
  },
83
- "resolutions": {
84
- "isolated-vm": "npm:noop3@1000.0.0"
93
+ "overrides": {
94
+ "webcrack": {
95
+ "@codemod/matchers": "$@codemod/matchers",
96
+ "@codemod/utils": "$@codemod/utils",
97
+ "@codemod/core": "$@codemod/core",
98
+ "@codemod/parser": "$@codemod/parser",
99
+ "@babel/generator": "$@babel/generator",
100
+ "@babel/helper-validator-identifier": "$@babel/helper-validator-identifier",
101
+ "@babel/parser": "$@babel/parser",
102
+ "@babel/template": "$@babel/template",
103
+ "@babel/traverse": "$@babel/traverse",
104
+ "@babel/types": "$@babel/types",
105
+ "@babel/code-frame": "$@babel/code-frame",
106
+ "@babel/core": "$@babel/core"
107
+ }
85
108
  },
86
109
  "scripts": {
87
- "build": "bun build index.ts cli.ts --target=node --splitting -e=isolated-vm -e=quickjs-emscripten -e=@* -e=debug --sourcemap=external --outdir=dist",
110
+ "build": "bun build index.ts cli.ts --target=node --splitting -e=isolated-vm -e=quickjs-emscripten -e=@babel -e=debug --outdir=dist",
88
111
  "build:minify": "bun run build --minify --entry-naming [dir]/[name].min.[ext]",
89
- "start": "bun cli.ts",
90
- "prepare": "rimraf dist && bun run build",
91
112
  "lint": "eslint .",
92
- "lint:fix": "eslint . --fix"
113
+ "lint:fix": "eslint . --fix",
114
+ "start": "bun cli.ts"
93
115
  }
94
- }
116
+ }
package/dist/cli.js.map DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../cli.ts", "../utils/colors.ts", "../utils/colors.ts", "../utils/colors.ts", "../utils/colors.ts", "../utils/colors.ts", "../utils/colors.ts", "../utils/colors.ts", "../cli.ts"],
4
- "sourcesContent": [
5
- "#!/usr/bin/env bun\nimport {spawnSync} from 'node:child_process';\nimport debug from 'debug';\nimport run from '.';\nimport * as pc from '~colors';\n\nfunction hl(...args: string[]) {\n\treturn pc.bgBlack(` ${pc.dim(pc.magenta('$'))} ${(\n\t\t[...(function* () {\n\t\t\tfor (let i = 0; i < args.length; i++) {\n\t\t\t\tconst arg = args[i];\n\t\t\t\tif (i === 0) {\n\t\t\t\t\tyield pc.yellow(arg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (arg === '|') {\n\t\t\t\t\tyield pc.green('|');\n\t\t\t\t\tyield pc.yellow(args[++i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (arg.startsWith('-')) {\n\t\t\t\t\tyield pc.cyan(arg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (arg.startsWith('#')) {\n\t\t\t\t\tyield pc.dim(args.slice(i).join(' '));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Not used yet, discard at tree shaking stage\n\t\t\t\tif (process.env.NODE_ENV === 'development') {\n\t\t\t\t\t// eslint-disable-next-line unicorn/no-lonely-if\n\t\t\t\t\tif (\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\targ.startsWith('\"')\n\t\t\t\t\t\t\t&& arg.endsWith('\"')\n\t\t\t\t\t\t) || (\n\t\t\t\t\t\t\targ.startsWith('\\'')\n\t\t\t\t\t\t\t&& arg.endsWith('\\'')\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tyield arg[0] + pc.magenta(arg.slice(1, -1)) + arg[0];\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tyield arg;\n\t\t\t}\n\t\t})()]\n\t).join(' ')} `);\n}\n\nconst errorMessage\n\t= `\n ${pc.red('Uh-oh')}. ${pc.bold(pc.yellow('@delance/builder'))} CLI requires Bun to run.\n If you were trying to run the language server, use ${pc.bold(pc.magenta('npm i @delance/runtime'))}.\n\n • To install Bun:\n ${hl('npm', 'i', '-d', 'bun', '#', 'locally')}\n ${hl('curl', '-fsSL', 'https://bun.sh/install', '|', 'bash', '#', 'globally')}\n • More info: ${pc.underline(pc.cyan('https://bun.sh/docs/installation'))}\n\n${'─'.repeat(80)}\n`;\n\nif (!process.isBun) {\n\tconst {status, error} = spawnSync(\n\t\t'bun',\n\t\t['run', ...process.argv.slice(1)],\n\t\t{stdio: 'inherit'},\n\t);\n\tif (status) {\n\t\tprocess.exit(status);\n\t} else {\n\t\t// @ts-expect-error Node.js errors has `.code`\n\t\tif (error && error.code === 'ENOENT') {\n\t\t\tconsole.error(errorMessage);\n\t\t}\n\n\t\tthrow error!;\n\t}\n}\n\nexport async function main(argv: string[]) {\n\tdebug.enable('*,-babel');\n\tconst cwd = argv.pop()!;\n\n\tfor await (\n\t\tconst x of new Bun.Glob('{!browser,*}.bundle.js')\n\t\t\t.scan({absolute: true, cwd})\n\t) {\n\t\tconsole.group(`${pc.magenta('> build')} ${pc.dim(x)}`);\n\t\tconst label = `${pc.bgBlue(pc.white(' Processed '))} ${pc.dim(x)}`;\n\t\tconsole.time(label);\n\n\t\ttry {\n\t\t\tconst file = Bun.file(x);\n\t\t\tawait Bun.write(file, (\n\t\t\t\tawait run(await file.text())),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error while processing file ${x} `);\n\t\t\tthrow error;\n\t\t}\n\n\t\tconsole.timeEnd(label);\n\t\tconsole.groupEnd();\n\t}\n}\n\nif (import.meta.main) {\n\tawait main(process.argv);\n}\n",
6
- "/*! modified from picocolors v1.0.0 | ISC License | github.com/alexeyraspopov/picocolors */\n/*\nCopyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nimport {isatty} from 'node:tty';\n\nconst argv = process.argv || [];\nconst {env} = process;\nconst enabled\n\t= !('NO_COLOR' in env || argv.includes('--no-color'))\n\t&& ('FORCE_COLOR' in env\n\t\t|| argv.includes('--color')\n\t\t|| process.platform === 'win32'\n\t\t|| (isatty(1) && env.TERM !== 'dumb')\n\t\t|| 'CI' in env);\n\nconst formatter = (open: string, close: string, replace = open) =>\n\tenabled ? (input: string) => {\n\t\tconst string = String(input);\n\t\tconst index = string.indexOf(close, open.length);\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close;\n\t} : String;\n\nconst replaceClose = (string: string, close: string, replace: string, index: number): string => {\n\tconst start = string.slice(0, Math.max(0, index)) + replace;\n\tconst end = string.slice(Math.max(0, index + close.length));\n\tconst nextIndex = end.indexOf(close);\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\n\nexport const reset = enabled ? (s: string) => `\\u001B[0m${s}\\u001B[0m` : String;\nexport const bold = /* #__PURE__ */ formatter('\\u001B[1m', '\\u001B[22m', '\\u001B[22m\\u001B[1m');\nexport const dim = /* #__PURE__ */ formatter('\\u001B[2m', '\\u001B[22m', '\\u001B[22m\\u001B[2m');\nexport const italic = /* #__PURE__ */ formatter('\\u001B[3m', '\\u001B[23m');\nexport const underline = /* #__PURE__ */ formatter('\\u001B[4m', '\\u001B[24m');\nexport const inverse = /* #__PURE__ */ formatter('\\u001B[7m', '\\u001B[27m');\nexport const hidden = /* #__PURE__ */ formatter('\\u001B[8m', '\\u001B[28m');\nexport const strikethrough = /* #__PURE__ */ formatter('\\u001B[9m', '\\u001B[29m');\nexport const black = /* #__PURE__ */ formatter('\\u001B[30m', '\\u001B[39m');\nexport const red = /* #__PURE__ */ formatter('\\u001B[31m', '\\u001B[39m');\nexport const green = /* #__PURE__ */ formatter('\\u001B[32m', '\\u001B[39m');\nexport const yellow = /* #__PURE__ */ formatter('\\u001B[33m', '\\u001B[39m');\nexport const blue = /* #__PURE__ */ formatter('\\u001B[34m', '\\u001B[39m');\nexport const magenta = /* #__PURE__ */ formatter('\\u001B[35m', '\\u001B[39m');\nexport const cyan = /* #__PURE__ */ formatter('\\u001B[36m', '\\u001B[39m');\nexport const white = /* #__PURE__ */ formatter('\\u001B[37m', '\\u001B[39m');\nexport const gray = /* #__PURE__ */ formatter('\\u001B[90m', '\\u001B[39m');\nexport const bgBlack = /* #__PURE__ */ formatter('\\u001B[40m', '\\u001B[49m');\nexport const bgRed = /* #__PURE__ */ formatter('\\u001B[41m', '\\u001B[49m');\nexport const bgGreen = /* #__PURE__ */ formatter('\\u001B[42m', '\\u001B[49m');\nexport const bgYellow = /* #__PURE__ */ formatter('\\u001B[43m', '\\u001B[49m');\nexport const bgBlue = /* #__PURE__ */ formatter('\\u001B[44m', '\\u001B[49m');\nexport const bgMagenta = /* #__PURE__ */ formatter('\\u001B[45m', '\\u001B[49m');\nexport const bgCyan = /* #__PURE__ */ formatter('\\u001B[46m', '\\u001B[49m');\nexport const bgWhite = /* #__PURE__ */ formatter('\\u001B[47m', '\\u001B[49m');\n",
7
- "/*! modified from picocolors v1.0.0 | ISC License | github.com/alexeyraspopov/picocolors */\n/*\nCopyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nimport {isatty} from 'node:tty';\n\nconst argv = process.argv || [];\nconst {env} = process;\nconst enabled\n\t= !('NO_COLOR' in env || argv.includes('--no-color'))\n\t&& ('FORCE_COLOR' in env\n\t\t|| argv.includes('--color')\n\t\t|| process.platform === 'win32'\n\t\t|| (isatty(1) && env.TERM !== 'dumb')\n\t\t|| 'CI' in env);\n\nconst formatter = (open: string, close: string, replace = open) =>\n\tenabled ? (input: string) => {\n\t\tconst string = String(input);\n\t\tconst index = string.indexOf(close, open.length);\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close;\n\t} : String;\n\nconst replaceClose = (string: string, close: string, replace: string, index: number): string => {\n\tconst start = string.slice(0, Math.max(0, index)) + replace;\n\tconst end = string.slice(Math.max(0, index + close.length));\n\tconst nextIndex = end.indexOf(close);\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\n\nexport const reset = enabled ? (s: string) => `\\u001B[0m${s}\\u001B[0m` : String;\nexport const bold = /* #__PURE__ */ formatter('\\u001B[1m', '\\u001B[22m', '\\u001B[22m\\u001B[1m');\nexport const dim = /* #__PURE__ */ formatter('\\u001B[2m', '\\u001B[22m', '\\u001B[22m\\u001B[2m');\nexport const italic = /* #__PURE__ */ formatter('\\u001B[3m', '\\u001B[23m');\nexport const underline = /* #__PURE__ */ formatter('\\u001B[4m', '\\u001B[24m');\nexport const inverse = /* #__PURE__ */ formatter('\\u001B[7m', '\\u001B[27m');\nexport const hidden = /* #__PURE__ */ formatter('\\u001B[8m', '\\u001B[28m');\nexport const strikethrough = /* #__PURE__ */ formatter('\\u001B[9m', '\\u001B[29m');\nexport const black = /* #__PURE__ */ formatter('\\u001B[30m', '\\u001B[39m');\nexport const red = /* #__PURE__ */ formatter('\\u001B[31m', '\\u001B[39m');\nexport const green = /* #__PURE__ */ formatter('\\u001B[32m', '\\u001B[39m');\nexport const yellow = /* #__PURE__ */ formatter('\\u001B[33m', '\\u001B[39m');\nexport const blue = /* #__PURE__ */ formatter('\\u001B[34m', '\\u001B[39m');\nexport const magenta = /* #__PURE__ */ formatter('\\u001B[35m', '\\u001B[39m');\nexport const cyan = /* #__PURE__ */ formatter('\\u001B[36m', '\\u001B[39m');\nexport const white = /* #__PURE__ */ formatter('\\u001B[37m', '\\u001B[39m');\nexport const gray = /* #__PURE__ */ formatter('\\u001B[90m', '\\u001B[39m');\nexport const bgBlack = /* #__PURE__ */ formatter('\\u001B[40m', '\\u001B[49m');\nexport const bgRed = /* #__PURE__ */ formatter('\\u001B[41m', '\\u001B[49m');\nexport const bgGreen = /* #__PURE__ */ formatter('\\u001B[42m', '\\u001B[49m');\nexport const bgYellow = /* #__PURE__ */ formatter('\\u001B[43m', '\\u001B[49m');\nexport const bgBlue = /* #__PURE__ */ formatter('\\u001B[44m', '\\u001B[49m');\nexport const bgMagenta = /* #__PURE__ */ formatter('\\u001B[45m', '\\u001B[49m');\nexport const bgCyan = /* #__PURE__ */ formatter('\\u001B[46m', '\\u001B[49m');\nexport const bgWhite = /* #__PURE__ */ formatter('\\u001B[47m', '\\u001B[49m');\n",
8
- "/*! modified from picocolors v1.0.0 | ISC License | github.com/alexeyraspopov/picocolors */\n/*\nCopyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nimport {isatty} from 'node:tty';\n\nconst argv = process.argv || [];\nconst {env} = process;\nconst enabled\n\t= !('NO_COLOR' in env || argv.includes('--no-color'))\n\t&& ('FORCE_COLOR' in env\n\t\t|| argv.includes('--color')\n\t\t|| process.platform === 'win32'\n\t\t|| (isatty(1) && env.TERM !== 'dumb')\n\t\t|| 'CI' in env);\n\nconst formatter = (open: string, close: string, replace = open) =>\n\tenabled ? (input: string) => {\n\t\tconst string = String(input);\n\t\tconst index = string.indexOf(close, open.length);\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close;\n\t} : String;\n\nconst replaceClose = (string: string, close: string, replace: string, index: number): string => {\n\tconst start = string.slice(0, Math.max(0, index)) + replace;\n\tconst end = string.slice(Math.max(0, index + close.length));\n\tconst nextIndex = end.indexOf(close);\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\n\nexport const reset = enabled ? (s: string) => `\\u001B[0m${s}\\u001B[0m` : String;\nexport const bold = /* #__PURE__ */ formatter('\\u001B[1m', '\\u001B[22m', '\\u001B[22m\\u001B[1m');\nexport const dim = /* #__PURE__ */ formatter('\\u001B[2m', '\\u001B[22m', '\\u001B[22m\\u001B[2m');\nexport const italic = /* #__PURE__ */ formatter('\\u001B[3m', '\\u001B[23m');\nexport const underline = /* #__PURE__ */ formatter('\\u001B[4m', '\\u001B[24m');\nexport const inverse = /* #__PURE__ */ formatter('\\u001B[7m', '\\u001B[27m');\nexport const hidden = /* #__PURE__ */ formatter('\\u001B[8m', '\\u001B[28m');\nexport const strikethrough = /* #__PURE__ */ formatter('\\u001B[9m', '\\u001B[29m');\nexport const black = /* #__PURE__ */ formatter('\\u001B[30m', '\\u001B[39m');\nexport const red = /* #__PURE__ */ formatter('\\u001B[31m', '\\u001B[39m');\nexport const green = /* #__PURE__ */ formatter('\\u001B[32m', '\\u001B[39m');\nexport const yellow = /* #__PURE__ */ formatter('\\u001B[33m', '\\u001B[39m');\nexport const blue = /* #__PURE__ */ formatter('\\u001B[34m', '\\u001B[39m');\nexport const magenta = /* #__PURE__ */ formatter('\\u001B[35m', '\\u001B[39m');\nexport const cyan = /* #__PURE__ */ formatter('\\u001B[36m', '\\u001B[39m');\nexport const white = /* #__PURE__ */ formatter('\\u001B[37m', '\\u001B[39m');\nexport const gray = /* #__PURE__ */ formatter('\\u001B[90m', '\\u001B[39m');\nexport const bgBlack = /* #__PURE__ */ formatter('\\u001B[40m', '\\u001B[49m');\nexport const bgRed = /* #__PURE__ */ formatter('\\u001B[41m', '\\u001B[49m');\nexport const bgGreen = /* #__PURE__ */ formatter('\\u001B[42m', '\\u001B[49m');\nexport const bgYellow = /* #__PURE__ */ formatter('\\u001B[43m', '\\u001B[49m');\nexport const bgBlue = /* #__PURE__ */ formatter('\\u001B[44m', '\\u001B[49m');\nexport const bgMagenta = /* #__PURE__ */ formatter('\\u001B[45m', '\\u001B[49m');\nexport const bgCyan = /* #__PURE__ */ formatter('\\u001B[46m', '\\u001B[49m');\nexport const bgWhite = /* #__PURE__ */ formatter('\\u001B[47m', '\\u001B[49m');\n",
9
- "/*! modified from picocolors v1.0.0 | ISC License | github.com/alexeyraspopov/picocolors */\n/*\nCopyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nimport {isatty} from 'node:tty';\n\nconst argv = process.argv || [];\nconst {env} = process;\nconst enabled\n\t= !('NO_COLOR' in env || argv.includes('--no-color'))\n\t&& ('FORCE_COLOR' in env\n\t\t|| argv.includes('--color')\n\t\t|| process.platform === 'win32'\n\t\t|| (isatty(1) && env.TERM !== 'dumb')\n\t\t|| 'CI' in env);\n\nconst formatter = (open: string, close: string, replace = open) =>\n\tenabled ? (input: string) => {\n\t\tconst string = String(input);\n\t\tconst index = string.indexOf(close, open.length);\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close;\n\t} : String;\n\nconst replaceClose = (string: string, close: string, replace: string, index: number): string => {\n\tconst start = string.slice(0, Math.max(0, index)) + replace;\n\tconst end = string.slice(Math.max(0, index + close.length));\n\tconst nextIndex = end.indexOf(close);\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\n\nexport const reset = enabled ? (s: string) => `\\u001B[0m${s}\\u001B[0m` : String;\nexport const bold = /* #__PURE__ */ formatter('\\u001B[1m', '\\u001B[22m', '\\u001B[22m\\u001B[1m');\nexport const dim = /* #__PURE__ */ formatter('\\u001B[2m', '\\u001B[22m', '\\u001B[22m\\u001B[2m');\nexport const italic = /* #__PURE__ */ formatter('\\u001B[3m', '\\u001B[23m');\nexport const underline = /* #__PURE__ */ formatter('\\u001B[4m', '\\u001B[24m');\nexport const inverse = /* #__PURE__ */ formatter('\\u001B[7m', '\\u001B[27m');\nexport const hidden = /* #__PURE__ */ formatter('\\u001B[8m', '\\u001B[28m');\nexport const strikethrough = /* #__PURE__ */ formatter('\\u001B[9m', '\\u001B[29m');\nexport const black = /* #__PURE__ */ formatter('\\u001B[30m', '\\u001B[39m');\nexport const red = /* #__PURE__ */ formatter('\\u001B[31m', '\\u001B[39m');\nexport const green = /* #__PURE__ */ formatter('\\u001B[32m', '\\u001B[39m');\nexport const yellow = /* #__PURE__ */ formatter('\\u001B[33m', '\\u001B[39m');\nexport const blue = /* #__PURE__ */ formatter('\\u001B[34m', '\\u001B[39m');\nexport const magenta = /* #__PURE__ */ formatter('\\u001B[35m', '\\u001B[39m');\nexport const cyan = /* #__PURE__ */ formatter('\\u001B[36m', '\\u001B[39m');\nexport const white = /* #__PURE__ */ formatter('\\u001B[37m', '\\u001B[39m');\nexport const gray = /* #__PURE__ */ formatter('\\u001B[90m', '\\u001B[39m');\nexport const bgBlack = /* #__PURE__ */ formatter('\\u001B[40m', '\\u001B[49m');\nexport const bgRed = /* #__PURE__ */ formatter('\\u001B[41m', '\\u001B[49m');\nexport const bgGreen = /* #__PURE__ */ formatter('\\u001B[42m', '\\u001B[49m');\nexport const bgYellow = /* #__PURE__ */ formatter('\\u001B[43m', '\\u001B[49m');\nexport const bgBlue = /* #__PURE__ */ formatter('\\u001B[44m', '\\u001B[49m');\nexport const bgMagenta = /* #__PURE__ */ formatter('\\u001B[45m', '\\u001B[49m');\nexport const bgCyan = /* #__PURE__ */ formatter('\\u001B[46m', '\\u001B[49m');\nexport const bgWhite = /* #__PURE__ */ formatter('\\u001B[47m', '\\u001B[49m');\n",
10
- "/*! modified from picocolors v1.0.0 | ISC License | github.com/alexeyraspopov/picocolors */\n/*\nCopyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nimport {isatty} from 'node:tty';\n\nconst argv = process.argv || [];\nconst {env} = process;\nconst enabled\n\t= !('NO_COLOR' in env || argv.includes('--no-color'))\n\t&& ('FORCE_COLOR' in env\n\t\t|| argv.includes('--color')\n\t\t|| process.platform === 'win32'\n\t\t|| (isatty(1) && env.TERM !== 'dumb')\n\t\t|| 'CI' in env);\n\nconst formatter = (open: string, close: string, replace = open) =>\n\tenabled ? (input: string) => {\n\t\tconst string = String(input);\n\t\tconst index = string.indexOf(close, open.length);\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close;\n\t} : String;\n\nconst replaceClose = (string: string, close: string, replace: string, index: number): string => {\n\tconst start = string.slice(0, Math.max(0, index)) + replace;\n\tconst end = string.slice(Math.max(0, index + close.length));\n\tconst nextIndex = end.indexOf(close);\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\n\nexport const reset = enabled ? (s: string) => `\\u001B[0m${s}\\u001B[0m` : String;\nexport const bold = /* #__PURE__ */ formatter('\\u001B[1m', '\\u001B[22m', '\\u001B[22m\\u001B[1m');\nexport const dim = /* #__PURE__ */ formatter('\\u001B[2m', '\\u001B[22m', '\\u001B[22m\\u001B[2m');\nexport const italic = /* #__PURE__ */ formatter('\\u001B[3m', '\\u001B[23m');\nexport const underline = /* #__PURE__ */ formatter('\\u001B[4m', '\\u001B[24m');\nexport const inverse = /* #__PURE__ */ formatter('\\u001B[7m', '\\u001B[27m');\nexport const hidden = /* #__PURE__ */ formatter('\\u001B[8m', '\\u001B[28m');\nexport const strikethrough = /* #__PURE__ */ formatter('\\u001B[9m', '\\u001B[29m');\nexport const black = /* #__PURE__ */ formatter('\\u001B[30m', '\\u001B[39m');\nexport const red = /* #__PURE__ */ formatter('\\u001B[31m', '\\u001B[39m');\nexport const green = /* #__PURE__ */ formatter('\\u001B[32m', '\\u001B[39m');\nexport const yellow = /* #__PURE__ */ formatter('\\u001B[33m', '\\u001B[39m');\nexport const blue = /* #__PURE__ */ formatter('\\u001B[34m', '\\u001B[39m');\nexport const magenta = /* #__PURE__ */ formatter('\\u001B[35m', '\\u001B[39m');\nexport const cyan = /* #__PURE__ */ formatter('\\u001B[36m', '\\u001B[39m');\nexport const white = /* #__PURE__ */ formatter('\\u001B[37m', '\\u001B[39m');\nexport const gray = /* #__PURE__ */ formatter('\\u001B[90m', '\\u001B[39m');\nexport const bgBlack = /* #__PURE__ */ formatter('\\u001B[40m', '\\u001B[49m');\nexport const bgRed = /* #__PURE__ */ formatter('\\u001B[41m', '\\u001B[49m');\nexport const bgGreen = /* #__PURE__ */ formatter('\\u001B[42m', '\\u001B[49m');\nexport const bgYellow = /* #__PURE__ */ formatter('\\u001B[43m', '\\u001B[49m');\nexport const bgBlue = /* #__PURE__ */ formatter('\\u001B[44m', '\\u001B[49m');\nexport const bgMagenta = /* #__PURE__ */ formatter('\\u001B[45m', '\\u001B[49m');\nexport const bgCyan = /* #__PURE__ */ formatter('\\u001B[46m', '\\u001B[49m');\nexport const bgWhite = /* #__PURE__ */ formatter('\\u001B[47m', '\\u001B[49m');\n",
11
- "/*! modified from picocolors v1.0.0 | ISC License | github.com/alexeyraspopov/picocolors */\n/*\nCopyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nimport {isatty} from 'node:tty';\n\nconst argv = process.argv || [];\nconst {env} = process;\nconst enabled\n\t= !('NO_COLOR' in env || argv.includes('--no-color'))\n\t&& ('FORCE_COLOR' in env\n\t\t|| argv.includes('--color')\n\t\t|| process.platform === 'win32'\n\t\t|| (isatty(1) && env.TERM !== 'dumb')\n\t\t|| 'CI' in env);\n\nconst formatter = (open: string, close: string, replace = open) =>\n\tenabled ? (input: string) => {\n\t\tconst string = String(input);\n\t\tconst index = string.indexOf(close, open.length);\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close;\n\t} : String;\n\nconst replaceClose = (string: string, close: string, replace: string, index: number): string => {\n\tconst start = string.slice(0, Math.max(0, index)) + replace;\n\tconst end = string.slice(Math.max(0, index + close.length));\n\tconst nextIndex = end.indexOf(close);\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\n\nexport const reset = enabled ? (s: string) => `\\u001B[0m${s}\\u001B[0m` : String;\nexport const bold = /* #__PURE__ */ formatter('\\u001B[1m', '\\u001B[22m', '\\u001B[22m\\u001B[1m');\nexport const dim = /* #__PURE__ */ formatter('\\u001B[2m', '\\u001B[22m', '\\u001B[22m\\u001B[2m');\nexport const italic = /* #__PURE__ */ formatter('\\u001B[3m', '\\u001B[23m');\nexport const underline = /* #__PURE__ */ formatter('\\u001B[4m', '\\u001B[24m');\nexport const inverse = /* #__PURE__ */ formatter('\\u001B[7m', '\\u001B[27m');\nexport const hidden = /* #__PURE__ */ formatter('\\u001B[8m', '\\u001B[28m');\nexport const strikethrough = /* #__PURE__ */ formatter('\\u001B[9m', '\\u001B[29m');\nexport const black = /* #__PURE__ */ formatter('\\u001B[30m', '\\u001B[39m');\nexport const red = /* #__PURE__ */ formatter('\\u001B[31m', '\\u001B[39m');\nexport const green = /* #__PURE__ */ formatter('\\u001B[32m', '\\u001B[39m');\nexport const yellow = /* #__PURE__ */ formatter('\\u001B[33m', '\\u001B[39m');\nexport const blue = /* #__PURE__ */ formatter('\\u001B[34m', '\\u001B[39m');\nexport const magenta = /* #__PURE__ */ formatter('\\u001B[35m', '\\u001B[39m');\nexport const cyan = /* #__PURE__ */ formatter('\\u001B[36m', '\\u001B[39m');\nexport const white = /* #__PURE__ */ formatter('\\u001B[37m', '\\u001B[39m');\nexport const gray = /* #__PURE__ */ formatter('\\u001B[90m', '\\u001B[39m');\nexport const bgBlack = /* #__PURE__ */ formatter('\\u001B[40m', '\\u001B[49m');\nexport const bgRed = /* #__PURE__ */ formatter('\\u001B[41m', '\\u001B[49m');\nexport const bgGreen = /* #__PURE__ */ formatter('\\u001B[42m', '\\u001B[49m');\nexport const bgYellow = /* #__PURE__ */ formatter('\\u001B[43m', '\\u001B[49m');\nexport const bgBlue = /* #__PURE__ */ formatter('\\u001B[44m', '\\u001B[49m');\nexport const bgMagenta = /* #__PURE__ */ formatter('\\u001B[45m', '\\u001B[49m');\nexport const bgCyan = /* #__PURE__ */ formatter('\\u001B[46m', '\\u001B[49m');\nexport const bgWhite = /* #__PURE__ */ formatter('\\u001B[47m', '\\u001B[49m');\n",
12
- "/*! modified from picocolors v1.0.0 | ISC License | github.com/alexeyraspopov/picocolors */\n/*\nCopyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nimport {isatty} from 'node:tty';\n\nconst argv = process.argv || [];\nconst {env} = process;\nconst enabled\n\t= !('NO_COLOR' in env || argv.includes('--no-color'))\n\t&& ('FORCE_COLOR' in env\n\t\t|| argv.includes('--color')\n\t\t|| process.platform === 'win32'\n\t\t|| (isatty(1) && env.TERM !== 'dumb')\n\t\t|| 'CI' in env);\n\nconst formatter = (open: string, close: string, replace = open) =>\n\tenabled ? (input: string) => {\n\t\tconst string = String(input);\n\t\tconst index = string.indexOf(close, open.length);\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close;\n\t} : String;\n\nconst replaceClose = (string: string, close: string, replace: string, index: number): string => {\n\tconst start = string.slice(0, Math.max(0, index)) + replace;\n\tconst end = string.slice(Math.max(0, index + close.length));\n\tconst nextIndex = end.indexOf(close);\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\n\nexport const reset = enabled ? (s: string) => `\\u001B[0m${s}\\u001B[0m` : String;\nexport const bold = /* #__PURE__ */ formatter('\\u001B[1m', '\\u001B[22m', '\\u001B[22m\\u001B[1m');\nexport const dim = /* #__PURE__ */ formatter('\\u001B[2m', '\\u001B[22m', '\\u001B[22m\\u001B[2m');\nexport const italic = /* #__PURE__ */ formatter('\\u001B[3m', '\\u001B[23m');\nexport const underline = /* #__PURE__ */ formatter('\\u001B[4m', '\\u001B[24m');\nexport const inverse = /* #__PURE__ */ formatter('\\u001B[7m', '\\u001B[27m');\nexport const hidden = /* #__PURE__ */ formatter('\\u001B[8m', '\\u001B[28m');\nexport const strikethrough = /* #__PURE__ */ formatter('\\u001B[9m', '\\u001B[29m');\nexport const black = /* #__PURE__ */ formatter('\\u001B[30m', '\\u001B[39m');\nexport const red = /* #__PURE__ */ formatter('\\u001B[31m', '\\u001B[39m');\nexport const green = /* #__PURE__ */ formatter('\\u001B[32m', '\\u001B[39m');\nexport const yellow = /* #__PURE__ */ formatter('\\u001B[33m', '\\u001B[39m');\nexport const blue = /* #__PURE__ */ formatter('\\u001B[34m', '\\u001B[39m');\nexport const magenta = /* #__PURE__ */ formatter('\\u001B[35m', '\\u001B[39m');\nexport const cyan = /* #__PURE__ */ formatter('\\u001B[36m', '\\u001B[39m');\nexport const white = /* #__PURE__ */ formatter('\\u001B[37m', '\\u001B[39m');\nexport const gray = /* #__PURE__ */ formatter('\\u001B[90m', '\\u001B[39m');\nexport const bgBlack = /* #__PURE__ */ formatter('\\u001B[40m', '\\u001B[49m');\nexport const bgRed = /* #__PURE__ */ formatter('\\u001B[41m', '\\u001B[49m');\nexport const bgGreen = /* #__PURE__ */ formatter('\\u001B[42m', '\\u001B[49m');\nexport const bgYellow = /* #__PURE__ */ formatter('\\u001B[43m', '\\u001B[49m');\nexport const bgBlue = /* #__PURE__ */ formatter('\\u001B[44m', '\\u001B[49m');\nexport const bgMagenta = /* #__PURE__ */ formatter('\\u001B[45m', '\\u001B[49m');\nexport const bgCyan = /* #__PURE__ */ formatter('\\u001B[46m', '\\u001B[49m');\nexport const bgWhite = /* #__PURE__ */ formatter('\\u001B[47m', '\\u001B[49m');\n",
13
- "#!/usr/bin/env bun\nimport {spawnSync} from 'node:child_process';\nimport debug from 'debug';\nimport run from '.';\nimport * as pc from '~colors';\n\nfunction hl(...args: string[]) {\n\treturn pc.bgBlack(` ${pc.dim(pc.magenta('$'))} ${(\n\t\t[...(function* () {\n\t\t\tfor (let i = 0; i < args.length; i++) {\n\t\t\t\tconst arg = args[i];\n\t\t\t\tif (i === 0) {\n\t\t\t\t\tyield pc.yellow(arg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (arg === '|') {\n\t\t\t\t\tyield pc.green('|');\n\t\t\t\t\tyield pc.yellow(args[++i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (arg.startsWith('-')) {\n\t\t\t\t\tyield pc.cyan(arg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (arg.startsWith('#')) {\n\t\t\t\t\tyield pc.dim(args.slice(i).join(' '));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Not used yet, discard at tree shaking stage\n\t\t\t\tif (process.env.NODE_ENV === 'development') {\n\t\t\t\t\t// eslint-disable-next-line unicorn/no-lonely-if\n\t\t\t\t\tif (\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\targ.startsWith('\"')\n\t\t\t\t\t\t\t&& arg.endsWith('\"')\n\t\t\t\t\t\t) || (\n\t\t\t\t\t\t\targ.startsWith('\\'')\n\t\t\t\t\t\t\t&& arg.endsWith('\\'')\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tyield arg[0] + pc.magenta(arg.slice(1, -1)) + arg[0];\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tyield arg;\n\t\t\t}\n\t\t})()]\n\t).join(' ')} `);\n}\n\nconst errorMessage\n\t= `\n ${pc.red('Uh-oh')}. ${pc.bold(pc.yellow('@delance/builder'))} CLI requires Bun to run.\n If you were trying to run the language server, use ${pc.bold(pc.magenta('npm i @delance/runtime'))}.\n\n • To install Bun:\n ${hl('npm', 'i', '-d', 'bun', '#', 'locally')}\n ${hl('curl', '-fsSL', 'https://bun.sh/install', '|', 'bash', '#', 'globally')}\n • More info: ${pc.underline(pc.cyan('https://bun.sh/docs/installation'))}\n\n${'─'.repeat(80)}\n`;\n\nif (!process.isBun) {\n\tconst {status, error} = spawnSync(\n\t\t'bun',\n\t\t['run', ...process.argv.slice(1)],\n\t\t{stdio: 'inherit'},\n\t);\n\tif (status) {\n\t\tprocess.exit(status);\n\t} else {\n\t\t// @ts-expect-error Node.js errors has `.code`\n\t\tif (error && error.code === 'ENOENT') {\n\t\t\tconsole.error(errorMessage);\n\t\t}\n\n\t\tthrow error!;\n\t}\n}\n\nexport async function main(argv: string[]) {\n\tdebug.enable('*,-babel');\n\tconst cwd = argv.pop()!;\n\n\tfor await (\n\t\tconst x of new Bun.Glob('{!browser,*}.bundle.js')\n\t\t\t.scan({absolute: true, cwd})\n\t) {\n\t\tconsole.group(`${pc.magenta('> build')} ${pc.dim(x)}`);\n\t\tconst label = `${pc.bgBlue(pc.white(' Processed '))} ${pc.dim(x)}`;\n\t\tconsole.time(label);\n\n\t\ttry {\n\t\t\tconst file = Bun.file(x);\n\t\t\tawait Bun.write(file, (\n\t\t\t\tawait run(await file.text())),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error while processing file ${x} `);\n\t\t\tthrow error;\n\t\t}\n\n\t\tconsole.timeEnd(label);\n\t\tconsole.groupEnd();\n\t}\n}\n\nif (import.meta.main) {\n\tawait main(process.argv);\n}\n"
14
- ],
15
- "mappings": ";;;;;;;AA/////fACA;AACA;;;ACjgggggBAiBA;AAAA;AAEA,IAAM,OAAO,QAAQ,QAAQ,CAAC;AAC9B,MAAO,QAAO;AACd,IAAM,aACD,cAAc,QAAO,KAAK,SAAS,YAAY,QAC/C,iBAAiB,QACjB,KAAK,SAAS,SAAS,KACvB,QAAQ,aAAa,WACpB,OAAO,CAAC,KAAK,IAAI,SAAS,WAC3B,QAAQ;AAEb,IAAM,YAAY,CAAC,MAAc,OAAe,UAAU,SACzD,UAAU,CAAC,UAAkB;AAC5B,QAAM,SAAS,OAAO,KAAK;AAC3B,QAAM,QAAQ,OAAO,QAAQ,OAAO,KAAK,MAAM;AAC/C,UAAQ,QACL,OAAO,aAAa,QAAQ,OAAO,SAAS,KAAK,IAAI,QACrD,OAAO,SAAS;AAAA,IAChB;AAEL,IAAM,eAAe,CAAC,QAAgB,OAAe,SAAiB,UAA0B;AAC/F,QAAM,QAAQ,OAAO,MAAM,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC,IAAI;AACpD,QAAM,MAAM,OAAO,MAAM,KAAK,IAAI,GAAG,QAAQ,MAAM,MAAM,CAAC;AAC1D,QAAM,YAAY,IAAI,QAAQ,KAAK;AACnC,UAAQ,YAAY,QAAQ,aAAa,KAAK,OAAO,SAAS,SAAS,IAAI,QAAQ;AAAA;",
16
- "debugId": "0E11DD9D5AAF722A64756e2164756e21",
17
- "names": []
18
- }