anl 1.3.19 → 1.3.20
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/lib/_virtual/argument.js +1 -0
- package/lib/_virtual/command.js +1 -0
- package/lib/_virtual/error.js +1 -0
- package/lib/_virtual/help.js +1 -0
- package/lib/_virtual/index.js +1 -0
- package/lib/_virtual/index2.js +1 -0
- package/lib/_virtual/option.js +1 -0
- package/lib/_virtual/suggestSimilar.js +1 -0
- package/lib/data/umf.json.js +1 -0
- package/lib/node_modules/@inquirer/checkbox/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/confirm/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/Separator.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/create-prompt.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/errors.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/hook-engine.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/key.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/make-theme.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/pagination/position.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/screen-manager.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/theme.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/use-effect.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/use-keypress.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/use-memo.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/use-prefix.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/use-ref.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/use-state.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/dist/esm/lib/utils.mjs.js +1 -0
- package/lib/node_modules/@inquirer/core/node_modules/signal-exit/dist/mjs/index.js +1 -0
- package/lib/node_modules/@inquirer/core/node_modules/signal-exit/dist/mjs/signals.js +1 -0
- package/lib/node_modules/@inquirer/editor/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/expand/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/figures/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/input/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/number/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/password/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/rawlist/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/search/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/select/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/@inquirer/type/dist/esm/inquirer.mjs.js +1 -0
- package/lib/node_modules/commander/esm.mjs.js +1 -0
- package/lib/node_modules/commander/index.js +1 -0
- package/lib/node_modules/commander/lib/argument.js +1 -0
- package/lib/node_modules/commander/lib/command.js +1 -0
- package/lib/node_modules/commander/lib/error.js +1 -0
- package/lib/node_modules/commander/lib/help.js +1 -0
- package/lib/node_modules/commander/lib/option.js +1 -0
- package/lib/node_modules/commander/lib/suggestSimilar.js +1 -0
- package/lib/node_modules/inquirer/dist/esm/index.mjs.js +1 -0
- package/lib/node_modules/inquirer/dist/esm/ui/prompt.mjs.js +1 -0
- package/lib/node_modules/run-async/index.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/Observable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/Subscriber.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/Subscription.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/config.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/defer.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/from.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/of.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/filter.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/map.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/reduce.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/args.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isIterable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isObservable.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isPromise.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/lift.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js +1 -0
- package/lib/node_modules/tslib/tslib.es6.js +1 -0
- package/lib/package.json.js +1 -0
- package/lib/src/build-type/core/components.js +1 -0
- package/lib/src/build-type/core/get-data.js +1 -0
- package/lib/src/build-type/core/path.js +1 -0
- package/lib/src/build-type/index.js +1 -0
- package/lib/src/build-type/tools/index.js +1 -0
- package/lib/src/index.js +1 -0
- package/lib/src/standard/const.js +1 -0
- package/lib/src/standard/install-commitlint.js +1 -0
- package/lib/src/standard/install-eslint.js +1 -0
- package/lib/src/standard/lint-init.js +1 -0
- package/lib/src/standard/prettier.js +1 -0
- package/lib/src/standard/vscode.js +1 -0
- package/lib/src/utils/index.js +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.__exports={};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.__exports={};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.__exports={};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.__exports={};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.commander={exports:{}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.runAsync={exports:{}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.__exports={};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.__exports={};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.0",t={"/api/test":{get:{operationId:"AppController_apiTest",parameters:[],responses:{200:{description:""}},tags:["Test Server"]}},"/api/lsp/compile":{post:{operationId:"LspController_compile",summary:"Get code completions based on given input",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CompletionDto"}}}},responses:{200:{description:"Successfully fetched the completion list."},400:{description:"Failed to fetch the completion list."}},tags:["LSP"]}},"/api/manageGame/createGame":{post:{operationId:"ManageGameController_createGame",summary:"创建新的游戏",parameters:[],requestBody:{required:!0,description:"创建游戏报文",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameDto"}}}},responses:{200:{description:"游戏创建成功"}},tags:["Manage Game"]}},"/api/manageGame/gameList":{get:{operationId:"ManageGameController_getGameList",summary:"游戏列表",parameters:[],responses:{200:{description:"返回游戏列表"}},tags:["Manage Game"]}},"/api/manageGame/getGameConfig/{gameName}":{get:{operationId:"ManageGameController_getGameConfig",summary:"获取游戏的配置信息",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置"},400:{description:"获取游戏配置失败"}},tags:["Manage Game"]}},"/api/manageGame/rename":{post:{operationId:"ManageGameController_rename",summary:"游戏名称重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/delete":{post:{operationId:"ManageGameController_deleteFileOrDir",summary:"删除游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteGameDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed."}},tags:["Manage Game"]}},"/api/manageGame/readGameAssets/{readDirPath}":{get:{operationId:"ManageGameController_readGameAssets",summary:"Read Game Assets",parameters:[{name:"readDirPath",required:!0,in:"path",description:"Path of the game directory to read assets from, including subdirectories.",schema:{type:"string"}}],responses:{200:{description:"Retrieve the assets of the specified game directory."}},tags:["Manage Game"]}},"/api/manageGame/readUserAssets/{readDirPath}":{get:{operationId:"ManageGameController_readUserAssets",summary:"读取用户资源",parameters:[{name:"readDirPath",required:!0,in:"path",description:"读取资产的用户目录路径,包括子目录.",schema:{type:"string"}}],responses:{200:{description:"检索指定用户目录下的资源."}},tags:["Manage Game"]}},"/api/manageGame/setGameConfig":{post:{operationId:"ManageGameController_setGameConfig",summary:"Set Game Configuration",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/GameConfigDto"}}}},responses:{200:{description:"Game configuration set successfully."},400:{description:"Failed to set the game configuration."}},tags:["Manage Game"]}},"/api/manageGame/resource/uploadFiles":{post:{operationId:"ManageGameController_uploadUserResource",summary:"上传用户资源文件",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UploadResourceDto"}}}},responses:{200:{description:"Files uploaded successfully."},400:{description:"Failed to upload files."}},tags:["Manage Game"]}},"/api/manageGame/resource/rename":{post:{operationId:"ManageGameController_resourceRename",summary:"用户资源文件重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed"}},tags:["Manage Game"]}},"/api/manageGame/resource/delete":{post:{operationId:"ManageGameController_resourceDelete",summary:"删除用户资源文件",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteResourceDto"}}}},responses:{200:{description:"Successfully"},400:{description:"Failed"}},tags:["Manage Game"]}},"/api/manageGame/resource/mkdir":{post:{operationId:"ManageGameController_resourceMkDir",summary:"新建用户资源文件夹",parameters:[{name:"resource",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/MkDirDto"}}}},responses:{200:{description:"Directory created successfully."},400:{description:"Failed to create directory."}},tags:["Manage Game"]}},"/api/manageGame/openGameDict/{gameName}":{get:{operationId:"ManageGameController_openGameDict",summary:"Open Game Dictionary",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game.",schema:{type:"string"}}],responses:{200:{description:"Opens the dictionary for a specified game."}},tags:["Manage Game"]}},"/api/manageGame/openGameAssetsDict/{gameName}":{get:{operationId:"ManageGameController_openGameAssetsDict",summary:"Open Game Assets Dictionary",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game.",schema:{type:"string"}},{name:"subFolder",required:!0,in:"query",schema:{type:"string"}}],responses:{200:{description:"Opens the assets dictionary for a specified game."}},tags:["Manage Game"]}},"/api/manageGame/ejectGameAsWeb/{gameName}":{get:{operationId:"ManageGameController_ejectGameAsWeb",summary:"Eject Game As Web App",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game to be exported as web app.",schema:{type:"string"}}],responses:{200:{description:"Exports the specified game as a web app."}},tags:["Manage Game"]}},"/api/manageGame/ejectGameAsExe/{gameName}":{get:{operationId:"ManageGameController_ejectGameAsExe",summary:"Eject Game As EXE",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game to be exported as EXE.",schema:{type:"string"}}],responses:{200:{description:"Exports the specified game as an EXE (Windows Electron App)."}},tags:["Manage Game"]}},"/api/manageGame/ejectGameAsAndroid/{gameName}":{get:{operationId:"ManageGameController_ejectGameAsAndroid",summary:"Eject Game As Android App",parameters:[{name:"gameName",required:!0,in:"path",description:"Name of the game to be exported as an Android app.",schema:{type:"string"}}],responses:{200:{description:"Exports the specified game as an Android app."}},tags:["Manage Game"]}},"/api/manageGame/deleteFile":{post:{operationId:"ManageGameController_deleteFile",summary:"Delete File",parameters:[],requestBody:{required:!0,description:"File deletion data",content:{"application/json":{schema:{$ref:"#/components/schemas/DeleteFileDto"}}}},responses:{200:{description:"Successfully deleted the file."},400:{description:"Failed to delete the file."}},tags:["Manage Game"]}},"/api/manageGame/createNewScene":{post:{operationId:"ManageGameController_createNewScene",summary:"Create a New Scene",parameters:[],requestBody:{required:!0,description:"Scene creation data",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateNewSceneDto"}}}},responses:{200:{description:"Successfully created the scene."},400:{description:"Failed to create the scene or scene already exists."}},tags:["Manage Game"]}},"/api/manageGame/editScene":{post:{operationId:"ManageGameController_editScene",summary:"Edit Scene",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/EditSceneDto"}}}},responses:{200:{description:"Scene edited successfully."},400:{description:"Failed to edit the scene."}},tags:["Manage Game"]}},"/api/manageGame/editTextFile":{post:{operationId:"ManageGameController_editTextFile",summary:"Edit TextFile",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/EditTextFileDto"}}}},responses:{200:{description:"File edited successfully."},400:{description:"Failed to edit the file."}},tags:["Manage Game"]}},"/api/manageGame/uploadFiles":{post:{operationId:"ManageGameController_uploadFiles",summary:"Upload Files",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UploadFilesDto"}}}},responses:{200:{description:"Files uploaded successfully."},400:{description:"Failed to upload files."}},tags:["Manage Game"]}},"/api/manageGame/mkdir":{post:{operationId:"ManageGameController_mkDir",summary:"Create Directory",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/MkDirDto"}}}},responses:{200:{description:"Directory created successfully."},400:{description:"Failed to create directory."}},tags:["Manage Game"]}},"/api/manageGame/{gameName}/scene/{fileName}":{get:{operationId:"ManageGameController_laodSceneFile",summary:"read scene file",parameters:[{name:"gameName",required:!0,in:"path",description:"game name.",schema:{type:"string"}},{name:"fileName",required:!0,in:"path",description:"scene file name.",schema:{type:"string"}}],responses:{200:{description:"return zh and en scene file"}},tags:["Manage Game"]}},"/api/llm/txt/v2/cache":{post:{operationId:"LlmController_mCache",summary:"Kimi模型资源存储",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Llm"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/txt/v2/{tlmId}":{get:{operationId:"LlmController_txtV3",summary:"Maas文生文",parameters:[{name:"tlmId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/recommend/{rid}/features":{get:{operationId:"LlmController_recommendFeatures",summary:"推荐角色人格",parameters:[{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/recommend/{bgid}/category":{get:{operationId:"LlmController_recommendCategory",summary:"推荐背景分类",parameters:[{name:"bgid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/image/upload":{post:{operationId:"LlmController_imageUpload",summary:"大模型图片上传接口",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ImageUploadDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/sseTest":{get:{operationId:"LlmController_sse",parameters:[],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/upload/text":{post:{operationId:"LlmController_uploadText",summary:"上传文本文件返回文本,最大可接收5000字符",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/get/expression/list":{get:{operationId:"LlmController_getExpressionList",summary:"获取表情标签列表",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/draw/{event}/{reqId}":{get:{operationId:"LlmController_draw",summary:"获取绘图结果",parameters:[{name:"event",required:!0,in:"path",schema:{type:"string"}},{name:"reqId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/draw/task":{get:{operationId:"LlmController_drawing",summary:"获取该用户下正在绘图的Reqs",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/role/figure":{post:{operationId:"RoleController_createFigure",summary:"保存角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/AddRoleDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/role/figure/img":{post:{operationId:"RoleController_uploadFigureImg",summary:"保存立绘/表情差分图图片",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/AddFigureDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/role/list":{get:{operationId:"RoleController_listRole",summary:"获取该用户下角色列表",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/role/{rid}":{put:{operationId:"RoleController_updateRole",summary:"更新角色",parameters:[{name:"rid",required:!0,in:"path",description:"角色ID",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]},delete:{operationId:"RoleController_deletedRole",summary:"删除角色",parameters:[{name:"rid",required:!0,in:"path",description:"角色ID",schema:{type:"string"}}],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/role/test1":{get:{operationId:"RoleController_test",parameters:[],responses:{200:{description:""}},tags:["Role"]}},"/api/resource":{post:{operationId:"ResourceController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateResourceDto"}}}},responses:{201:{description:""}},tags:["Resource"]}},"/api/resource/{id}":{get:{operationId:"ResourceController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]},patch:{operationId:"ResourceController_update",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateResourceDto"}}}},responses:{200:{description:""}},tags:["Resource"]},delete:{operationId:"ResourceController_remove",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]}},"/api/bg/add":{post:{operationId:"BgController_createBg",summary:"保存背景信息",parameters:[],requestBody:{required:!0,description:"保存背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateBgDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bg"]}},"/api/bg/list":{get:{operationId:"BgController_list",summary:"获取背景信息列表",parameters:[],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bg"]}},"/api/bg/update/{bid}":{post:{operationId:"BgController_updateBg",summary:"更新背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"更新背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bg"]}},"/api/bg/uploadImage/{bid}":{post:{operationId:"BgController_uploadBgImg",summary:"保存背景图片",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UploadImageDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Bg"]}},"/api/bg/remove/{bid}":{delete:{operationId:"BgController_remove",summary:"删除背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Bg"]}},"/api/user/login":{post:{operationId:"UserController_login",summary:"用户登录",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{200:{description:"Successfully."}},tags:["User"]}},"/api/user":{post:{operationId:"UserController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateUserDto"}}}},responses:{201:{description:""}},tags:["User"]}},"/api/editor/addScenes":{post:{operationId:"EditorController_addScenes",summary:"创建章节/场景",parameters:[],requestBody:{required:!0,description:"请求体",content:{"application/json":{schema:{$ref:"#/components/schemas/AddSceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["Editor"]}},"/api/editor/createNewScene":{post:{operationId:"EditorController_createNewScene",summary:"创建章节/场景",parameters:[],requestBody:{required:!0,description:"创建章节/场景",content:{"application/json":{schema:{$ref:"#/components/schemas/DialogueDto"}}}},responses:{200:{description:"Successfully created the scene."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/deleteScene":{post:{operationId:"EditorController_deleteScene",summary:"删除章节/场景",parameters:[],requestBody:{required:!0,description:"删除章节/场景",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully delete the scene."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/sceneDetail":{post:{operationId:"EditorController_getSceneDetail",summary:"查询场景详情内容",parameters:[],requestBody:{required:!0,description:"查询场景详情内容",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editUiScene/upload":{post:{operationId:"EditorController_uploadUiSceneDialogue",summary:"上传文本更新UI对话资源",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/DialogueDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editUiScene/dialogue":{post:{operationId:"EditorController_editUiSceneDialogue",summary:"更新UI编辑器对话资源",parameters:[],requestBody:{required:!0,description:"更新UI编辑器对话资源",content:{"application/json":{schema:{$ref:"#/components/schemas/DialogueDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/scene/command/{id}":{post:{operationId:"EditorController_commandLine",summary:"根据行ID获取指令行",parameters:[{name:"id",required:!0,in:"path",description:"id",schema:{type:"string"}}],requestBody:{required:!0,description:"场景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/scene/check":{post:{operationId:"EditorController_checkScene",summary:"校验场景信息",parameters:[],requestBody:{required:!0,description:"校验场景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editUiScene/resource":{post:{operationId:"EditorController_editUiSceneResource",summary:"更新UI编辑器场景资源",parameters:[],requestBody:{required:!0,description:"更新UI编辑器场景资源",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateUiResourceDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editTxtScene/upload":{post:{operationId:"EditorController_uploadTxtSceneDialogue",summary:"上传文本更新TXT对话资源",parameters:[],requestBody:{required:!0,description:"更新文本编辑器内容",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateTxtSceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/editTxtScene":{post:{operationId:"EditorController_editTxtScene",summary:"更新文本编辑器内容",parameters:[],requestBody:{required:!0,description:"更新文本编辑器内容",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateTxtSceneDto"}}}},responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/rename":{post:{operationId:"EditorController_sceneFileRename",summary:"场景文件重命名",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SceneReNameDto"}}}},responses:{200:{description:"Rename successfully."},400:{description:"Failed"}},tags:["Editor"]}},"/api/editor/getSectionSceneList/{gameName}":{post:{operationId:"EditorController_getSectionSceneList",summary:"获取章节场景列表数据",parameters:[{name:"gameName",required:!0,in:"path",description:"游戏名称",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/editor/launch/{gameName}":{get:{operationId:"EditorController_launchGame",summary:"发布游戏",parameters:[{name:"gameName",required:!0,in:"path",description:"游戏名称",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["Editor"]}},"/api/variable/global/record":{post:{operationId:"VariableController_recordVariable",summary:"记录变量信息",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateVariableDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ResultData"}}}}},tags:["Variable"]}},"/api/variable/global/{gameName}/list":{get:{operationId:"VariableController_varList",summary:"获取游戏变量信息列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/variable/{id}":{get:{operationId:"VariableController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Variable"]}},"/api/variable/global/{id}/remove":{delete:{operationId:"VariableController_remove",summary:"删除变量信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/canvas/record":{post:{operationId:"CanvasController_record",summary:"记录画布数据",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RecordCanvasDto"}}}},responses:{200:{description:""},500:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ValidateCanvas"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/view":{get:{operationId:"CanvasController_view",summary:"获取最新的画布节点数据",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasBody"}}}}},tags:["Canvas"]}},"/api/canvas/{gameName}/revise/history":{get:{operationId:"CanvasController_history",summary:"获取历史修订列表",parameters:[{name:"gameName",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CanvasHistory"}}}}}},tags:["Canvas"]}},"/api/canvas/{id}/revise/detail":{get:{operationId:"CanvasController_detail",summary:"获取指定修订详情",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasBody"}}}}},tags:["Canvas"]}}},r={title:"UMPAY.NETA Terre API",description:"API Refrence of UMPAY.NETA Terre Editor",version:"1.0",contact:{}},s=[],a=[{url:"http://10.10.77.121/dev-api"}],i={schemas:{CompletionDto:{type:"object",properties:{editorValue:{type:"string",description:"Editor input value for which the completion is required"},sceneType:{type:"string",description:"scene file type en or zh"},params:{type:"object",description:"Parameters required for completion"}},required:["editorValue","sceneType","params"]},CreateGameDto:{type:"object",properties:{gameName:{type:"string",description:"The name of the game to be created"}},required:["gameName"]},RenameDto:{type:"object",properties:{source:{type:"string",description:"The source path of the file or directory to be renamed"},newName:{type:"string",description:"New name for renaming the file or directory"}},required:["source","newName"]},DeleteGameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"}},required:["gameName"]},GameConfigDto:{type:"object",properties:{gameName:{type:"string",description:"The name of the game"},newConfig:{type:"string",description:"New game configuration"}},required:["gameName","newConfig"]},UploadResourceDto:{type:"object",properties:{folder:{type:"string",description:"资源所属文件夹"}},required:["folder"]},DeleteResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"}},required:["name"]},MkDirDto:{type:"object",properties:{source:{type:"string",description:"已有的资源文件夹"},name:{type:"string",description:"Name for the new directory"}},required:["source","name"]},DeleteFileDto:{type:"object",properties:{path:{type:"string",description:"The path to the file to be deleted"}},required:["path"]},CreateNewSceneDto:{type:"object",properties:{gameName:{type:"string",description:"The name of the game"},sceneName:{type:"string",description:"The name of the scene"}},required:["gameName","sceneName"]},EditSceneDto:{type:"object",properties:{gameName:{type:"string",description:"The name of the game"},sceneName:{type:"string",description:"The name of the scene"},type:{type:"string",description:"Scene data type en or zh"},sceneData:{type:"string",description:"Scene data content",format:"{ value: string }"}},required:["gameName","sceneName","type","sceneData"]},EditTextFileDto:{type:"object",properties:{path:{type:"string",description:"The path of textfile"},textFile:{type:"string",description:"Text data content"}},required:["path","textFile"]},UploadFilesDto:{type:"object",properties:{targetDirectory:{type:"string",description:"Target directory for the uploaded files"}},required:["targetDirectory"]},Llm:{type:"object",properties:{}},ImageUploadDto:{type:"object",properties:{category:{type:"string",description:"图片类别"},original:{type:"string",description:"蒙版对应原始图片名称"}},required:["category","original"]},AddRoleDto:{type:"object",properties:{name:{type:"string",description:"角色名字"},gender:{type:"string",description:"性别",enum:["male","female"]},style:{type:"string",description:"立绘风格"},age:{type:"string",description:"年纪",enum:["child","adult","hoariness"]}},required:["name","gender","style","age"]},AddFigureDto:{type:"object",properties:{fileUrl:{type:"string",description:"需要保存的文件地址"},rid:{type:"string",description:"角色ID"},expression:{type:"string",description:"差分名"}},required:["fileUrl","rid","expression"]},UpdateRoleDto:{type:"object",properties:{fileUrl:{type:"string",description:"主立绘的图片地址"},fileLink:{type:"string",description:"主立绘图片链接"},seed:{type:"string",description:"主立绘随机种子"},tlmId:{type:"string",description:"角色对应的大模型信息ID"},feature:{type:"string",description:"人格"},referPic:{type:"string",description:"人格参考图"},expression:{type:"string",description:"差分名"},prompts:{type:"string",description:"提示词"},figures:{description:"表情差分图",type:"array",items:{type:"string"}}},required:["fileUrl","fileLink","seed","tlmId","feature","referPic","expression","prompts","figures"]},CreateResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"},path:{type:"string",description:"资源路径"},type:{type:"string",description:"资源类型"},uid:{type:"string",description:"用户ID"},pid:{type:"string",description:"父级资源ID"},remark:{type:"string",description:"备注"}},required:["name","path","type","uid","pid","remark"]},UpdateResourceDto:{type:"object",properties:{}},CreateBgDto:{type:"object",properties:{name:{type:"string",description:"背景名称"},style:{type:"string",description:"背景风格"}},required:["name","style"]},UpdateBgDto:{type:"object",properties:{prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"背景对应大模型输出ID"},bgPath:{type:"string",description:"背景图片的相对地址"},category:{type:"string",description:"背景分类"},referPic:{type:"string",description:"背景分类参考图"}},required:["prompts","tlmId","bgPath","category","referPic"]},UploadImageDto:{type:"object",properties:{imageName:{type:"string",description:"图片名称"},imageUrl:{type:"string",description:"图片地址"},imageRelevancy:{type:"string",description:"图片所属:用户"},imageCategory:{type:"string",description:"图片类别"}},required:["imageName","imageUrl","imageRelevancy","imageCategory"]},CreateUserDto:{type:"object",properties:{username:{type:"string",description:"用户名"},password:{type:"string",description:"密码"},nickname:{type:"string",description:"昵称(可选填)"}},required:["username","password","nickname"]},ResultData:{type:"object",properties:{code:{type:"number",default:200},msg:{type:"string",default:"ok"},data:{type:"any",default:null,nullable:!0}},required:["code","msg","data"]},AddSceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sceneName:{description:"场景列表",type:"array",items:{type:"string"}}},required:["gameName","sceneName"]},DialogueDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},dialogue:{type:"string",description:"更新对话"}},required:["gameName","sectionName","sceneName","editorType","dialogue"]},SceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"}},required:["gameName","sectionName","sceneName","editorType"]},SceneDetailDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},sceneType:{type:"string",description:"场景类型"}},required:["gameName","sectionName","sceneName","editorType","sceneType"]},UpdateUiResourceDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},bg:{type:"string",description:"更新背景"},bgm:{type:"string",description:"更新音乐"}},required:["gameName","sectionName","sceneName","editorType","bg","bgm"]},UpdateTxtSceneDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},text:{type:"string",description:"编辑文本"}},required:["gameName","sectionName","sceneName","editorType","text"]},SceneReNameDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},sectionName:{type:"string",description:"章节名称(文本编辑器忽略)"},sceneName:{type:"string",description:"场景名称"},editorType:{type:"string",description:"编辑器类型"},newSectionName:{type:"string",description:"新章节名称"},newSceneName:{type:"string",description:"新场景名称"}},required:["gameName","sectionName","sceneName","editorType","newSectionName","newSceneName"]},UpdateVariableDto:{type:"object",properties:{id:{type:"string",description:"变量表ID"}},required:["id"]},Variable:{type:"object",properties:{id:{type:"string"},name:{type:"string"}},required:["id","name"]},ExpValue:{type:"object",properties:{value:{type:"number"},exp:{type:"string"}},required:["value","exp"]},ICondition:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"下限",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"上限",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},IOptions:{type:"object",properties:{name:{type:"string",description:"选项名称"},nodeId:{type:"string",description:"关联的节点"},sound:{type:"string",description:"绑定音频"},varId:{type:"string",description:"选定的变量"},varValue:{type:"number",description:"设定的变量值"},advanced:{description:"高级选项",allOf:[{$ref:"#/components/schemas/ICondition"}]}},required:["name","nodeId","sound","varId","varValue","advanced"]},NodeData:{type:"object",properties:{label:{type:"string",description:"节点名称"},chapterId:{type:"string",description:"章节id"},background:{type:"string",description:"绑定背景"},options:{description:"选项",type:"array",items:{$ref:"#/components/schemas/IOptions"}}},required:["label","chapterId","background","options"]},Node:{type:"object",properties:{id:{type:"string",description:"id"},type:{type:"string",description:"类型"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/NodeData"}]}},required:["id","type","data"]},EdgeData:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"下限",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"上限",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{type:"string",description:"条件"}},required:["isEnabled","variable","lower","upper","condition"]},Edge:{type:"object",properties:{id:{type:"string",description:"id"},source:{type:"string"},target:{type:"string"},data:{$ref:"#/components/schemas/EdgeData"}},required:["id","source","target","data"]},CanvasBody:{type:"object",properties:{nodes:{description:"节点信息",allOf:[{$ref:"#/components/schemas/Node"}]},edges:{description:"边信息",allOf:[{$ref:"#/components/schemas/Edge"}]}},required:["nodes","edges"]},Valid:{type:"object",properties:{id:{type:"string"},msg:{type:"string"}},required:["id","msg"]},ValidateCanvas:{type:"object",properties:{only:{description:"节点重复集",allOf:[{$ref:"#/components/schemas/Valid"}]},scene:{description:"场景报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},branch:{description:"节点报错集",allOf:[{$ref:"#/components/schemas/Valid"}]},edge:{description:"边报错集",allOf:[{$ref:"#/components/schemas/Valid"}]}},required:["only","scene","branch","edge"]},CanvasHistory:{type:"object",properties:{_id:{type:"string",description:"画布ID"},updatedAt:{type:"string",description:"更新时间"},createdAt:{type:"string",description:"创建时间"}},required:["_id","updatedAt","createdAt"]},RecordCanvasDto:{type:"object",properties:{gameName:{type:"string",description:"游戏名称"},nodes:{description:"画布节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"画布边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["gameName","nodes","edges"]}}},o={openapi:e,paths:t,info:r,tags:s,servers:a,components:i};exports.components=i,exports.default=o,exports.info=r,exports.openapi=e,exports.paths=t,exports.servers=a,exports.tags=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("yoctocolors-cjs"),s=require("../../../figures/dist/esm/index.mjs.js"),t=require("ansi-escapes"),r=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),i=require("../../../core/dist/esm/lib/make-theme.mjs.js"),o=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),a=require("../../../core/dist/esm/lib/use-ref.mjs.js"),c=require("../../../core/dist/esm/lib/use-state.mjs.js"),l=require("../../../core/dist/esm/lib/use-memo.mjs.js"),n=require("../../../core/dist/esm/lib/errors.mjs.js"),u=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),d=require("../../../core/dist/esm/lib/key.mjs.js"),m=require("../../../core/dist/esm/lib/pagination/use-pagination.mjs.js"),p=require("../../../core/dist/esm/lib/Separator.mjs.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=f(e),y=f(t);const j={icon:{checked:h.default.green(s.default.circleFilled),unchecked:s.default.circle,cursor:s.default.pointer},style:{disabledChoice:e=>h.default.dim(`- ${e}`),renderSelectedChoices:e=>e.map((e=>e.short??e.name??e.value)).join(", ")},helpMode:"auto"};function b(e){return!p.Separator.isSeparator(e)&&!e.disabled}function $(e){return b(e)&&Boolean(e.checked)}function g(e){return b(e)?{...e,checked:!e.checked}:e}var k=r.createPrompt(((e,s)=>{const{instructions:t,pageSize:r=7,loop:f=!0,choices:h,required:k,validate:S=(()=>!0)}=e,v=i.makeTheme(j,e.theme),q=o.usePrefix({theme:v}),w=a.useRef(!0),[x,K]=c.useState("pending"),[M,P]=c.useState(h.map((e=>({...e})))),C=l.useMemo((()=>{const e=M.findIndex(b),s=M.findLastIndex(b);if(e<0)throw new n.ValidationError("[checkbox prompt] No selectable choices. All choices are disabled.");return{first:e,last:s}}),[M]),[U,A]=c.useState(C.first),[I,N]=c.useState(!0),[z,D]=c.useState();u.useKeypress((async e=>{if(d.isEnterKey(e)){const e=M.filter($),t=await S([...e]);k&&!M.some($)?D("At least one choice must be selected"):!0===t?(K("done"),s(e.map((e=>e.value)))):D(t||"You must select a valid value")}else if(d.isUpKey(e)||d.isDownKey(e)){if(f||d.isUpKey(e)&&U!==C.first||d.isDownKey(e)&&U!==C.last){const s=d.isUpKey(e)?-1:1;let t=U;do{t=(t+s+M.length)%M.length}while(!b(M[t]));A(t)}}else if(d.isSpaceKey(e))D(void 0),N(!1),P(M.map(((e,s)=>s===U?g(e):e)));else if("a"===e.name){const e=M.some((e=>b(e)&&!e.checked));P(M.map((t=e,function(e){return b(e)?{...e,checked:t}:e})))}else if("i"===e.name)P(M.map(g));else if(d.isNumberKey(e)){const s=Number(e.name)-1,t=M[s];null!=t&&b(t)&&(A(s),P(M.map(((e,t)=>t===s?g(e):e))))}var t}));const E=v.style.message(e.message),_=m.usePagination({items:M,active:U,renderItem({item:e,isActive:s}){if(p.Separator.isSeparator(e))return` ${e.separator}`;const t=String(e.name||e.value);if(e.disabled){const s="string"==typeof e.disabled?e.disabled:"(disabled)";return v.style.disabledChoice(`${t} ${s}`)}const r=e.checked?v.icon.checked:v.icon.unchecked;return(s?v.style.highlight:e=>e)(`${s?v.icon.cursor:" "}${r} ${t}`)},pageSize:r,loop:f});if("done"===x){const e=M.filter($);return`${q} ${E} ${v.style.answer(v.style.renderSelectedChoices(e,M))}`}let B="",F="";if("always"===v.helpMode||"auto"===v.helpMode&&I&&(void 0===t||t)){if("string"==typeof t)B=t;else{B=` (Press ${[`${v.style.key("space")} to select`,`${v.style.key("a")} to toggle all`,`${v.style.key("i")} to invert selection`,`and ${v.style.key("enter")} to proceed`].join(", ")})`}M.length>r&&("always"===v.helpMode||"auto"===v.helpMode&&w.current)&&(F=`\n${v.style.help("(Use arrow keys to reveal more choices)")}`,w.current=!1)}let H="";return z&&(H=`\n${v.style.error(z)}`),`${q} ${E}${B}\n${_}${F}${H}${y.default.cursorHide}`}));exports.Separator=p.Separator,exports.default=k;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),s=require("../../../core/dist/esm/lib/use-state.mjs.js"),t=require("../../../core/dist/esm/lib/make-theme.mjs.js"),r=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),i=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),m=require("../../../core/dist/esm/lib/key.mjs.js"),u=e.createPrompt(((e,u)=>{const{transformer:l=(e=>e?"yes":"no")}=e,[o,a]=s.useState("pending"),[n,d]=s.useState(""),j=t.makeTheme(e.theme),y=r.usePrefix({theme:j});i.useKeypress(((s,t)=>{if(m.isEnterKey(s)){let s=!1!==e.default;/^(y|yes)/i.test(n)?s=!0:/^(n|no)/i.test(n)&&(s=!1),d(l(s)),a("done"),u(s)}else d(t.line)}));let c=n,p="";"done"===o?c=j.style.answer(n):p=` ${j.style.defaultAnswer(!1===e.default?"y/N":"Y/n")}`;return`${y} ${j.style.message(e.message)}${p} ${c}`}));exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("yoctocolors-cjs"),r=require("../../../../figures/dist/esm/index.mjs.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e);exports.Separator=class{separator=a.default.dim(Array.from({length:15}).join(r.default.line));type="separator";constructor(e){e&&(this.separator=e)}static isSeparator(e){return Boolean(e&&"separator"===e.type)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node:readline"),r=require("node:async_hooks"),t=require("mute-stream"),n=require("../../../node_modules/signal-exit/dist/mjs/index.js"),o=require("./screen-manager.mjs.js"),s=require("./hook-engine.mjs.js"),c=require("./errors.mjs.js"),u=require("../../../../type/dist/esm/inquirer.mjs.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var l=a(e),d=i(t);exports.createPrompt=function(e){return(t,i)=>{const a=i?.input??process.stdin,f=new d.default;f.pipe(i?.output??process.stdout);const p=l.createInterface({terminal:!0,input:a,output:f}),m=new o.default(p);let j=()=>{};const y=new u.CancelablePromise(((o,u)=>{s.withHooks(p,(a=>{function l(){m.checkCursorPos()}const d=n.onExit(((e,r)=>{h(),u(new c.ExitPromptError(`User force closed the prompt with ${e} ${r}`))})),y=r.AsyncResource.bind((()=>{try{s.effectScheduler.clearAll()}catch(e){u(e)}}));function h(){y(),m.done({clearContent:Boolean(i?.clearPromptOnDone)}),d(),p.input.removeListener("keypress",l),p.removeListener("close",y),f.end()}function b(e){setImmediate((()=>{h(),o(e)}))}j=()=>{h(),u(new c.CancelPromptError)},a((()=>{try{const r=e(t,b),[n,o]="string"==typeof r?[r]:r;m.render(n,o),s.effectScheduler.run()}catch(e){h(),u(e)}})),p.input.on("keypress",l),p.on("close",y)}))}));return y.cancel=j,y}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class r extends Error{name="CancelPromptError";message="Prompt was canceled"}class e extends Error{name="ExitPromptError"}class o extends Error{name="HookError"}class s extends Error{name="ValidationError"}exports.CancelPromptError=r,exports.ExitPromptError=e,exports.HookError=o,exports.ValidationError=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node:async_hooks"),n=require("./errors.mjs.js");const o=new e.AsyncLocalStorage;function t(){const e=o.getStore();if(!e)throw new n.HookError("[Inquirer] Hook functions can only be called from within a prompt");return e}function r(){return t().rl}function s(n){return e.AsyncResource.bind(((...e)=>{const o=t();let r=!1;const s=o.handleChange;o.handleChange=()=>{r=!0};const h=n(...e);return r&&s(),o.handleChange=s,h}))}const h={queue(e){const o=t(),{index:s}=o;o.hooksEffect.push((()=>{o.hooksCleanup[s]?.();const t=e(r());if(null!=t&&"function"!=typeof t)throw new n.ValidationError("useEffect return value must be a cleanup function or nothing.");o.hooksCleanup[s]=t}))},run(){const e=t();s((()=>{e.hooksEffect.forEach((e=>{e()})),e.hooksEffect.length=0}))()},clearAll(){const e=t();e.hooksCleanup.forEach((e=>{e?.()})),e.hooksEffect.length=0,e.hooksCleanup.length=0}};exports.effectScheduler=h,exports.handleChange=function(){t().handleChange()},exports.readline=r,exports.withHooks=function(e,n){const t=function(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}(e);return o.run(t,(()=>{n((function(e){t.handleChange=()=>{t.index=0,e()},t.handleChange()}))}))},exports.withPointer=function(e){const n=t(),{index:o}=n,r=e({get:()=>n.hooks[o],set(e){n.hooks[o]=e},initialized:o in n.hooks});return n.index++,r},exports.withUpdates=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.isBackspaceKey=e=>"backspace"===e.name,exports.isDownKey=e=>"down"===e.name||"j"===e.name||e.ctrl&&"n"===e.name,exports.isEnterKey=e=>"enter"===e.name||"return"===e.name,exports.isNumberKey=e=>"123456789".includes(e.name),exports.isSpaceKey=e=>"space"===e.name,exports.isUpKey=e=>"up"===e.name||"k"===e.name||e.ctrl&&"p"===e.name;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./theme.mjs.js");function t(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function o(...e){const r={};for(const n of e)for(const[e,f]of Object.entries(n)){const n=r[e];r[e]=t(n)&&t(f)?o(n,f):f}return r}exports.makeTheme=function(...t){const r=[e.defaultTheme,...t.filter((e=>null!=e))];return o(...r)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils.mjs.js");exports.lines=function({items:t,width:r,renderItem:i,active:n,position:s,pageSize:l}){const o=t.map(((e,t)=>({item:e,index:t,isActive:t===n}))),c=function(e,t){const r=t.length,i=(e%r+r)%r;return[...t.slice(i),...t.slice(0,i)]}(n-s,o).slice(0,l),f=t=>null==c[t]?[]:function(t,r){return e.breakLines(t,r).split("\n")}(i(c[t]),r),u=Array.from({length:l}),a=f(s).slice(0,l),g=s+a.length<=l?s:l-a.length;u.splice(g,a.length,...a);let p=g+a.length,h=s+1;for(;p<l&&h<c.length;){for(const e of f(h))if(u[p++]=e,p>=l)break;h++}for(p=g-1,h=s-1;p>=0&&h>=0;){for(const e of f(h).reverse())if(u[p--]=e,p<0)break;h--}return u.filter((e=>"string"==typeof e))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.finite=function({active:t,pageSize:e,total:i}){const o=Math.floor(e/2);return i<=e||t<o?t:t>=i-o?t+e-i:o},exports.infinite=function({active:t,lastActive:e,total:i,pageSize:o,pointer:n}){return i<=o?t:e<t&&t-e<o?Math.min(Math.floor(o/2),n+t-e):n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../use-ref.mjs.js"),t=require("../utils.mjs.js"),i=require("./lines.mjs.js"),r=require("./position.mjs.js");exports.usePagination=function({items:s,active:n,renderItem:o,pageSize:a,loop:u=!0}){const c=e.useRef({position:0,lastActive:0}),l=u?r.infinite({active:n,lastActive:c.current.lastActive,total:s.length,pageSize:a,pointer:c.current.position}):r.finite({active:n,total:s.length,pageSize:a});return c.current.position=l,c.current.lastActive=n,i.lines({items:s,width:t.readlineWidth(),renderItem:o,active:n,position:l,pageSize:a}).join("\n")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("strip-ansi"),s=require("ansi-escapes"),r=require("./utils.mjs.js");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=e(t),i=e(s);const l=t=>t.split("\n").length;function u(t){return t>0?i.default.cursorDown(t):""}exports.default=class{rl;height=0;extraLinesUnderPrompt=0;cursorPos;constructor(t){this.rl=t,this.rl=t,this.cursorPos=t.getCursorPos()}write(t){this.rl.output.unmute(),this.rl.output.write(t),this.rl.output.mute()}render(t,s=""){const e=(t=>t.split("\n").pop()??"")(t),n=o.default(e);let h=n;this.rl.line.length>0&&(h=h.slice(0,-this.rl.line.length)),this.rl.setPrompt(h),this.cursorPos=this.rl.getCursorPos();const c=r.readlineWidth();t=r.breakLines(t,c),s=r.breakLines(s,c),n.length%c==0&&(t+="\n");let a=t+(s?"\n"+s:"");const d=Math.floor(n.length/c)-this.cursorPos.rows+(s?l(s):0);d>0&&(a+=i.default.cursorUp(d)),a+=i.default.cursorTo(this.cursorPos.cols),this.write(u(this.extraLinesUnderPrompt)+i.default.eraseLines(this.height)+a),this.extraLinesUnderPrompt=d,this.height=l(a)}checkCursorPos(){const t=this.rl.getCursorPos();t.cols!==this.cursorPos.cols&&(this.write(i.default.cursorTo(t.cols)),this.cursorPos=t)}done({clearContent:t}){this.rl.setPrompt("");let s=u(this.extraLinesUnderPrompt);s+=t?i.default.eraseLines(this.height):"\n",s+=i.default.cursorShow,this.write(s),this.rl.close()}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("yoctocolors-cjs"),t=require("cli-spinners");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(e),r=a(t);const d={prefix:l.default.green("?"),spinner:{interval:r.default.dots.interval,frames:r.default.dots.frames.map((e=>l.default.yellow(e)))},style:{answer:l.default.cyan,message:l.default.bold,error:e=>l.default.red(`> ${e}`),defaultAnswer:e=>l.default.dim(`(${e})`),help:l.default.dim,highlight:l.default.cyan,key:e=>l.default.cyan(l.default.bold(`<${e}>`))}};exports.defaultTheme=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./hook-engine.mjs.js");exports.useEffect=function(t,r){e.withPointer((s=>{const o=s.get();(!Array.isArray(o)||r.some(((e,t)=>!Object.is(e,o[t]))))&&e.effectScheduler.queue(t),s.set(r)}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./use-ref.mjs.js"),s=require("./use-effect.mjs.js"),r=require("./hook-engine.mjs.js");exports.useKeypress=function(t){const u=e.useRef(t);u.current=t,s.useEffect((e=>{let s=!1;const t=r.withUpdates(((r,t)=>{s||u.current(t,e)}));return e.input.on("keypress",t),()=>{s=!0,e.input.removeListener("keypress",t)}}),[])};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./hook-engine.mjs.js");exports.useMemo=function(n,t){return e.withPointer((e=>{const r=e.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some(((e,n)=>e!==t[n]))){const r=n();return e.set({value:r,dependencies:t}),r}return r.value}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node:async_hooks"),s=require("./use-state.mjs.js"),r=require("./use-effect.mjs.js"),t=require("./make-theme.mjs.js");exports.usePrefix=function({isLoading:n=!1,theme:u}){const[i,a]=s.useState(!1),[o,c]=s.useState(0),{prefix:m,spinner:f}=t.makeTheme(u);return r.useEffect((()=>{if(n){let s,r=-1;const t=setTimeout(e.AsyncResource.bind((()=>{a(!0),s=setInterval(e.AsyncResource.bind((()=>{r+=1,c(r%f.frames.length)})),f.interval)})),300);return()=>{clearTimeout(t),clearInterval(s)}}a(!1)}),[n]),i?f.frames[o]:m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./use-state.mjs.js");exports.useRef=function(t){return e.useState({current:t})[0]};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./hook-engine.mjs.js");exports.useState=function(t){return e.withPointer((n=>{const r=t=>{n.get()!==t&&(n.set(t),e.handleChange())};if(n.initialized)return[n.get(),r];const i="function"==typeof t?t():t;return n.set(i),[i,r]}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("cli-width"),t=require("wrap-ansi"),r=require("./hook-engine.mjs.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e),u=i(t);exports.breakLines=function(e,t){return e.split("\n").flatMap((e=>u.default(e,t,{trim:!1,hard:!0}).split("\n").map((e=>e.trimEnd())))).join("\n")},exports.readlineWidth=function(){return n.default({defaultWidth:80,output:r.readline().output})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./signals.js");const e=t=>!!t&&"object"==typeof t&&"function"==typeof t.removeListener&&"function"==typeof t.emit&&"function"==typeof t.reallyExit&&"function"==typeof t.listeners&&"function"==typeof t.kill&&"number"==typeof t.pid&&"function"==typeof t.on,s=Symbol.for("signal-exit emitter"),i=globalThis,o=Object.defineProperty.bind(Object);class r{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(i[s])return i[s];o(i,s,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,e){this.listeners[t].push(e)}removeListener(t,e){const s=this.listeners[t],i=s.indexOf(e);-1!==i&&(0===i&&1===s.length?s.length=0:s.splice(i,1))}emit(t,e,s){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(const o of this.listeners[t])i=!0===o(e,s)||i;return"exit"===t&&(i=this.emit("afterExit",e,s)||i),i}}class n{}const l=globalThis.process,{onExit:c,load:a,unload:h}=(p=e(l)?new class extends n{#t="win32"===l.platform?"SIGINT":"SIGHUP";#e=new r;#s;#i;#o;#r={};#n=!1;constructor(e){super(),this.#s=e,this.#r={};for(const s of t.signals)this.#r[s]=()=>{const t=this.#s.listeners(s);let{count:i}=this.#e;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(i+=o.__signal_exit_emitter__.count),t.length===i){this.unload();const t=this.#e.emit("exit",null,s),i="SIGHUP"===s?this.#t:s;t||e.kill(e.pid,i)}};this.#o=e.reallyExit,this.#i=e.emit}onExit(t,s){if(!e(this.#s))return()=>{};!1===this.#n&&this.load();const i=s?.alwaysLast?"afterExit":"exit";return this.#e.on(i,t),()=>{this.#e.removeListener(i,t),0===this.#e.listeners.exit.length&&0===this.#e.listeners.afterExit.length&&this.unload()}}load(){if(!this.#n){this.#n=!0,this.#e.count+=1;for(const e of t.signals)try{const t=this.#r[e];t&&this.#s.on(e,t)}catch(t){}this.#s.emit=(t,...e)=>this.#l(t,...e),this.#s.reallyExit=t=>this.#c(t)}}unload(){this.#n&&(this.#n=!1,t.signals.forEach((t=>{const e=this.#r[t];if(!e)throw new Error("Listener not defined for signal: "+t);try{this.#s.removeListener(t,e)}catch(t){}})),this.#s.emit=this.#i,this.#s.reallyExit=this.#o,this.#e.count-=1)}#c(t){return e(this.#s)?(this.#s.exitCode=t||0,this.#e.emit("exit",this.#s.exitCode,null),this.#o.call(this.#s,this.#s.exitCode)):0}#l(t,...s){const i=this.#i;if("exit"===t&&e(this.#s)){"number"==typeof s[0]&&(this.#s.exitCode=s[0]);const e=i.call(this.#s,t,...s);return this.#e.emit("exit",this.#s.exitCode,null),e}return i.call(this.#s,t,...s)}}(l):new class extends n{onExit(){return()=>{}}load(){}unload(){}},{onExit:(t,e)=>p.onExit(t,e),load:()=>p.load(),unload:()=>p.unload()});var p;exports.signals=t.signals,exports.load=a,exports.onExit=c,exports.unload=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const S=[];S.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&S.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&S.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT"),exports.signals=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node:async_hooks"),s=require("external-editor"),t=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),r=require("../../../core/dist/esm/lib/make-theme.mjs.js"),i=require("../../../core/dist/esm/lib/use-state.mjs.js"),o=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),n=require("../../../core/dist/esm/lib/use-effect.mjs.js"),u=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),a=require("../../../core/dist/esm/lib/key.mjs.js"),l=t.createPrompt(((t,l)=>{const{waitForUseInput:d=!0,postfix:c=".txt",validate:m=(()=>!0)}=t,p=r.makeTheme(t.theme),[f,j]=i.useState("pending"),[y,g]=i.useState(t.default||""),[b,q]=i.useState(),h="loading"===f,v=o.usePrefix({isLoading:h,theme:p});function x(t){t.pause();const r=e.AsyncResource.bind((async(e,s)=>{if(t.resume(),e)q(e.toString());else{j("loading");const e=await m(s);!0===e?(q(void 0),j("done"),l(s)):(g(s),q(e||"You must provide a valid value"),j("pending"))}}));s.editAsync(y,((e,s)=>{r(e,s)}),{postfix:c})}n.useEffect((e=>{d||x(e)}),[]),u.useKeypress(((e,s)=>{"pending"===f&&a.isEnterKey(e)&&x(s)}));const k=p.style.message(t.message);let P="";if("loading"===f)P=p.style.help("Received");else if("pending"===f){const e=p.style.key("enter");P=p.style.help(`Press ${e} to launch your preferred editor.`)}let S="";return b&&(S=p.style.error(b)),[[v,k,P].filter(Boolean).join(" "),S]}));exports.default=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("yoctocolors-cjs"),s=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),t=require("../../../core/dist/esm/lib/use-state.mjs.js"),r=require("../../../core/dist/esm/lib/make-theme.mjs.js"),a=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),i=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),n=require("../../../core/dist/esm/lib/key.mjs.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(e);const u={key:"h",name:"Help, list all options",value:void 0};function m(e,s){return"name"===s?"name"in e?e.name:e.value:"value"in e?e.value:e.name}var c=s.createPrompt(((e,s)=>{const{choices:o,default:c="h",expanded:d=!1}=e,[y,f]=t.useState("pending"),[p,j]=t.useState(""),[v,$]=t.useState(d),[k,h]=t.useState(),b=r.makeTheme(e.theme),q=a.usePrefix({theme:b});i.useKeypress(((e,t)=>{if(n.isEnterKey(e)){const e=(p||c).toLowerCase();if("h"!==e||v){const t=o.find((({key:s})=>s===e));if(t){const e=m(t,"value");j(e),f("done"),s(e)}else h(""===p?"Please input a value":`"${l.default.red(p)}" isn't an available option`)}else $(!0)}else j(t.line),h(void 0)}));const g=b.style.message(e.message);if("done"===y)return`${q} ${g} ${b.style.answer(p)}`;const w=v?o:[...o,u];let x="",C=w.map((e=>e.key===c?e.key.toUpperCase():e.key)).join("");C=` ${b.style.defaultAnswer(C)}`,v&&(C="",x=w.map((e=>{const s=` ${e.key}) ${m(e,"name")}`;return e.key===p.toLowerCase()?b.style.highlight(s):s})).join("\n"));let P="";const S=w.find((({key:e})=>e===p.toLowerCase()));S&&(P=`${l.default.cyan(">>")} ${m(S,"name")}`);let L="";return k&&(L=b.style.error(k)),[`${q} ${g}${C} ${p}`,[x,P,L].filter(Boolean).join("\n")]}));exports.default=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var l=e(require("node:process"));const i={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},o={...i,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},n={...i,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"};var t=("win32"!==l.default.platform?"linux"!==l.default.env.TERM:Boolean(l.default.env.WT_SESSION)||Boolean(l.default.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===l.default.env.ConEmuTask||"Terminus-Sublime"===l.default.env.TERM_PROGRAM||"vscode"===l.default.env.TERM_PROGRAM||"xterm-256color"===l.default.env.TERM||"alacritty"===l.default.env.TERM||"JetBrains-JediTerm"===l.default.env.TERMINAL_EMULATOR)?o:n;exports.default=t,exports.fallbackSymbols=n,exports.mainSymbols=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),s=require("../../../core/dist/esm/lib/make-theme.mjs.js"),t=require("../../../core/dist/esm/lib/use-state.mjs.js"),r=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),i=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),a=require("../../../core/dist/esm/lib/key.mjs.js"),o=e.createPrompt(((e,o)=>{const{required:n,validate:d=(()=>!0)}=e,u=s.makeTheme(e.theme),[l,m]=t.useState("pending"),[c="",p]=t.useState(e.default),[j,f]=t.useState(),[v,y]=t.useState(""),b="loading"===l,g=r.usePrefix({isLoading:b,theme:u});i.useKeypress((async(e,s)=>{if("pending"===l)if(a.isEnterKey(e)){const e=v||c;m("loading");const t=n&&!e?"You must provide a value":await d(e);!0===t?(y(e),m("done"),o(e)):(s.write(v),f(t||"You must provide a valid value"),m("pending"))}else a.isBackspaceKey(e)&&!v?p(void 0):"tab"!==e.name||v?(y(s.line),f(void 0)):(p(void 0),s.clearLine(0),s.write(c),y(c))}));const q=u.style.message(e.message);let k,w=v;"function"==typeof e.transformer?w=e.transformer(v,{isFinal:"done"===l}):"done"===l&&(w=u.style.answer(v)),c&&"done"!==l&&!v&&(k=u.style.defaultAnswer(c));let h="";return j&&(h=u.style.error(j)),[[g,q,k,w].filter((e=>void 0!==e)).join(" "),h]}));exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),t=require("../../../core/dist/esm/lib/make-theme.mjs.js"),s=require("../../../core/dist/esm/lib/use-state.mjs.js"),i=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),r=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),a=require("../../../core/dist/esm/lib/key.mjs.js");function n(e,{min:t,max:s,step:i}){return null!=e&&!Number.isNaN(e)&&(e<t||e>s?`Value must be between ${t} and ${s}`:!("any"!==i&&!function(e,t,s){const i=e*Math.pow(10,6),r=t*Math.pow(10,6),a=s*Math.pow(10,6);return(i-(Number.isFinite(s)?a:0))%r==0}(e,i,t))||`Value must be a multiple of ${i}${Number.isFinite(t)?` starting from ${t}`:""}`)}var u=e.createPrompt(((e,u)=>{const{validate:m=(()=>!0),min:o=-1/0,max:l=1/0,step:d=1,required:p=!1}=e,c=t.makeTheme(e.theme),[b,f]=s.useState("pending"),[j,v]=s.useState(""),y=!0===n(e.default,{min:o,max:l,step:d})?e.default?.toString():void 0,[g="",w]=s.useState(y),[x,h]=s.useState(),q="loading"===b,N=i.usePrefix({isLoading:q,theme:c});r.useKeypress((async(e,t)=>{if("pending"===b)if(a.isEnterKey(e)){const e=j||g,s=""===e?void 0:Number(e);f("loading");let i=!0;(p||null!=s)&&(i=n(s,{min:o,max:l,step:d})),!0===i&&(i=await m(s)),!0===i?(v(String(s??"")),f("done"),u(s)):(t.write(j),h(i||"You must provide a valid numeric value"),f("pending"))}else a.isBackspaceKey(e)&&!j?w(void 0):"tab"!==e.name||j?(v(t.line),h(void 0)):(w(void 0),t.clearLine(0),t.write(g),v(g))}));const S=c.style.message(e.message);let k,$=j;"done"===b&&($=c.style.answer(j)),g&&"done"!==b&&!j&&(k=c.style.defaultAnswer(g));let M="";return x&&(M=c.style.error(x)),[[N,S,k,$].filter((e=>void 0!==e)).join(" "),M]}));exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("ansi-escapes"),s=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),t=require("../../../core/dist/esm/lib/make-theme.mjs.js"),r=require("../../../core/dist/esm/lib/use-state.mjs.js"),i=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),a=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),o=require("../../../core/dist/esm/lib/key.mjs.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(e),l=s.createPrompt(((e,s)=>{const{validate:n=(()=>!0)}=e,l=t.makeTheme(e.theme),[m,d]=r.useState("pending"),[c,p]=r.useState(),[j,f]=r.useState(""),y="loading"===m,g=i.usePrefix({isLoading:y,theme:l});a.useKeypress((async(e,t)=>{if("pending"===m)if(o.isEnterKey(e)){const e=j;d("loading");const r=await n(e);!0===r?(f(e),d("done"),s(e)):(t.write(j),p(r||"You must provide a valid value"),d("pending"))}else f(t.line),p(void 0)}));const k=l.style.message(e.message);let b,v="";if(e.mask){v=("string"==typeof e.mask?e.mask:"*").repeat(j.length)}else"done"!==m&&(b=`${l.style.help("[input is masked]")}${u.default.cursorHide}`);"done"===m&&(v=l.style.answer(v));let q="";return c&&(q=l.style.error(c)),[[g,k,e.mask?v:b].join(" "),q]}));exports.default=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("yoctocolors-cjs"),r=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),t=require("../../../core/dist/esm/lib/use-state.mjs.js"),s=require("../../../core/dist/esm/lib/make-theme.mjs.js"),i=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),a=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),o=require("../../../core/dist/esm/lib/Separator.mjs.js"),n=require("../../../core/dist/esm/lib/key.mjs.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(e);const m=/\d+/;function c(e){return null!=e&&!o.Separator.isSeparator(e)}var p=r.createPrompt(((e,r)=>{const{choices:u}=e,[p,d]=t.useState("pending"),[j,f]=t.useState(""),[y,S]=t.useState(),b=s.makeTheme(e.theme),v=i.usePrefix({theme:b});a.useKeypress(((e,t)=>{if(n.isEnterKey(e)){let e;if(m.test(j)){const r=Number.parseInt(j,10)-1;e=u.filter(c)[r]}else e=u.find((e=>c(e)&&e.key===j));c(e)?(f(e.short??e.name??String(e.value)),d("done"),r(e.value)):S(""===j?"Please input a value":`"${l.default.red(j)}" isn't an available option`)}else f(t.line),S(void 0)}));const $=b.style.message(e.message);if("done"===p)return`${v} ${$} ${b.style.answer(j)}`;let h=0;const g=u.map((e=>{if(o.Separator.isSeparator(e))return` ${e.separator}`;h+=1;const r=` ${e.key||h}) ${String(e.name||e.value)}`;return e.key===j.toLowerCase()||String(h)===j?b.style.highlight(r):r})).join("\n");let q="";return y&&(q=b.style.error(y)),[`${v} ${$} ${j}`,[g,q].filter(Boolean).join("\n")]}));exports.Separator=o.Separator,exports.default=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("yoctocolors-cjs"),s=require("../../../figures/dist/esm/index.mjs.js"),r=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),t=require("../../../core/dist/esm/lib/make-theme.mjs.js"),i=require("../../../core/dist/esm/lib/use-ref.mjs.js"),a=require("../../../core/dist/esm/lib/use-state.mjs.js"),o=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),n=require("../../../core/dist/esm/lib/use-memo.mjs.js"),l=require("../../../core/dist/esm/lib/use-effect.mjs.js"),u=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),d=require("../../../core/dist/esm/lib/pagination/use-pagination.mjs.js"),c=require("../../../core/dist/esm/lib/Separator.mjs.js"),m=require("../../../core/dist/esm/lib/key.mjs.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e);const g={icon:{cursor:s.default.pointer},style:{disabled:e=>f.default.dim(`- ${e}`),searchTerm:e=>f.default.cyan(e),description:e=>f.default.cyan(e)},helpMode:"auto"};function j(e){return!c.Separator.isSeparator(e)&&!e.disabled}var h=r.createPrompt(((e,s)=>{const{pageSize:r=7}=e,p=t.makeTheme(g,e.theme),f=i.useRef(!0),[h,y]=a.useState("searching"),[b,S]=a.useState(""),[v,$]=a.useState([]),[q,w]=a.useState(),x="loading"===h||"searching"===h,k=o.usePrefix({isLoading:x,theme:p}),M=n.useMemo((()=>({first:v.findIndex(j),last:v.findLastIndex(j)})),[v]),[P=M.first,E]=a.useState();l.useEffect((()=>{const s=new AbortController;y("searching"),w(void 0);return(async()=>{try{const r=await e.source(b||void 0,{signal:s.signal});s.signal.aborted||(E(void 0),w(void 0),$(r),y("pending"))}catch(e){!s.signal.aborted&&e instanceof Error&&w(e.message)}})(),()=>{s.abort()}}),[b]);const I=v[P];u.useKeypress(((e,r)=>{if(m.isEnterKey(e)&&I)y("done"),s(I.value);else if("searching"===h||"up"!==e.name&&"down"!==e.name)S(r.line);else if(r.clearLine(0),"up"===e.name&&P!==M.first||"down"===e.name&&P!==M.last){const s="up"===e.name?-1:1;let r=P;do{r=(r+s+v.length)%v.length}while(!j(v[r]));E(r)}}));const L=p.style.message(e.message);P>0&&(f.current=!1);let T="";"pending"===h&&v.length>0&&("always"===p.helpMode||"auto"===p.helpMode&&f.current)&&(T=v.length>r?`\n${p.style.help("(Use arrow keys to reveal more choices)")}`:p.style.help("(Use arrow keys)"));const z=d.usePagination({items:v,active:P,renderItem({item:e,isActive:s}){if(c.Separator.isSeparator(e))return` ${e.separator}`;const r=String(e.name||e.value);if(e.disabled){const s="string"==typeof e.disabled?e.disabled:"(disabled)";return p.style.disabled(`${r} ${s}`)}return(s?p.style.highlight:e=>e)(`${s?p.icon.cursor:" "} ${r}`)},pageSize:r,loop:!1});let A,K;if(q?A=p.style.error(q):0===v.length&&""!==b&&"pending"===h&&(A=p.style.error("No results found")),"done"===h&&I){const e=I.short??I.name??String(I.value);return`${k} ${L} ${p.style.answer(e)}`}K=p.style.searchTerm(b);const U=I?.description?`\n${p.style.description(I.description)}`:"";return[[k,L,K].filter(Boolean).join(" "),`${A??z}${T}${U}`]}));exports.Separator=c.Separator,exports.default=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("yoctocolors-cjs"),s=require("../../../figures/dist/esm/index.mjs.js"),r=require("ansi-escapes"),t=require("../../../core/dist/esm/lib/create-prompt.mjs.js"),i=require("../../../core/dist/esm/lib/use-ref.mjs.js"),o=require("../../../core/dist/esm/lib/make-theme.mjs.js"),a=require("../../../core/dist/esm/lib/use-prefix.mjs.js"),n=require("../../../core/dist/esm/lib/use-state.mjs.js"),l=require("../../../core/dist/esm/lib/use-memo.mjs.js"),u=require("../../../core/dist/esm/lib/use-keypress.mjs.js"),c=require("../../../core/dist/esm/lib/Separator.mjs.js"),d=require("../../../core/dist/esm/lib/use-effect.mjs.js"),m=require("../../../core/dist/esm/lib/pagination/use-pagination.mjs.js"),p=require("../../../core/dist/esm/lib/errors.mjs.js"),f=require("../../../core/dist/esm/lib/key.mjs.js");function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=j(e),b=j(r);const h={icon:{cursor:s.default.pointer},style:{disabled:e=>y.default.dim(`- ${e}`),description:e=>y.default.cyan(e)},helpMode:"auto"};function g(e){return!c.Separator.isSeparator(e)&&!e.disabled}var S=t.createPrompt(((e,s)=>{const{choices:r,loop:t=!0,pageSize:j=7}=e,y=i.useRef(!0),S=o.makeTheme(h,e.theme),$=a.usePrefix({theme:S}),[q,v]=n.useState("pending"),w=i.useRef(),x=l.useMemo((()=>{const e=r.findIndex(g),s=r.findLastIndex(g);if(e<0)throw new p.ValidationError("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:s}}),[r]),K=l.useMemo((()=>"default"in e?r.findIndex((s=>g(s)&&s.value===e.default)):-1),[e.default,r]),[k,L]=n.useState(-1===K?x.first:K),M=r[k];u.useKeypress(((e,i)=>{if(clearTimeout(w.current),f.isEnterKey(e))v("done"),s(M.value);else if(f.isUpKey(e)||f.isDownKey(e)){if(i.clearLine(0),t||f.isUpKey(e)&&k!==x.first||f.isDownKey(e)&&k!==x.last){const s=f.isUpKey(e)?-1:1;let t=k;do{t=(t+s+r.length)%r.length}while(!g(r[t]));L(t)}}else if(f.isNumberKey(e)){i.clearLine(0);const s=Number(e.name)-1,t=r[s];null!=t&&g(t)&&L(s)}else if(f.isBackspaceKey(e))i.clearLine(0);else{const e=i.line.toLowerCase(),s=r.findIndex((s=>!(c.Separator.isSeparator(s)||!g(s))&&String(s.name||s.value).toLowerCase().startsWith(e)));s>=0&&L(s),w.current=setTimeout((()=>{i.clearLine(0)}),700)}})),d.useEffect((()=>()=>{clearTimeout(w.current)}),[]);const I=S.style.message(e.message);let U="",P="";("always"===S.helpMode||"auto"===S.helpMode&&y.current)&&(y.current=!1,r.length>j?P=`\n${S.style.help("(Use arrow keys to reveal more choices)")}`:U=S.style.help("(Use arrow keys)"));const T=m.usePagination({items:r,active:k,renderItem({item:e,isActive:s}){if(c.Separator.isSeparator(e))return` ${e.separator}`;const r=String(e.name||e.value);if(e.disabled){const s="string"==typeof e.disabled?e.disabled:"(disabled)";return S.style.disabled(`${r} ${s}`)}return(s?S.style.highlight:e=>e)(`${s?S.icon.cursor:" "} ${r}`)},pageSize:j,loop:t});if("done"===q){const e=M.short??M.name??String(M.value);return`${$} ${I} ${S.style.answer(e)}`}const E=M.description?`\n${S.style.description(M.description)}`:"";return`${[$,I,U].filter(Boolean).join(" ")}\n${T}${P}${E}${b.default.cursorHide}`}));exports.Separator=c.Separator,exports.default=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.CancelablePromise=class extends Promise{cancel=()=>{}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./index.js");const{program:e,createCommand:t,createArgument:o,createOption:n,CommanderError:p,InvalidArgumentError:m,InvalidOptionArgumentError:a,Command:s,Argument:d,Option:i,Help:u}=r.default;exports.Argument=d,exports.Command=s,exports.CommanderError=p,exports.Help=u,exports.InvalidArgumentError=m,exports.InvalidOptionArgumentError=a,exports.Option=i,exports.createArgument=o,exports.createCommand=t,exports.createOption=n,exports.program=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../_virtual/index.js");require("./lib/argument.js"),require("./lib/command.js"),require("./lib/error.js"),require("./lib/help.js"),require("./lib/option.js");var e=require("../../_virtual/argument.js"),o=require("../../_virtual/command.js"),t=require("../../_virtual/error.js"),i=require("../../_virtual/help.js"),n=require("../../_virtual/option.js");!function(r,u){const{Argument:a}=e.__exports,{Command:m}=o.__exports,{CommanderError:s,InvalidArgumentError:l}=t.__exports,{Help:p}=i.__exports,{Option:_}=n.__exports;(u=r.exports=new m).program=u,u.Argument=a,u.Command=m,u.CommanderError=s,u.Help=p,u.InvalidArgumentError=l,u.InvalidOptionArgumentError=l,u.Option=_}(r.commander,r.commander.exports);var u=r.commander.exports;exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/argument.js");require("./error.js");var r=require("../../../_virtual/error.js");const{InvalidArgumentError:i}=r.__exports;e.__exports.Argument=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r!==this.defaultValue&&Array.isArray(r)?r.concat(e):[e]}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,r)=>{if(!this.argChoices.includes(e))throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,r):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},e.__exports.humanReadableArgName=function(e){const r=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+r+">":"["+r+"]"},exports.default=e.__exports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../_virtual/command.js"),e=require("events"),i=require("child_process"),s=require("path"),n=require("fs"),o=require("process");require("./argument.js"),require("./error.js"),require("./help.js"),require("./option.js"),require("./suggestSimilar.js");var r=require("../../../_virtual/argument.js"),a=require("../../../_virtual/error.js"),h=require("../../../_virtual/help.js"),l=require("../../../_virtual/option.js"),u=require("../../../_virtual/suggestSimilar.js");function p(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=p(e),m=p(i),d=p(s),_=p(n),g=p(o);const f=c.default.EventEmitter,O=m.default,C=d.default,b=_.default,v=g.default,{Argument:A,humanReadableArgName:w}=r.__exports,{CommanderError:x}=a.__exports,{Help:E}=h.__exports,{Option:H,splitOptionFlags:k,DualOptions:$}=l.__exports,{suggestSimilar:y}=u.__exports;class S extends f{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>v.stdout.write(t),writeErr:t=>v.stderr.write(t),getOutHelpWidth:()=>v.stdout.isTTY?v.stdout.columns:void 0,getErrHelpWidth:()=>v.stderr.isTTY?v.stderr.columns:void 0,outputError:(t,e)=>e(t)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._hasHelpOption=t._hasHelpOption,this._helpFlags=t._helpFlags,this._helpDescription=t._helpDescription,this._helpShortFlag=t._helpShortFlag,this._helpLongFlag=t._helpLongFlag,this._helpCommandName=t._helpCommandName,this._helpCommandnameAndArgs=t._helpCommandnameAndArgs,this._helpCommandDescription=t._helpCommandDescription,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}command(t,e,i){let s=e,n=i;"object"==typeof s&&null!==s&&(n=s,s=null),n=n||{};const[,o,r]=t.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return s&&(a.description(s),a._executableHandler=!0),n.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!n.noHelp&&!n.hidden),a._executableFile=n.executableFile||null,r&&a.arguments(r),this.commands.push(a),a.parent=this,a.copyInheritedSettings(this),s?this:a}createCommand(t){return new S(t)}createHelp(){return Object.assign(new E,this.configureHelp())}configureHelp(t){return void 0===t?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return void 0===t?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return"string"!=typeof t&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,e){if(!t._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(e=e||{}).isDefault&&(this._defaultCommandName=t._name),(e.noHelp||e.hidden)&&(t._hidden=!0),this.commands.push(t),t.parent=this,this}createArgument(t,e){return new A(t,e)}argument(t,e,i,s){const n=this.createArgument(t,e);return"function"==typeof i?n.default(s).argParser(i):n.default(i),this.addArgument(n),this}arguments(t){return t.split(/ +/).forEach((t=>{this.argument(t)})),this}addArgument(t){const e=this._args.slice(-1)[0];if(e&&e.variadic)throw new Error(`only the last argument can be variadic '${e.name()}'`);if(t.required&&void 0!==t.defaultValue&&void 0===t.parseArg)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this._args.push(t),this}addHelpCommand(t,e){return!1===t?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,"string"==typeof t&&(this._helpCommandName=t.split(" ")[0],this._helpCommandnameAndArgs=t),this._helpCommandDescription=e||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return void 0===this._addImplicitHelpCommand?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(t,e){const i=["preSubcommand","preAction","postAction"];if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(e):this._lifeCycleHooks[t]=[e],this}exitOverride(t){return this._exitCallback=t||(t=>{if("commander.executeSubCommandAsync"!==t.code)throw t}),this}_exit(t,e,i){this._exitCallback&&this._exitCallback(new x(t,e,i)),v.exit(t)}action(t){return this._actionHandler=e=>{const i=this._args.length,s=e.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),t.apply(this,s)},this}createOption(t,e){return new H(t,e)}addOption(t){const e=t.name(),i=t.attributeName();if(t.negate){const e=t.long.replace(/^--no-/,"--");this._findOption(e)||this.setOptionValueWithSource(i,void 0===t.defaultValue||t.defaultValue,"default")}else void 0!==t.defaultValue&&this.setOptionValueWithSource(i,t.defaultValue,"default");this.options.push(t);const s=(e,s,n)=>{null==e&&void 0!==t.presetArg&&(e=t.presetArg);const o=this.getOptionValue(i);if(null!==e&&t.parseArg)try{e=t.parseArg(e,o)}catch(t){if("commander.invalidArgument"===t.code){const e=`${s} ${t.message}`;this.error(e,{exitCode:t.exitCode,code:t.code})}throw t}else null!==e&&t.variadic&&(e=t._concatValue(e,o));null==e&&(e=!t.negate&&(!(!t.isBoolean()&&!t.optional)||"")),this.setOptionValueWithSource(i,e,n)};return this.on("option:"+e,(e=>{const i=`error: option '${t.flags}' argument '${e}' is invalid.`;s(e,i,"cli")})),t.envVar&&this.on("optionEnv:"+e,(e=>{const i=`error: option '${t.flags}' value '${e}' from env '${t.envVar}' is invalid.`;s(e,i,"env")})),this}_optionEx(t,e,i,s,n){if("object"==typeof e&&e instanceof H)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const o=this.createOption(e,i);if(o.makeOptionMandatory(!!t.mandatory),"function"==typeof s)o.default(n).argParser(s);else if(s instanceof RegExp){const t=s;s=(e,i)=>{const s=t.exec(e);return s?s[0]:i},o.default(n).argParser(s)}else o.default(s);return this.addOption(o)}option(t,e,i,s){return this._optionEx({},t,e,i,s)}requiredOption(t,e,i,s){return this._optionEx({mandatory:!0},t,e,i,s)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){if(this._passThroughOptions=!!t,this.parent&&t&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(t=!0){if(this._storeOptionsAsProperties=!!t,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,e){return this.setOptionValueWithSource(t,e,void 0)}setOptionValueWithSource(t,e,i){return this._storeOptionsAsProperties?this[t]=e:this._optionValues[t]=e,this._optionValueSources[t]=i,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let e;return P(this).forEach((i=>{void 0!==i.getOptionValueSource(t)&&(e=i.getOptionValueSource(t))})),e}_prepareUserArgs(t,e){if(void 0!==t&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");let i;switch(e=e||{},void 0===t&&(t=v.argv,v.versions&&v.versions.electron&&(e.from="electron")),this.rawArgs=t.slice(),e.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2);break;case"electron":v.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break;default:throw new Error(`unexpected parse option { from: '${e.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(t,e){const i=this._prepareUserArgs(t,e);return this._parseCommand([],i),this}async parseAsync(t,e){const i=this._prepareUserArgs(t,e);return await this._parseCommand([],i),this}_executeSubCommand(t,e){e=e.slice();let i=!1;const s=[".js",".ts",".tsx",".mjs",".cjs"];function n(t,e){const i=C.resolve(t,e);if(b.existsSync(i))return i;if(s.includes(C.extname(e)))return;const n=s.find((t=>b.existsSync(`${i}${t}`)));return n?`${i}${n}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o,r=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let t;try{t=b.realpathSync(this._scriptPath)}catch(e){t=this._scriptPath}a=C.resolve(C.dirname(t),a)}if(a){let e=n(a,r);if(!e&&!t._executableFile&&this._scriptPath){const i=C.basename(this._scriptPath,C.extname(this._scriptPath));i!==this._name&&(e=n(a,`${i}-${t._name}`))}r=e||r}if(i=s.includes(C.extname(r)),"win32"!==v.platform?i?(e.unshift(r),e=F(v.execArgv).concat(e),o=O.spawn(v.argv[0],e,{stdio:"inherit"})):o=O.spawn(r,e,{stdio:"inherit"}):(e.unshift(r),e=F(v.execArgv).concat(e),o=O.spawn(v.execPath,e,{stdio:"inherit"})),!o.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((t=>{v.on(t,(()=>{!1===o.killed&&null===o.exitCode&&o.kill(t)}))}))}const h=this._exitCallback;h?o.on("close",(()=>{h(new x(v.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):o.on("close",v.exit.bind(v)),o.on("error",(e=>{if("ENOENT"===e.code){const e=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${r}' does not exist\n - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${e}`;throw new Error(i)}if("EACCES"===e.code)throw new Error(`'${r}' not executable`);if(h){const t=new x(1,"commander.executeSubCommandAsync","(error)");t.nestedError=e,h(t)}else v.exit(1)})),this.runningCommand=o}_dispatchSubcommand(t,e,i){const s=this._findCommand(t);let n;return s||this.help({error:!0}),n=this._chainOrCallSubCommandHook(n,s,"preSubcommand"),n=this._chainOrCall(n,(()=>{if(!s._executableHandler)return s._parseCommand(e,i);this._executeSubCommand(s,e.concat(i))})),n}_checkNumberOfArguments(){this._args.forEach(((t,e)=>{t.required&&null==this.args[e]&&this.missingArgument(t.name())})),this._args.length>0&&this._args[this._args.length-1].variadic||this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){const t=(t,e,i)=>{let s=e;if(null!==e&&t.parseArg)try{s=t.parseArg(e,i)}catch(i){if("commander.invalidArgument"===i.code){const s=`error: command-argument value '${e}' is invalid for argument '${t.name()}'. ${i.message}`;this.error(s,{exitCode:i.exitCode,code:i.code})}throw i}return s};this._checkNumberOfArguments();const e=[];this._args.forEach(((i,s)=>{let n=i.defaultValue;i.variadic?s<this.args.length?(n=this.args.slice(s),i.parseArg&&(n=n.reduce(((e,s)=>t(i,s,e)),i.defaultValue))):void 0===n&&(n=[]):s<this.args.length&&(n=this.args[s],i.parseArg&&(n=t(i,n,i.defaultValue))),e[s]=n})),this.processedArgs=e}_chainOrCall(t,e){return t&&t.then&&"function"==typeof t.then?t.then((()=>e())):e()}_chainOrCallHooks(t,e){let i=t;const s=[];return P(this).reverse().filter((t=>void 0!==t._lifeCycleHooks[e])).forEach((t=>{t._lifeCycleHooks[e].forEach((e=>{s.push({hookedCommand:t,callback:e})}))})),"postAction"===e&&s.reverse(),s.forEach((t=>{i=this._chainOrCall(i,(()=>t.callback(t.hookedCommand,this)))})),i}_chainOrCallSubCommandHook(t,e,i){let s=t;return void 0!==this._lifeCycleHooks[i]&&this._lifeCycleHooks[i].forEach((t=>{s=this._chainOrCall(s,(()=>t(this,e)))})),s}_parseCommand(t,e){const i=this.parseOptions(e);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(i.operands),e=i.unknown,this.args=t.concat(e),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),e);if(this._hasImplicitHelpCommand()&&t[0]===this._helpCommandName)return 1===t.length&&this.help(),this._dispatchSubcommand(t[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return V(this,e),this._dispatchSubcommand(this._defaultCommandName,t,e);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),V(this,i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const s=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},n=`command:${this.name()}`;if(this._actionHandler){let i;return s(),this._processArguments(),i=this._chainOrCallHooks(i,"preAction"),i=this._chainOrCall(i,(()=>this._actionHandler(this.processedArgs))),this.parent&&(i=this._chainOrCall(i,(()=>{this.parent.emit(n,t,e)}))),i=this._chainOrCallHooks(i,"postAction"),i}if(this.parent&&this.parent.listenerCount(n))s(),this._processArguments(),this.parent.emit(n,t,e);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,e);this.listenerCount("command:*")?this.emit("command:*",t,e):this.commands.length?this.unknownCommand():(s(),this._processArguments())}else this.commands.length?(s(),this.help({error:!0})):(s(),this._processArguments())}_findCommand(t){if(t)return this.commands.find((e=>e._name===t||e._aliases.includes(t)))}_findOption(t){return this.options.find((e=>e.is(t)))}_checkForMissingMandatoryOptions(){for(let t=this;t;t=t.parent)t.options.forEach((e=>{e.mandatory&&void 0===t.getOptionValue(e.attributeName())&&t.missingMandatoryOptionValue(e)}))}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const e=t.attributeName();return void 0!==this.getOptionValue(e)&&"default"!==this.getOptionValueSource(e)})),e=t.filter((t=>t.conflictsWith.length>0));e.forEach((e=>{const i=t.find((t=>e.conflictsWith.includes(t.attributeName())));i&&this._conflictingOption(e,i)}))}_checkForConflictingOptions(){for(let t=this;t;t=t.parent)t._checkForConflictingLocalOptions()}parseOptions(t){const e=[],i=[];let s=e;const n=t.slice();function o(t){return t.length>1&&"-"===t[0]}let r=null;for(;n.length;){const t=n.shift();if("--"===t){s===i&&s.push(t),s.push(...n);break}if(!r||o(t)){if(r=null,o(t)){const e=this._findOption(t);if(e){if(e.required){const t=n.shift();void 0===t&&this.optionMissingArgument(e),this.emit(`option:${e.name()}`,t)}else if(e.optional){let t=null;n.length>0&&!o(n[0])&&(t=n.shift()),this.emit(`option:${e.name()}`,t)}else this.emit(`option:${e.name()}`);r=e.variadic?e:null;continue}}if(t.length>2&&"-"===t[0]&&"-"!==t[1]){const e=this._findOption(`-${t[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,t.slice(2)):(this.emit(`option:${e.name()}`),n.unshift(`-${t.slice(2)}`));continue}}if(/^--[^=]+=/.test(t)){const e=t.indexOf("="),i=this._findOption(t.slice(0,e));if(i&&(i.required||i.optional)){this.emit(`option:${i.name()}`,t.slice(e+1));continue}}if(o(t)&&(s=i),(this._enablePositionalOptions||this._passThroughOptions)&&0===e.length&&0===i.length){if(this._findCommand(t)){e.push(t),n.length>0&&i.push(...n);break}if(t===this._helpCommandName&&this._hasImplicitHelpCommand()){e.push(t),n.length>0&&e.push(...n);break}if(this._defaultCommandName){i.push(t),n.length>0&&i.push(...n);break}}if(this._passThroughOptions){s.push(t),n.length>0&&s.push(...n);break}s.push(t)}else this.emit(`option:${r.name()}`,t)}return{operands:e,unknown:i}}opts(){if(this._storeOptionsAsProperties){const t={},e=this.options.length;for(let i=0;i<e;i++){const e=this.options[i].attributeName();t[e]=e===this._versionOptionName?this._version:this[e]}return t}return this._optionValues}optsWithGlobals(){return P(this).reduce(((t,e)=>Object.assign(t,e.opts())),{})}error(t,e){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const i=e||{},s=i.exitCode||1,n=i.code||"commander.error";this._exit(s,n,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in v.env){const e=t.attributeName();(void 0===this.getOptionValue(e)||["default","config","env"].includes(this.getOptionValueSource(e)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,v.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}}))}_parseOptionsImplied(){const t=new $(this.options),e=t=>void 0!==this.getOptionValue(t)&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((i=>void 0!==i.implied&&e(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i))).forEach((t=>{Object.keys(t.implied).filter((t=>!e(t))).forEach((e=>{this.setOptionValueWithSource(e,t.implied[e],"implied")}))}))}missingArgument(t){const e=`error: missing required argument '${t}'`;this.error(e,{code:"commander.missingArgument"})}optionMissingArgument(t){const e=`error: option '${t.flags}' argument missing`;this.error(e,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const e=`error: required option '${t.flags}' not specified`;this.error(e,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,e){const i=t=>{const e=t.attributeName(),i=this.getOptionValue(e),s=this.options.find((t=>t.negate&&e===t.attributeName())),n=this.options.find((t=>!t.negate&&e===t.attributeName()));return s&&(void 0===s.presetArg&&!1===i||void 0!==s.presetArg&&i===s.presetArg)?s:n||t},s=t=>{const e=i(t),s=e.attributeName();return"env"===this.getOptionValueSource(s)?`environment variable '${e.envVar}'`:`option '${e.flags}'`},n=`error: ${s(t)} cannot be used with ${s(e)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let e="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{const t=s.createHelp().visibleOptions(s).filter((t=>t.long)).map((t=>t.long));i=i.concat(t),s=s.parent}while(s&&!s._enablePositionalOptions);e=y(t,i)}const i=`error: unknown option '${t}'${e}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const e=this._args.length,i=1===e?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${e} argument${i} but got ${t.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let e="";if(this._showSuggestionAfterError){const i=[];this.createHelp().visibleCommands(this).forEach((t=>{i.push(t.name()),t.alias()&&i.push(t.alias())})),e=y(t,i)}const i=`error: unknown command '${t}'${e}`;this.error(i,{code:"commander.unknownCommand"})}version(t,e,i){if(void 0===t)return this._version;this._version=t,e=e||"-V, --version",i=i||"output the version number";const s=this.createOption(e,i);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`),this._exit(0,"commander.version",t)})),this}description(t,e){return void 0===t&&void 0===e?this._description:(this._description=t,e&&(this._argsDescription=e),this)}summary(t){return void 0===t?this._summary:(this._summary=t,this)}alias(t){if(void 0===t)return this._aliases[0];let e=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(e=this.commands[this.commands.length-1]),t===e._name)throw new Error("Command alias can't be the same as its name");return e._aliases.push(t),this}aliases(t){return void 0===t?this._aliases:(t.forEach((t=>this.alias(t))),this)}usage(t){if(void 0===t){if(this._usage)return this._usage;const t=this._args.map((t=>w(t)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=t,this}name(t){return void 0===t?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=C.basename(t,C.extname(t)),this}executableDir(t){return void 0===t?this._executableDir:(this._executableDir=t,this)}helpInformation(t){const e=this.createHelp();return void 0===e.helpWidth&&(e.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),e.formatHelp(this,e)}_getHelpContext(t){const e={error:!!(t=t||{}).error};let i;return i=e.error?t=>this._outputConfiguration.writeErr(t):t=>this._outputConfiguration.writeOut(t),e.write=t.write||i,e.command=this,e}outputHelp(t){let e;"function"==typeof t&&(e=t,t=void 0);const i=this._getHelpContext(t);P(this).reverse().forEach((t=>t.emit("beforeAllHelp",i))),this.emit("beforeHelp",i);let s=this.helpInformation(i);if(e&&(s=e(s),"string"!=typeof s&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(s),this.emit(this._helpLongFlag),this.emit("afterHelp",i),P(this).forEach((t=>t.emit("afterAllHelp",i)))}helpOption(t,e){if("boolean"==typeof t)return this._hasHelpOption=t,this;this._helpFlags=t||this._helpFlags,this._helpDescription=e||this._helpDescription;const i=k(this._helpFlags);return this._helpShortFlag=i.shortFlag,this._helpLongFlag=i.longFlag,this}help(t){this.outputHelp(t);let e=v.exitCode||0;0===e&&t&&"function"!=typeof t&&t.error&&(e=1),this._exit(e,"commander.help","(outputHelp)")}addHelpText(t,e){const i=["beforeAll","before","after","afterAll"];if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${i.join("', '")}'`);const s=`${t}Help`;return this.on(s,(t=>{let i;i="function"==typeof e?e({error:t.error,command:t.command}):e,i&&t.write(`${i}\n`)})),this}}function V(t,e){t._hasHelpOption&&e.find((e=>e===t._helpLongFlag||e===t._helpShortFlag))&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"))}function F(t){return t.map((t=>{if(!t.startsWith("--inspect"))return t;let e,i,s="127.0.0.1",n="9229";return null!==(i=t.match(/^(--inspect(-brk)?)$/))?e=i[1]:null!==(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(e=i[1],/^\d+$/.test(i[3])?n=i[3]:s=i[3]):null!==(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(e=i[1],s=i[3],n=i[4]),e&&"0"!==n?`${e}=${s}:${parseInt(n)+1}`:t}))}function P(t){const e=[];for(let i=t;i;i=i.parent)e.push(i);return e}t.__exports.Command=S,exports.default=t.__exports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../../_virtual/error.js");class t extends Error{constructor(r,t,e){super(e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=r,this.nestedError=void 0}}r.__exports.CommanderError=t,r.__exports.InvalidArgumentError=class extends t{constructor(r){super(1,"commander.invalidArgument",r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}},exports.default=r.__exports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/help.js");require("./argument.js");var t=require("../../../_virtual/argument.js");const{humanReadableArgName:n}=t.__exports;e.__exports.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const[,n,o]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),r=e.createCommand(n).helpOption(!1);r.description(e._helpCommandDescription),o&&r.arguments(o),t.push(r)}return this.sortSubcommands&&t.sort(((e,t)=>e.name().localeCompare(t.name()))),t}compareOptions(e,t){const n=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden)),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),o=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||o){let r;r=n?o?e.createOption(e._helpFlags,e._helpDescription):e.createOption(e._helpShortFlag,e._helpDescription):e.createOption(e._helpLongFlag,e._helpDescription),t.push(r)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const e=n.options.filter((e=>!e.hidden));t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e._args.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""})),e._args.find((e=>e.description))?e._args:[]}subcommandTerm(e){const t=e._args.map((e=>n(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,n)=>Math.max(e,t.argumentTerm(n).length)),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t),o=t.helpWidth||80;function r(e,r){if(r){const i=`${e.padEnd(n+2)}${r}`;return t.wrap(i,o-2,n+2)}return e}function i(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let s=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);a.length>0&&(s=s.concat([t.wrap(a,o,0),""]));const p=t.visibleArguments(e).map((e=>r(t.argumentTerm(e),t.argumentDescription(e))));p.length>0&&(s=s.concat(["Arguments:",i(p),""]));const l=t.visibleOptions(e).map((e=>r(t.optionTerm(e),t.optionDescription(e))));if(l.length>0&&(s=s.concat(["Options:",i(l),""])),this.showGlobalOptions){const n=t.visibleGlobalOptions(e).map((e=>r(t.optionTerm(e),t.optionDescription(e))));n.length>0&&(s=s.concat(["Global Options:",i(n),""]))}const m=t.visibleCommands(e).map((e=>r(t.subcommandTerm(e),t.subcommandDescription(e))));return m.length>0&&(s=s.concat(["Commands:",i(m),""])),s.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,o=40){const r=new RegExp("[\\n][ \\f\\t\\v - \ufeff]+");if(e.match(r))return e;const i=t-n;if(i<o)return e;const s=e.slice(0,n),a=e.slice(n).replace("\r\n","\n"),p=" ".repeat(n),l="\\s",m=new RegExp(`\n|.{1,${i-1}}([${l}]|$)|[^${l}]+?([${l}]|$)`,"g");return s+(a.match(m)||[]).map(((e,t)=>"\n"===e?"":(t>0?p:"")+e.trimEnd())).join("\n")}},exports.default=e.__exports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../_virtual/option.js");require("./error.js");var i=require("../../../_virtual/error.js");const{InvalidArgumentError:s}=i.__exports;function e(t){let i,s;const e=t.split(/[ |,]+/);return e.length>1&&!/^[[<]/.test(e[1])&&(i=e.shift()),s=e.shift(),!i&&/^-[^-]$/.test(s)&&(i=s,s=void 0),{shortFlag:i,longFlag:s}}t.__exports.Option=class{constructor(t,i){this.flags=t,this.description=i||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;const s=e(t);this.short=s.shortFlag,this.long=s.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(t,i){return this.defaultValue=t,this.defaultValueDescription=i,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let i=t;return"string"==typeof t&&(i={[t]:!0}),this.implied=Object.assign(this.implied||{},i),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,i){return i!==this.defaultValue&&Array.isArray(i)?i.concat(t):[t]}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new s(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((t,i)=>t+i[0].toUpperCase()+i.slice(1)))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},t.__exports.splitOptionFlags=e,t.__exports.DualOptions=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach((t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)})),this.negativeOptions.forEach(((t,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)}))}valueFromOption(t,i){const s=i.attributeName();if(!this.dualOptions.has(s))return!0;const e=this.negativeOptions.get(s).presetArg,r=void 0!==e&&e;return i.negate===(r===t)}},exports.default=t.__exports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../_virtual/suggestSimilar.js");const e=3;t.__exports.suggestSimilar=function(t,n){if(!n||0===n.length)return"";n=Array.from(new Set(n));const r=t.startsWith("--");r&&(t=t.slice(2),n=n.map((t=>t.slice(2))));let l=[],o=e;return n.forEach((n=>{if(n.length<=1)return;const r=function(t,n){if(Math.abs(t.length-n.length)>e)return Math.max(t.length,n.length);const r=[];for(let e=0;e<=t.length;e++)r[e]=[e];for(let t=0;t<=n.length;t++)r[0][t]=t;for(let e=1;e<=n.length;e++)for(let l=1;l<=t.length;l++){let o=1;o=t[l-1]===n[e-1]?0:1,r[l][e]=Math.min(r[l-1][e]+1,r[l][e-1]+1,r[l-1][e-1]+o),l>1&&e>1&&t[l-1]===n[e-2]&&t[l-2]===n[e-1]&&(r[l][e]=Math.min(r[l][e],r[l-2][e-2]+1))}return r[t.length][n.length]}(t,n),h=Math.max(t.length,n.length);(h-r)/h>.4&&(r<o?(o=r,l=[n]):r===o&&l.push(n))})),l.sort(((t,e)=>t.localeCompare(e))),r&&(l=l.map((t=>`--${t}`))),l.length>1?`\n(Did you mean one of ${l.join(", ")}?)`:1===l.length?`\n(Did you mean ${l[0]}?)`:""},exports.default=t.__exports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ui/prompt.mjs.js"),r=require("../../../@inquirer/core/dist/esm/lib/Separator.mjs.js"),t=require("../../../@inquirer/input/dist/esm/index.mjs.js"),s=require("../../../@inquirer/select/dist/esm/index.mjs.js"),i=require("../../../@inquirer/number/dist/esm/index.mjs.js"),u=require("../../../@inquirer/confirm/dist/esm/index.mjs.js"),n=require("../../../@inquirer/rawlist/dist/esm/index.mjs.js"),o=require("../../../@inquirer/expand/dist/esm/index.mjs.js"),d=require("../../../@inquirer/checkbox/dist/esm/index.mjs.js"),m=require("../../../@inquirer/password/dist/esm/index.mjs.js"),a=require("../../../@inquirer/editor/dist/esm/index.mjs.js"),p=require("../../../@inquirer/search/dist/esm/index.mjs.js");const c={input:t.default,select:s.default,list:s.default,number:i.default,confirm:u.default,rawlist:n.default,expand:o.default,checkbox:d.default,password:m.default,editor:a.default,search:p.default};function j(r){function t(s,i){const u=new e.default(t.prompts,r);try{return u.run(s,i)}catch(e){const r=Promise.reject(e);return Object.assign(r,{ui:u})}}return t.prompts={...c},t.registerPrompt=function(e,r){return t.prompts[e]=r,this},t.restoreDefaultPrompts=function(){t.prompts={...c}},t}const l=j();var f={prompt:l,ui:{Prompt:e.default},createPromptModule:j,registerPrompt:function(e,r){l.registerPrompt(e,r)},restoreDefaultPrompts:function(){l.restoreDefaultPrompts()},Separator:r.Separator};exports.createPromptModule=j,exports.default=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node:readline"),t=require("../../../../run-async/index.js"),r=require("mute-stream"),s=require("ansi-escapes"),o=require("../../../../rxjs/dist/esm5/internal/observable/empty.js"),n=require("../../../../rxjs/dist/esm5/internal/observable/from.js"),i=require("../../../../rxjs/dist/esm5/internal/util/isObservable.js"),a=require("../../../../rxjs/dist/esm5/internal/operators/concatMap.js"),c=require("../../../../rxjs/dist/esm5/internal/lastValueFrom.js"),u=require("../../../../rxjs/dist/esm5/internal/operators/reduce.js"),p=require("../../../../rxjs/dist/esm5/internal/observable/defer.js"),l=require("../../../../rxjs/dist/esm5/internal/observable/of.js"),f=require("../../../../rxjs/dist/esm5/internal/operators/filter.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(e),d=h(r),y=h(s);const j={set:(e,t="",r)=>{let s=e;t.split(".").forEach(((e,t,o)=>{"__proto__"!==e&&"constructor"!==e&&(t===o.length-1?s[e]=r:e in s&&"object"==typeof s[e]||(s[e]={}),s=s[e])}))},get:(e,t="",r)=>{const s=r=>String.prototype.split.call(t,r).filter(Boolean).reduce(((e,t)=>null!=e?e[t]:e),e),o=s(/[,[\]]+?/)||s(/[,.[\]]+?/);return void 0===o||o===e?r:o}};function b(e,r,s){if(r in e){const o=e[r];if("function"==typeof o)return n.from(t.default(o)(s).then((t=>Object.assign(e,{[r]:t}))))}return l.of(e)}class w extends Error{name="TTYError";isTtyError=!0}exports._=j,exports.default=class{prompts;answers={};process=o.EMPTY;onClose;opt;rl;constructor(e,t){this.opt=t,this.prompts=e}run(e,t){let r;this.answers="object"==typeof t?{...t}:{},r=function(e){return Array.isArray(e)}(e)?n.from(e):i.isObservable(e)?e:function(e){return Object.values(e).every((e=>"object"==typeof e&&!Array.isArray(e)&&null!=e))}(e)?n.from(Object.entries(e).map((([e,t])=>Object.assign({},t,{name:e})))):n.from([e]),this.process=r.pipe(a.concatMap((e=>this.processQuestion(e))));const s=c.lastValueFrom(this.process.pipe(u.reduce(((e,t)=>(j.set(e,t.name,t.answer),e)),this.answers))).then((()=>this.onCompletion()),(e=>this.onError(e)));return Object.assign(s,{ui:this})}onCompletion(){return this.close(),this.answers}onError(e){return this.close(),Promise.reject(e)}processQuestion(e){return e={...e},p.defer((()=>l.of(e).pipe(a.concatMap(this.setDefaultType),a.concatMap(this.filterIfRunnable),a.concatMap((e=>b(e,"message",this.answers))),a.concatMap((e=>b(e,"default",this.answers))),a.concatMap((e=>b(e,"choices",this.answers))),a.concatMap((e=>{const{choices:t}=e;return Array.isArray(t)&&(e.choices=t.map((e=>"string"==typeof e||"number"==typeof e?{name:e,value:e}:"value"in e?e:{...e,value:e.name}))),l.of(e)})),a.concatMap((e=>this.fetchAnswer(e))))))}fetchAnswer(e){const t=this.prompts[e.type];if(null==t)throw new Error(`Prompt for type ${e.type} not found`);return function(e){return Boolean(e.prototype&&"run"in e.prototype&&"function"==typeof e.prototype.run)}(t)?p.defer((()=>{const r=m.default.createInterface(function(e={}){e.skipTTYChecks=void 0===e.skipTTYChecks||e.skipTTYChecks;const t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY)throw new w("Prompts can not be meaningfully rendered in non-TTY environments");const r=new d.default;r.pipe(e.output||process.stdout);const s=r;return{terminal:!0,...e,input:t,output:s}}(this.opt));r.resume();const s=()=>{r.removeListener("SIGINT",this.onForceClose),r.setPrompt(""),r.output.unmute(),r.output.write(y.default.cursorShow),r.output.end(),r.close()};this.onClose=s,this.rl=r,process.on("exit",this.onForceClose),r.on("SIGINT",this.onForceClose);const o=new t(e,r,this.answers);return n.from(o.run().then((t=>(s(),this.onClose=void 0,this.rl=void 0,{name:e.name,answer:t}))))})):p.defer((()=>n.from(t(e,this.opt).then((t=>({name:e.name,answer:t}))))))}onForceClose=()=>{this.close(),process.kill(process.pid,"SIGINT"),console.log("")};close=()=>{process.removeListener("exit",this.onForceClose),"function"==typeof this.onClose&&this.onClose()};setDefaultType=e=>(this.prompts[e.type]||(e=Object.assign({},e,{type:"input"})),p.defer((()=>l.of(e))));filterIfRunnable=e=>{if(!0!==e.askAnswered&&void 0!==j.get(this.answers,e.name))return o.EMPTY;const{when:r}=e;return!1===r?o.EMPTY:"function"!=typeof r?l.of(e):p.defer((()=>n.from(t.default(r)(this.answers).then((t=>{if(t)return e}))).pipe(f.filter((e=>null!=e)))))}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../_virtual/index2.js");function e(n){return!!n&&("object"==typeof n||"function"==typeof n)&&"function"==typeof n.then}var r=n.runAsync.exports=function(n,r,t="async"){return"string"==typeof r&&(t=r,r=void 0),r=r||function(){},function(){var o=arguments,c=this,a=new Promise((function(r,a){var s=!1;const u=function(n){s&&console.warn("Run-async promise already resolved."),s=!0,r(n)};var l=!1;const i=function(n){l&&console.warn("Run-async promise already rejected."),l=!0,a(n)};var y,p=!1,f=!1,d=!1,v=function(){return d?(console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){}):(f&&console.warn("Run-async wrapped function (async) returned a promise.\nCalls to async() callback can have unexpected results."),p=!0,function(n,e){n?i(n):u(e)})};y=c&&t&&Proxy?new Proxy(c,{get(n,e){return e===t?(e in n&&console.warn(`${t} property is been shadowed by run-sync`),v):Reflect.get(...arguments)}}):{[t]:v};var b=n.apply(y,Array.prototype.slice.call(o));p?e(b)&&console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve."):e(b)?(f=!0,b.then(u,i)):u(b),d=!0}));return a.then(r.bind(null,null),r),a}};r.cb=function(n,e){return r((function(){var e=Array.prototype.slice.call(arguments);return e.length===n.length-1&&e.push(this.async()),n.apply(this,e)}),e)};var t=n.runAsync.exports;exports.default=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./Subscriber.js"),e=require("./Subscription.js"),t=require("./symbol/observable.js"),n=require("./util/pipe.js"),i=require("./config.js"),o=require("./util/isFunction.js"),u=require("./util/errorContext.js"),s=function(){function i(r){r&&(this._subscribe=r)}return i.prototype.lift=function(r){var e=new i;return e.source=this,e.operator=r,e},i.prototype.subscribe=function(t,n,i){var s,c=this,b=(s=t)&&s instanceof r.Subscriber||function(r){return r&&o.isFunction(r.next)&&o.isFunction(r.error)&&o.isFunction(r.complete)}(s)&&e.isSubscription(s)?t:new r.SafeSubscriber(t,n,i);return u.errorContext((function(){var r=c,e=r.operator,t=r.source;b.add(e?e.call(b,t):t?c._subscribe(b):c._trySubscribe(b))})),b},i.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(e){r.error(e)}},i.prototype.forEach=function(e,t){var n=this;return new(t=c(t))((function(t,i){var o=new r.SafeSubscriber({next:function(r){try{e(r)}catch(r){i(r),o.unsubscribe()}},error:i,complete:t});n.subscribe(o)}))},i.prototype._subscribe=function(r){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(r)},i.prototype[t.observable]=function(){return this},i.prototype.pipe=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return n.pipeFromArray(r)(this)},i.prototype.toPromise=function(r){var e=this;return new(r=c(r))((function(r,t){var n;e.subscribe((function(r){return n=r}),(function(r){return t(r)}),(function(){return r(n)}))}))},i.create=function(r){return new i(r)},i}();function c(r){var e;return null!==(e=null!=r?r:i.config.Promise)&&void 0!==e?e:Promise}exports.Observable=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../tslib/tslib.es6.js"),e=require("./util/isFunction.js"),r=require("./Subscription.js"),i=require("./config.js"),o=require("./util/reportUnhandledError.js"),n=require("./util/noop.js"),s=function(e){function i(t){var i=e.call(this)||this;return i.isStopped=!1,t?(i.destination=t,r.isSubscription(t)&&t.add(i)):i.destination=d,i}return t.__extends(i,e),i.create=function(t,e,r){return new l(t,e,r)},i.prototype.next=function(t){this.isStopped||this._next(t)},i.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},i.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},i.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},i.prototype._next=function(t){this.destination.next(t)},i.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},i.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},i}(r.Subscription),p=Function.prototype.bind;function c(t,e){return p.call(t,e)}var u=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){a(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){a(t)}else a(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){a(t)}},t}(),l=function(r){function o(t,o,n){var s,p,l=r.call(this)||this;e.isFunction(t)||!t?s={next:null!=t?t:void 0,error:null!=o?o:void 0,complete:null!=n?n:void 0}:l&&i.config.useDeprecatedNextContext?((p=Object.create(t)).unsubscribe=function(){return l.unsubscribe()},s={next:t.next&&c(t.next,p),error:t.error&&c(t.error,p),complete:t.complete&&c(t.complete,p)}):s=t;return l.destination=new u(s),l}return t.__extends(o,r),o}(s);function a(t){o.reportUnhandledError(t)}var d={closed:!0,next:n.noop,error:function(t){throw t},complete:n.noop};exports.EMPTY_OBSERVER=d,exports.SafeSubscriber=l,exports.Subscriber=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../../../tslib/tslib.es6.js"),e=require("./util/isFunction.js"),i=require("./util/UnsubscriptionError.js"),t=require("./util/arrRemove.js"),n=function(){function n(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}var a;return n.prototype.unsubscribe=function(){var t,n,a,o,u;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var c=r.__values(l),f=c.next();!f.done;f=c.next()){f.value.remove(this)}}catch(r){t={error:r}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}else l.remove(this);var h=this.initialTeardown;if(e.isFunction(h))try{h()}catch(r){u=r instanceof i.UnsubscriptionError?r.errors:[r]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var _=r.__values(p),d=_.next();!d.done;d=_.next()){var v=d.value;try{s(v)}catch(e){u=null!=u?u:[],e instanceof i.UnsubscriptionError?u=r.__spreadArray(r.__spreadArray([],r.__read(u)),r.__read(e.errors)):u.push(e)}}}catch(r){a={error:r}}finally{try{d&&!d.done&&(o=_.return)&&o.call(_)}finally{if(a)throw a.error}}}if(u)throw new i.UnsubscriptionError(u)}},n.prototype.add=function(r){var e;if(r&&r!==this)if(this.closed)s(r);else{if(r instanceof n){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(r)}},n.prototype._hasParent=function(r){var e=this._parentage;return e===r||Array.isArray(e)&&e.includes(r)},n.prototype._addParent=function(r){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(r),e):e?[e,r]:r},n.prototype._removeParent=function(r){var e=this._parentage;e===r?this._parentage=null:Array.isArray(e)&&t.arrRemove(e,r)},n.prototype.remove=function(r){var e=this._finalizers;e&&t.arrRemove(e,r),r instanceof n&&r._removeParent(this)},n.EMPTY=((a=new n).closed=!0,a),n}();function s(r){e.isFunction(r)?r():r.unsubscribe()}n.EMPTY,exports.Subscription=n,exports.isSubscription=function(r){return r instanceof n||r&&"closed"in r&&e.isFunction(r.remove)&&e.isFunction(r.add)&&e.isFunction(r.unsubscribe)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};exports.config=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./util/EmptyError.js");exports.lastValueFrom=function(r,t){var o="object"==typeof t;return new Promise((function(u,n){var i,s=!1;r.subscribe({next:function(e){i=e,s=!0},error:n,complete:function(){s?u(i):o?u(t.defaultValue):n(new e.EmptyError)}})}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../Observable.js"),r=require("./innerFrom.js");exports.defer=function(n){return new e.Observable((function(e){r.innerFrom(n()).subscribe(e)}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=new(require("../Observable.js").Observable)((function(e){return e.complete()}));exports.EMPTY=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../scheduled/scheduled.js"),r=require("./innerFrom.js");exports.from=function(s,u){return u?e.scheduled(s,u):r.innerFrom(s)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../tslib/tslib.es6.js"),r=require("../util/isArrayLike.js"),t=require("../util/isPromise.js"),n=require("../Observable.js"),i=require("../util/isInteropObservable.js"),s=require("../util/isAsyncIterable.js"),o=require("../util/throwUnobservableError.js"),u=require("../util/isIterable.js"),a=require("../util/isReadableStreamLike.js"),l=require("../util/isFunction.js"),c=require("../util/reportUnhandledError.js"),b=require("../symbol/observable.js");function f(e){return new n.Observable((function(r){var t=e[b.observable]();if(l.isFunction(t.subscribe))return t.subscribe(r);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function v(e){return new n.Observable((function(r){for(var t=0;t<e.length&&!r.closed;t++)r.next(e[t]);r.complete()}))}function d(e){return new n.Observable((function(r){e.then((function(e){r.closed||(r.next(e),r.complete())}),(function(e){return r.error(e)})).then(null,c.reportUnhandledError)}))}function p(r){return new n.Observable((function(t){var n,i;try{for(var s=e.__values(r),o=s.next();!o.done;o=s.next()){var u=o.value;if(t.next(u),t.closed)return}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}t.complete()}))}function m(r){return new n.Observable((function(t){(function(r,t){var n,i,s,o;return e.__awaiter(this,void 0,void 0,(function(){var u,a;return e.__generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=e.__asyncValues(r),l.label=1;case 1:return[4,n.next()];case 2:if((i=l.sent()).done)return[3,4];if(u=i.value,t.next(u),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),s={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),i&&!i.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(r,t).catch((function(e){return t.error(e)}))}))}function y(e){return m(a.readableStreamLikeToAsyncGenerator(e))}exports.fromArrayLike=v,exports.fromAsyncIterable=m,exports.fromInteropObservable=f,exports.fromIterable=p,exports.fromPromise=d,exports.fromReadableStreamLike=y,exports.innerFrom=function(e){if(e instanceof n.Observable)return e;if(null!=e){if(i.isInteropObservable(e))return f(e);if(r.isArrayLike(e))return v(e);if(t.isPromise(e))return d(e);if(s.isAsyncIterable(e))return m(e);if(u.isIterable(e))return p(e);if(a.isReadableStreamLike(e))return y(e)}throw o.createInvalidObservableTypeError(e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../util/args.js"),e=require("./from.js");exports.of=function(){for(var o=[],t=0;t<arguments.length;t++)o[t]=arguments[t];var u=r.popScheduler(o);return e.from(o,u)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../../../../tslib/tslib.es6.js");var e=function(e){function t(r,t,s,i,o,n){var u=e.call(this,r)||this;return u.onFinalize=o,u.shouldUnsubscribe=n,u._next=t?function(e){try{t(e)}catch(e){r.error(e)}}:e.prototype._next,u._error=i?function(e){try{i(e)}catch(e){r.error(e)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=s?function(){try{s()}catch(e){r.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,u}return r.__extends(t,e),t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var t=this.closed;e.prototype.unsubscribe.call(this),!t&&(null===(r=this.onFinalize)||void 0===r||r.call(this))}},t}(require("../Subscriber.js").Subscriber);exports.OperatorSubscriber=e,exports.createOperatorSubscriber=function(r,t,s,i,o){return new e(r,t,s,i,o)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./mergeMap.js"),r=require("../util/isFunction.js");exports.concatMap=function(t,i){return r.isFunction(i)?e.mergeMap(t,i,1):e.mergeMap(t,1)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/lift.js"),r=require("./OperatorSubscriber.js");exports.filter=function(t,u){return e.operate((function(e,i){var s=0;e.subscribe(r.createOperatorSubscriber(i,(function(e){return t.call(u,e,s++)&&i.next(e)})))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/lift.js"),r=require("./OperatorSubscriber.js");exports.map=function(t,u){return e.operate((function(e,i){var s=0;e.subscribe(r.createOperatorSubscriber(i,(function(e){i.next(t.call(u,e,s++))})))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../observable/innerFrom.js"),r=require("../util/executeSchedule.js"),n=require("./OperatorSubscriber.js");exports.mergeInternals=function(t,u,c,i,o,s,f,a){var l=[],b=0,p=0,v=!1,h=function(){!v||l.length||b||u.complete()},x=function(e){return b<i?d(e):l.push(e)},d=function(t){s&&u.next(t),b++;var a=!1;e.innerFrom(c(t,p++)).subscribe(n.createOperatorSubscriber(u,(function(e){null==o||o(e),s?x(e):u.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{b--;for(var e=function(){var e=l.shift();f?r.executeSchedule(u,f,(function(){return d(e)})):d(e)};l.length&&b<i;)e();h()}catch(e){u.error(e)}})))};return t.subscribe(n.createOperatorSubscriber(u,x,(function(){v=!0,h()}))),function(){null==a||a()}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./map.js"),r=require("../observable/innerFrom.js"),n=require("../util/lift.js"),t=require("./mergeInternals.js"),i=require("../util/isFunction.js");exports.mergeMap=function u(o,s,a){return void 0===a&&(a=1/0),i.isFunction(s)?u((function(n,t){return e.map((function(e,r){return s(n,e,t,r)}))(r.innerFrom(o(n,t)))}),a):("number"==typeof s&&(a=s),n.operate((function(e,r){return t.mergeInternals(e,r,o,a)})))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/executeSchedule.js"),r=require("../util/lift.js"),t=require("./OperatorSubscriber.js");exports.observeOn=function(u,n){return void 0===n&&(n=0),r.operate((function(r,c){r.subscribe(t.createOperatorSubscriber(c,(function(r){return e.executeSchedule(c,u,(function(){return c.next(r)}),n)}),(function(){return e.executeSchedule(c,u,(function(){return c.complete()}),n)}),(function(r){return e.executeSchedule(c,u,(function(){return c.error(r)}),n)})))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./scanInternals.js"),r=require("../util/lift.js");exports.reduce=function(t,n){return r.operate(e.scanInternals(t,n,arguments.length>=2,!1,!0))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./OperatorSubscriber.js");exports.scanInternals=function(r,t,n,c,s){return function(u,o){var i=n,a=t,b=0;u.subscribe(e.createOperatorSubscriber(o,(function(e){var t=b++;a=i?r(a,e,t):(i=!0,e),c&&o.next(a)}),s&&function(){i&&o.next(a),o.complete()}))}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/lift.js");exports.subscribeOn=function(r,t){return void 0===t&&(t=0),e.operate((function(e,u){u.add(r.schedule((function(){return e.subscribe(u)}),t))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../Observable.js");exports.scheduleArray=function(r,t){return new e.Observable((function(e){var s=0;return t.schedule((function(){s===r.length?e.complete():(e.next(r[s++]),e.closed||this.schedule())}))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../Observable.js"),t=require("../util/executeSchedule.js");exports.scheduleAsyncIterable=function(n,r){if(!n)throw new Error("Iterable cannot be null");return new e.Observable((function(e){t.executeSchedule(e,r,(function(){var u=n[Symbol.asyncIterator]();t.executeSchedule(e,r,(function(){u.next().then((function(t){t.done?e.complete():e.next(t.value)}))}),0,!0)}))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../Observable.js"),r=require("../symbol/iterator.js"),t=require("../util/isFunction.js"),u=require("../util/executeSchedule.js");exports.scheduleIterable=function(n,i){return new e.Observable((function(e){var c;return u.executeSchedule(e,i,(function(){c=n[r.iterator](),u.executeSchedule(e,i,(function(){var r,t,u;try{t=(r=c.next()).value,u=r.done}catch(r){return void e.error(r)}u?e.complete():e.next(t)}),0,!0)})),function(){return t.isFunction(null==c?void 0:c.return)&&c.return()}}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../observable/innerFrom.js"),r=require("../operators/observeOn.js"),s=require("../operators/subscribeOn.js");exports.scheduleObservable=function(o,n){return e.innerFrom(o).pipe(s.subscribeOn(n),r.observeOn(n))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../observable/innerFrom.js"),r=require("../operators/observeOn.js"),s=require("../operators/subscribeOn.js");exports.schedulePromise=function(o,i){return e.innerFrom(o).pipe(s.subscribeOn(i),r.observeOn(i))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./scheduleAsyncIterable.js"),r=require("../util/isReadableStreamLike.js");exports.scheduleReadableStreamLike=function(t,a){return e.scheduleAsyncIterable(r.readableStreamLikeToAsyncGenerator(t),a)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./scheduleObservable.js"),r=require("./schedulePromise.js"),s=require("./scheduleArray.js"),i=require("./scheduleIterable.js"),u=require("./scheduleAsyncIterable.js"),l=require("../util/isInteropObservable.js"),t=require("../util/isPromise.js"),a=require("../util/isArrayLike.js"),b=require("../util/isIterable.js"),c=require("../util/isAsyncIterable.js"),d=require("../util/throwUnobservableError.js"),n=require("../util/isReadableStreamLike.js"),o=require("./scheduleReadableStreamLike.js");exports.scheduled=function(h,j){if(null!=h){if(l.isInteropObservable(h))return e.scheduleObservable(h,j);if(a.isArrayLike(h))return s.scheduleArray(h,j);if(t.isPromise(h))return r.schedulePromise(h,j);if(c.isAsyncIterable(h))return u.scheduleAsyncIterable(h,j);if(b.isIterable(h))return i.scheduleIterable(h,j);if(n.isReadableStreamLike(h))return o.scheduleReadableStreamLike(h,j)}throw d.createInvalidObservableTypeError(h)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../tslib/tslib.es6.js"),r={setTimeout:function(r,t){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return setTimeout.apply(void 0,e.__spreadArray([r,t],e.__read(i)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};exports.timeoutProvider=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function t(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(exports,"__esModule",{value:!0});var e=t();exports.getSymbolIterator=t,exports.iterator=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="function"==typeof Symbol&&Symbol.observable||"@@observable";exports.observable=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./createErrorClass.js").createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));exports.EmptyError=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./createErrorClass.js").createErrorClass((function(r){return function(e){r(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(r,e){return e+1+") "+r.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));exports.UnsubscriptionError=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./isScheduler.js");exports.popScheduler=function(r){return e.isScheduler((t=r)[t.length-1])?r.pop():void 0;var t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.arrRemove=function(e,r){if(e){var t=e.indexOf(r);0<=t&&e.splice(t,1)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createErrorClass=function(r){var t=r((function(r){Error.call(r),r.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.errorContext=function(e){e()};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.executeSchedule=function(e,u,t,d,s){void 0===d&&(d=0),void 0===s&&(s=!1);var i=u.schedule((function(){t(),s?e.add(this.schedule(null,d)):this.unsubscribe()}),d);if(e.add(i),!s)return i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.identity=function(e){return e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./isFunction.js");exports.isAsyncIterable=function(r){return Symbol.asyncIterator&&e.isFunction(null==r?void 0:r[Symbol.asyncIterator])};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isFunction=function(e){return"function"==typeof e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../symbol/observable.js"),r=require("./isFunction.js");exports.isInteropObservable=function(s){return r.isFunction(s[e.observable])};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../symbol/iterator.js"),r=require("./isFunction.js");exports.isIterable=function(t){return r.isFunction(null==t?void 0:t[e.iterator])};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../Observable.js"),s=require("./isFunction.js");exports.isObservable=function(r){return!!r&&(r instanceof e.Observable||s.isFunction(r.lift)&&s.isFunction(r.subscribe))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./isFunction.js");exports.isPromise=function(i){return e.isFunction(null==i?void 0:i.then)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../tslib/tslib.es6.js"),r=require("./isFunction.js");exports.isReadableStreamLike=function(e){return r.isFunction(null==e?void 0:e.getReader)},exports.readableStreamLikeToAsyncGenerator=function(r){return e.__asyncGenerator(this,arguments,(function(){var t,a,s;return e.__generator(this,(function(n){switch(n.label){case 0:t=r.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,e.__await(t.read())];case 3:return a=n.sent(),s=a.value,a.done?[4,e.__await(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,e.__await(s)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./isFunction.js");exports.isScheduler=function(r){return r&&e.isFunction(r.schedule)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./isFunction.js");function r(r){return t.isFunction(null==r?void 0:r.lift)}exports.hasLift=r,exports.operate=function(t){return function(e){if(r(e))return e.lift((function(r){try{return t(r,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.noop=function(){};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./identity.js");exports.pipeFromArray=function(r){return 0===r.length?e.identity:1===r.length?r[0]:function(e){return r.reduce((function(e,r){return r(e)}),e)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../scheduler/timeoutProvider.js");exports.reportUnhandledError=function(r){e.timeoutProvider.setTimeout((function(){throw r}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},t(r,n)};function r(t){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&t[r],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t){return this instanceof n?(this.v=t,this):new n(t)}"function"==typeof SuppressedError&&SuppressedError,exports.__asyncGenerator=function(t,r,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,i=e.apply(t,r||[]),a=[];return o={},u("next"),u("throw"),u("return"),o[Symbol.asyncIterator]=function(){return this},o;function u(t){i[t]&&(o[t]=function(r){return new Promise((function(n,e){a.push([t,r,n,e])>1||c(t,r)}))})}function c(t,r){try{(e=i[t](r)).value instanceof n?Promise.resolve(e.value.v).then(l,f):s(a[0][2],e)}catch(t){s(a[0][3],t)}var e}function l(t){c("next",t)}function f(t){c("throw",t)}function s(t,r){t(r),a.shift(),a.length&&c(a[0][0],a[0][1])}},exports.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=r(t),n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n);function o(r){n[r]=t[r]&&function(n){return new Promise((function(e,o){(function(t,r,n,e){Promise.resolve(e).then((function(r){t({value:r,done:n})}),r)})(e,o,(n=t[r](n)).done,n.value)}))}}},exports.__await=n,exports.__awaiter=function(t,r,n,e){return new(n||(n=Promise))((function(o,i){function a(t){try{c(e.next(t))}catch(t){i(t)}}function u(t){try{c(e.throw(t))}catch(t){i(t)}}function c(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}c((e=e.apply(t,r||[])).next())}))},exports.__extends=function(r,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)},exports.__generator=function(t,r){var n,e,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(n=1,e&&(o=2&u[0]?e.return:u[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,u[1])).done)return o;switch(e=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,e=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=r.call(t,a)}catch(t){u=[6,t],e=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},exports.__read=function(t,r){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,o,i=n.call(t),a=[];try{for(;(void 0===r||r-- >0)&&!(e=i.next()).done;)a.push(e.value)}catch(t){o={error:t}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},exports.__spreadArray=function(t,r,n){if(n||2===arguments.length)for(var e,o=0,i=r.length;o<i;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))},exports.__values=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.3.19",i="FE command line tool",s="bin/an-cli.js",t={dev:"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript -w",build:"rimraf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",pub:"bash publish.sh",ts:"tsc ./src/int.ts --noEmit --watch"},p={anl:"bin/an-cli.js"},l="Gleason <bianliuzhu@gmail.com>",r={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.3","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},o={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"^10.0.0",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},n=["typescript","cli","typescript 脚手架","ts 脚手架","ts-cli","脚手架"],c=["package.json","README.md","lib","template"],u={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},a="commonjs",g={name:"anl",version:e,description:i,main:s,scripts:t,bin:p,author:l,license:"ISC",devDependencies:r,dependencies:o,keywords:n,files:c,repository:u,type:a};exports.author=l,exports.bin=p,exports.default=g,exports.dependencies=o,exports.description=i,exports.devDependencies=r,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=t,exports.type=a,exports.version=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const r="\t";exports.default=class{defaultReturn={headerRef:"",renderStr:""};schemas={};schemasMap=new Map;config;constructor(e,r){this.schemas=e,this.config=r}typeNameToFileName(e){return e.replace(/_/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().replace(/-+/g,"-")}nameTheHumpCenterStroke(e){const r=e.replace("#/components/schemas/","");return{typeName:r,fileName:this.typeNameToFileName(r)}}parseRef(e){if(!e)return{headerRefStr:"",typeName:""};const{fileName:r,typeName:t}=this.nameTheHumpCenterStroke(e);return{headerRefStr:`import type { ${t} } from './${r}';`,typeName:t}}parseObject(e,r){let t="",s="";if("object"===e.type){const a=e;if("object"==typeof a.additionalProperties){const e=this.parseArray(a.additionalProperties,r)??this.defaultReturn;t=e.headerRef,s=e.renderStr}}return{headerRef:t,renderStr:s}}parseArray(e,t){let s="",a="";const n=e;if(n.items?.$ref){const{headerRefStr:e,typeName:i}=this.parseRef(n.items.$ref);s=e,a=`${r}${t}?: Array<${i}>;`}else{const e=n.items;a=`${r}${t}?: Array<${"integer"===e.type?"number":e.type}>;`}return{headerRef:s,renderStr:a}}parseBoolean(e,t){return"boolean"===e.type?`${r}${t}?: boolean;`:""}parseEnum(e,t){if("integer"===e.type&&Array.isArray(e.enum)){return[`export enum ${t} {`,...e.enum.map((e=>`${r}NUMBER_${e} = ${e},`)),"}"].join("\n")}return""}parseInteger(e,t){return Array.isArray(e.enum)?this.parseEnum(e,t):`${r}${t}?: number;`}parseNumber(e,t){return"number"===e.type?`${r}${t}?: number;`:""}parseString(e,t){return"string"===e.type?{headerRef:"",renderStr:`${r}${t}?: string;`}:null}parseProperties(e,t){const s=[],a=[];for(const t in e){const n=e[t];if(n?.$ref){const{headerRefStr:e,typeName:i}=this.parseRef(n.$ref);a.includes(e)||a.push(e),s.push(`${r}${t}?: ${i};`)}else{if("allOf"in n){const e=n.allOf?.[0];if(e?.$ref){const{headerRefStr:n,typeName:i}=this.parseRef(e.$ref);a.includes(n)||a.push(n),s.push(`${r}${t}?: ${i};`);continue}}switch(n.type){case"array":{const e=this.parseArray(n,t)??this.defaultReturn;s.push(e.renderStr),a.includes(e.headerRef)||a.push(e.headerRef)}break;case"boolean":s.push(this.parseBoolean(n,t));break;case"integer":s.push(this.parseInteger(n,t));break;case"number":s.push(this.parseNumber(n,t));break;case"string":s.push(this.parseString(n,t)?.renderStr??"");break;case"object":{const{headerRef:e,renderStr:r}=this.parseObject(n,t)??this.defaultReturn;s.push(r),a.includes(e)||a.push(e)}}}}const n=`export interface ${t} {`;return[...a,"\n",n,...s,"}"].join("\n")}async parse(){for(const e in this.schemas){const r=this.schemas[e],t=r;if("$ref"in r){console.warn("ReferenceObject 未处理");continue}const s="type"in t?t:null,a=this.typeNameToFileName(e);if(s)if("items"in s)console.log("未处理---------------------------\x3e",s.items);else{let r="";switch(s.type){case"boolean":r=this.parseBoolean(s,e);break;case"integer":r=this.parseInteger(s,e);break;case"number":r=this.parseNumber(s,e);break;case"object":r=this.parseProperties(s.properties,e);break;case"string":r=this.parseString(s,e)?.renderStr??""}this.schemasMap.set(e,{fileName:a,content:r})}}}async writeFileHandler(){const r=[],t=[],s=`${this.config.saveTypeFolderPath}/models/`;for(const[,a]of this.schemasMap){const n=async({fileName:r,content:a})=>{t.push(`export * from './${r}';`),await e.writeFileRecursive(`${s}${r}.ts`,a)};r.push(n(a))}await Promise.all(r),await e.writeFileRecursive(`${s}/index.ts`,t.join("\n")),console.log("components done!")}async handle(){await this.parse(),await this.writeFileHandler()}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("http"),t=require("https"),r=require("path"),o=require("../tools/index.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=s(e),u=s(t),c=s(r);function i({swaggerJsonUrl:e,headers:t={}}){return new Promise(((r,o)=>{let s;const c=/^https/.test(e)?u.default.request:n.default.request;console.info(`Request Start: ${e}`);const i=c(e,{method:"GET",rejectUnauthorized:!1,headers:{Accept:"*/*","Accept-Encoding":"utf-8","Content-Type":"application/x-www-form-urlencoded",...t}},(t=>{t.setEncoding("utf-8");let n="";t.on("data",(e=>{n+=e.toString()})),t.on("end",(()=>{clearTimeout(s);try{const t=JSON.parse(n);console.info(`Request Successful: ${e}`),r(t)}catch(t){console.error(`Request Failed: ${e}`,!0),o(t)}})),t.on("error",(t=>{console.error(`Request Failed: ${e}`,!0),o(t)}))}));i.on("timeout",(e=>{console.error(e,!0),o(e)})),s=setTimeout((()=>{const t=new Error;t.name="Request Timeout",t.message=e,i.emit("timeout",t)}),15e3),i.end()}))}exports.getSwaggerJson=async function(e){if(/^https?:\/\//.test(e.swaggerJsonUrl))return i(e);try{const t=o.requireModule(c.default.join("",e.swaggerJsonUrl));return Promise.resolve(t)}catch(e){return console.error(e,!0),Promise.reject(e)}},exports.requestJson=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/index.js");const t="\t";var n;!function(e){e.GET="get",e.PUT="put",e.POST="post",e.DELETE="delete",e.OPTIONS="options",e.HEAD="head",e.PATCH="patch",e.TRACE="trace"}(n||(n={}));const s={payload:{path:[],query:[],body:[]},response:"",_response:"",fileName:"",apiName:"",typeName:"",method:"",requestPath:"",summary:""};class r{pathsObject={};nonArrayType=["boolean","object","number","string","integer"];pathKey="";contentBody=s;Map=new Map;config;constructor(e,t){this.pathsObject=e,this.config=t}typeNameToFileName(e){return e=(e=(e=e.replace(/_/g,"-")).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()).replace(/-+/g,"-")}propertiesParse(e){const n=[];for(const s in e){const r=e[s],a=this.schemaParse(r);let o="";o=Array.isArray(a)?`${t}${t}${s}:{${a.join("\n")}};`:`${t}${t}${s}:${a};`,n.push(o)}return n}nonArraySchemaObjectParse(e){if(!e)return"unknown";switch(e.type){case"boolean":return"boolean";case"integer":case"number":return"number";case"object":return this.propertiesParse(e.properties);case"string":return"string";default:return"unknown"}}arraySchemaObjectParse(e){if("array"!==e.type)return"";const{items:t}=e,n="$ref"in t?t:null,s=t;if(n){return`Array<${this.referenceObjectParse(n)}>`}if(s){const e=this.schemaParse(t);if(Array.isArray(e)){return`Array<{${e.join("\n")}}>`}return`Array<${e}>`}return""}referenceObjectParse(e){if(!e)return"";const t=e.$ref.replace("#/components/schemas/","");return`import('../models/${this.typeNameToFileName(t)}').${t}`}schemaParse(e){if(!e)return"unknown";const t=e?.type,n="$ref"in e?e:null,s="array"===t?e:null,r=t&&this.nonArrayType.includes(t)?e:null;return n?this.referenceObjectParse(n):s?this.arraySchemaObjectParse(s):r?this.nonArraySchemaObjectParse(r):"unknown"}responseObjectParse(e){const t=e.content;if(!t)return"";const{schema:n}=Object.values(t)[0];if(n){return this.schemaParse(n)}}responseHandle(e){const t=e[200];if(!t)return;const n="content"in t?t:null,s="$ref"in t?t:null;if(null===n&&null===s&&(this.contentBody.response="type Response = unknown",this.contentBody._response="unknown"),s){const e=this.referenceObjectParse(s);this.contentBody.response=`type Response = ${e}`,this.contentBody._response=e}if(n){const e=this.responseObjectParse(n);Array.isArray(e)?(this.contentBody.response=`interface Response {${e.join("\n")}} `,this.contentBody._response=`${e.join("\n")}`):(this.contentBody.response=`type Response = ${e}`,this.contentBody._response=`${e}`)}}requestBodyObjectParse(e){const n=Object.values(e.content),{schema:s}=Array.isArray(n)&&n.length>0?n[0]:{schema:null};if(s){const e=s?.type,n="$ref"in s?s:null,r="array"===e?s:null,a=e&&this.nonArrayType.includes(e)?s:null;if(n){const e=this.referenceObjectParse(n);return`${t}type Body = ${e}`}if(r){const e=this.arraySchemaObjectParse(r);return`${t}type Body = ${e}`}if(a){const e=this.nonArraySchemaObjectParse(a);return Array.isArray(e)?0===e.length?[`${t}type Body = unknown`]:[`${t}interface Body {`,...e,"}"]:[`${t}type Body = ${e}`]}}}requestBodyParse(e){if(!e)return"{}";const n="$ref"in e?e:null,s="content"in e?e:null;if(n){const e=this.referenceObjectParse(n);return`${t}type Body = ${e}`}return s&&"[object Object]"===String(e)&&0!==Reflect.ownKeys(e).length?this.requestBodyObjectParse(s):"{}"}requestParametersParse(e){const n=[],s=[];e?.map((e=>{const r="$ref"in e?e:null,a="name"in e?e:null;if(r){const e=this.referenceObjectParse(r);return console.log(this.pathKey,e,"item 是 ReferenceObject 类型","----未处理---"),e}if(a){if("path"===a.in){const e=this.schemaParse(a.schema);n.push(`${t}${t}type ${a.name} = ${e};`),this.contentBody.payload._path?"string"==typeof e?this.contentBody.payload._path[a.name]=e:console.log(e):"string"==typeof e?this.contentBody.payload._path={[a.name]:e}:console.log(e)}if("query"===a.in){const e=this.schemaParse(a.schema);s.push(`${t}${t}${a.name}: ${e};`),this.contentBody.payload._query?"string"==typeof e?this.contentBody.payload._query[a.name]=e:console.log(e):"string"==typeof e?this.contentBody.payload._query={[a.name]:e}:console.log(e)}}})),0!==n.length&&(n.unshift(`${t}namespace Path {`),n.push(`${t}}`)),0!==s.length&&(s.unshift(`${t}interface Query {`),s.push(`${t}}`)),this.contentBody.payload.path=n,this.contentBody.payload.query=s}requestHandle(e){if(e.parameters&&this.requestParametersParse(e.parameters),e.requestBody){const t=this.requestBodyParse(e.requestBody);if(Array.isArray(t))this.contentBody.payload.body=t;else if(t){const e=t?.split("\n")||[];this.contentBody.payload.body=e}}}parsePathItemObject(e,t){if(e)for(const n in e){const s=e[n];if(s){const e=n.toUpperCase(),r=t+"|"+e,{apiName:a,typeName:o,fileName:i,path:c}=this.convertEndpointString(r);this.contentBody.method=e,this.contentBody.typeName=o,this.contentBody.summary=s.summary,this.contentBody.fileName=i,this.contentBody.requestPath=c,this.contentBody.apiName=a,this.requestHandle(s),this.responseHandle(s.responses),this.Map.has(r)||this.Map.set(r,JSON.parse(JSON.stringify(this.contentBody))),this.contentBody={payload:{path:[],query:[],body:[]},response:"",_response:"",fileName:"",method:"",requestPath:"",summary:"",apiName:"",typeName:""}}}}initialize(){return new Promise(((e,t)=>{try{for(const e in this.pathsObject){const t=this.pathsObject[e];t&&this.parsePathItemObject(t,e)}e(this.Map)}catch(e){t(e)}}))}convertEndpointString(e){let t=e;e.startsWith("/")||(t="/"+e);const[n,s]=t.split("|"),r=`${n.replace("/api/","").split("/").map((e=>e.includes("{")?`$${e.slice(1,-1)}`:e.charAt(0).toUpperCase()+e.slice(1))).join("")}_${s}`;return{apiName:r.charAt(0).toLowerCase()+r.slice(1),fileName:(n.slice(1).replace(/\//g,"-").replace("api-","")+"-"+s).toLowerCase(),typeName:r.charAt(0).toUpperCase()+r.slice(1),path:n.replace(/(\/api)|(api)/g,"").replace(/\{\w+\}/g,(e=>`$${e}`))}}apiRequestItemHandle(e){const{payload:t,requestPath:n,_response:s,method:r,typeName:a,apiName:o}=e,{_path:i,_query:c,body:p}=t,h=e=>{const t=[];for(const n in e)t.push(`${n}: ${a}.Path.${n}`);return t.length>1?t.join(","):t.join("")},y=i?h(i):"",l=c?`params: ${a}.Query`:"",u=p.length>0?`params: ${a}.Body`:"",d={};y&&(d.apiParamsPath=y),l&&(d.apiParamsQuery=l),u&&(d.apiParamsBody=u);const m=Object.keys(d).length>=2;return[`export const ${o} = `,"(",i?h(i):"",""+(m?",":""),c?`params: ${a}.Query`:"",p.length>0?`params: ${a}.Body`:"",")"," => ",`${r}${s?`<${a}.Response>`:""}`,"(`"+n+"`"+(l||u?", params":"")+");"].join("")}writeFileHabdler(){const n=[],s=[],r=this.config.saveTypeFolderPath,a=[],o=(n,o)=>new Promise(((i,c)=>{try{const{payload:p,response:h,fileName:y,summary:l,typeName:u}=o,[,d]=n.split("|");!a.includes(d)&&a.push(d);const m=[`declare namespace ${u} {`,...p.path,...p.query,...p.body,`${t}${h}`,"}"],f=["/**","\n",` * ${l}`,"\n"," */"].join("");l&&s.push(f);const $=this.apiRequestItemHandle(o);s.push($,"\n"),e.writeFileRecursive(`${r}/api/${y}.d.ts`,m.join("\n")).then((()=>i(1))).catch((e=>{c(e),console.error(e)}))}catch(e){console.error(e,!0),c()}}));for(const[e,t]of this.Map)console.log(e),n.push(o(e,t));Promise.all(n).then((()=>{s.unshift(`import { ${a.join(", ")} } from '${this.config.requestMethodsImportPath||"./api"}';`,"\n"),e.clearDir(this.config.apiListFilePath+"/index.ts").finally((()=>{e.writeFileRecursive(this.config.apiListFilePath+"/index.ts",s.join("\n")).then((()=>{console.log("path parse done!"),this.Map=new Map})).catch((e=>{console.error("-----------\x3e",e)}))}))}))}handle(){this.initialize().then((()=>this.writeFileHabdler()))}}exports.PathParse=r,exports.default=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),s=require("../../data/umf.json.js"),t=require("../utils/index.js"),r=require("./core/components.js"),a=require("./core/get-data.js"),n=require("./core/path.js"),o=require("shelljs");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=i(e);const l={saveTypeFolderPath:"apps/types",apiListFilePath:"apps/services",swaggerJsonUrl:"",requestMethodsImportPath:"./fetch",indent:"\t",headers:{}};class c{schemas={};paths={};handle(e){return"development"===process.env.NODE_ENV?new Promise(((t,a)=>{const o=s.default;this.schemas=o.components?.schemas,this.paths=o.paths;new r.default(this.schemas,e).handle();return new n.PathParse(this.paths,e).handle(),t(!0)})):new Promise((s=>{if(!e.swaggerJsonUrl)return s({});a.getSwaggerJson(e).then((t=>{const a=t;this.schemas=a.components?.schemas,this.paths=a.paths;new r.default(this.schemas,e).handle();new n.PathParse(this.paths,e).handle(),s({})})).catch((()=>{s({})}))}))}initialize(){const e=process.cwd()+"/an.config.json";t.isFileExisted(e).then((()=>{h.default.readFile(e,"utf8",((e,s)=>{if(e)return void console.error(e);const r=JSON.parse(s);console.log("config ----\x3e",r),t.clearDir(r.saveTypeFolderPath).then((()=>{this.handle(r).then((e=>{console.log("format: ",`npx prettier --write "${r.saveTypeFolderPath}/**/*.{ts,d.ts}"`),o.exec(`npx prettier --write "${r.saveTypeFolderPath}/**/*.{ts,d.ts}"`)})).catch((e=>{console.log(e)}))}))}))})).catch((s=>{console.error("配置文件不存在,将自动创建配置文件!"),t.clearDir(l.saveTypeFolderPath).then((()=>{t.writeFileRecursive(e,JSON.stringify(l,null,2)).catch((e=>{console.log(e)})).finally((()=>{this.handle(l)}))}))}))}}if("development"===process.env.NODE_ENV){(new c).initialize()}exports.Main=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("fs"),require("path"),exports.requireModule=function(e,r=!0){try{const t=require(e);return r&&setTimeout((()=>{delete require.cache[require.resolve(e)]}),200),t}catch(e){throw new Error(e)}};
|
package/lib/src/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("../node_modules/commander/esm.mjs.js"),i=require("../package.json.js"),r=require("./build-type/index.js"),n=require("./standard/lint-init.js");e.program.version(`${i.default.version}`,"-v --version").usage("<command> [options]"),e.program.command("type").description("auto interface").action((()=>{(new r.Main).initialize()})),e.program.command("lint").description("install eslint, prettier, commitlint").action((()=>n.lintHandle())),e.program.parse(process.argv);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.ADD_COMMIT_MSG="npx husky add .husky/commit-msg 'npx --no-install commitlint --edit \"$1\"'",exports.COMMIT_CONFIG_CONTENT="\nmodule.exports = {\n\textends: ['@commitlint/config-conventional']\n}",exports.COMMIT_VERIFY="npm install --save-dev @commitlint/cli @commitlint/config-conventional",exports.HUSKY_INSTALL="npx husky install",exports.NPM_HUSK="npm install husky --save-dev",exports.Prettier="npm install --save-dev --save-exact prettier eslint-config-prettier",exports.REACT_ESLINT="npm i eslint eslint-plugin-react@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest -D",exports.VUE_ESLINT="npm i eslint-plugin-vue@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest eslint@latest -D";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),s=require("progress-estimator"),t=require("./const.js"),i=require("fs"),o=require("shelljs"),c=require("../utils/index.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const r=l(s).default({storagePath:e.join(__dirname,".progress-estimator")});exports.commitlintHanlde=async()=>{o.which("git")||(c.log.warning("Sorry, this script requires git"),o.exit(1));const e=new Promise(((e,s)=>{try{c.spinner.start("commitlint tools instll..."),o.exec(t.COMMIT_VERIFY,{silent:!0}),c.spinner.success("✨ commitlint instll success!"),e({success:!0})}catch(e){s(e)}})),s=!0,l=new Promise(((e,l)=>{try{c.log.load("instll husky..."),o.exec(t.NPM_HUSK,{silent:s}),c.log.success("husk instll done!"),c.log.load("create husky..."),o.exec(t.HUSKY_INSTALL,{silent:s}),c.log.success("husk create done!"),c.log.load("set commit-msg..."),o.exec(t.ADD_COMMIT_MSG,{silent:s}),c.log.success("set commit-msg done!"),c.log.load("create config file..."),i.writeFileSync(`${process.cwd()}/commitlint.config.js`,t.COMMIT_CONFIG_CONTENT),c.log.success("config file write done!"),e({success:!0})}catch(e){c.spinner.error("commitlint instll fail!"),l(e)}}));try{await r(e,"install commit lint tools",{estimate:1e4}),await r(l,"commit config file write")}catch(e){console.log("commitlintHanlde=====>",e)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("child_process"),s=require("fs"),r=require("path"),t=require("progress-estimator"),i=require("../utils/index.js"),n=require("./const.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(s);const a=c(t).default({storagePath:r.join(__dirname,".progress-estimator")});exports.eslintHandle=async s=>{i.spinner.start("start installation...");const r="vue"===s?n.VUE_ESLINT:n.REACT_ESLINT,t="vue"===s?"vue-eslint.js":"react-eslint.js",c=new Promise(((s,t)=>{const n=e.exec(r,(e=>{e&&i.spinner.error(e.message)}));n.stdout?.on("data",(()=>{i.spinner.success("✨ eslint instll success!"),s({success:!0})})),n.stderr?.on("data",(()=>{i.spinner.error("eslint install fail!"),t({success:!1})}))})),o=new Promise(((e,s)=>{try{l.default.copyFileSync(`${__dirname.replace("lib/src","template/.eslintignore")}`,`${process.cwd()}/.eslintignore`),l.default.copyFileSync(`${__dirname.replace("lib/src",`template/${t}`)}`,`${process.cwd()}/.eslintrc.js`),i.spinner.success("✨ .eslintrc file write success"),e({success:!0})}catch(e){i.spinner.error(".eslintrc file write fail"),s(e)}}));try{await a(c,"instll eslint",{estimate:3e4}),await a(o,"write .eslintignore file")}catch(e){console.error("eslintHandle=====>",e)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/inquirer/dist/esm/index.mjs.js"),t=require("./install-eslint.js"),r=require("./prettier.js"),i=require("./install-commitlint.js"),a=require("./vscode.js");exports.lintHandle=function(){e.default.prompt([{type:"list",message:"Choose the framework to use",name:"framework",choices:["React","Vue"],filter:e=>e.toLowerCase(),validate:e=>!!e.length||"Choose the framework to use"}]).then((async e=>{await i.commitlintHanlde(),await r.prettierHanlde(),await a.default(),await t.eslintHandle(e.framework)}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("child_process"),r=require("fs"),t=require("path"),s=require("progress-estimator"),i=require("../utils/index.js"),c=require("./const.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const o=n(s).default({storagePath:t.join(__dirname,".progress-estimator")});exports.prettierHanlde=async()=>{const t=new Promise(((r,t)=>{const s=e.exec(c.Prettier,(e=>{e&&i.spinner.error(e.message)}));s.stdout?.on("data",(function(){i.spinner.success("✨ prettier instll success!"),r({success:!0})})),s.stderr?.on("data",(function(e){i.spinner.error(e),t({success:!1})}))})),s=new Promise(((e,t)=>{try{r.copyFileSync(`${__dirname.replace("lib/src","template/prettierrc.js")}`,`${process.cwd()}/.prettierrc.js`),i.spinner.success("✨ .prettierrc write done!"),e({success:!0})}catch(e){i.spinner.error("❌ prettierrc write fail!"),t(e)}}));try{await o(t,"install prettier",{estimate:1e4}),await o(s,"write .prettierrc file")}catch(e){console.error("prettierHanlde======>",e)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),s=require("../utils/index.js");exports.default=async()=>{const t=`${process.cwd()}/.vscode/settings.json`;if(e.existsSync(t)){const s=e.readFileSync(t,"utf-8"),r=JSON.parse(s);r["editor.formatOnSave"]=!0,r["editor.defaultFormatter"]="esbenp.prettier-vscode";const i=JSON.stringify(r,null,"\t");e.writeFileSync(t,i)}else{const t=`${process.cwd()}/.vscode`;try{e.mkdirSync(t),e.copyFileSync(`${__dirname.replace("lib/src","template/settings.json")}`,`${t}/settings.json`),s.spinner.success("✨ .vscode/settings.json file write success")}catch(e){s.spinner.error(".vscode/settings.json file write fail"),console.error(e)}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("chalk"),r=require("fs"),t=require("ora");require("path");var o=require("shelljs");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(e),n=s(r);const u={info:e=>console.log(l.default.dim(e)),error:e=>console.log(l.default.red(`× ${e}`)),success:e=>console.log(l.default.green(`✔ ${e}`)),warning:e=>console.log(l.default.yellow(`⚠️ ${e}`)),load:e=>console.log(l.default.dim(`☯︎ ${e}`))},i=s(t).default(),a={stop:()=>i.stop(),error:e=>i.fail(`❌ ${l.default.red(e)}`),start:e=>{i.text=l.default.blue(e),i.start()},success:e=>{i.stopAndPersist({symbol:l.default.green("✔"),text:l.default.green(e)})}};exports.clearDir=function(e){return new Promise(((r,t)=>{try{o.exec(`rm -rf ${e}`),r(!0)}catch(e){console.error(e),t(!1)}}))},exports.isFileExisted=function(e){return new Promise(((r,t)=>{n.default.access(e,(e=>{e?t(!1):r(!0)}))}))},exports.log=u,exports.spinner=a,exports.writeFileRecursive=function(e,r){return new Promise(((t,o)=>{try{const s=e.substring(0,e.lastIndexOf("/"));n.default.mkdir(s,{recursive:!0},(s=>{if(s)return o(!1);n.default.writeFile(e,r,(function(e){if(e)return o(!1);t(!0)}))}))}catch(e){console.error(e),o(e)}}))};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anl",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.20",
|
|
4
4
|
"description": "FE command line tool",
|
|
5
5
|
"main": "bin/an-cli.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@types/shelljs": "^0.8.11",
|
|
26
26
|
"@typescript-eslint/eslint-plugin": "^5.52.0",
|
|
27
27
|
"@typescript-eslint/parser": "^5.52.0",
|
|
28
|
+
"cross-env": "^7.0.3",
|
|
28
29
|
"eslint": "^8.7.0",
|
|
29
30
|
"husky": "^8.0.3",
|
|
30
31
|
"openapi-types": "^12.1.3",
|
|
@@ -67,4 +68,4 @@
|
|
|
67
68
|
"url": "https://github.com/bianliuzhu/an-cli.git"
|
|
68
69
|
},
|
|
69
70
|
"type": "commonjs"
|
|
70
|
-
}
|
|
71
|
+
}
|