@runium/cli 2026.1.0-beta → 2026.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/plugin/plugin-add.js +1 -1
- package/commands/plugin/plugin-get-options.js +1 -0
- package/commands/plugin/plugin-set-options.js +1 -0
- package/commands/plugin/plugin.js +1 -1
- package/commands/project/project-start.js +1 -1
- package/commands/project/project-status.js +1 -1
- package/constants/error-code.js +1 -1
- package/macros/base64.js +1 -0
- package/macros/file.js +1 -0
- package/macros/index.js +1 -1
- package/macros/json.js +1 -0
- package/macros/math.js +1 -0
- package/macros/os.js +1 -0
- package/macros/unique.js +1 -0
- package/package.json +2 -2
- package/services/plugin-context.js +1 -1
- package/utils/debounce.js +1 -1
- package/utils/deep-merge.js +1 -0
- package/utils/index.js +1 -1
- package/validation/get-plugin-schema.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RuniumError as
|
|
1
|
+
import{RuniumError as t}from"@runium/core";import{ErrorCode as l}from"../../constants/index.js";import{PluginCommand as s}from"./plugin-command.js";class g extends s{config(){this.command.name("add").description("add plugin").option("-f, --file","use file path instead of plugin package name").argument("<plugin>","plugin package name or absolute file path")}async handle(e,{file:n}){const o=this.pluginService.resolvePath(e,n),i=await this.pluginService.loadPlugin(o,{}),a=this.pluginService.getPluginByName(i);if(a)await this.profileService.addPlugin({name:i,path:n?o:e,file:n,disabled:!1,options:a.options?.value??{}}),this.outputService.success('Plugin "%s" successfully added',i);else throw new t(`Failed to add plugin "${e}"`,l.PLUGIN_NOT_FOUND,{name:i,path:e})}}export{g as PluginAddCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PluginCommand as r}from"./plugin-command.js";class l extends r{config(){this.command.name("get-options").description("get plugin options").argument("<name>","plugin name").option("-r, --raw","output raw JSON")}async handle(o,n){const t=this.ensureProfilePlugin(o),i=await this.pluginService.loadPlugin(t.path,t.options);(await this.pluginService.getPluginByName(i))?.options?n.raw?this.outputService.info(JSON.stringify(t.options,null,2)):this.outputService.table(this.getFlattenedOptions(t.options||{}),["key","value","type"]):this.outputService.info('Plugin "%s" does not support options',t.name)}getFlattenedOptions(o,n=""){const t=[];for(const[i,e]of Object.entries(o)){const s=n?`${n}.${i}`:i;e!==null&&typeof e=="object"&&!Array.isArray(e)?t.push(...this.getFlattenedOptions(e,s)):t.push({key:s,value:e,type:typeof e})}return t}}export{l as PluginGetOptionsCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{runInNewContext as l}from"node:vm";import{RuniumError as u}from"@runium/core";import{ErrorCode as p}from"../../constants/index.js";import{deepMerge as m}from"../../utils/index.js";import{PluginCommand as g}from"./plugin-command.js";class y extends g{config(){this.command.name("set-options").description("set plugin options").argument("<name>","plugin name").argument("<value>","options value as an object literal string")}async handle(n,o){const e=this.ensureProfilePlugin(n),a=await this.pluginService.loadPlugin(e.path,e.options),s=await this.pluginService.getPluginByName(a);if(s?.options){let i={};try{i=l(`(${o})`)}catch{i=null}let r=!1;if(i&&typeof i=="object"&&!Array.isArray(i)){const t=m(e.options??{},i);(s.options?.validate(t)??!1)&&(await this.profileService.updatePlugin(e.name,{options:t}),r=!0)}if(r)this.outputService.info('Plugin "%s" options successfully updated',e.name);else throw new u(`Failed to set plugin "${e.name}" options`,p.PLUGIN_INVALID_OPTIONS,{name:n,value:o})}else this.outputService.info('Plugin "%s" does not support options',e.name)}}export{y as PluginSetOptionsCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RuniumCommand as m}from"../runium-command.js";import{PluginAddCommand as o}from"./plugin-add.js";import{PluginDisableCommand as n}from"./plugin-disable.js";import{PluginEnableCommand as i}from"./plugin-enable.js";import{PluginListCommand as
|
|
1
|
+
import{RuniumCommand as m}from"../runium-command.js";import{PluginAddCommand as o}from"./plugin-add.js";import{PluginDisableCommand as n}from"./plugin-disable.js";import{PluginEnableCommand as i}from"./plugin-enable.js";import{PluginListCommand as t}from"./plugin-list.js";import{PluginRemoveCommand as d}from"./plugin-remove.js";import{PluginGetOptionsCommand as r}from"./plugin-get-options.js";import{PluginSetOptionsCommand as a}from"./plugin-set-options.js";class P extends m{subcommands=[t,o,d,n,i,r,a];config(){this.command.name("plugin").description("manage plugins")}async handle(){this.command.help()}}export{P as PluginCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dirname as h}from"node:path";import{Option as
|
|
1
|
+
import{dirname as h}from"node:path";import{Option as u}from"commander";import{Container as j}from"typedi";import{ProjectEvent as d,RuniumError as f}from"@runium/core";import{ErrorCode as m}from"../../constants/index.js";import{ShutdownService as S}from"../../services/index.js";import{ProjectStateCommand as P}from"./project-state-command.js";class N extends P{shutdownService;fileWriter=null;constructor(t){super(t),this.shutdownService=j.get(S)}config(){this.command.name("start").description("start project").option("-f, --file","use file path instead of project name").option("-o, --output","output project state changes").addOption(new u("-w, --working-dir <choice>","set working directory").choices(["cwd","project"]).default("cwd")).argument("<name>","project name")}async handle(t,{file:s,workingDir:p,output:a}){const r=s?this.projectService.resolvePath(t):this.ensureProfileProject(t).path,c=this.getProjectDataFileName(s?r:t),e=this.profileService.getPath("projects",c),i=await this.readProjectData(e);if(i&&this.isProjectProcessStarted(i.pid))throw new f(`Project "${t}" is already started`,m.PROJECT_ALREADY_STARTED,{name:t});if(p==="project"){const n=h(r);n!==process.cwd()&&process.chdir(n)}const o=await this.projectService.initProject(r);this.shutdownService.addBlocker(n=>o.stop(n)),await this.fileService.ensureDirExists(h(e)),this.fileWriter=this.fileService.createAtomicWriter(e),this.addProjectListeners(o,{projectPath:r,output:a}),await this.projectService.runHook("project.beforeStart",{project:o,path:r,name:s?null:t}),await o.start()}addProjectListeners(t,s){const{projectPath:p,output:a}=s,r={id:t.getConfig().id,pid:process.pid,cwd:process.cwd(),path:p,state:{project:[],tasks:{}}},c=()=>{this.fileWriter.writeJson(r).then()};c(),t.on(d.STATE_CHANGE,async e=>{r.state.project.push(e),c(),a&&this.outputService.info('Project "%s" %s %s',r.id,e.status,e.reason?`(${e.reason})`:"")}),t.on(d.TASK_STATE_CHANGE,(e,i)=>{if(r.state.tasks[e]||(r.state.tasks[e]=[]),r.state.tasks[e].push(i),c(),a){const o=this.getTaskStateReason(i);this.outputService.info('Task "%s" %s %s',e,i.status,o?`(${o})`:"")}}),t.on(d.STATE_CHANGE,e=>{e.status==="stopped"&&e.reason==="action"&&this.shutdownService.shutdown("project-stop").then()})}getTaskStateReason(t){return t.reason?t.reason:t.exitCode?`code=${t.exitCode}`:t.error?`error=${t.error}`:""}}export{N as ProjectStartCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SILENT_EXIT_CODE as g}from"@runium/core";import{formatTimestamp as m}from"../../utils/index.js";import{ProjectStateCommand as P}from"./project-state-command.js";class E extends P{config(){this.command.name("status").description("get project status").option("-f, --file","use file path instead of project name").option("-t, --tasks","show tasks status").option("-a, --all","show status change history").argument("<name>","project name")}async handle(a,{file:p,tasks:d,all:c}){const l=p?this.projectService.resolvePath(a):this.ensureProfileProject(a).path,f=this.getProjectDataFileName(p?l:a),j=this.profileService.getPath("projects",f),r=await this.readProjectData(j);if(r){let{project:o=[]}=r.state;if(c||(o=o.length>0?[o[o.length-1]]:[]),d){const n=o.map(t=>({name:"
|
|
1
|
+
import{SILENT_EXIT_CODE as g}from"@runium/core";import{formatTimestamp as m}from"../../utils/index.js";import{ProjectStateCommand as P}from"./project-state-command.js";class E extends P{config(){this.command.name("status").description("get project status").option("-f, --file","use file path instead of project name").option("-t, --tasks","show tasks status").option("-a, --all","show status change history").argument("<name>","project name")}async handle(a,{file:p,tasks:d,all:c}){const l=p?this.projectService.resolvePath(a):this.ensureProfileProject(a).path,f=this.getProjectDataFileName(p?l:a),j=this.profileService.getPath("projects",f),r=await this.readProjectData(j);if(r){let{project:o=[]}=r.state;if(c||(o=o.length>0?[o[o.length-1]]:[]),d){const n=o.map(t=>({name:"project",status:t.status,time:m(t.timestamp),timestamp:t.timestamp,reason:t.reason||""})),{tasks:i=[]}=r.state,h=[];Object.entries(i).forEach(([t,e])=>{c||(e=e.length>0?[e[e.length-1]]:[]),e.forEach(s=>{const S=s.exitCode&&s.exitCode!==g?s.exitCode:"";h.push({name:t,status:s.status,time:m(s.timestamp),timestamp:s.timestamp,reason:[s.reason,S].filter(Boolean).join(" ")})})});const u=[...n,...h];u.sort((t,e)=>t.timestamp-e.timestamp),this.outputService.table(u,["time","name","status","reason"])}else{const n=o.map(i=>({status:i.status,time:m(i.timestamp)}));this.outputService.table(n,["time","status"])}}else this.outputService.info(`No project status for "${a}"`)}}export{E as ProjectStatusCommand};
|
package/constants/error-code.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _=(R=>(R.FILE_READ_JSON_ERROR="file-read-json-error",R.FILE_WRITE_JSON_ERROR="file-write-json-error",R.FILE_READ_ERROR="file-read-error",R.FILE_WRITE_ERROR="file-write-error",R.FILE_CREATE_DIR_ERROR="file-create-dir-error",R.FILE_REMOVE_ERROR="file-remove-error",R.PLUGIN_NOT_FOUND="plugin-not-found",R.PLUGIN_FILE_NOT_FOUND="plugin-file-not-found",R.PLUGIN_INCORRECT_MODULE="plugin-incorrect-module",R.PLUGIN_INVALID="plugin-invalid",R.PLUGIN_PATH_RESOLVE_ERROR="plugin-path-resolve-error",R.PLUGIN_LOAD_ERROR="plugin-load-error",R.PLUGIN_HOOK_ERROR="plugin-hook-error",R.PLUGIN_PATH_NOT_SPECIFIED="plugin-path-not-specified",R.PROJECT_ALREADY_STARTED="project-already-started",R.PROJECT_NOT_STARTED="project-not-started",R.PROJECT_STOP_ERROR="project-stop-error",R.PROJECT_NOT_FOUND="project-not-found",R.PROJECT_FILE_NOT_FOUND="project-file-not-found",R.PROJECT_FILE_CAN_NOT_READ="project-file-can-not-read",R.PROJECT_JSON_PARSE_ERROR="project-json-parse-error",R.PROJECT_PATH_NOT_SPECIFIED="project-path-not-specified",R.INVALID_ARGUMENT="invalid-argument",R.INVALID_PATH="invalid-path",R.CONFIG_INVALID_DATA="config-invalid-data",R.COMMAND_REGISTRATION_ERROR="command-registration-error",R.COMMAND_INCORRECT="command-incorrect",R.COMMAND_NOT_FOUND="command-not-found",R.COMMAND_RUN_ERROR="command-run-error",R))(_||{});export{_ as ErrorCode};
|
|
1
|
+
var _=(R=>(R.FILE_READ_JSON_ERROR="file-read-json-error",R.FILE_WRITE_JSON_ERROR="file-write-json-error",R.FILE_READ_ERROR="file-read-error",R.FILE_WRITE_ERROR="file-write-error",R.FILE_CREATE_DIR_ERROR="file-create-dir-error",R.FILE_REMOVE_ERROR="file-remove-error",R.PLUGIN_NOT_FOUND="plugin-not-found",R.PLUGIN_FILE_NOT_FOUND="plugin-file-not-found",R.PLUGIN_INCORRECT_MODULE="plugin-incorrect-module",R.PLUGIN_INVALID="plugin-invalid",R.PLUGIN_PATH_RESOLVE_ERROR="plugin-path-resolve-error",R.PLUGIN_LOAD_ERROR="plugin-load-error",R.PLUGIN_HOOK_ERROR="plugin-hook-error",R.PLUGIN_PATH_NOT_SPECIFIED="plugin-path-not-specified",R.PROJECT_ALREADY_STARTED="project-already-started",R.PROJECT_NOT_STARTED="project-not-started",R.PROJECT_STOP_ERROR="project-stop-error",R.PROJECT_NOT_FOUND="project-not-found",R.PROJECT_FILE_NOT_FOUND="project-file-not-found",R.PROJECT_FILE_CAN_NOT_READ="project-file-can-not-read",R.PROJECT_JSON_PARSE_ERROR="project-json-parse-error",R.PROJECT_PATH_NOT_SPECIFIED="project-path-not-specified",R.INVALID_ARGUMENT="invalid-argument",R.INVALID_PATH="invalid-path",R.CONFIG_INVALID_DATA="config-invalid-data",R.COMMAND_REGISTRATION_ERROR="command-registration-error",R.COMMAND_INCORRECT="command-incorrect",R.COMMAND_NOT_FOUND="command-not-found",R.COMMAND_RUN_ERROR="command-run-error",R.PLUGIN_INVALID_OPTIONS="plugin-invalid-options",R))(_||{});export{_ as ErrorCode};
|
package/macros/base64.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(r){return Buffer.from(r,"utf-8").toString("base64")}function e(r){return Buffer.from(r,"base64").toString("utf-8")}export{e as base64decodeMacro,t as base64encodeMacro};
|
package/macros/file.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readFileSync as t}from"node:fs";function e(r){return t(r,"utf-8")}export{e as fileContentMacro};
|
package/macros/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eqMacro as
|
|
1
|
+
import{base64decodeMacro as o,base64encodeMacro as r}from"./base64.js";import{eqMacro as m,neMacro as a}from"./conditional.js";import{dateMacro as e,timestampMacro as t}from"./date.js";import{emptyMacro as c}from"./empty.js";import{envMacro as i}from"./env.js";import{fileContentMacro as p}from"./file.js";import{jsonMacro as n}from"./json.js";import{maxMacro as M,minMacro as d,randomMacro as f}from"./math.js";import{platformMacro as s,usernameMacro as u}from"./os.js";import{homeDirMacro as b,pathMacro as h,tmpDirMacro as l}from"./path.js";import{uuidMacro as x}from"./unique.js";const B={base64decode:o,base64encode:r,date:e,homedir:b,env:i,empty:c,eq:m,ne:a,content:p,json:n,path:h,platform:s,random:f,min:d,max:M,tmpdir:l,timestamp:t,uuid:x,username:u};export{B as macros};
|
package/macros/json.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{runInNewContext as o}from"node:vm";function s(...n){const t=n.join(","),r=o(`(${t})`);return JSON.stringify(r)}export{s as jsonMacro};
|
package/macros/math.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function m(t,n){const u=Number(t),r=Number(n),e=Number.isNaN(u)||t===void 0?0:u,i=Number.isNaN(r)||n===void 0?Number.MAX_SAFE_INTEGER:r;return String(Math.floor(Math.random()*(i-e)+e))}function o(...t){const n=[];return t.forEach(u=>{const r=Number(u);Number.isNaN(r)||n.push(r)}),n.length===0?"0":String(Math.min(...n))}function s(...t){const n=[];return t.forEach(u=>{const r=Number(u);Number.isNaN(r)||n.push(r)}),n.length===0?"0":String(Math.max(...n))}export{s as maxMacro,o as minMacro,m as randomMacro};
|
package/macros/os.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{platform as r,userInfo as n}from"node:os";function t(){return r()}function e(){return n().username}export{t as platformMacro,e as usernameMacro};
|
package/macros/unique.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{randomUUID as r}from"node:crypto";function n(){return r()}export{n as uuidMacro};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runium/cli",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.2.0",
|
|
4
4
|
"description": "Runium CLI",
|
|
5
5
|
"author": "TheBeastApp",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"module": "./index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@runium/core": "^1.0.
|
|
16
|
+
"@runium/core": "^1.0.1",
|
|
17
17
|
"@segment/ajv-human-errors": "^2.15.0",
|
|
18
18
|
"commander": "^14.0.2",
|
|
19
19
|
"reflect-metadata": "^0.2.2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var w=function(a,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,t,e,r);else for(var u=a.length-1;u>=0;u--)(n=a[u])&&(i=(o<3?n(i):o>3?n(t,e,i):n(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},O=function(a,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,t)},c=function(a,t){return function(e,r){t(e,r,a)}},d,p,f,l,v;import{delimiter as j}from"node:path";import{Inject as s,Service as R}from"typedi";import{Argument as W,Option as C}from"commander";import{RuniumError as h,isRuniumError as E,RuniumTask as A,RuniumTrigger as x,applyMacros as L,TaskEvent as T,TaskStatus as I,ProjectEvent as N,ProjectStatus as B}from"@runium/core";import{RuniumCommand as D}from"../commands/runium-command.js";import{CommandService as S,FileService as b,OutputLevel as g,OutputService as y,ProfileService as _,ShutdownService as P}from"./index.js";import{getVersion as J,convertPathToValidFileName as
|
|
1
|
+
var w=function(a,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,t,e,r);else for(var u=a.length-1;u>=0;u--)(n=a[u])&&(i=(o<3?n(i):o>3?n(t,e,i):n(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},O=function(a,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,t)},c=function(a,t){return function(e,r){t(e,r,a)}},d,p,f,l,v;import{delimiter as j}from"node:path";import{Inject as s,Service as R}from"typedi";import{Argument as W,Option as C}from"commander";import{RuniumError as h,isRuniumError as E,RuniumTask as A,RuniumTrigger as x,applyMacros as L,TaskEvent as T,TaskStatus as I,ProjectEvent as N,ProjectStatus as B}from"@runium/core";import{RuniumCommand as D}from"../commands/runium-command.js";import{CommandService as S,FileService as b,OutputLevel as g,OutputService as y,ProfileService as _,ShutdownService as P}from"./index.js";import{getVersion as J,convertPathToValidFileName as V}from"../utils/index.js";import{createValidator as k}from"../validation/index.js";import{ErrorCode as F}from"../constants/index.js";global.runium=null;let m=class{commandService;outputService;shutdownService;fileService;profileService;constructor(t,e,r,o,i){this.commandService=t,this.outputService=e,this.shutdownService=r,this.fileService=o,this.profileService=i}createStorageWrapper(t){return((...e)=>{const[r,...o]=e,i=this.resolveProfilePath(r),n=this.fileService[t];return n(i,...o)})}resolveProfilePath(t){const e=Array.isArray(t)?t:t.split(j);if(e.length===0||e.every(r=>r.trim()===""))throw new h("Invalid path",F.INVALID_PATH,{path:t});return this.profileService.getPath(...e)}async init(){const t=this.commandService,e=this.outputService,r=this.shutdownService,o={class:{RuniumCommand:D,CommandArgument:W,CommandOption:C,RuniumError:h,RuniumTask:A,RuniumTrigger:x},enum:{OutputLevel:Object.keys(g).filter(i=>isNaN(Number(i))).reduce((i,n)=>(i[n]=g[n],i),{}),ProjectEvent:N,ProjectStatus:B,TaskEvent:T,TaskStatus:I},utils:{applyMacros:L,isRuniumError:E,pathToId:V},output:{getLevel:e.getLevel.bind(e),setLevel:e.setLevel.bind(e),trace:e.trace.bind(e),debug:e.debug.bind(e),info:e.info.bind(e),warn:e.warn.bind(e),error:e.error.bind(e),table:e.table.bind(e),log:e.log.bind(e)},shutdown:{addBlocker:r.addBlocker.bind(r),removeBlocker:r.removeBlocker.bind(r)},command:{has:t.hasCommand.bind(t),run:t.runCommand.bind(t)},storage:{read:this.createStorageWrapper("read"),write:this.createStorageWrapper("write"),readJson:this.createStorageWrapper("readJson"),writeJson:this.createStorageWrapper("writeJson"),isExists:this.createStorageWrapper("isExists"),ensureDirExists:this.createStorageWrapper("ensureDirExists"),remove:this.createStorageWrapper("remove"),createAtomicWriter:this.createStorageWrapper("createAtomicWriter"),getPath:this.resolveProfilePath.bind(this)},validation:{createValidator:k},version:J()};global.runium=Object.freeze(o)}};m=w([R(),c(0,s()),c(1,s()),c(2,s()),c(3,s()),c(4,s()),O("design:paramtypes",[typeof(d=typeof S<"u"&&S)=="function"?d:Object,typeof(p=typeof y<"u"&&y)=="function"?p:Object,typeof(f=typeof P<"u"&&P)=="function"?f:Object,typeof(l=typeof b<"u"&&b)=="function"?l:Object,typeof(v=typeof _<"u"&&_)=="function"?v:Object])],m);export{m as PluginContextService};
|
package/utils/debounce.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
import{setTimeout as e,clearTimeout as l}from"node:timers";const i=100;function m(u,o=i){let n=null;return function(...t){n!==null&&l(n),n=e(()=>{u.apply(this,t),n=null},o)}}export{m as debounce};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function c(s,t){const e={...s};for(const r of Object.keys(t)){const n=t[r],o=e[r];n!==null&&typeof n=="object"&&!Array.isArray(n)&&o!==null&&typeof o=="object"&&!Array.isArray(o)?e[r]=c(o,n):e[r]=n}return e}export{c as deepMerge};
|
package/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{convertPathToValidFileName as r}from"./convert-path-to-valid-file-name.js";import{debounce as m}from"./debounce.js";import{formatTimestamp as
|
|
1
|
+
import{convertPathToValidFileName as r}from"./convert-path-to-valid-file-name.js";import{debounce as m}from"./debounce.js";import{deepMerge as f}from"./deep-merge.js";import{formatTimestamp as x}from"./format-timestamp.js";import{getVersion as n}from"./get-version.js";import{parseRootOptions as d}from"./parse-root-options.js";export{r as convertPathToValidFileName,m as debounce,f as deepMerge,x as formatTimestamp,n as getVersion,d as parseRootOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ID_REGEX as e}from"@runium/core";function o(){return{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://runium.dev/schemas/plugin.json",title:"Runium Plugin",type:"object",properties:{name:{type:"string",minLength:2,pattern:e.source},options:{type:"object",description:"Plugin configuration options"},project:{type:"object",description:"Project-level plugin definitions",properties:{macros:{type:"object",description:"Macro definitions for config file expansion",additionalProperties:{instanceof:"Function"}},tasks:{type:"object",description:"Task constructor definitions",additionalProperties:{instanceof:"Function"}},actions:{type:"object",description:"Action function definitions",additionalProperties:{instanceof:"Function"}},triggers:{type:"object",description:"Trigger constructor definitions",additionalProperties:{instanceof:"Function"}},validationSchema:{type:"object",description:"JSON Schema extension for project config validation",additionalProperties:!0}},additionalProperties:!1},app:{type:"object",description:"Application-level plugin definitions",properties:{commands:{type:"array",description:"Command constructor definitions",items:{instanceof:"Function"}}},additionalProperties:!1},hooks:{type:"object",description:"Lifecycle hooks for app and project events",properties:{app:{type:"object",description:"Application lifecycle hooks",properties:{afterInit:{instanceof:"Function",description:"Hook called after app initialization"},beforeExit:{instanceof:"Function",description:"Hook called before app exit"},beforeCommandRun:{instanceof:"Function",description:"Hook called before command execution"},afterCommandRun:{instanceof:"Function",description:"Hook called after command execution"}},additionalProperties:!1},project:{type:"object",description:"Project lifecycle hooks",properties:{beforeConfigRead:{instanceof:"Function",description:"Hook called before reading config file"},afterConfigRead:{instanceof:"Function",description:"Hook called after reading config file content"},afterConfigMacrosApply:{instanceof:"Function",description:"Hook called after applying macros to config"},afterConfigParse:{instanceof:"Function",description:"Hook called after parsing config"},beforeStart:{instanceof:"Function",description:"Hook called before project starts"}},additionalProperties:!1}},additionalProperties:!1}},required:["name"],additionalProperties:!1}}export{o as getPluginSchema};
|
|
1
|
+
import{ID_REGEX as e}from"@runium/core";function o(){return{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://runium.dev/schemas/plugin.json",title:"Runium Plugin",type:"object",properties:{name:{type:"string",minLength:2,pattern:e.source},options:{type:"object",description:"Plugin configuration options",properties:{value:{type:"object",description:"Plugin options values",additionalProperties:!0},validate:{instanceof:"Function",description:"Function to validate plugin options"}},required:["value","validate"],additionalProperties:!1},project:{type:"object",description:"Project-level plugin definitions",properties:{macros:{type:"object",description:"Macro definitions for config file expansion",additionalProperties:{instanceof:"Function"}},tasks:{type:"object",description:"Task constructor definitions",additionalProperties:{instanceof:"Function"}},actions:{type:"object",description:"Action function definitions",additionalProperties:{instanceof:"Function"}},triggers:{type:"object",description:"Trigger constructor definitions",additionalProperties:{instanceof:"Function"}},validationSchema:{type:"object",description:"JSON Schema extension for project config validation",additionalProperties:!0}},additionalProperties:!1},app:{type:"object",description:"Application-level plugin definitions",properties:{commands:{type:"array",description:"Command constructor definitions",items:{instanceof:"Function"}}},additionalProperties:!1},hooks:{type:"object",description:"Lifecycle hooks for app and project events",properties:{app:{type:"object",description:"Application lifecycle hooks",properties:{afterInit:{instanceof:"Function",description:"Hook called after app initialization"},beforeExit:{instanceof:"Function",description:"Hook called before app exit"},beforeCommandRun:{instanceof:"Function",description:"Hook called before command execution"},afterCommandRun:{instanceof:"Function",description:"Hook called after command execution"}},additionalProperties:!1},project:{type:"object",description:"Project lifecycle hooks",properties:{beforeConfigRead:{instanceof:"Function",description:"Hook called before reading config file"},afterConfigRead:{instanceof:"Function",description:"Hook called after reading config file content"},afterConfigMacrosApply:{instanceof:"Function",description:"Hook called after applying macros to config"},afterConfigParse:{instanceof:"Function",description:"Hook called after parsing config"},beforeStart:{instanceof:"Function",description:"Hook called before project starts"}},additionalProperties:!1}},additionalProperties:!1}},required:["name"],additionalProperties:!1}}export{o as getPluginSchema};
|