@eggjs/mock 6.0.6 → 6.1.0-beta.10
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/README.md +35 -56
- package/README.zh_CN.md +30 -50
- package/dist/_virtual/rolldown_runtime.js +30 -0
- package/dist/app/extend/agent.d.ts +39 -0
- package/dist/app/extend/agent.js +48 -0
- package/dist/app/extend/application.d.ts +175 -0
- package/dist/app/extend/application.js +385 -0
- package/dist/app/middleware/cluster_app_mock.d.ts +6 -0
- package/dist/app/middleware/cluster_app_mock.js +97 -0
- package/dist/app.d.ts +10 -0
- package/dist/app.js +17 -0
- package/dist/bootstrap.d.ts +9 -0
- package/dist/bootstrap.js +14 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +47 -0
- package/dist/inject_mocha.d.ts +1 -0
- package/dist/inject_mocha.js +35 -0
- package/dist/lib/agent_handler.d.ts +7 -0
- package/dist/lib/agent_handler.js +26 -0
- package/dist/lib/app.d.ts +7 -0
- package/dist/lib/app.js +251 -0
- package/dist/lib/app_handler.d.ts +9 -0
- package/dist/lib/app_handler.js +56 -0
- package/dist/lib/cluster.d.ts +126 -0
- package/dist/lib/cluster.js +283 -0
- package/dist/lib/context.d.ts +4 -0
- package/dist/lib/context.js +12 -0
- package/dist/lib/format_options.d.ts +10 -0
- package/dist/lib/format_options.js +65 -0
- package/dist/lib/inject_context.d.ts +9 -0
- package/dist/lib/inject_context.js +106 -0
- package/dist/lib/mock_agent.d.ts +9 -0
- package/dist/lib/mock_agent.js +45 -0
- package/dist/lib/mock_custom_loader.d.ts +4 -0
- package/dist/lib/mock_custom_loader.js +35 -0
- package/dist/lib/mock_http_server.d.ts +6 -0
- package/dist/lib/mock_http_server.js +17 -0
- package/dist/lib/mock_httpclient.d.ts +40 -0
- package/dist/lib/mock_httpclient.js +110 -0
- package/dist/lib/parallel/agent.d.ts +24 -0
- package/dist/lib/parallel/agent.js +111 -0
- package/dist/lib/parallel/app.d.ts +24 -0
- package/dist/lib/parallel/app.js +99 -0
- package/dist/lib/parallel/util.d.ts +6 -0
- package/dist/lib/parallel/util.js +59 -0
- package/dist/lib/prerequire.d.ts +1 -0
- package/dist/lib/prerequire.js +1 -0
- package/dist/lib/request_call_function.d.ts +1 -0
- package/dist/lib/request_call_function.js +37 -0
- package/dist/lib/restore.d.ts +4 -0
- package/dist/lib/restore.js +16 -0
- package/dist/lib/start-cluster.d.ts +1 -0
- package/dist/lib/start-cluster.js +19 -0
- package/dist/lib/supertest.d.ts +16 -0
- package/dist/lib/supertest.js +39 -0
- package/dist/lib/tmp/empty.d.ts +1 -0
- package/dist/lib/tmp/empty.js +1 -0
- package/{src/lib/types.ts → dist/lib/types.d.ts} +12 -29
- package/dist/lib/types.js +1 -0
- package/dist/lib/utils.d.ts +12 -0
- package/dist/lib/utils.js +40 -0
- package/dist/node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +142 -0
- package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js +157 -0
- package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js +97 -0
- package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js +40 -0
- package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js +814 -0
- package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js +50 -0
- package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js +68 -0
- package/dist/node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +752 -0
- package/dist/node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js +203 -0
- package/dist/node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js +209 -0
- package/dist/node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js +18 -0
- package/dist/node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js +215 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/convert/dmp.js +24 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/convert/xml.js +33 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/array.js +29 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/base.js +185 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/character.js +23 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/css.js +26 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/json.js +83 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/line.js +51 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/sentence.js +26 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/word.js +151 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/index.js +178 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/apply.js +168 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/create.js +301 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/line-endings.js +137 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/merge.js +367 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/parse.js +91 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/reverse.js +99 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/array.js +23 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/distance-iterator.js +30 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/params.js +22 -0
- package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/string.js +97 -0
- package/dist/node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js +14 -0
- package/dist/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js +16 -0
- package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.js +4093 -0
- package/dist/node_modules/.pnpm/is-unicode-supported@0.1.0/node_modules/is-unicode-supported/index.js +14 -0
- package/dist/node_modules/.pnpm/log-symbols@4.1.0/node_modules/log-symbols/index.js +27 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/index.js +12 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/context.js +83 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/error-constants.js +35 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/errors.js +392 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/hook.js +86 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/bdd.js +104 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/common.js +99 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/exports.js +65 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/index.js +18 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/qunit.js +95 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/tdd.js +105 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/mocha.js +1037 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/mocharc.js +24 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/buffered-worker-pool.js +152 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/esm-utils.js +74 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/file-unloader.js +22 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/parallel-buffered-runner.js +329 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/serializer.js +314 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/pending.js +22 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/base.js +417 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/doc.js +79 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/dot.js +75 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/html.js +283 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/index.js +40 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/json-stream.js +90 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/json.js +145 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/landing.js +107 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/list.js +77 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/markdown.js +106 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/min.js +57 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/nyan.js +233 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/progress.js +92 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/spec.js +91 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/tap.js +261 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/xunit.js +166 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/runnable.js +346 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/runner.js +922 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/stats-collector.js +72 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/suite.js +517 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/test.js +105 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/utils.js +505 -0
- package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/package.js +225 -0
- package/dist/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +124 -0
- package/dist/node_modules/.pnpm/randombytes@2.1.0/node_modules/randombytes/index.js +11 -0
- package/dist/node_modules/.pnpm/serialize-javascript@6.0.2/node_modules/serialize-javascript/index.js +114 -0
- package/dist/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +76 -0
- package/dist/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js +89 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/Pool.js +366 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/Promise.js +248 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/WorkerHandler.js +419 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/debug-port-allocator.js +27 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/environment.js +18 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/generated/embeddedWorker.js +16 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/index.js +63 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/transfer.js +21 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/validateOptions.js +9 -0
- package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/worker.js +277 -0
- package/dist/register.d.ts +10 -0
- package/dist/register.js +40 -0
- package/dist/typings/index.d.ts +1 -0
- package/package.json +71 -98
- package/dist/commonjs/app/extend/agent.d.ts +0 -34
- package/dist/commonjs/app/extend/agent.js +0 -49
- package/dist/commonjs/app/extend/application.d.ts +0 -171
- package/dist/commonjs/app/extend/application.js +0 -450
- package/dist/commonjs/app/middleware/cluster_app_mock.d.ts +0 -3
- package/dist/commonjs/app/middleware/cluster_app_mock.js +0 -101
- package/dist/commonjs/app.d.ts +0 -6
- package/dist/commonjs/app.js +0 -20
- package/dist/commonjs/bootstrap.d.ts +0 -5
- package/dist/commonjs/bootstrap.js +0 -59
- package/dist/commonjs/index.d.ts +0 -77
- package/dist/commonjs/index.js +0 -114
- package/dist/commonjs/lib/agent_handler.d.ts +0 -3
- package/dist/commonjs/lib/agent_handler.js +0 -28
- package/dist/commonjs/lib/app.d.ts +0 -3
- package/dist/commonjs/lib/app.js +0 -301
- package/dist/commonjs/lib/app_handler.d.ts +0 -5
- package/dist/commonjs/lib/app_handler.js +0 -71
- package/dist/commonjs/lib/cluster.d.ts +0 -114
- package/dist/commonjs/lib/cluster.js +0 -337
- package/dist/commonjs/lib/context.d.ts +0 -1
- package/dist/commonjs/lib/context.js +0 -16
- package/dist/commonjs/lib/format_options.d.ts +0 -5
- package/dist/commonjs/lib/format_options.js +0 -100
- package/dist/commonjs/lib/inject_context.d.ts +0 -6
- package/dist/commonjs/lib/inject_context.js +0 -132
- package/dist/commonjs/lib/mock_agent.d.ts +0 -5
- package/dist/commonjs/lib/mock_agent.js +0 -49
- package/dist/commonjs/lib/mock_custom_loader.d.ts +0 -1
- package/dist/commonjs/lib/mock_custom_loader.js +0 -37
- package/dist/commonjs/lib/mock_http_server.d.ts +0 -2
- package/dist/commonjs/lib/mock_http_server.js +0 -24
- package/dist/commonjs/lib/mock_httpclient.d.ts +0 -36
- package/dist/commonjs/lib/mock_httpclient.js +0 -147
- package/dist/commonjs/lib/parallel/agent.d.ts +0 -20
- package/dist/commonjs/lib/parallel/agent.js +0 -125
- package/dist/commonjs/lib/parallel/app.d.ts +0 -20
- package/dist/commonjs/lib/parallel/app.js +0 -115
- package/dist/commonjs/lib/parallel/util.d.ts +0 -3
- package/dist/commonjs/lib/parallel/util.js +0 -77
- package/dist/commonjs/lib/prerequire.d.ts +0 -1
- package/dist/commonjs/lib/prerequire.js +0 -26
- package/dist/commonjs/lib/request_call_function.d.ts +0 -1
- package/dist/commonjs/lib/request_call_function.js +0 -52
- package/dist/commonjs/lib/restore.d.ts +0 -1
- package/dist/commonjs/lib/restore.js +0 -16
- package/dist/commonjs/lib/start-cluster.d.ts +0 -2
- package/dist/commonjs/lib/start-cluster.js +0 -23
- package/dist/commonjs/lib/supertest.d.ts +0 -11
- package/dist/commonjs/lib/supertest.js +0 -48
- package/dist/commonjs/lib/tmp/empty.d.ts +0 -1
- package/dist/commonjs/lib/tmp/empty.js +0 -3
- package/dist/commonjs/lib/types.d.ts +0 -68
- package/dist/commonjs/lib/types.js +0 -3
- package/dist/commonjs/lib/utils.d.ts +0 -9
- package/dist/commonjs/lib/utils.js +0 -80
- package/dist/commonjs/package.json +0 -3
- package/dist/commonjs/register.d.ts +0 -8
- package/dist/commonjs/register.js +0 -80
- package/dist/esm/app/extend/agent.d.ts +0 -34
- package/dist/esm/app/extend/agent.js +0 -46
- package/dist/esm/app/extend/application.d.ts +0 -171
- package/dist/esm/app/extend/application.js +0 -444
- package/dist/esm/app/middleware/cluster_app_mock.d.ts +0 -3
- package/dist/esm/app/middleware/cluster_app_mock.js +0 -99
- package/dist/esm/app.d.ts +0 -6
- package/dist/esm/app.js +0 -17
- package/dist/esm/bootstrap.d.ts +0 -5
- package/dist/esm/bootstrap.js +0 -15
- package/dist/esm/index.d.ts +0 -77
- package/dist/esm/index.js +0 -91
- package/dist/esm/lib/agent_handler.d.ts +0 -3
- package/dist/esm/lib/agent_handler.js +0 -24
- package/dist/esm/lib/app.d.ts +0 -3
- package/dist/esm/lib/app.js +0 -295
- package/dist/esm/lib/app_handler.d.ts +0 -5
- package/dist/esm/lib/app_handler.js +0 -65
- package/dist/esm/lib/cluster.d.ts +0 -114
- package/dist/esm/lib/cluster.js +0 -328
- package/dist/esm/lib/context.d.ts +0 -1
- package/dist/esm/lib/context.js +0 -13
- package/dist/esm/lib/format_options.d.ts +0 -5
- package/dist/esm/lib/format_options.js +0 -94
- package/dist/esm/lib/inject_context.d.ts +0 -6
- package/dist/esm/lib/inject_context.js +0 -126
- package/dist/esm/lib/mock_agent.d.ts +0 -5
- package/dist/esm/lib/mock_agent.js +0 -45
- package/dist/esm/lib/mock_custom_loader.d.ts +0 -1
- package/dist/esm/lib/mock_custom_loader.js +0 -34
- package/dist/esm/lib/mock_http_server.d.ts +0 -2
- package/dist/esm/lib/mock_http_server.js +0 -18
- package/dist/esm/lib/mock_httpclient.d.ts +0 -36
- package/dist/esm/lib/mock_httpclient.js +0 -144
- package/dist/esm/lib/parallel/agent.d.ts +0 -20
- package/dist/esm/lib/parallel/agent.js +0 -117
- package/dist/esm/lib/parallel/app.d.ts +0 -20
- package/dist/esm/lib/parallel/app.js +0 -110
- package/dist/esm/lib/parallel/util.d.ts +0 -3
- package/dist/esm/lib/parallel/util.js +0 -73
- package/dist/esm/lib/prerequire.d.ts +0 -1
- package/dist/esm/lib/prerequire.js +0 -25
- package/dist/esm/lib/request_call_function.d.ts +0 -1
- package/dist/esm/lib/request_call_function.js +0 -47
- package/dist/esm/lib/restore.d.ts +0 -1
- package/dist/esm/lib/restore.js +0 -13
- package/dist/esm/lib/start-cluster.d.ts +0 -2
- package/dist/esm/lib/start-cluster.js +0 -18
- package/dist/esm/lib/supertest.d.ts +0 -11
- package/dist/esm/lib/supertest.js +0 -40
- package/dist/esm/lib/tmp/empty.d.ts +0 -1
- package/dist/esm/lib/tmp/empty.js +0 -2
- package/dist/esm/lib/types.d.ts +0 -68
- package/dist/esm/lib/types.js +0 -2
- package/dist/esm/lib/utils.d.ts +0 -9
- package/dist/esm/lib/utils.js +0 -69
- package/dist/esm/package.json +0 -3
- package/dist/esm/register.d.ts +0 -8
- package/dist/esm/register.js +0 -75
- package/dist/package.json +0 -4
- package/src/app/extend/agent.ts +0 -57
- package/src/app/extend/application.ts +0 -510
- package/src/app/middleware/cluster_app_mock.ts +0 -102
- package/src/app.ts +0 -18
- package/src/bootstrap.ts +0 -25
- package/src/index.ts +0 -112
- package/src/lib/agent_handler.ts +0 -28
- package/src/lib/app.ts +0 -314
- package/src/lib/app_handler.ts +0 -77
- package/src/lib/cluster.ts +0 -363
- package/src/lib/context.ts +0 -14
- package/src/lib/format_options.ts +0 -103
- package/src/lib/inject_context.ts +0 -134
- package/src/lib/mock_agent.ts +0 -57
- package/src/lib/mock_custom_loader.ts +0 -36
- package/src/lib/mock_http_server.ts +0 -19
- package/src/lib/mock_httpclient.ts +0 -183
- package/src/lib/parallel/agent.ts +0 -128
- package/src/lib/parallel/app.ts +0 -123
- package/src/lib/parallel/util.ts +0 -66
- package/src/lib/prerequire.ts +0 -25
- package/src/lib/request_call_function.ts +0 -49
- package/src/lib/restore.ts +0 -14
- package/src/lib/start-cluster.ts +0 -23
- package/src/lib/supertest.ts +0 -45
- package/src/lib/tmp/.gitkeep +0 -0
- package/src/lib/tmp/empty.ts +0 -0
- package/src/lib/utils.ts +0 -82
- package/src/register.ts +0 -80
- package/src/typings/index.d.ts +0 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __commonJS } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/array.js
|
|
4
|
+
var require_array = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/array.js": ((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.arrayEqual = arrayEqual;
|
|
7
|
+
exports.arrayStartsWith = arrayStartsWith;
|
|
8
|
+
/*istanbul ignore end*/
|
|
9
|
+
function arrayEqual(a, b) {
|
|
10
|
+
if (a.length !== b.length) return false;
|
|
11
|
+
return arrayStartsWith(a, b);
|
|
12
|
+
}
|
|
13
|
+
function arrayStartsWith(array, start) {
|
|
14
|
+
if (start.length > array.length) return false;
|
|
15
|
+
for (var i = 0; i < start.length; i++) if (start[i] !== array[i]) return false;
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
}) });
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export default require_array();
|
|
22
|
+
|
|
23
|
+
export { require_array };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __commonJS } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/distance-iterator.js
|
|
4
|
+
var require_distance_iterator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/distance-iterator.js": ((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports["default"] = _default;
|
|
7
|
+
/*istanbul ignore end*/
|
|
8
|
+
function _default(start, minLine, maxLine) {
|
|
9
|
+
var wantForward = true, backwardExhausted = false, forwardExhausted = false, localOffset = 1;
|
|
10
|
+
return function iterator() {
|
|
11
|
+
if (wantForward && !forwardExhausted) {
|
|
12
|
+
if (backwardExhausted) localOffset++;
|
|
13
|
+
else wantForward = false;
|
|
14
|
+
if (start + localOffset <= maxLine) return start + localOffset;
|
|
15
|
+
forwardExhausted = true;
|
|
16
|
+
}
|
|
17
|
+
if (!backwardExhausted) {
|
|
18
|
+
if (!forwardExhausted) wantForward = true;
|
|
19
|
+
if (minLine <= start - localOffset) return start - localOffset++;
|
|
20
|
+
backwardExhausted = true;
|
|
21
|
+
return iterator();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}) });
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export default require_distance_iterator();
|
|
29
|
+
|
|
30
|
+
export { require_distance_iterator };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __commonJS } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/params.js
|
|
4
|
+
var require_params = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/params.js": ((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.generateOptions = generateOptions;
|
|
7
|
+
/*istanbul ignore end*/
|
|
8
|
+
function generateOptions(options, defaults) {
|
|
9
|
+
if (typeof options === "function") defaults.callback = options;
|
|
10
|
+
else if (options) {
|
|
11
|
+
for (var name in options)
|
|
12
|
+
/* istanbul ignore else */
|
|
13
|
+
if (options.hasOwnProperty(name)) defaults[name] = options[name];
|
|
14
|
+
}
|
|
15
|
+
return defaults;
|
|
16
|
+
}
|
|
17
|
+
}) });
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export default require_params();
|
|
21
|
+
|
|
22
|
+
export { require_params };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { __commonJS } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/string.js
|
|
4
|
+
var require_string = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/string.js": ((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.hasOnlyUnixLineEndings = hasOnlyUnixLineEndings;
|
|
7
|
+
exports.hasOnlyWinLineEndings = hasOnlyWinLineEndings;
|
|
8
|
+
exports.longestCommonPrefix = longestCommonPrefix;
|
|
9
|
+
exports.longestCommonSuffix = longestCommonSuffix;
|
|
10
|
+
exports.maximumOverlap = maximumOverlap;
|
|
11
|
+
exports.removePrefix = removePrefix;
|
|
12
|
+
exports.removeSuffix = removeSuffix;
|
|
13
|
+
exports.replacePrefix = replacePrefix;
|
|
14
|
+
exports.replaceSuffix = replaceSuffix;
|
|
15
|
+
/*istanbul ignore end*/
|
|
16
|
+
function longestCommonPrefix(str1, str2) {
|
|
17
|
+
var i;
|
|
18
|
+
for (i = 0; i < str1.length && i < str2.length; i++) if (str1[i] != str2[i]) return str1.slice(0, i);
|
|
19
|
+
return str1.slice(0, i);
|
|
20
|
+
}
|
|
21
|
+
function longestCommonSuffix(str1, str2) {
|
|
22
|
+
var i;
|
|
23
|
+
if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) return "";
|
|
24
|
+
for (i = 0; i < str1.length && i < str2.length; i++) if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) return str1.slice(-i);
|
|
25
|
+
return str1.slice(-i);
|
|
26
|
+
}
|
|
27
|
+
function replacePrefix(string, oldPrefix, newPrefix) {
|
|
28
|
+
if (string.slice(0, oldPrefix.length) != oldPrefix) throw Error(
|
|
29
|
+
/*istanbul ignore start*/
|
|
30
|
+
"string ".concat(
|
|
31
|
+
/*istanbul ignore end*/
|
|
32
|
+
JSON.stringify(string),
|
|
33
|
+
" doesn't start with prefix "
|
|
34
|
+
).concat(JSON.stringify(oldPrefix), "; this is a bug")
|
|
35
|
+
);
|
|
36
|
+
return newPrefix + string.slice(oldPrefix.length);
|
|
37
|
+
}
|
|
38
|
+
function replaceSuffix(string, oldSuffix, newSuffix) {
|
|
39
|
+
if (!oldSuffix) return string + newSuffix;
|
|
40
|
+
if (string.slice(-oldSuffix.length) != oldSuffix) throw Error(
|
|
41
|
+
/*istanbul ignore start*/
|
|
42
|
+
"string ".concat(
|
|
43
|
+
/*istanbul ignore end*/
|
|
44
|
+
JSON.stringify(string),
|
|
45
|
+
" doesn't end with suffix "
|
|
46
|
+
).concat(JSON.stringify(oldSuffix), "; this is a bug")
|
|
47
|
+
);
|
|
48
|
+
return string.slice(0, -oldSuffix.length) + newSuffix;
|
|
49
|
+
}
|
|
50
|
+
function removePrefix(string, oldPrefix) {
|
|
51
|
+
return replacePrefix(string, oldPrefix, "");
|
|
52
|
+
}
|
|
53
|
+
function removeSuffix(string, oldSuffix) {
|
|
54
|
+
return replaceSuffix(string, oldSuffix, "");
|
|
55
|
+
}
|
|
56
|
+
function maximumOverlap(string1, string2) {
|
|
57
|
+
return string2.slice(0, overlapCount(string1, string2));
|
|
58
|
+
}
|
|
59
|
+
function overlapCount(a, b) {
|
|
60
|
+
var startA = 0;
|
|
61
|
+
if (a.length > b.length) startA = a.length - b.length;
|
|
62
|
+
var endB = b.length;
|
|
63
|
+
if (a.length < b.length) endB = a.length;
|
|
64
|
+
var map = Array(endB);
|
|
65
|
+
var k = 0;
|
|
66
|
+
map[0] = 0;
|
|
67
|
+
for (var j = 1; j < endB; j++) {
|
|
68
|
+
if (b[j] == b[k]) map[j] = map[k];
|
|
69
|
+
else map[j] = k;
|
|
70
|
+
while (k > 0 && b[j] != b[k]) k = map[k];
|
|
71
|
+
if (b[j] == b[k]) k++;
|
|
72
|
+
}
|
|
73
|
+
k = 0;
|
|
74
|
+
for (var i = startA; i < a.length; i++) {
|
|
75
|
+
while (k > 0 && a[i] != b[k]) k = map[k];
|
|
76
|
+
if (a[i] == b[k]) k++;
|
|
77
|
+
}
|
|
78
|
+
return k;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Returns true if the string consistently uses Windows line endings.
|
|
82
|
+
*/
|
|
83
|
+
function hasOnlyWinLineEndings(string) {
|
|
84
|
+
return string.includes("\r\n") && !string.startsWith("\n") && !string.match(/[^\r]\n/);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Returns true if the string consistently uses Unix line endings.
|
|
88
|
+
*/
|
|
89
|
+
function hasOnlyUnixLineEndings(string) {
|
|
90
|
+
return !string.includes("\r\n") && string.includes("\n");
|
|
91
|
+
}
|
|
92
|
+
}) });
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
export default require_string();
|
|
96
|
+
|
|
97
|
+
export { require_string };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __commonJS } from "../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js
|
|
4
|
+
var require_escape_string_regexp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js": ((exports, module) => {
|
|
5
|
+
module.exports = (string) => {
|
|
6
|
+
if (typeof string !== "string") throw new TypeError("Expected a string");
|
|
7
|
+
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
8
|
+
};
|
|
9
|
+
}) });
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export default require_escape_string_regexp();
|
|
13
|
+
|
|
14
|
+
export { require_escape_string_regexp };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __commonJS } from "../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
4
|
+
var require_has_flag = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js": ((exports, module) => {
|
|
5
|
+
module.exports = (flag, argv = process.argv) => {
|
|
6
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
7
|
+
const position = argv.indexOf(prefix + flag);
|
|
8
|
+
const terminatorPosition = argv.indexOf("--");
|
|
9
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
10
|
+
};
|
|
11
|
+
}) });
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export default require_has_flag();
|
|
15
|
+
|
|
16
|
+
export { require_has_flag };
|