@doracli/express-server 0.0.3 → 0.0.5
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/cjs/index.js +3 -0
- package/lib/esm/index.js +3 -0
- package/lib/type/index.d.ts +143 -0
- package/package.json +22 -15
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";var e=require("path"),t=require("@cclr/utils"),n=require("@doracli/helper"),r=require("@dorabag/file-pro"),o=require("@doracli/esbuild"),i=require("@dorabag/config-loader"),a=require("@doracli/define-server"),u=require("@cclr/lang"),c=require("chokidar"),l=require("@doracli/express");function s(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function f(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){s(i,r,o,a,u,"next",e)}function u(e){s(i,r,o,a,u,"throw",e)}a(void 0)})}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function v(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(){
|
|
2
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
+
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return w(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,u=0,c=e,h.n=n,a}};function p(n,r){for(u=n,c=r,t=0;!f&&l&&!o&&t<s.length;t++){var o,i=s[t],p=h.p,v=i[2];n>3?(o=v===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(u=0,h.v=r,h.n=i[1]):p<v&&(o=n<3||i[0]>r||r>v)&&(i[4]=n,i[5]=r,h.n=v,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,v){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,v),u=s,c=v;(t=u<2?e:c)||!f;){i||(u?u<3?(u>1&&(h.n=-1),p(u,c)):h.n=c:h.v=c);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(f=h.n<0)?c:n.call(r,h))!==a)break}catch(t){i=e,u=1,c=t}finally{l=1}}return{value:t,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(w(t={},r,function(){return this}),t),f=l.prototype=u.prototype=Object.create(s);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,w(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,w(f,"constructor",l),w(l,"constructor",c),c.displayName="GeneratorFunction",w(l,o,"GeneratorFunction"),w(f),w(f,o,"Generator"),w(f,r,function(){return this}),w(f,"toString",function(){return"[object Generator]"}),(b=function(){return{w:i,m:h}})()}function w(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}w=function(e,t,n,r){function i(t,n){w(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},w(e,t,n,r)}function m(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}var C=function(e,r){var o=e.Controller,i=e.relativePath,a=new o,u=o.routeFunNameMap,c=o.funNameMethodMap,l=o.fileRoute,s=o.defaultHandlerType;Object.keys(u).forEach(function(e){var o=u[e],f=(c||{})[o]||["get","post"],h=t.uriPathJoin("/",i,l,e);f.forEach(function(e){r.add(h,e,function(e,t){return a[o].bind(a)(e,t)},{handlerType:s}),n.cLog.log("ser","Mount","[".concat(e.toUpperCase(),"] ").concat(h))})})},O=function(t,r){var o=t.relativePath,i=t.Controller,a=new i,u=i.routeFunNameMap,c=i.fileRoute,l=i.funNameMethodMap,s=i.defaultHandlerType;Object.keys(u).forEach(function(t){var i=u[t],f=(l||{})[i]||["get","post"],h=e.join("/",o,c,t);f.forEach(function(e){r.update(h,e,function(e,t){return a[i].bind(a)(e,t)},{handlerType:s}),n.cLog.log("ser","Update","[".concat(e.toUpperCase(),"] ").concat(h))})})},k=function(t,r){var o=t.relativePath,i=t.Controller,a=i.routeFunNameMap,u=i.funNameMethodMap;Object.keys(a).forEach(function(t){var i=a[t],c=(u||{})[i]||["get"],l=e.join("/",o,t);c.forEach(function(e){r.remove(l,e),n.cLog.log("ser","remove","[".concat(e.toUpperCase(),"] ").concat(l))})})},P=function(){var e=f(b().m(function e(t){var o,i;return b().w(function(e){for(;;)switch(e.p=e.n){case 0:return o=[],e.p=1,e.n=2,r.dirIterate(t,function(){var e=f(b().m(function e(t,n){return b().w(function(e){for(;;)switch(e.n){case 0:if(!n.isDirectory){e.n=1;break}return e.a(2);case 1:o.push(t);case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),{recursive:!0});case 2:return e.a(2,o);case 3:return e.p=3,i=e.v,n.cLog.error("scan","error","扫描 ".concat(t," 目录失败\n")),n.cLog.debug("scan","error",i),e.a(2,o)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}(),M=function(){return v(function t(i,a){var u=this;h(this,t),this.ctx=i,this.controllerConfig=a,g(this,"compiler",void 0),g(this,"outdirAbsolute",void 0),g(this,"inputKeyMap",{}),g(this,"compilerCtxMap",new Map),g(this,"buildGroup",function(){var t=f(b().m(function t(n){var o,i,a;return b().w(function(t){for(;;)switch(t.p=t.n){case 0:return o=u.compilerCtxMap.get(n),t.p=1,t.n=2,o.rebuild();case 2:return i=t.v,t.a(2,Object.keys(i.metafile.outputs).reduce(function(t,n){return i.metafile.outputs[n].entryPoint?(t[e.join(r.getCwd(),i.metafile.outputs[n].entryPoint)]=e.join(r.getCwd(),n),t):t},{}));case 3:return t.p=3,a=t.v,console.error(a),t.a(2,{})}},t,null,[[1,3]])}));return function(e){return t.apply(this,arguments)}}()),this.outdirAbsolute=i.serverConfig.cacheDir,this.compiler=o.createCompiler(o.getNodeBuildConfigPreset({sourcemap:void 0,minify:!1,external:Object.keys(n.getDependencies(i.configCtx.getPackageConfig())),metafile:!0,splitting:!0,bundle:!0,outdir:this.outdirAbsolute,entryNames:"[dir]/[name]/[hash]"}))},[{key:"build",value:(i=f(b().m(function e(n){var r,o,i,a,u,c,l=this;return b().w(function(e){for(;;)switch(e.n){case 0:if(r=new Set,o=[],i=t.uuid(8),a={},n.forEach(function(e){var t;if(".ts"===(null===(t=l.controllerConfig.getConfig(e))||void 0===t?void 0:t.fileExt)){var n=l.inputKeyMap[e];n?r.add(n):o.push({in:e,out:l.getOutputPath(e,i)})}else a[e]=e}),!o.length){e.n=2;break}return e.n=1,this.compiler.context({entryPoints:o});case 1:u=e.v,this.compilerCtxMap.set(i,u),o.forEach(function(e){return l.inputKeyMap[e.in]=i}),r.add(i);case 2:return e.n=3,Promise.all(Array.from(r).map(function(e){return l.buildGroup(e)}));case 3:return c=e.v,e.a(2,c.reduce(function(e,t){return y(y({},e),t)},a))}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"getOutputPath",value:function(t,n){var r=this.controllerConfig.getConfig(t),o=r.relativeFilePathOrigin,i=r.fileName;return e.join(n,e.dirname(o),i)}}]);var i}(),j=function(){return v(function e(){h(this,e),g(this,"map",new Map)},[{key:"update",value:function(e,t){this.map.set(e,y(y({},this.map.get(e)),t))}},{key:"updateMulti",value:function(e){var t=this;e.forEach(function(e){return t.update(e.absoluteFilePathOrigin,e)})}},{key:"updateAbsoluteFilePath",value:function(e){for(var t in e)Object.hasOwn(e,t)&&this.update(t,{absoluteFilePath:e[t]})}},{key:"getConfig",value:function(e){return this.map.get(e)}},{key:"getConfigList",value:function(e){var t=this;return e.map(function(e){return t.getConfig(e)})}}])}(),x=function(){var t=f(b().m(function t(n){var r,o,a,u;return b().w(function(t){for(;;)switch(t.n){case 0:r=n.absoluteFilePath,a=e.extname(r),u=a,t.n=".js"===u||".mjs"===u?1:".json"===u?3:5;break;case 1:return t.n=2,i.loadJs(r);case 2:case 4:return o=t.v,t.a(3,6);case 3:return t.n=4,i.loadJson(r);case 5:return t.a(3,6);case 6:return n.orange=o.default||o,t.a(2,n)}},t)}));return function(e){return t.apply(this,arguments)}}(),E=function(){return v(function e(t){h(this,e),this.scanAbsolute=t},[{key:"getBaseConfigMult",value:function(e){var t=this;return e.map(function(e){return t.getBaseConfig(e)})}},{key:"getBaseConfig",value:function(t){return n=t,r=this.scanAbsolute,o=e.relative(r,n),i=o.split("/"),a=i.pop()||"",u=i.join("/"),(c=a.match(/^(.*?)(\..*)$/))?{relativePath:u,fileName:c[1],fileExt:c[2],relativeFilePathOrigin:o,absoluteFilePathOrigin:n}:{relativeFilePathOrigin:o,absoluteFilePathOrigin:n};var n,r,o,i,a,u,c}},{key:"loadMult",value:function(e){return Promise.all(e.map(function(){var e=f(b().m(function e(t){return b().w(function(e){for(;;)if(0===e.n)return e.a(2,x(t))},e)}));return function(t){return e.apply(this,arguments)}}()))}},{key:"load",value:function(e){return x(e)}},{key:"formatMult",value:function(e){var t=this;return e.map(function(e){return t.format(e)})}},{key:"format",value:function(e){return function(e){var t,n,r=e.fileExt,o=e.fileName,i=e.orange;if(!i)return e;if(null===(t=n=".json"===r?a.defineControllerFun(function(e,t){t.json(i)}):i)||void 0===t||!t.handlerServer)return e;"FUN"===n.defineType&&(n.routeFunNameMap=g({},o||"",a.DefaultHandlerName));return n.defineType="CLASS",n.fileRoute=n.fileRoute||"/",y(y({},e),{},{Controller:n})}(e)}}])}(),D=function(){function e(t){h(this,e),g(this,"watcher",void 0),g(this,"watcherOptions",{ignoreInitial:!0,persistent:!0}),g(this,"changeCb",u.noop),t&&(this.watcherOptions=y(y({},this.watcherOptions),t)),this.watcher=this.createWatcher([])}return v(e,[{key:"onChange",value:function(e){this.changeCb=e}},{key:"add",value:function(e){var t;null===(t=this.watcher)||void 0===t||t.add(e)}},{key:"unwatch",value:function(e){var t;null===(t=this.watcher)||void 0===t||t.unwatch(e)}},{key:"close",value:function(){this.watcher&&this.watcher.close()}},{key:"createWatcher",value:function(e){var t=this,n=c.watch(e,this.watcherOptions).on("change",function(e){return t.changeCb(e,{type:"update"})}).on("add",function(e){return t.changeCb(e,{type:"create"})}).on("unlink",function(e){return t.changeCb(e,{type:"delete"})});return n}}],[{key:"of",value:function(t){return e.watcher||(e.watcher=new e(t)),e.watcher}}])}();g(D,"watcher",void 0);var F=function(){return v(function e(){h(this,e),g(this,"fileWatcher",void 0),g(this,"onCreate",u.noop),g(this,"onUpdate",u.noop),g(this,"onDelete",u.noop),this.fileWatcher=new D},[{key:"handleChange",value:function(){var e=this;this.fileWatcher.onChange(function(){var t=f(b().m(function t(n,r){var o,i;return b().w(function(t){for(;;)switch(t.n){case 0:o=r.type,i=o,t.n="create"===i?1:"delete"===i?2:"update"===i?3:4;break;case 1:return e.onCreate(n),t.a(3,5);case 2:return e.onDelete(n),t.a(3,5);case 3:return e.onUpdate(n),t.a(3,5);case 4:return t.a(3,5);case 5:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}())}},{key:"listion",value:function(e){this.fileWatcher.add(e),this.handleChange()}}])}(),N=function(){return v(function t(n){h(this,t),g(this,"scanAbsolute",void 0),g(this,"controllerBuilder",void 0),g(this,"controllerConfig",void 0),g(this,"controllerDeal",void 0),g(this,"routeManager",void 0),g(this,"controllerWatcher",void 0);var r=n.envParams.workRootDir;this.scanAbsolute=e.join(r,n.serverConfig.scan),this.controllerConfig=new j,this.controllerBuilder=new M(n,this.controllerConfig),this.controllerDeal=new E(this.scanAbsolute),this.controllerWatcher=new F,this.routeManager=n.routeManager},[{key:"scan",value:(n=f(b().m(function e(){var t,n=this;return b().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,P(this.scanAbsolute);case 1:return t=e.v,this.controllerConfig.updateMulti(this.controllerDeal.getBaseConfigMult(t)),e.n=2,this.buildResolve(t);case 2:e.v.forEach(function(e){var t=n.controllerConfig.getConfig(e);t.Controller&&C(t,n.routeManager)});case 3:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})},{key:"listen",value:function(){var e=this;this.controllerWatcher.onCreate=function(){var t=f(b().m(function t(n){return b().w(function(t){for(;;)switch(t.n){case 0:return e.controllerConfig.updateMulti(e.controllerDeal.getBaseConfigMult([n])),t.n=1,e.buildResolve([n]);case 1:t.v.forEach(function(t){var n=e.controllerConfig.getConfig(t);n.Controller&&C(n,e.routeManager)});case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),this.controllerWatcher.onUpdate=function(){var t=f(b().m(function t(n){return b().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.buildResolve([n]);case 1:t.v.forEach(function(t){var n=e.controllerConfig.getConfig(t);n.Controller&&O(n,e.routeManager)});case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),this.controllerWatcher.onDelete=function(){var t=f(b().m(function t(n){var r;return b().w(function(t){for(;;)switch(t.n){case 0:if(r=e.controllerConfig.getConfig(n)){t.n=1;break}return t.a(2);case 1:k(r,e.routeManager);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),this.controllerWatcher.listion(this.scanAbsolute)}},{key:"buildResolve",value:(t=f(b().m(function e(t){var n,r,o;return b().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.controllerBuilder.build(t);case 1:return n=e.v,this.controllerConfig.updateAbsoluteFilePath(n),o=this.controllerDeal,e.n=2,this.controllerDeal.loadMult(this.controllerConfig.getConfigList(Object.keys(n)));case 2:return r=o.formatMult.call(o,e.v),this.controllerConfig.updateMulti(r),e.a(2,Object.keys(n))}},e,this)})),function(e){return t.apply(this,arguments)})}]);var t,n}(),S=function(){var e=f(b().m(function e(t,r,o){var i;return b().w(function(e){for(;;)switch(e.n){case 0:return(i=n.configCtxWorkflow(new n.ConfigCtx)).use(n.collectBaseConfigMw(t.workRootDir,r)),i.use(n.collectPackageJsonMw()),i.use(n.collectTsconfigJsonMw()),i.use(n.collectDoraConfigMw("development")),i.use(n.wholeDoraConfigMw(o)),e.n=1,i.getResult();case 1:return e.a(2,e.v)}},e)}));return function(t,n,r){return e.apply(this,arguments)}}();exports.ServerWorkflow=N,exports.getConfigCtx=S,exports.getServerCtx=function(e,t,r){var o,i=n.configCtxWorkflow(new l.Ctx(e,t));return i.use(l.envParamsMw(r)),i.use(l.serverPlainMw()),i.use(l.serverScanMw(null===(o=e.getCmd())||void 0===o?void 0:o.scan)),i.use(l.serverCacheMw()),i.getResult()};
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{join as t,dirname as e,relative as r,extname as n}from"path";import{uriPathJoin as o,uuid as i}from"@cclr/utils";import{cLog as a,getDependencies as u,configCtxWorkflow as c,ConfigCtx as l,collectBaseConfigMw as s,collectPackageJsonMw as f,collectTsconfigJsonMw as h,collectDoraConfigMw as p,wholeDoraConfigMw as v}from"@doracli/helper";import{dirIterate as d,getCwd as g}from"@dorabag/file-pro";import{createCompiler as y,getNodeBuildConfigPreset as m}from"@doracli/esbuild";import{loadJson as b,loadJs as w}from"@dorabag/config-loader";import{defineControllerFun as C,DefaultHandlerName as O}from"@doracli/define-server";import{noop as k}from"@cclr/lang";import P from"chokidar";import{Ctx as j,envParamsMw as M,serverPlainMw as E,serverScanMw as F,serverCacheMw as D}from"@doracli/express";function x(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function A(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){x(i,n,o,a,u,"next",t)}function u(t){x(i,n,o,a,u,"throw",t)}a(void 0)})}}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_(n.key),n)}}function S(t,e,r){return e&&T(t.prototype,e),r&&T(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function R(t,e,r){return(e=_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function W(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function B(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?W(Object(r),!0).forEach(function(e){R(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function G(){
|
|
2
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
+
var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof u?n:u,l=Object.create(c.prototype);return U(l,"_invoke",function(r,n,o){var i,u,c,l=0,s=o||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,u=0,c=t,h.n=r,a}};function p(r,n){for(u=r,c=n,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],p=h.p,v=i[2];r>3?(o=v===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(u=0,h.v=n,h.n=i[1]):p<v&&(o=r<3||i[0]>n||n>v)&&(i[4]=r,i[5]=n,h.n=v,u=0))}if(o||r>1)return a;throw f=!0,n}return function(o,s,v){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,v),u=s,c=v;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(h.n=-1),p(u,c)):h.n=c:h.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=h.n<0)?c:r.call(n,h))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(r,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][n]?e(e([][n]())):(U(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,U(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,U(f,"constructor",l),U(l,"constructor",c),c.displayName="GeneratorFunction",U(l,o,"GeneratorFunction"),U(f),U(f,o,"Generator"),U(f,n,function(){return this}),U(f,"toString",function(){return"[object Generator]"}),(G=function(){return{w:i,m:h}})()}function U(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}U=function(t,e,r,n){function i(e,r){U(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},U(t,e,r,n)}function _(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}var K=function(t,e){var r=t.Controller,n=t.relativePath,i=new r,u=r.routeFunNameMap,c=r.funNameMethodMap,l=r.fileRoute,s=r.defaultHandlerType;Object.keys(u).forEach(function(t){var r=u[t],f=(c||{})[r]||["get","post"],h=o("/",n,l,t);f.forEach(function(t){e.add(h,t,function(t,e){return i[r].bind(i)(t,e)},{handlerType:s}),a.log("ser","Mount","[".concat(t.toUpperCase(),"] ").concat(h))})})},L=function(e,r){var n=e.relativePath,o=e.Controller,i=o.routeFunNameMap,u=o.funNameMethodMap;Object.keys(i).forEach(function(e){var o=i[e],c=(u||{})[o]||["get"],l=t("/",n,e);c.forEach(function(t){r.remove(l,t),a.log("ser","remove","[".concat(t.toUpperCase(),"] ").concat(l))})})},H=function(){var t=A(G().m(function t(e){var r,n;return G().w(function(t){for(;;)switch(t.p=t.n){case 0:return r=[],t.p=1,t.n=2,d(e,function(){var t=A(G().m(function t(e,n){return G().w(function(t){for(;;)switch(t.n){case 0:if(!n.isDirectory){t.n=1;break}return t.a(2);case 1:r.push(e);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}(),{recursive:!0});case 2:return t.a(2,r);case 3:return t.p=3,n=t.v,a.error("scan","error","扫描 ".concat(e," 目录失败\n")),a.debug("scan","error",n),t.a(2,r)}},t,null,[[1,3]])}));return function(e){return t.apply(this,arguments)}}(),I=function(){return S(function e(r,n){var o=this;N(this,e),this.ctx=r,this.controllerConfig=n,R(this,"compiler",void 0),R(this,"outdirAbsolute",void 0),R(this,"inputKeyMap",{}),R(this,"compilerCtxMap",new Map),R(this,"buildGroup",function(){var e=A(G().m(function e(r){var n,i,a;return G().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=o.compilerCtxMap.get(r),e.p=1,e.n=2,n.rebuild();case 2:return i=e.v,e.a(2,Object.keys(i.metafile.outputs).reduce(function(e,r){return i.metafile.outputs[r].entryPoint?(e[t(g(),i.metafile.outputs[r].entryPoint)]=t(g(),r),e):e},{}));case 3:return e.p=3,a=e.v,console.error(a),e.a(2,{})}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}()),this.outdirAbsolute=r.serverConfig.cacheDir,this.compiler=y(m({sourcemap:void 0,minify:!1,external:Object.keys(u(r.configCtx.getPackageConfig())),metafile:!0,splitting:!0,bundle:!0,outdir:this.outdirAbsolute,entryNames:"[dir]/[name]/[hash]"}))},[{key:"build",value:(r=A(G().m(function t(e){var r,n,o,a,u,c,l=this;return G().w(function(t){for(;;)switch(t.n){case 0:if(r=new Set,n=[],o=i(8),a={},e.forEach(function(t){var e;if(".ts"===(null===(e=l.controllerConfig.getConfig(t))||void 0===e?void 0:e.fileExt)){var i=l.inputKeyMap[t];i?r.add(i):n.push({in:t,out:l.getOutputPath(t,o)})}else a[t]=t}),!n.length){t.n=2;break}return t.n=1,this.compiler.context({entryPoints:n});case 1:u=t.v,this.compilerCtxMap.set(o,u),n.forEach(function(t){return l.inputKeyMap[t.in]=o}),r.add(o);case 2:return t.n=3,Promise.all(Array.from(r).map(function(t){return l.buildGroup(t)}));case 3:return c=t.v,t.a(2,c.reduce(function(t,e){return B(B({},t),e)},a))}},t,this)})),function(t){return r.apply(this,arguments)})},{key:"getOutputPath",value:function(r,n){var o=this.controllerConfig.getConfig(r),i=o.relativeFilePathOrigin,a=o.fileName;return t(n,e(i),a)}}]);var r}(),$=function(){return S(function t(){N(this,t),R(this,"map",new Map)},[{key:"update",value:function(t,e){this.map.set(t,B(B({},this.map.get(t)),e))}},{key:"updateMulti",value:function(t){var e=this;t.forEach(function(t){return e.update(t.absoluteFilePathOrigin,t)})}},{key:"updateAbsoluteFilePath",value:function(t){for(var e in t)Object.hasOwn(t,e)&&this.update(e,{absoluteFilePath:t[e]})}},{key:"getConfig",value:function(t){return this.map.get(t)}},{key:"getConfigList",value:function(t){var e=this;return t.map(function(t){return e.getConfig(t)})}}])}(),q=function(){var t=A(G().m(function t(e){var r,o,i,a;return G().w(function(t){for(;;)switch(t.n){case 0:r=e.absoluteFilePath,i=n(r),a=i,t.n=".js"===a||".mjs"===a?1:".json"===a?3:5;break;case 1:return t.n=2,w(r);case 2:case 4:return o=t.v,t.a(3,6);case 3:return t.n=4,b(r);case 5:return t.a(3,6);case 6:return e.orange=o.default||o,t.a(2,e)}},t)}));return function(e){return t.apply(this,arguments)}}(),z=function(){return S(function t(e){N(this,t),this.scanAbsolute=e},[{key:"getBaseConfigMult",value:function(t){var e=this;return t.map(function(t){return e.getBaseConfig(t)})}},{key:"getBaseConfig",value:function(t){return e=t,n=this.scanAbsolute,o=r(n,e),i=o.split("/"),a=i.pop()||"",u=i.join("/"),(c=a.match(/^(.*?)(\..*)$/))?{relativePath:u,fileName:c[1],fileExt:c[2],relativeFilePathOrigin:o,absoluteFilePathOrigin:e}:{relativeFilePathOrigin:o,absoluteFilePathOrigin:e};var e,n,o,i,a,u,c}},{key:"loadMult",value:function(t){return Promise.all(t.map(function(){var t=A(G().m(function t(e){return G().w(function(t){for(;;)if(0===t.n)return t.a(2,q(e))},t)}));return function(e){return t.apply(this,arguments)}}()))}},{key:"load",value:function(t){return q(t)}},{key:"formatMult",value:function(t){var e=this;return t.map(function(t){return e.format(t)})}},{key:"format",value:function(t){return function(t){var e,r,n=t.fileExt,o=t.fileName,i=t.orange;if(!i)return t;if(null===(e=r=".json"===n?C(function(t,e){e.json(i)}):i)||void 0===e||!e.handlerServer)return t;"FUN"===r.defineType&&(r.routeFunNameMap=R({},o||"",O));return r.defineType="CLASS",r.fileRoute=r.fileRoute||"/",B(B({},t),{},{Controller:r})}(t)}}])}(),J=function(){function t(e){N(this,t),R(this,"watcher",void 0),R(this,"watcherOptions",{ignoreInitial:!0,persistent:!0}),R(this,"changeCb",k),e&&(this.watcherOptions=B(B({},this.watcherOptions),e)),this.watcher=this.createWatcher([])}return S(t,[{key:"onChange",value:function(t){this.changeCb=t}},{key:"add",value:function(t){var e;null===(e=this.watcher)||void 0===e||e.add(t)}},{key:"unwatch",value:function(t){var e;null===(e=this.watcher)||void 0===e||e.unwatch(t)}},{key:"close",value:function(){this.watcher&&this.watcher.close()}},{key:"createWatcher",value:function(t){var e=this;return P.watch(t,this.watcherOptions).on("change",function(t){return e.changeCb(t,{type:"update"})}).on("add",function(t){return e.changeCb(t,{type:"create"})}).on("unlink",function(t){return e.changeCb(t,{type:"delete"})})}}],[{key:"of",value:function(e){return t.watcher||(t.watcher=new t(e)),t.watcher}}])}();R(J,"watcher",void 0);var Q=function(){return S(function t(){N(this,t),R(this,"fileWatcher",void 0),R(this,"onCreate",k),R(this,"onUpdate",k),R(this,"onDelete",k),this.fileWatcher=new J},[{key:"handleChange",value:function(){var t=this;this.fileWatcher.onChange(function(){var e=A(G().m(function e(r,n){var o,i;return G().w(function(e){for(;;)switch(e.n){case 0:o=n.type,i=o,e.n="create"===i?1:"delete"===i?2:"update"===i?3:4;break;case 1:return t.onCreate(r),e.a(3,5);case 2:return t.onDelete(r),e.a(3,5);case 3:return t.onUpdate(r),e.a(3,5);case 4:return e.a(3,5);case 5:return e.a(2)}},e)}));return function(t,r){return e.apply(this,arguments)}}())}},{key:"listion",value:function(t){this.fileWatcher.add(t),this.handleChange()}}])}(),V=function(){return S(function e(r){N(this,e),R(this,"scanAbsolute",void 0),R(this,"controllerBuilder",void 0),R(this,"controllerConfig",void 0),R(this,"controllerDeal",void 0),R(this,"routeManager",void 0),R(this,"controllerWatcher",void 0);var n=r.envParams.workRootDir;this.scanAbsolute=t(n,r.serverConfig.scan),this.controllerConfig=new $,this.controllerBuilder=new I(r,this.controllerConfig),this.controllerDeal=new z(this.scanAbsolute),this.controllerWatcher=new Q,this.routeManager=r.routeManager},[{key:"scan",value:(r=A(G().m(function t(){var e,r=this;return G().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,H(this.scanAbsolute);case 1:return e=t.v,this.controllerConfig.updateMulti(this.controllerDeal.getBaseConfigMult(e)),t.n=2,this.buildResolve(e);case 2:t.v.forEach(function(t){var e=r.controllerConfig.getConfig(t);e.Controller&&K(e,r.routeManager)});case 3:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"listen",value:function(){var e=this;this.controllerWatcher.onCreate=function(){var t=A(G().m(function t(r){return G().w(function(t){for(;;)switch(t.n){case 0:return e.controllerConfig.updateMulti(e.controllerDeal.getBaseConfigMult([r])),t.n=1,e.buildResolve([r]);case 1:t.v.forEach(function(t){var r=e.controllerConfig.getConfig(t);r.Controller&&K(r,e.routeManager)});case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),this.controllerWatcher.onUpdate=function(){var r=A(G().m(function r(n){return G().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,e.buildResolve([n]);case 1:r.v.forEach(function(r){var n,o,i,u,c,l,s,f,h,p=e.controllerConfig.getConfig(r);p.Controller&&(n=p,o=e.routeManager,i=n.relativePath,u=n.Controller,c=new u,l=u.routeFunNameMap,s=u.fileRoute,f=u.funNameMethodMap,h=u.defaultHandlerType,Object.keys(l).forEach(function(e){var r=l[e],n=(f||{})[r]||["get","post"],u=t("/",i,s,e);n.forEach(function(t){o.update(u,t,function(t,e){return c[r].bind(c)(t,e)},{handlerType:h}),a.log("ser","Update","[".concat(t.toUpperCase(),"] ").concat(u))})}))});case 2:return r.a(2)}},r)}));return function(t){return r.apply(this,arguments)}}(),this.controllerWatcher.onDelete=function(){var t=A(G().m(function t(r){var n;return G().w(function(t){for(;;)switch(t.n){case 0:if(n=e.controllerConfig.getConfig(r)){t.n=1;break}return t.a(2);case 1:L(n,e.routeManager);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),this.controllerWatcher.listion(this.scanAbsolute)}},{key:"buildResolve",value:(e=A(G().m(function t(e){var r,n,o;return G().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.controllerBuilder.build(e);case 1:return r=t.v,this.controllerConfig.updateAbsoluteFilePath(r),o=this.controllerDeal,t.n=2,this.controllerDeal.loadMult(this.controllerConfig.getConfigList(Object.keys(r)));case 2:return n=o.formatMult.call(o,t.v),this.controllerConfig.updateMulti(n),t.a(2,Object.keys(r))}},t,this)})),function(t){return e.apply(this,arguments)})}]);var e,r}(),X=function(){var t=A(G().m(function t(e,r,n){var o;return G().w(function(t){for(;;)switch(t.n){case 0:return(o=c(new l)).use(s(e.workRootDir,r)),o.use(f()),o.use(h()),o.use(p("development")),o.use(v(n)),t.n=1,o.getResult();case 1:return t.a(2,t.v)}},t)}));return function(e,r,n){return t.apply(this,arguments)}}(),Y=function(t,e,r){var n,o=c(new j(t,e));return o.use(M(r)),o.use(E()),o.use(F(null===(n=t.getCmd())||void 0===n?void 0:n.scan)),o.use(D()),o.getResult()};export{V as ServerWorkflow,X as getConfigCtx,Y as getServerCtx};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Ctx, RouteManager, TEnvParams } from '@doracli/express';
|
|
2
|
+
import { Compiler } from '@doracli/esbuild';
|
|
3
|
+
import { TPlainObject, TAny, PartialRecursive } from '@cclr/lang';
|
|
4
|
+
import { TController } from '@doracli/define-server';
|
|
5
|
+
import { ConfigCtx } from '@doracli/helper';
|
|
6
|
+
import { TDoraConfig } from '@doracli/type';
|
|
7
|
+
import { Application } from 'express';
|
|
8
|
+
|
|
9
|
+
type TControllerConfig = {
|
|
10
|
+
/** 原始文件的绝对路径 */
|
|
11
|
+
absoluteFilePathOrigin: string;
|
|
12
|
+
/** 原始文件相对路径 */
|
|
13
|
+
relativeFilePathOrigin: string;
|
|
14
|
+
/** 处理后文件绝对路径 */
|
|
15
|
+
absoluteFilePath: string;
|
|
16
|
+
/** 路由前缀 */
|
|
17
|
+
route: string;
|
|
18
|
+
/** 文件相对路径 - 路径部分 */
|
|
19
|
+
relativePath: string;
|
|
20
|
+
/** 文件后缀 */
|
|
21
|
+
fileExt: string;
|
|
22
|
+
/** 文件名称 */
|
|
23
|
+
fileName: string;
|
|
24
|
+
/** 文件原始内容,类,函数,json */
|
|
25
|
+
orange: TPlainObject;
|
|
26
|
+
/** 统一后的类型 */
|
|
27
|
+
Controller: TController;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
declare class ControllerConfig {
|
|
31
|
+
map: Map<string, TControllerConfig>;
|
|
32
|
+
update(absoluteFilePathOrigin: string, config: Partial<TControllerConfig>): void;
|
|
33
|
+
updateMulti(configs: Partial<TControllerConfig>[]): void;
|
|
34
|
+
updateAbsoluteFilePath(inOutMap: Record<string, string>): void;
|
|
35
|
+
getConfig(absoluteFilePathOrigin: string): TControllerConfig | undefined;
|
|
36
|
+
getConfigList(absoluteFilePathOriginList: string[]): (TControllerConfig | undefined)[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class ControllerBuilder {
|
|
40
|
+
private ctx;
|
|
41
|
+
private controllerConfig;
|
|
42
|
+
compiler: Compiler;
|
|
43
|
+
outdirAbsolute: string;
|
|
44
|
+
/**
|
|
45
|
+
* absoluteFilePathOrigin => ctxKey
|
|
46
|
+
*/
|
|
47
|
+
inputKeyMap: Record<string, string>;
|
|
48
|
+
/**
|
|
49
|
+
* ctxKey => compilerCtx
|
|
50
|
+
*/
|
|
51
|
+
compilerCtxMap: Map<string, Awaited<ReturnType<Compiler['context']>>>;
|
|
52
|
+
constructor(ctx: Ctx, controllerConfig: ControllerConfig);
|
|
53
|
+
/** 批量构建 */
|
|
54
|
+
build(absoluteFilePathOriginList: string[]): Promise<Record<string, string>>;
|
|
55
|
+
/**
|
|
56
|
+
* 根据编译上下文分组构建
|
|
57
|
+
* @param groupkey
|
|
58
|
+
* @returns {input => output}[]
|
|
59
|
+
*/
|
|
60
|
+
private buildGroup;
|
|
61
|
+
/** 获取输出文件路径 */
|
|
62
|
+
private getOutputPath;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 控制器处理类
|
|
67
|
+
*/
|
|
68
|
+
declare class ControllerDeal {
|
|
69
|
+
private scanAbsolute;
|
|
70
|
+
constructor(scanAbsolute: string);
|
|
71
|
+
/** 收集路径中的参数 多个 */
|
|
72
|
+
getBaseConfigMult(absolutePathList: string[]): ({
|
|
73
|
+
relativeFilePathOrigin: string;
|
|
74
|
+
absoluteFilePathOrigin: string;
|
|
75
|
+
relativePath?: undefined;
|
|
76
|
+
fileName?: undefined;
|
|
77
|
+
fileExt?: undefined;
|
|
78
|
+
} | {
|
|
79
|
+
relativePath: string;
|
|
80
|
+
fileName: string;
|
|
81
|
+
fileExt: string;
|
|
82
|
+
relativeFilePathOrigin: string;
|
|
83
|
+
absoluteFilePathOrigin: string;
|
|
84
|
+
})[];
|
|
85
|
+
/** 收集路径中的参数 */
|
|
86
|
+
getBaseConfig(absolutePath: string): {
|
|
87
|
+
relativeFilePathOrigin: string;
|
|
88
|
+
absoluteFilePathOrigin: string;
|
|
89
|
+
relativePath?: undefined;
|
|
90
|
+
fileName?: undefined;
|
|
91
|
+
fileExt?: undefined;
|
|
92
|
+
} | {
|
|
93
|
+
relativePath: string;
|
|
94
|
+
fileName: string;
|
|
95
|
+
fileExt: string;
|
|
96
|
+
relativeFilePathOrigin: string;
|
|
97
|
+
absoluteFilePathOrigin: string;
|
|
98
|
+
};
|
|
99
|
+
/** 加载多个配置 */
|
|
100
|
+
loadMult(configs: TControllerConfig[]): Promise<Partial<TControllerConfig>[]>;
|
|
101
|
+
/** 加载单个配置 */
|
|
102
|
+
load(config: TControllerConfig): Promise<Partial<TControllerConfig>>;
|
|
103
|
+
/** 格式化多个配置 */
|
|
104
|
+
formatMult(configs: Partial<TControllerConfig>[]): Partial<TControllerConfig>[];
|
|
105
|
+
/** 格式化配置 */
|
|
106
|
+
format(config: Partial<TControllerConfig>): Partial<TControllerConfig>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
declare class ControllerWatcher {
|
|
110
|
+
private fileWatcher;
|
|
111
|
+
onCreate: (path: string) => void;
|
|
112
|
+
onUpdate: (path: string) => void;
|
|
113
|
+
onDelete: (path: string) => void;
|
|
114
|
+
constructor();
|
|
115
|
+
private handleChange;
|
|
116
|
+
listion(path: string): void;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare class ServerWorkflow {
|
|
120
|
+
scanAbsolute: string;
|
|
121
|
+
controllerBuilder: ControllerBuilder;
|
|
122
|
+
controllerConfig: ControllerConfig;
|
|
123
|
+
controllerDeal: ControllerDeal;
|
|
124
|
+
routeManager: RouteManager;
|
|
125
|
+
controllerWatcher: ControllerWatcher;
|
|
126
|
+
constructor(ctx: Ctx);
|
|
127
|
+
scan(): Promise<void>;
|
|
128
|
+
listen(): void;
|
|
129
|
+
/**
|
|
130
|
+
* 1. 构建
|
|
131
|
+
* 2. 加载
|
|
132
|
+
* 3. 格式化
|
|
133
|
+
* @param absoluteFilePathOriginList 更新的文件
|
|
134
|
+
* @returns 更新的文件列表
|
|
135
|
+
*/
|
|
136
|
+
private buildResolve;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare const getConfigCtx: (envParams: TEnvParams, cmd: TAny, defaultDora: PartialRecursive<TDoraConfig>) => Promise<ConfigCtx>;
|
|
140
|
+
|
|
141
|
+
declare const getServerCtx: (configCtx: ConfigCtx, app: Application, envParams: TEnvParams) => Promise<Ctx>;
|
|
142
|
+
|
|
143
|
+
export { ServerWorkflow, getConfigCtx, getServerCtx };
|
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doracli/express-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "use server",
|
|
5
5
|
"author": "cclr <18843152354@163.com>",
|
|
6
6
|
"homepage": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"import": "./lib/esm/index.js",
|
|
11
|
+
"require": "./lib/cjs/index.js"
|
|
12
|
+
},
|
|
13
|
+
"types": "lib/type/index.d.ts",
|
|
9
14
|
"bin": {
|
|
10
15
|
"des": "bin/enter.mjs"
|
|
11
16
|
},
|
|
@@ -23,23 +28,25 @@
|
|
|
23
28
|
"scripts": {
|
|
24
29
|
"test": "vitest",
|
|
25
30
|
"g:test": "vitest run",
|
|
26
|
-
"build": "
|
|
27
|
-
"g:build": "
|
|
31
|
+
"build": "drr build",
|
|
32
|
+
"g:build": "drr build"
|
|
28
33
|
},
|
|
29
34
|
"dependencies": {
|
|
30
|
-
"@cclr/lang": "^0.1.
|
|
31
|
-
"@cclr/utils": "^0.1.
|
|
32
|
-
"@dorabag/config-loader": "^1.0.
|
|
35
|
+
"@cclr/lang": "^0.1.49",
|
|
36
|
+
"@cclr/utils": "^0.1.49",
|
|
37
|
+
"@dorabag/config-loader": "^1.0.16",
|
|
33
38
|
"@dorabag/file-pro": "^1.0.10",
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@doracli/
|
|
37
|
-
"@doracli/
|
|
38
|
-
"@doracli/
|
|
39
|
-
"@doracli/
|
|
40
|
-
"@
|
|
39
|
+
"@dorabag/open-browser": "^1.0.16",
|
|
40
|
+
"@dorabag/srv-tool": "^1.0.16",
|
|
41
|
+
"@doracli/commander": "0.0.5",
|
|
42
|
+
"@doracli/define-server": "0.0.5",
|
|
43
|
+
"@doracli/esbuild": "0.0.5",
|
|
44
|
+
"@doracli/express": "0.0.5",
|
|
45
|
+
"@doracli/helper": "0.0.5",
|
|
46
|
+
"@doracli/type": "0.0.5",
|
|
47
|
+
"@types/express": "^5.0.6",
|
|
41
48
|
"chokidar": "^4.0.3",
|
|
42
|
-
"express": "^5.1
|
|
49
|
+
"express": "^5.2.1"
|
|
43
50
|
},
|
|
44
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "ac4c6829b2cec621ecf66b6324843773e8b5141f"
|
|
45
52
|
}
|