gant-core 2.0.2 → 2.0.4

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/bin/index.js +21 -1
  3. package/bin/styletext-loader.mjs +30 -0
  4. package/lib/cli/config/index.js +155 -2
  5. package/lib/cli/config/index.mjs +3 -0
  6. package/lib/cli/copyfiles/index.js +33 -2
  7. package/lib/cli/copyfiles/index.mjs +3 -0
  8. package/lib/cli/create/config/index.js +1226 -4
  9. package/lib/cli/create/config/index.mjs +11 -0
  10. package/lib/cli/create/index.js +4 -2
  11. package/lib/cli/create/index.mjs +3 -0
  12. package/lib/cli/create/module/index.js +33214 -2
  13. package/lib/cli/create/module/index.mjs +3 -0
  14. package/lib/cli/i18n/index.js +22179 -3
  15. package/lib/cli/i18n/index.mjs +10 -0
  16. package/lib/cli/i18n/utils.js +180 -2
  17. package/lib/cli/i18n/utils.mjs +3 -0
  18. package/lib/cli/index.js +3655 -2
  19. package/lib/cli/index.mjs +3 -0
  20. package/lib/cli/routes/index.js +75 -2
  21. package/lib/cli/routes/index.mjs +3 -0
  22. package/lib/cli/tsconfig/index.js +70 -2
  23. package/lib/cli/tsconfig/index.mjs +3 -0
  24. package/lib/cli/utils/detectPort.js +120 -2
  25. package/lib/cli/utils/detectPort.mjs +3 -0
  26. package/lib/cli/utils/getJavascriptfile.js +14 -2
  27. package/lib/cli/utils/getJavascriptfile.mjs +3 -0
  28. package/lib/cli/utils/index.js +4948 -2
  29. package/lib/cli/utils/index.mjs +3 -0
  30. package/lib/cli/webpack/Webpack.js +60 -2
  31. package/lib/cli/webpack/Webpack.mjs +3 -0
  32. package/lib/cli/webpack/config/analyzer.config.js +17 -2
  33. package/lib/cli/webpack/config/analyzer.config.mjs +3 -0
  34. package/lib/cli/webpack/config/browsers.js +13 -2
  35. package/lib/cli/webpack/config/browsers.mjs +3 -0
  36. package/lib/cli/webpack/config/cssRules.js +80 -2
  37. package/lib/cli/webpack/config/cssRules.mjs +3 -0
  38. package/lib/cli/webpack/config/default.config.js +179 -2
  39. package/lib/cli/webpack/config/default.config.mjs +3 -0
  40. package/lib/cli/webpack/config/development.config.js +45 -2
  41. package/lib/cli/webpack/config/development.config.mjs +3 -0
  42. package/lib/cli/webpack/config/framework/index.js +25 -2
  43. package/lib/cli/webpack/config/framework/index.mjs +3 -0
  44. package/lib/cli/webpack/config/framework/react.js +23 -2
  45. package/lib/cli/webpack/config/framework/react.mjs +3 -0
  46. package/lib/cli/webpack/config/framework/vue.js +33 -2
  47. package/lib/cli/webpack/config/framework/vue.mjs +3 -0
  48. package/lib/cli/webpack/config/index.js +23 -2
  49. package/lib/cli/webpack/config/index.mjs +3 -0
  50. package/lib/cli/webpack/config/production.config.js +74 -2
  51. package/lib/cli/webpack/config/production.config.mjs +3 -0
  52. package/lib/cli/webpack/plugins/copy.js +20 -2
  53. package/lib/cli/webpack/plugins/copy.mjs +3 -0
  54. package/lib/cli/webpack/plugins/index.js +4 -2
  55. package/lib/cli/webpack/plugins/index.mjs +3 -0
  56. package/package.json +2 -2
  57. package/rollup.config.js +5 -4
  58. package/.changeset/README.md +0 -8
  59. package/.changeset/config.json +0 -11
  60. package/lib/cli/acorn.js +0 -3
  61. package/lib/cli/angular.js +0 -3
  62. package/lib/cli/babel.js +0 -3
  63. package/lib/cli/estree.js +0 -3
  64. package/lib/cli/flow.js +0 -3
  65. package/lib/cli/glimmer.js +0 -3
  66. package/lib/cli/graphql.js +0 -3
  67. package/lib/cli/html.js +0 -3
  68. package/lib/cli/markdown.js +0 -3
  69. package/lib/cli/meriyah.js +0 -3
  70. package/lib/cli/msmain.js +0 -65
  71. package/lib/cli/postcss.js +0 -3
  72. package/lib/cli/typescript.js +0 -3
  73. package/lib/cli/yaml.js +0 -3
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import e from"fs";import t,{dirname as n,resolve as r}from"path";import{fileURLToPath as i}from"node:url";import{j as o}from"../../utils/index.mjs";import{g as a}from"../../utils/detectPort.mjs";var s={},c={};!function(e){var t=/[|\\{}()[\]^$+*?.]/g,n=Object.prototype.hasOwnProperty,r=function(e,t){return n.apply(e,[t])};e.escapeRegExpChars=function(e){return e?String(e).replace(t,"\\$&"):""};var i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},o=/[&<>'"]/g;function a(e){return i[e]||e}function s(){return Function.prototype.toString.call(this)+';\nvar _ENCODE_HTML_RULES = {\n "&": "&amp;"\n , "<": "&lt;"\n , ">": "&gt;"\n , \'"\': "&#34;"\n , "\'": "&#39;"\n }\n , _MATCH_HTML = /[&<>\'"]/g;\nfunction encode_char(c) {\n return _ENCODE_HTML_RULES[c] || c;\n};\n'}e.escapeXML=function(e){return null==e?"":String(e).replace(o,a)};try{"function"==typeof Object.defineProperty?Object.defineProperty(e.escapeXML,"toString",{value:s}):e.escapeXML.toString=s}catch(e){console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)")}e.shallowCopy=function(e,t){if(t=t||{},null!=e)for(var n in t)r(t,n)&&"__proto__"!==n&&"constructor"!==n&&(e[n]=t[n]);return e},e.shallowCopyFromList=function(e,t,n){if(n=n||[],t=t||{},null!=e)for(var i=0;i<n.length;i++){var o=n[i];if(void 0!==t[o]){if(!r(t,o))continue;if("__proto__"===o||"constructor"===o)continue;e[o]=t[o]}}return e},e.cache={_data:{},set:function(e,t){this._data[e]=t},get:function(e){return this._data[e]},remove:function(e){delete this._data[e]},reset:function(){this._data={}}},e.hyphenToCamel=function(e){return e.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})},e.createNullProtoObjWherePossible="function"==typeof Object.create?function(){return Object.create(null)}:{__proto__:null}instanceof Object?function(){return{}}:function(){return{__proto__:null}},e.hasOwnOnlyObject=function(t){var n=e.createNullProtoObjWherePossible();for(var i in t)r(t,i)&&(n[i]=t[i]);return n}}(c);var l="3.1.10";!function(n){
3
+ /**
4
+ * @file Embedded JavaScript templating engine. {@link http://ejs.co}
5
+ * @author Matthew Eernisse <mde@fleegix.org>
6
+ * @author Tiancheng "Timothy" Gu <timothygu99@gmail.com>
7
+ * @project EJS
8
+ * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
9
+ */
10
+ var r=e,i=t,o=c,a=!1,s=l,u="locals",p=["delimiter","scope","context","debug","compileDebug","client","_with","rmWhitespace","strict","filename","async"],m=p.concat("cache"),h=/^\uFEFF/,f=/^[a-zA-Z_$][0-9a-zA-Z_$]*$/;function d(e,t){var i;if(t.some(function(t){return i=n.resolveInclude(e,t,!0),r.existsSync(i)}))return i}function g(e,t){var r,i=e.filename,o=arguments.length>1;if(e.cache){if(!i)throw new Error("cache option requires a filename");if(r=n.cache.get(i))return r;o||(t=_(i).toString().replace(h,""))}else if(!o){if(!i)throw new Error("Internal EJS error: no file name or template provided");t=_(i).toString().replace(h,"")}return r=n.compile(t,e),e.cache&&n.cache.set(i,r),r}function _(e){return n.fileLoader(e)}function w(e,t){var i=o.shallowCopy(o.createNullProtoObjWherePossible(),t);if(i.filename=function(e,t){var i,o,a=t.views,s=/^[A-Za-z]+:\\|^\//.exec(e);if(s&&s.length)e=e.replace(/^\/*/,""),i=Array.isArray(t.root)?d(e,t.root):n.resolveInclude(e,t.root||"/",!0);else if(t.filename&&(o=n.resolveInclude(e,t.filename),r.existsSync(o)&&(i=o)),!i&&Array.isArray(a)&&(i=d(e,a)),!i&&"function"!=typeof t.includer)throw new Error('Could not find the include file "'+t.escapeFunction(e)+'"');return i}(e,i),"function"==typeof t.includer){var a=t.includer(e,i.filename);if(a&&(a.filename&&(i.filename=a.filename),a.template))return g(i,a.template)}return g(i)}function y(e,t,n,r,i){var o=t.split("\n"),a=Math.max(r-3,0),s=Math.min(o.length,r+3),c=i(n),l=o.slice(a,s).map(function(e,t){var n=t+a+1;return(n==r?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=c,e.message=(c||"ejs")+":"+r+"\n"+l+"\n\n"+e.message,e}function v(e){return e.replace(/;(\s*$)/,"$1")}function b(e,t){var r=o.hasOwnOnlyObject(t),i=o.createNullProtoObjWherePossible();this.templateText=e,this.mode=null,this.truncate=!1,this.currentLine=1,this.source="",i.client=r.client||!1,i.escapeFunction=r.escape||r.escapeFunction||o.escapeXML,i.compileDebug=!1!==r.compileDebug,i.debug=!!r.debug,i.filename=r.filename,i.openDelimiter=r.openDelimiter||n.openDelimiter||"<",i.closeDelimiter=r.closeDelimiter||n.closeDelimiter||">",i.delimiter=r.delimiter||n.delimiter||"%",i.strict=r.strict||!1,i.context=r.context,i.cache=r.cache||!1,i.rmWhitespace=r.rmWhitespace,i.root=r.root,i.includer=r.includer,i.outputFunctionName=r.outputFunctionName,i.localsName=r.localsName||n.localsName||u,i.views=r.views,i.async=r.async,i.destructuredLocals=r.destructuredLocals,i.legacyInclude=void 0===r.legacyInclude||!!r.legacyInclude,i.strict?i._with=!1:i._with=void 0===r._with||r._with,this.opts=i,this.regex=this.createRegex()}n.cache=o.cache,n.fileLoader=r.readFileSync,n.localsName=u,n.promiseImpl=new Function("return this;")().Promise,n.resolveInclude=function(e,t,n){var r=i.dirname,o=i.extname,a=(0,i.resolve)(n?t:r(t),e);return o(e)||(a+=".ejs"),a},n.compile=function(e,t){return t&&t.scope&&(a||(console.warn("`scope` option is deprecated and will be removed in EJS 3"),a=!0),t.context||(t.context=t.scope),delete t.scope),new b(e,t).compile()},n.render=function(e,t,n){var r=t||o.createNullProtoObjWherePossible(),i=n||o.createNullProtoObjWherePossible();return 2==arguments.length&&o.shallowCopyFromList(i,r,p),g(i,e)(r)},n.renderFile=function(){var e,t,r,i=Array.prototype.slice.call(arguments),a=i.shift(),s={filename:a};return"function"==typeof arguments[arguments.length-1]&&(e=i.pop()),i.length?(t=i.shift(),i.length?o.shallowCopy(s,i.pop()):(t.settings&&(t.settings.views&&(s.views=t.settings.views),t.settings["view cache"]&&(s.cache=!0),(r=t.settings["view options"])&&o.shallowCopy(s,r)),o.shallowCopyFromList(s,t,m)),s.filename=a):t=o.createNullProtoObjWherePossible(),function(e,t,r){var i;if(!r){if("function"==typeof n.promiseImpl)return new n.promiseImpl(function(n,r){try{n(i=g(e)(t))}catch(e){r(e)}});throw new Error("Please provide a callback function")}try{i=g(e)(t)}catch(e){return r(e)}r(null,i)}(s,t,e)},n.Template=b,n.clearCache=function(){n.cache.reset()},b.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"},b.prototype={createRegex:function(){var e="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",t=o.escapeRegExpChars(this.opts.delimiter),n=o.escapeRegExpChars(this.opts.openDelimiter),r=o.escapeRegExpChars(this.opts.closeDelimiter);return e=e.replace(/%/g,t).replace(/</g,n).replace(/>/g,r),new RegExp(e)},compile:function(){var e,t,n,r=this.opts,a="",s="",c=r.escapeFunction,l=r.filename?JSON.stringify(r.filename):"undefined";if(!this.source){if(this.generateSource(),a+=' var __output = "";\n function __append(s) { if (s !== undefined && s !== null) __output += s }\n',r.outputFunctionName){if(!f.test(r.outputFunctionName))throw new Error("outputFunctionName is not a valid JS identifier.");a+=" var "+r.outputFunctionName+" = __append;\n"}if(r.localsName&&!f.test(r.localsName))throw new Error("localsName is not a valid JS identifier.");if(r.destructuredLocals&&r.destructuredLocals.length){for(var u=" var __locals = ("+r.localsName+" || {}),\n",p=0;p<r.destructuredLocals.length;p++){var m=r.destructuredLocals[p];if(!f.test(m))throw new Error("destructuredLocals["+p+"] is not a valid JS identifier.");p>0&&(u+=",\n "),u+=m+" = __locals."+m}a+=u+";\n"}!1!==r._with&&(a+=" with ("+r.localsName+" || {}) {\n",s+=" }\n"),s+=" return __output;\n",this.source=a+this.source+s}e=r.compileDebug?"var __line = 1\n , __lines = "+JSON.stringify(this.templateText)+"\n , __filename = "+l+";\ntry {\n"+this.source+"} catch (e) {\n rethrow(e, __lines, __filename, __line, escapeFn);\n}\n":this.source,r.client&&(e="escapeFn = escapeFn || "+c.toString()+";\n"+e,r.compileDebug&&(e="rethrow = rethrow || "+y.toString()+";\n"+e)),r.strict&&(e='"use strict";\n'+e),r.debug&&console.log(e),r.compileDebug&&r.filename&&(e=e+"\n//# sourceURL="+l+"\n");try{if(r.async)try{n=new Function("return (async function(){}).constructor;")()}catch(e){throw e instanceof SyntaxError?new Error("This environment does not support async/await"):e}else n=Function;t=new n(r.localsName+", escapeFn, include, rethrow",e)}catch(e){throw e instanceof SyntaxError&&(r.filename&&(e.message+=" in "+r.filename),e.message+=" while compiling ejs\n\n",e.message+="If the above error is not helpful, you may want to try EJS-Lint:\n",e.message+="https://github.com/RyanZim/EJS-Lint",r.async||(e.message+="\n",e.message+="Or, if you meant to create an async function, pass `async: true` as an option.")),e}var h=r.client?t:function(e){return t.apply(r.context,[e||o.createNullProtoObjWherePossible(),c,function(t,n){var i=o.shallowCopy(o.createNullProtoObjWherePossible(),e);return n&&(i=o.shallowCopy(i,n)),w(t,r)(i)},y])};if(r.filename&&"function"==typeof Object.defineProperty){var d=r.filename,g=i.basename(d,i.extname(d));try{Object.defineProperty(h,"name",{value:g,writable:!1,enumerable:!1,configurable:!0})}catch(e){}}return h},generateSource:function(){this.opts.rmWhitespace&&(this.templateText=this.templateText.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");var e=this,t=this.parseTemplateText(),n=this.opts.delimiter,r=this.opts.openDelimiter,i=this.opts.closeDelimiter;t&&t.length&&t.forEach(function(o,a){var s;if(0===o.indexOf(r+n)&&0!==o.indexOf(r+n+n)&&(s=t[a+2])!=n+i&&s!="-"+n+i&&s!="_"+n+i)throw new Error('Could not find matching close tag for "'+o+'".');e.scanLine(o)})},parseTemplateText:function(){for(var e,t=this.templateText,n=this.regex,r=n.exec(t),i=[];r;)0!==(e=r.index)&&(i.push(t.substring(0,e)),t=t.slice(e)),i.push(r[0]),t=t.slice(r[0].length),r=n.exec(t);return t&&i.push(t),i},_addOutput:function(e){if(this.truncate&&(e=e.replace(/^(?:\r\n|\r|\n)/,""),this.truncate=!1),!e)return e;e=(e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/"/g,'\\"'),this.source+=' ; __append("'+e+'")\n'},scanLine:function(e){var t,n=this.opts.delimiter,r=this.opts.openDelimiter,i=this.opts.closeDelimiter;switch(t=e.split("\n").length-1,e){case r+n:case r+n+"_":this.mode=b.modes.EVAL;break;case r+n+"=":this.mode=b.modes.ESCAPED;break;case r+n+"-":this.mode=b.modes.RAW;break;case r+n+"#":this.mode=b.modes.COMMENT;break;case r+n+n:this.mode=b.modes.LITERAL,this.source+=' ; __append("'+e.replace(r+n+n,r+n)+'")\n';break;case n+n+i:this.mode=b.modes.LITERAL,this.source+=' ; __append("'+e.replace(n+n+i,n+i)+'")\n';break;case n+i:case"-"+n+i:case"_"+n+i:this.mode==b.modes.LITERAL&&this._addOutput(e),this.mode=null,this.truncate=0===e.indexOf("-")||0===e.indexOf("_");break;default:if(this.mode){switch(this.mode){case b.modes.EVAL:case b.modes.ESCAPED:case b.modes.RAW:e.lastIndexOf("//")>e.lastIndexOf("\n")&&(e+="\n")}switch(this.mode){case b.modes.EVAL:this.source+=" ; "+e+"\n";break;case b.modes.ESCAPED:this.source+=" ; __append(escapeFn("+v(e)+"))\n";break;case b.modes.RAW:this.source+=" ; __append("+v(e)+")\n";break;case b.modes.COMMENT:break;case b.modes.LITERAL:this._addOutput(e)}}else this._addOutput(e)}this.opts.compileDebug&&t&&(this.currentLine+=t,this.source+=" ; __line = "+this.currentLine+"\n")}},n.escapeXML=o.escapeXML,n.__express=n.renderFile,n.VERSION=s,n.name="ejs","undefined"!=typeof window&&(window.ejs=n)}(s);var u=a(s);const p=n(i(import.meta.url)),m=(t,n,i)=>{const a=e.readFileSync(r(p,"vue"===i?"../../template/template.vue.config.txt":"../../template/template.config.txt"),"utf-8"),s=e.readFileSync(r(p,"../../template/template.proxy.ts"),"utf-8"),c=u.compile(a),l=u.compile(s);o(r(t,"config")),e.writeFileSync(r(t,"config/config.ts"),c({name:n})),e.writeFileSync(r(t,"config/proxy.ts"),l({}))};export{m as c,u as e};
11
+ //# sourceMappingURL=index.mjs.map
@@ -1,3 +1,5 @@
1
- #!/usr/bin/env node
2
- "use strict";require("./module/index.js");
1
+ 'use strict';
2
+
3
+ var create_module_index = require('./module/index.js');
4
+
3
5
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{c as m}from"./module/index.mjs";
3
+ //# sourceMappingURL=index.mjs.map