@maka/maka-cli 4.5.2 → 4.5.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/bundle/obf/package.json +1 -1
- package/bundle/obf/src/command.js +1 -1
- package/bundle/obf/src/commands/_index.js +1 -1
- package/bundle/obf/src/commands/aws/_index.js +1 -1
- package/bundle/obf/src/commands/aws/aws.command.js +1 -1
- package/bundle/obf/src/commands/aws/ci.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/ckp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/csg.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/di.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/dkp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/dsg.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/rbi.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/rkp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/sth.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/ti.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/build/_index.js +1 -1
- package/bundle/obf/src/commands/build/build.js +1 -1
- package/bundle/obf/src/commands/build/docker.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/create.js +1 -1
- package/bundle/obf/src/commands/debug.js +1 -1
- package/bundle/obf/src/commands/deploy.js +1 -1
- package/bundle/obf/src/commands/game/_index.js +1 -1
- package/bundle/obf/src/commands/game/battleship.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/play.command.js +1 -1
- package/bundle/obf/src/commands/game/pong.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/snake.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/tetris.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/generate.js +1 -1
- package/bundle/obf/src/commands/get/_index.js +1 -1
- package/bundle/obf/src/commands/get/get.command.js +1 -1
- package/bundle/obf/src/commands/get/global.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/get/local.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/get/whoami.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/help.js +1 -1
- package/bundle/obf/src/commands/install.js +1 -1
- package/bundle/obf/src/commands/jsdoc.js +1 -1
- package/bundle/obf/src/commands/lint.js +1 -1
- package/bundle/obf/src/commands/login.js +1 -1
- package/bundle/obf/src/commands/logout.js +1 -1
- package/bundle/obf/src/commands/logs.js +1 -1
- package/bundle/obf/src/commands/maka.cmd.js +1 -1
- package/bundle/obf/src/commands/murder.js +1 -1
- package/bundle/obf/src/commands/proxy.js +1 -1
- package/bundle/obf/src/commands/reconfig.js +1 -1
- package/bundle/obf/src/commands/run/_index.js +1 -1
- package/bundle/obf/src/commands/run/docker.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/run/run.command.js +1 -1
- package/bundle/obf/src/commands/set/_index.js +1 -1
- package/bundle/obf/src/commands/set/global.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/set/local.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/set/set.command.js +1 -1
- package/bundle/obf/src/commands/ssh.js +1 -1
- package/bundle/obf/src/commands/ssl.js +1 -1
- package/bundle/obf/src/commands/test.js +1 -1
- package/bundle/obf/src/commands/version.js +1 -1
- package/bundle/obf/src/error.js +1 -1
- package/bundle/obf/src/generator.js +1 -1
- package/bundle/obf/src/generators/_index.js +1 -1
- package/bundle/obf/src/generators/api.js +1 -1
- package/bundle/obf/src/generators/collection.js +1 -1
- package/bundle/obf/src/generators/component.js +1 -1
- package/bundle/obf/src/generators/config.js +1 -1
- package/bundle/obf/src/generators/dbc.js +1 -1
- package/bundle/obf/src/generators/dockerfile.js +1 -1
- package/bundle/obf/src/generators/hook.js +1 -1
- package/bundle/obf/src/generators/kit.js +1 -1
- package/bundle/obf/src/generators/layout.js +1 -1
- package/bundle/obf/src/generators/maka.gen.js +1 -1
- package/bundle/obf/src/generators/methods.js +1 -1
- package/bundle/obf/src/generators/package.js +1 -1
- package/bundle/obf/src/generators/page.js +1 -1
- package/bundle/obf/src/generators/publish.js +1 -1
- package/bundle/obf/src/generators/route.js +1 -1
- package/bundle/obf/src/generators/service.js +1 -1
- package/bundle/obf/src/generators/services/_index.js +1 -1
- package/bundle/obf/src/generators/services/openssl.js +1 -1
- package/bundle/obf/src/generators/services/translation.js +1 -1
- package/bundle/obf/src/maka.js +1 -1
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/index.js.jsx +20 -6
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/index.js.tsx +21 -7
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/index.js.jsx +10 -0
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/index.js.tsx +10 -0
- package/bundle/obf/src/templates/meteor/app/imports/startup/server/index.js.jsx +25 -14
- package/bundle/obf/src/templates/meteor/app/imports/startup/server/index.js.tsx +25 -13
- package/bundle/obf/src/templates/meteor/template/template.js.jsx +1 -1
- package/bundle/obf/src/templates/meteor/template/template.js.tsx +1 -1
- package/bundle/obf/src/templates/react/component/component.js.jsx +2 -6
- package/bundle/obf/src/templates/react/component/component.js.tsx +2 -6
- package/bundle/obf/src/templates/react/hook/hook.js.jsx +1 -5
- package/bundle/obf/src/templates/react/hook/hook.js.tsx +1 -5
- package/bundle/obf/src/tool.js +1 -1
- package/bundle/obf/src/tools/actions/actions.class.js +1 -1
- package/bundle/obf/src/tools/actions/actions.test.js +1 -1
- package/bundle/obf/src/tools/aws/aws.class.js +1 -1
- package/bundle/obf/src/tools/aws/aws.interfaces.js +1 -1
- package/bundle/obf/src/tools/docker/docker.class.js +1 -1
- package/bundle/obf/src/tools/docker/docker.interfaces.js +1 -1
- package/bundle/obf/src/tools/fsi/fsi.class.js +1 -1
- package/bundle/obf/src/tools/fsi/fsi.interfaces.js +1 -1
- package/bundle/obf/src/tools/https/https.class.js +1 -1
- package/bundle/obf/src/tools/https/https.interface.js +1 -1
- package/bundle/obf/src/tools/log/log.class.js +1 -1
- package/bundle/obf/src/tools/log/log.interfaces.js +1 -1
- package/bundle/obf/src/tools/spawn-async/spawn-async.class.js +1 -1
- package/bundle/obf/src/tools/spawn-async/spawn-async.interfaces.js +1 -1
- package/bundle/obf/src/tools/ssh/ssh.class.js +1 -1
- package/bundle/obf/src/tools/ssh/ssh.interfaces.js +1 -1
- package/bundle/obf/src/tools/ssl/ssl.class.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function a70d(a,b){const c=a70c();return a70d=function(d,e){d=d-
|
|
1
|
+
function a70c(){const n=['toString','resourceName','12ISepVG','49291SRSZrZ','tsx','maka\x20{generate,\x20g}:{publish,\x20p}\x20<name>','1338245lthEUq','apply','create','4920Umhuzc','server/publish.','850428qUjgpR','25NSpLua','15112GTzDsj','(((.+)+)+)+$','18OrUEyt','Scaffolding\x20for\x20a\x20publish\x20function.\x0ahttps://docs.meteor.com/api/pubsub.html','145154LHKntd','engines','templateContent','getProjectConfig','756SczjJk','9260784UuwLuH','search','18689770ekpkDb','fsi'];a70c=function(){return n;};return a70c();}const a70k=a70d;function a70d(a,b){const c=a70c();return a70d=function(d,e){d=d-0x140;let f=c[d];return f;},a70d(a,b);}(function(a,b){const h=a70d,c=a();while(!![]){try{const d=-parseInt(h(0x149))/0x1*(-parseInt(h(0x14e))/0x2)+parseInt(h(0x159))/0x3*(-parseInt(h(0x148))/0x4)+parseInt(h(0x143))/0x5*(-parseInt(h(0x14c))/0x6)+-parseInt(h(0x152))/0x7*(parseInt(h(0x14a))/0x8)+parseInt(h(0x153))/0x9+-parseInt(h(0x155))/0xa+parseInt(h(0x140))/0xb*(parseInt(h(0x146))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a70c,0xe8f87));const a70b=(function(){let a=!![];return function(b,c){const d=a?function(){const i=a70d;if(c){const e=c[i(0x144)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a70a=a70b(this,function(){const j=a70d;return a70a[j(0x157)]()[j(0x154)]('(((.+)+)+)+$')[j(0x157)]()['constructor'](a70a)[j(0x154)](j(0x14b));});a70a();import{paramCase}from'change-case';import{Generator}from'../generator.js';Generator[a70k(0x145)]({'name':'publish','aliases':['p'],'usage':a70k(0x142),'shortDesc':a70k(0x14d),'validOpts':[],'examples':['maka\x20g:publish\x20todos']},async function(a,b){const l=a70k,c=this[l(0x156)][l(0x151)]();this[l(0x156)]['withValue'](c,async()=>{const m=l,d={'name':b['resourceName'],'collection':paramCase(b[m(0x158)]),'noRename':!![]};let e='js';c[m(0x14f)]['js']===m(0x141)&&(e='ts');const f=this[m(0x156)]['rewriteDestinationPathForEngine']({'pathParts':[m(0x147)+c[m(0x14f)]['js']]}),g=this['fsi'][m(0x150)]({'srcPath':'publish/publish.'+e,'context':d,'config':c});this[m(0x156)]['injectAtEndOfFile']({'filePath':f,'content':'\x0a'+g});});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a71d(a,b){const c=a71c();return a71d=function(d,e){d=d-0x148;let f=c[d];return f;},a71d(a,b);}const a71x=a71d;(function(a,b){const v=a71d,c=a();while(!![]){try{const d=parseInt(v(0x16e))/0x1*(parseInt(v(0x159))/0x2)+-parseInt(v(0x168))/0x3+-parseInt(v(0x184))/0x4*(-parseInt(v(0x180))/0x5)+parseInt(v(0x15d))/0x6*(-parseInt(v(0x14a))/0x7)+parseInt(v(0x158))/0x8*(parseInt(v(0x163))/0x9)+-parseInt(v(0x172))/0xa+-parseInt(v(0x148))/0xb*(-parseInt(v(0x17e))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a71c,0x4bf18));const a71b=(function(){let a=!![];return function(b,c){const d=a?function(){if(c){const e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a71a=a71b(this,function(){const w=a71d;return a71a[w(0x152)]()['search']('(((.+)+)+)+$')[w(0x152)]()[w(0x16d)](a71a)['search'](w(0x14b));});a71a();import a71e from'path';import{Generator}from'../generator.js';import{Log}from'../tools/log/log.class.js';import a71f from'../generators/maka.gen.js';import{camelCase,paramCase,pascalCase}from'change-case';const aliases=['r'];Generator['create']({'name':'route','aliases':aliases,'validOpts':[a71x(0x15f),a71x(0x161),a71x(0x17f),a71x(0x171),a71x(0x167),'root',a71x(0x156),a71x(0x153)],'usage':'maka\x20{generate,\x20g}:{route,\x20r}\x20[path/]<name>\x20[url]\x20[--private]','shortDesc':'Scaffolding\x20for\x20a\x20Route.','examples':['maka\x20g:route\x20todosIndex\x20todos','maka\x20g:route\x20todosEdit\x20todos/:id/edit',a71x(0x17b),'maka\x20g:route\x20lists/listIndex\x20lists']},function(a,b){const y=a71x;try{const c=this[y(0x14c)][y(0x162)]();this[y(0x14c)][y(0x154)](c,async()=>{const z=y,d=b[z(0x15f)]??![];let f=paramCase(a[0x0]),g='/'+f;a[z(0x174)]>0x1&&(g='/'+a['filter'](function(l){return l!=='/';})[z(0x169)]('/')[z(0x17d)]());f=camelCase(f);b[z(0x161)]&&(b[z(0x161)]=camelCase(b[z(0x161)]));const h=a71e[z(0x169)](z(0x160),f,f),i={'name':f,'fileCase':paramCase(f),'camelCaseName':camelCase(f),'url':g,'layout':b[z(0x161)]||z(0x16f),'templatePath':h,'templateName':pascalCase(f),'client':c[z(0x15e)][z(0x15b)],'newForm':![],'withTranslations':c['features'][z(0x150)]};d&&(i['layout']='PrivateLayout');if(!b['root']){const l=a71f[z(0x14d)](z(0x17a));l&&await l['invoke'](a,b);}let j,k;if(c[z(0x15e)][z(0x15b)]===z(0x176)){if(c[z(0x15e)][z(0x155)]===z(0x170)){const p=this[z(0x14c)][z(0x14f)]({'pathParts':[z(0x177),'startup','lib','routes.js']});j=this['fsi']['rewriteDestinationPathForEngine']({'pathParts':[p],'config':c});}else{const q=this['fsi'][z(0x14f)]({'pathParts':['imports','startup',z(0x15b),z(0x14e)]});j=this['fsi'][z(0x149)]({'pathParts':[q],'config':c});}const m=this[z(0x14c)]['readFileLines'](j)[z(0x182)]((r,s)=>{const A=z;return r['includes'](A(0x157))?s+0x1:null;})[z(0x16a)](r=>r!==null);let n=this[z(0x14c)][z(0x179)](j)[z(0x182)]((r,s)=>{const B=z;return r['includes'](B(0x181))?s+0x1:null;})['filter'](r=>r!==null),o=this['fsi'][z(0x179)](j)[z(0x182)]((r,s)=>{return r['includes']('const\x20privateRoutes\x20=\x20(<>')?s+0x1:null;})[z(0x16a)](r=>r!==null);n[z(0x174)]>0x0&&o[z(0x174)]>0x0&&(i['newForm']=!![]);k=this[z(0x14c)][z(0x151)]({'srcPath':z(0x15c),'framework':z(0x176),'context':i,'config':c});if(n[z(0x174)]>0x0||o[z(0x174)]>0x0){this[z(0x14c)]['injectAfterLineNumber']({'filePath':j,'content':k,'lineNumber':m[0x0]});if(d&&o[z(0x174)]>0x0)o=this[z(0x14c)][z(0x179)](j)['map']((r,s)=>{const C=z;return r['includes'](C(0x16b))?s+0x1:null;})['filter'](r=>r!==null),this['fsi'][z(0x165)]({'filePath':j,'content':'\x09{'+i['templateName']+'}','lineNumber':o[0x0]});else n[z(0x174)]>0x0?(n=this[z(0x14c)]['readFileLines'](j)[z(0x182)]((r,s)=>{return r['includes']('const\x20publicRoutes\x20=\x20(<>')?s+0x1:null;})[z(0x16a)](r=>r!==null),this[z(0x14c)][z(0x165)]({'filePath':j,'content':'\x09{'+i[z(0x185)]+'}','lineNumber':n[0x0]})):Log['warn']('Could\x20not\x20find\x20a\x20suitable\x20location\x20to\x20enable\x20this\x20route.\x20\x20Please\x20inspect\x20'+j);}else{const r=this['fsi'][z(0x179)](j)['map'](u=>{const D=z;return u['includes'](D(0x178));}),s=r[z(0x166)](!![])>-0x1,t=s?z(0x173):'</Router>';this[z(0x14c)][z(0x175)]({'filePath':j,'content':z(0x183)+k+z(0x183),'begin':z(0x15a),'end':t});}}else{if(c[z(0x15e)][z(0x15b)]===z(0x164)){const u=this['fsi'][z(0x14f)]({'pathParts':[z(0x177),z(0x17c),z(0x15b),z(0x14e)]});j=this[z(0x14c)][z(0x149)]({'pathParts':[u],'config':c}),k=this[z(0x14c)][z(0x151)]({'srcPath':z(0x15c),'context':i}),this[z(0x14c)]['injectAtEndOfFile']({'filePath':j,'content':'\x0a'+k});}}});}catch(d){Log[y(0x16c)](d);}});function a71c(){const E=['route/route.js','324vlBijU','engines','private','/imports/ui/pages','layout','getProjectConfig','72zwMHdq','vanilla','injectAfterLineNumber','indexOf','config','1598805qZjtzP','join','filter','const\x20privateRoutes\x20=\x20(<>','error','constructor','29582jePUVt','MasterLayout','true','cwd','3456360SLCpxY','<Route','length','injectIntoFile','react','imports','\x22*\x22','readFileLines','page','maka\x20g:route\x20usersShow\x20users/:id/show\x20--layout\x20userView','startup','toLowerCase','7944VTEPBs','only','35OQnLwR','const\x20publicRoutes\x20=\x20(<>','map','\x0a\x09\x09','231524QOxJrX','templateName','9427rtyYrd','rewriteDestinationPathForEngine','49133PGknhu','(((.+)+)+)+$','fsi','findGenerator','routes.js','pathFromApp','withTranslations','templateContent','toString','url','withValue','ssr','withHook','import\x20*\x20as\x20Component\x20from\x20\x27./templates\x27;','477832guFZvn','8HTChsr','<Router','client'];a71c=function(){return E;};return a71c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a72l=a72d;(function(a,b){const j=a72d,c=a();while(!![]){try{const d=-parseInt(j(
|
|
1
|
+
const a72l=a72d;(function(a,b){const j=a72d,c=a();while(!![]){try{const d=-parseInt(j(0x13f))/0x1*(-parseInt(j(0x144))/0x2)+-parseInt(j(0x15d))/0x3+-parseInt(j(0x15a))/0x4+parseInt(j(0x141))/0x5*(-parseInt(j(0x160))/0x6)+-parseInt(j(0x155))/0x7*(-parseInt(j(0x150))/0x8)+parseInt(j(0x143))/0x9*(-parseInt(j(0x146))/0xa)+parseInt(j(0x152))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a72c,0x7fc3f));const a72b=(function(){let a=!![];return function(b,c){const d=a?function(){if(c){const e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a72a=a72b(this,function(){const k=a72d;return a72a['toString']()[k(0x14b)](k(0x148))[k(0x145)]()['constructor'](a72a)['search']('(((.+)+)+)+$');});a72a();import{camelCase,paramCase,pascalCase}from'change-case';function a72c(){const o=['(((.+)+)+)+$','maka\x20g:svc\x20logger','engines','search','pathFromApp','getProjectConfig','service','checkNpmPackage','32XOUKRa','imports','4395380lVMPzc','startup','Installing\x20winston','1809542yPUTQR','svc','resourceName','lib','Generate\x20a\x20service\x20to\x20run\x20within\x20your\x20meteor\x20application.','3047532dNuhbE','winston','create','3045078amUQPl','logger','error','6WDCIVy','maka\x20{generate,\x20g}:{service}\x20[service-type]','service/logger/logger.js','withValue','141557aDkIoC','fsi','109115ePqiVa','services','76833QvanMl','14BSQTjb','toString','120mPhlZv','type'];a72c=function(){return o;};return a72c();}import{Generator}from'../generator.js';import{Log}from'../tools/log/log.class.js';function a72d(a,b){const c=a72c();return a72d=function(d,e){d=d-0x13e;let f=c[d];return f;},a72d(a,b);}Generator[a72l(0x15c)]({'name':a72l(0x14e),'aliases':[a72l(0x156)],'usage':a72l(0x161),'shortDesc':a72l(0x159),'validOpts':[a72l(0x147)],'validArgs':[a72l(0x15e)],'maxArgLength':0x1,'minArgLength':0x1,'examples':[a72l(0x149)]},async function(a,b){const m=a72l;try{const c=this[m(0x140)][m(0x14d)]();this[m(0x140)][m(0x13e)](c,async()=>{const n=m,d=this[n(0x140)][n(0x14c)]({}),f=paramCase(b['resourceName']),g={'name':pascalCase(b[n(0x157)]),'fileName':f,'camelCase':camelCase(b[n(0x157)]),'type':a[0x0],'engine':c[n(0x14a)]['js'],'noRename':!![]};let h='js';c['engines']['js']==='tsx'&&(h='ts');if(a[0x0]===n(0x15e)){!this['fsi'][n(0x14f)](n(0x15b))&&await this[n(0x140)]['installNpmPackage']('winston\x20setimmediate',{'cwd':d,'msg':n(0x154)});const i=this[n(0x140)][n(0x14c)]({'pathParts':[n(0x151),n(0x153),n(0x158),n(0x142),f+'.'+h]});this[n(0x140)]['template']({'srcPath':n(0x162),'destPath':i,'context':g,'config':c});}});}catch(d){Log[m(0x15f)](d);}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var f=a73d,c=a();while(!![]){try{var d=parseInt(f(
|
|
1
|
+
(function(a,b){var f=a73d,c=a();while(!![]){try{var d=parseInt(f(0x1c1))/0x1*(parseInt(f(0x1c0))/0x2)+-parseInt(f(0x1c2))/0x3+-parseInt(f(0x1c3))/0x4+parseInt(f(0x1be))/0x5+-parseInt(f(0x1c4))/0x6*(-parseInt(f(0x1c5))/0x7)+parseInt(f(0x1c7))/0x8+parseInt(f(0x1c6))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a73c,0x74d13));function a73c(){var i=['constructor','6IxhWaY','79087HILMrn','2252361jdjXWZ','3406108hHydqV','1653810GChJBE','21ylgpBt','2318391txIBlP','4410648HFQWPb','apply','toString','(((.+)+)+)+$','search','1038505xJUOLS'];a73c=function(){return i;};return a73c();}var a73b=(function(){var a=!![];return function(b,c){var d=a?function(){var g=a73d;if(c){var e=c[g(0x1c8)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a73a=a73b(this,function(){var h=a73d;return a73a['toString']()['search'](h(0x1bc))[h(0x1c9)]()[h(0x1bf)](a73a)[h(0x1bd)](h(0x1bc));});function a73d(a,b){var c=a73c();return a73d=function(d,e){d=d-0x1bc;var f=c[d];return f;},a73d(a,b);}a73a();import'./translation.js';import'./openssl.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a74c(){const
|
|
1
|
+
function a74c(){const o=['getGlobalConfig','fsi','appName','4oIioam','toString','(((.+)+)+)+$','getProjectConfig','openssl.conf','constructor','template','error','615hHuCyn','2577393InOudA','apply','maka\x20g:sslconfig\x20--env\x20dev','1110016aVgTSn','148320EVbesp','maka\x20{generate,\x20g}:sslconfig','env','getConfigPath','service','144348FOkoXg','openssl/openssl.conf','1028AiXHxi','_keys','610526ttRjwL','72985TNiWIm'];a74c=function(){return o;};return a74c();}const a74l=a74d;(function(a,b){const i=a74d,c=a();while(!![]){try{const d=-parseInt(i(0xcf))/0x1+-parseInt(i(0xcc))/0x2*(parseInt(i(0xc0))/0x3)+-parseInt(i(0xd3))/0x4*(-parseInt(i(0xc5))/0x5)+parseInt(i(0xca))/0x6+parseInt(i(0xce))/0x7+-parseInt(i(0xc4))/0x8+parseInt(i(0xc1))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a74c,0x1ae82));const a74b=(function(){let a=!![];return function(b,c){const d=a?function(){const j=a74d;if(c){const e=c[j(0xc2)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a74a=a74b(this,function(){const k=a74d;return a74a[k(0xd4)]()['search'](k(0xba))['toString']()[k(0xbd)](a74a)['search'](k(0xba));});a74a();function a74d(a,b){const c=a74c();return a74d=function(d,e){d=d-0xba;let f=c[d];return f;},a74d(a,b);}import{Generator}from'../../generator.js';import{Log}from'../../tools/log/log.class.js';import a74e from'path';Generator['create']({'name':'sslconfig','usage':a74l(0xc6),'shortDesc':'Generate\x20a\x20new\x20openssl\x20config\x20file','noResource':!![],'requiredOpts':[a74l(0xc7)],'examples':[a74l(0xc3)],'validOpts':[a74l(0xc7)]},async function(a,b){const m=a74l;try{const c=await this['fsi'][m(0xbb)](),d=await this[m(0xd1)][m(0xd0)](),f=this['fsi'][m(0xc8)](b[m(0xc7)]),g=a74e['join'](f,m(0xcd),m(0xbc));await this[m(0xd1)]['withValue'](c,async()=>{const n=m,h={'app':d[n(0xd2)],'noRename':!![]};await this[n(0xd1)][n(0xbe)]({'srcPath':n(0xcb),'destPath':g,'framework':n(0xc9),'context':h,'config':c});});}catch(h){Log[m(0xbf)](h);}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a75d(a,b){const c=a75c();return a75d=function(d,e){d=d-0x179;let f=c[d];return f;},a75d(a,b);}function a75c(){const D=['20940SzgKiQ','i18next','isFile','installNpmPackage','findAppDirectory','index.js','rewriteDestinationPathForEngine','startup','(((.+)+)+)+$','591isvedh','lib','injectAtBeginningOfFile','lang','fsi','translations','root','index.','template','Locale\x20already\x20exported:\x20','i18next\x20i18next-browser-languagedetector\x20react-i18next','services','i18n/i18n.js','checkNpmPackage','grep','import\x20\x27../lib/services/translations/i18n\x27;\x0a','error','appName','getGlobalConfig','toString','i18n.js','i18n/index.js','readFileSync','7220tQGFPc','export\x20{\x20default\x20as\x20','1355BFgvJe','engines','service','7028848TAdpFm','Verifying\x20npm\x20package\x20requirements:\x20i18next\x20...','injectAtEndOfFile','features.withTranslations','setProjectConfig','true','warn','2270sJpzyJ','pathFromApp','search','imports','i18n/locales.js','exit','i18n','ssr','.js','7AxlbxR','6651150BKwdlI','4732776qdcQAN','locales','withValue','maka\x20g:translation\x20--lang=en\x20(default)','server','getProjectConfig','Generate\x20a\x20new\x20locale\x20translation','1658512YsKTbJ','apply','create','import\x20\x27../lib/services/translations/i18n\x27;'];a75c=function(){return D;};return a75c();}const a75A=a75d;(function(a,b){const x=a75d,c=a();while(!![]){try{const d=parseInt(x(0x19f))/0x1+parseInt(x(0x1ab))/0x2*(-parseInt(x(0x188))/0x3)+-parseInt(x(0x17b))/0x4+parseInt(x(0x1a1))/0x5*(-parseInt(x(0x17f))/0x6)+parseInt(x(0x1b4))/0x7*(parseInt(x(0x1a4))/0x8)+parseInt(x(0x1b6))/0x9+parseInt(x(0x1b5))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a75c,0x784f8));const a75b=(function(){let a=!![];return function(b,c){const d=a?function(){const y=a75d;if(c){const e=c[y(0x17c)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a75a=a75b(this,function(){const z=a75d;return a75a[z(0x19b)]()[z(0x1ad)](z(0x187))[z(0x19b)]()['constructor'](a75a)[z(0x1ad)](z(0x187));});a75a();import{Generator}from'../../generator.js';import{Log}from'../../tools/log/log.class.js';import a75e from'fs';Generator[a75A(0x17d)]({'name':'translation','usage':'maka\x20{generate,\x20g}:translation\x20--lang=<language>','aliases':[a75A(0x1b1)],'shortDesc':a75A(0x17a),'noResource':!![],'examples':[a75A(0x1b9),'maka\x20g:translation\x20--lang=fr','maka\x20g:translation\x20--lang=de'],'validOpts':[a75A(0x18b)]},function(a,b){const B=a75A;try{const c=this['fsi'][B(0x179)](),d=this[B(0x18c)][B(0x19a)](),f=this['fsi'][B(0x183)]();this[B(0x18c)][B(0x1b8)](c,()=>{const C=B;try{!b['lang']&&(b['lang']='en');!b[C(0x18e)]&&!this[C(0x18c)][C(0x195)](C(0x180))&&(Log[C(0x1aa)](C(0x1a5)),this[C(0x18c)][C(0x182)](C(0x192),{'cwd':f}),this[C(0x18c)][C(0x1a8)](C(0x1a7),!![]));const g=this[C(0x18c)]['pathFromApp']({'pathParts':[C(0x1ae),C(0x186),'client',C(0x184)]}),h=this[C(0x18c)][C(0x185)]({'pathParts':[g],'config':c}),i=this['fsi'][C(0x196)](a75e[C(0x19e)](h)[C(0x19b)](),'import\x20\x27../lib/services/translations/i18n\x27;')[0x0]&&!![];if(c['engines'][C(0x1b2)]===C(0x1a9)){!i&&this[C(0x18c)][C(0x18a)]({'filePath':h,'content':C(0x197)});const t=this['fsi'][C(0x1ac)]({'pathParts':[C(0x1ae),C(0x186),C(0x1ba),C(0x184)]}),u=this[C(0x18c)][C(0x185)]({'pathParts':[t],'config':c}),v=this[C(0x18c)][C(0x196)](a75e[C(0x19e)](u)[C(0x19b)](),C(0x17e))[0x0]&&!![];!v&&this['fsi']['injectAtBeginningOfFile']({'filePath':u,'content':C(0x197)});}else!i&&this['fsi'][C(0x18a)]({'filePath':h,'content':'import\x20\x27../lib/services/translations/i18n\x27;\x0a'});const j={'app':d[C(0x199)],'config':c},k=this[C(0x18c)][C(0x1ac)]({'pathParts':[C(0x1ae),C(0x186),C(0x189),C(0x193),C(0x18d),C(0x19c)]}),l=this[C(0x18c)][C(0x181)](this['fsi'][C(0x185)]({'pathParts':[k],'config':c}));!l&&this[C(0x18c)][C(0x190)]({'srcPath':C(0x194),'destPath':k,'framework':C(0x1a3),'context':j,'config':c});const m=this[C(0x18c)][C(0x1ac)]({'pathParts':[C(0x1ae),C(0x186),'lib',C(0x193),C(0x18d),'locales',b[C(0x18b)]+C(0x1b3)]}),n=this['fsi']['rewriteDestinationPathForEngine']({'pathParts':[m],'config':c}),o=this[C(0x18c)][C(0x181)](n);!o?this[C(0x18c)][C(0x190)]({'srcPath':C(0x1af),'destPath':m,'framework':'service','context':j,'config':c}):Log[C(0x1aa)]('Locale\x20already\x20defined:\x20'+n);const p=this[C(0x18c)][C(0x1ac)]({'pathParts':[C(0x1ae),C(0x186),'lib',C(0x193),C(0x18d),C(0x1b7),C(0x18f)+c[C(0x1a2)]['js']]}),q=this['fsi'][C(0x185)]({'pathParts':[p],'config':c}),r=this['fsi']['isFile'](q);!r&&this[C(0x18c)][C(0x190)]({'srcPath':C(0x19d),'destPath':p,'framework':C(0x1a3),'context':j,'config':c});const s=this['fsi'][C(0x196)](a75e[C(0x19e)](p)[C(0x19b)](),'default\x20as\x20'+b[C(0x18b)])[0x0]&&!![];!s?this[C(0x18c)][C(0x1a6)]({'filePath':p,'content':C(0x1a0)+b[C(0x18b)]+'\x20}\x20from\x20\x27./'+b['lang']+'\x27;'}):Log[C(0x1aa)](C(0x191)+p);}catch(w){Log[C(0x198)](w),process[C(0x1b0)](0x1);}});}catch(g){Log[B(0x198)](g),process[B(0x1b0)](0x1);}});
|
package/bundle/obf/src/maka.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --experimental-modules --no-warnings --experimental-json-modules
|
|
2
|
-
const
|
|
2
|
+
const a76l=a76d;(function(a,b){const j=a76d,c=a();while(!![]){try{const d=parseInt(j(0x1aa))/0x1+-parseInt(j(0x1b4))/0x2+-parseInt(j(0x1b5))/0x3*(parseInt(j(0x1ad))/0x4)+-parseInt(j(0x1ab))/0x5+-parseInt(j(0x1bd))/0x6*(-parseInt(j(0x1a2))/0x7)+parseInt(j(0x1be))/0x8*(-parseInt(j(0x1b2))/0x9)+-parseInt(j(0x1b0))/0xa*(-parseInt(j(0x1a9))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a76c,0xcc4e2));const a76b=(function(){let a=!![];return function(b,c){const d=a?function(){if(c){const e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a76a=a76b(this,function(){const k=a76d;return a76a[k(0x1a6)]()[k(0x1a5)]('(((.+)+)+)+$')[k(0x1a6)]()[k(0x1a1)](a76a)[k(0x1a5)](k(0x1bb));});function a76d(a,b){const c=a76c();return a76d=function(d,e){d=d-0x1a1;let f=c[d];return f;},a76d(a,b);}a76a();import a76e from'minimist';import a76f from'os';import a76g from'path';function a76c(){const m=['stringify','run','search','toString','argv','TOOL_NODE_FLAGS','451fAsFOf','945895IkPKkL','7830140mfoBDn','BROWSERSLIST_IGNORE_OLD_DATA','4rAUrKr','floor','url','721030WverSB','--max-old-space-size=','9jxkCrx','env','2889920icVhWx','3422046FgoPIs','camelizeKeys','parse','slice','dirname','MAKA_COMMAND_PATH','(((.+)+)+)+$','totalmem','6PBuYcm','2706216BjUiAO','constructor','9972641bSUfBT'];a76c=function(){return m;};return a76c();}import a76h from'humps';import a76i from'./commands/maka.cmd.js';import'./commands/_index.js';import'./generators/_index.js';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta[a76l(0x1af)]),__dirname=a76g[a76l(0x1b9)](__filename);global[a76l(0x1ba)]=__dirname;const total_memory=a76f[a76l(0x1bc)](),total_mem_in_kb=total_memory/0x400;let total_mem_in_mb=total_mem_in_kb/0x400;total_mem_in_mb=Math[a76l(0x1ae)](total_mem_in_mb),process[a76l(0x1b3)][a76l(0x1a8)]=a76l(0x1b1)+total_mem_in_mb,process[a76l(0x1b3)][a76l(0x1ac)]='1';const argv=a76e(process[a76l(0x1a7)][a76l(0x1b8)](0x2)),args=argv['_'],deepCopyArgv=JSON[a76l(0x1b7)](JSON[a76l(0x1a3)](argv));delete deepCopyArgv['_'];const opts=a76h[a76l(0x1b6)](deepCopyArgv);a76i[a76l(0x1a4)](args,opts);
|
|
@@ -6,12 +6,14 @@ import { browserHistory } from 'react-router';
|
|
|
6
6
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
7
7
|
<% if (config.engines.graphql === 'apollo') { %>
|
|
8
8
|
// Apollo Client configuration
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
ApolloClient,
|
|
11
|
+
ApolloProvider,
|
|
12
|
+
createHttpLink,
|
|
13
|
+
InMemoryCache
|
|
14
|
+
} from '@apollo/client';
|
|
10
15
|
import { ApolloProvider as ApolloHooksProvider } from '@apollo/react-hooks';
|
|
11
|
-
import {
|
|
12
|
-
import { ApolloLink } from 'apollo-link';
|
|
13
|
-
import { HttpLink, createHttpLink } from 'apollo-link-http';
|
|
14
|
-
import { setContext } from "apollo-link-context";
|
|
16
|
+
import { setContext } from "@apollo/link-context";
|
|
15
17
|
|
|
16
18
|
const httpLink = createHttpLink({
|
|
17
19
|
uri: `/graphql`
|
|
@@ -38,14 +40,25 @@ const client = new ApolloClient({
|
|
|
38
40
|
});
|
|
39
41
|
<% } %><% if (config.engines.theme === 'material') { if (config.engines.ssr === 'true') { %>
|
|
40
42
|
import { ThemeProvider } from '@mui/material/styles';
|
|
43
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
41
44
|
import { theme } from '../lib/index';<% } else { %>
|
|
42
45
|
// Material UI Theme config using default mui.
|
|
43
46
|
import { ThemeProvider, createTheme, responsiveFontSizes } from '@mui/material/styles';
|
|
47
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
44
48
|
// https://mui.com/material-ui/customization/default-theme/
|
|
45
49
|
let theme = createTheme({
|
|
46
50
|
typography: {
|
|
47
51
|
useNextVariants: true,
|
|
48
52
|
},
|
|
53
|
+
components: {
|
|
54
|
+
MuiCssBaseline: {
|
|
55
|
+
styleOverrides: {
|
|
56
|
+
body: {
|
|
57
|
+
backgroundColor: '#fff', // sets default background
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
49
62
|
});
|
|
50
63
|
theme = responsiveFontSizes(theme);<% }} %>
|
|
51
64
|
<% if (config.engines.ssr === 'true') { %>
|
|
@@ -59,7 +72,8 @@ const App = ({ user }) => (<% if (config.engines.ssr === 'true') { %>
|
|
|
59
72
|
<BrowserRouter><% } %><% if (config.engines.graphql === 'apollo') { %>
|
|
60
73
|
<ApolloProvider client={client}>
|
|
61
74
|
<ApolloHooksProvider client={client}><% } %><% if (config.engines.theme === 'material') { %>
|
|
62
|
-
<ThemeProvider theme={theme}
|
|
75
|
+
<ThemeProvider theme={theme}>
|
|
76
|
+
<CssBaseline /><% } %>
|
|
63
77
|
<Routes user={user} history={browserHistory}/><% if (config.engines.theme === 'material') { %>
|
|
64
78
|
</ThemeProvider><% } %><% if (config.engines.graphql === 'apollo') { %>
|
|
65
79
|
</ApolloHooksProvider>
|
|
@@ -6,13 +6,14 @@ import { browserHistory } from 'react-router';
|
|
|
6
6
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
7
7
|
<% if (config.engines.graphql === 'apollo') { %>
|
|
8
8
|
// Apollo Client configuration
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import {
|
|
10
|
+
ApolloClient,
|
|
11
|
+
ApolloProvider,
|
|
12
|
+
createHttpLink,
|
|
13
|
+
InMemoryCache
|
|
14
|
+
} from '@apollo/client';
|
|
11
15
|
import { ApolloProvider as ApolloHooksProvider } from '@apollo/react-hooks';
|
|
12
|
-
import {
|
|
13
|
-
import { ApolloLink } from 'apollo-link';
|
|
14
|
-
import { HttpLink, createHttpLink } from 'apollo-link-http';
|
|
15
|
-
import { setContext } from "apollo-link-context";
|
|
16
|
+
import { setContext } from "@apollo/link-context";
|
|
16
17
|
|
|
17
18
|
const httpLink = createHttpLink({
|
|
18
19
|
uri: `/graphql`
|
|
@@ -39,14 +40,26 @@ const client = new ApolloClient({
|
|
|
39
40
|
});
|
|
40
41
|
<% } %><% if (config.engines.theme === 'material') { if (config.engines.ssr === 'true') { %>
|
|
41
42
|
import { ThemeProvider } from '@mui/material/styles';
|
|
43
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
42
44
|
import { theme } from '../lib/index';<% } else { %>
|
|
43
45
|
// Material UI Theme config using default mui.
|
|
46
|
+
// https://mui.com/material-ui/customization/default-theme/
|
|
44
47
|
import { ThemeProvider, createTheme, responsiveFontSizes } from '@mui/material/styles';
|
|
48
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
45
49
|
// https://mui.com/material-ui/customization/default-theme/
|
|
46
50
|
let theme = createTheme({
|
|
47
51
|
typography: {
|
|
48
52
|
useNextVariants: true,
|
|
49
53
|
},
|
|
54
|
+
components: {
|
|
55
|
+
MuiCssBaseline: {
|
|
56
|
+
styleOverrides: {
|
|
57
|
+
body: {
|
|
58
|
+
backgroundColor: '#fff', // sets default background
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
50
63
|
});
|
|
51
64
|
theme = responsiveFontSizes(theme);<% }} %>
|
|
52
65
|
<% if (config.engines.ssr === 'true') { %>
|
|
@@ -60,7 +73,8 @@ const App = ({ user }) => (<% if (config.engines.ssr === 'true') { %>
|
|
|
60
73
|
<BrowserRouter><% } %><% if (config.engines.graphql === 'apollo') { %>
|
|
61
74
|
<ApolloProvider client={client}>
|
|
62
75
|
<ApolloHooksProvider client={client}><% } %><% if (config.engines.theme === 'material') { %>
|
|
63
|
-
<ThemeProvider theme={theme}
|
|
76
|
+
<ThemeProvider theme={theme}>
|
|
77
|
+
<CssBaseline /><% } %>
|
|
64
78
|
<Routes user={user} history={browserHistory}/><% if (config.engines.theme === 'material') { %>
|
|
65
79
|
</ThemeProvider><% } %><% if (config.engines.graphql === 'apollo') { %>
|
|
66
80
|
</ApolloHooksProvider>
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
/** @namespace Common */<% if (config.engines.theme === 'material' && config.engines.ssr === 'true') { %>
|
|
2
2
|
// Material UI Theme config using roboto typefont and default mui.
|
|
3
3
|
import { createTheme, responsiveFontSizes } from '@mui/material/styles';
|
|
4
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
4
5
|
// https://mui.com/material-ui/customization/default-theme/
|
|
5
6
|
let theme = createTheme({
|
|
6
7
|
typography: {
|
|
7
8
|
useNextVariants: true,
|
|
8
9
|
},
|
|
10
|
+
components: {
|
|
11
|
+
MuiCssBaseline: {
|
|
12
|
+
styleOverrides: {
|
|
13
|
+
body: {
|
|
14
|
+
backgroundColor: '#fff', // sets default background
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
9
19
|
});
|
|
10
20
|
theme = responsiveFontSizes(theme);
|
|
11
21
|
export { theme };<% } %>
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
/** @namespace Common */<% if (config.engines.theme === 'material' && config.engines.ssr === 'true') { %>
|
|
2
2
|
// Material UI Theme config using roboto typefont and default mui.
|
|
3
3
|
import { createTheme, responsiveFontSizes } from '@mui/material/styles';
|
|
4
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
4
5
|
// https://mui.com/material-ui/customization/default-theme/
|
|
5
6
|
let theme = createTheme({
|
|
6
7
|
typography: {
|
|
7
8
|
useNextVariants: true,
|
|
8
9
|
},
|
|
10
|
+
components: {
|
|
11
|
+
MuiCssBaseline: {
|
|
12
|
+
styleOverrides: {
|
|
13
|
+
body: {
|
|
14
|
+
backgroundColor: '#fff', // sets default background
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
9
19
|
});
|
|
10
20
|
theme = responsiveFontSizes(theme);
|
|
11
21
|
export { theme };<% } %>
|
|
@@ -4,17 +4,20 @@ Meteor.startup(() => {
|
|
|
4
4
|
WebAppInternals.setInlineScriptsAllowed(false);
|
|
5
5
|
});
|
|
6
6
|
<% if (config.engines.graphql === 'apollo') { %>
|
|
7
|
-
import { ApolloServer } from 'apollo
|
|
7
|
+
import { ApolloServer } from '@apollo/server';
|
|
8
8
|
import { WebApp } from 'meteor/webapp';
|
|
9
9
|
import { getUser } from 'meteor/apollo';
|
|
10
10
|
import { mergeTypeDefs, mergeResolvers } from '@graphql-tools/merge';
|
|
11
11
|
import {
|
|
12
12
|
ApolloServerPluginLandingPageGraphQLPlayground
|
|
13
|
-
} from
|
|
13
|
+
} from '@apollo/server-plugin-landing-page-graphql-playground';
|
|
14
|
+
import { expressMiddleware } from '@apollo/server/express4';
|
|
15
|
+
import express from 'express';
|
|
14
16
|
|
|
15
17
|
const typeList = [];
|
|
16
18
|
const resolverList = [];
|
|
17
19
|
if (typeList.length > 0 && resolverList.length > 0) {
|
|
20
|
+
const expressApp = express();
|
|
18
21
|
const typeDefs = mergeTypeDefs(typeList);
|
|
19
22
|
const resolvers = mergeResolvers(resolverList);
|
|
20
23
|
const server = new ApolloServer({
|
|
@@ -24,13 +27,15 @@ if (typeList.length > 0 && resolverList.length > 0) {
|
|
|
24
27
|
defaultMaxAge: 60, //seconds
|
|
25
28
|
},
|
|
26
29
|
cache: 'bounded',
|
|
27
|
-
context: async ({ req }) => ({
|
|
28
|
-
user: await getUser(req.headers.authorization) || await getUser(req.headers['x-auth-token']) || {},
|
|
29
|
-
}),
|
|
30
30
|
formatError: (err) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
if (Meteor.isProduction === 'production') {
|
|
32
|
+
// Don't give specific errors to the client
|
|
33
|
+
sysLogger.error(err);
|
|
34
|
+
err.message = err.extensions.code; // eslint-disable-line no-param-reassign
|
|
35
|
+
return err;
|
|
36
|
+
}
|
|
37
|
+
console.log(err);
|
|
38
|
+
return err;
|
|
34
39
|
},
|
|
35
40
|
plugins: [
|
|
36
41
|
ApolloServerPluginLandingPageGraphQLPlayground()
|
|
@@ -39,12 +44,15 @@ if (typeList.length > 0 && resolverList.length > 0) {
|
|
|
39
44
|
|
|
40
45
|
const startApolloServer = async(server) => {
|
|
41
46
|
await server.start();
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
expressApp.use(
|
|
48
|
+
'/graphql',
|
|
49
|
+
expressMiddleware(server, {
|
|
50
|
+
context: async ({ req }) => ({
|
|
51
|
+
user: await getUser(req.headers.authorization) || await getUser(req.headers['x-auth-token']) || {},
|
|
52
|
+
}),
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
55
|
+
WebApp.connectHandlers.use(expressApp);
|
|
48
56
|
};
|
|
49
57
|
|
|
50
58
|
startApolloServer(server);
|
|
@@ -72,6 +80,7 @@ const networkInterface = createMeteorNetworkInterface({
|
|
|
72
80
|
const client = new ApolloClient(meteorClientConfig({ networkInterface, ssrMode: true }));<% } %>
|
|
73
81
|
<% if (config.engines.theme === 'material') { %>
|
|
74
82
|
import { ThemeProvider } from '@mui/material/styles';
|
|
83
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
75
84
|
import { theme } from '../lib/index';<% } %>
|
|
76
85
|
// css bundler
|
|
77
86
|
import createEmotionServer from '@emotion/server/create-instance';
|
|
@@ -98,6 +107,7 @@ onPageLoad((sink) => {
|
|
|
98
107
|
renderToStringWithData(
|
|
99
108
|
<ApolloProvider client={client}>
|
|
100
109
|
<ThemeProvider theme={theme}>
|
|
110
|
+
<CssBaseline />
|
|
101
111
|
<App location={sink.request.url} />
|
|
102
112
|
</ThemeProvider>
|
|
103
113
|
</ApolloProvider>
|
|
@@ -110,6 +120,7 @@ onPageLoad((sink) => {
|
|
|
110
120
|
});<% } else { %>
|
|
111
121
|
const html = renderToStaticMarkup(
|
|
112
122
|
<ThemeProvider theme={theme}>
|
|
123
|
+
<CssBaseline />
|
|
113
124
|
<App location={sink.request.url} />
|
|
114
125
|
</ThemeProvider>
|
|
115
126
|
);
|
|
@@ -4,17 +4,20 @@ Meteor.startup(() => {
|
|
|
4
4
|
WebAppInternals.setInlineScriptsAllowed(false);
|
|
5
5
|
});
|
|
6
6
|
<% if (config.engines.graphql === 'apollo') { %>
|
|
7
|
-
import { ApolloServer } from 'apollo
|
|
7
|
+
import { ApolloServer } from '@apollo/server';
|
|
8
8
|
import { WebApp } from 'meteor/webapp';
|
|
9
9
|
import { getUser } from 'meteor/apollo';
|
|
10
10
|
import { mergeTypeDefs, mergeResolvers } from '@graphql-tools/merge';
|
|
11
11
|
import {
|
|
12
12
|
ApolloServerPluginLandingPageGraphQLPlayground
|
|
13
|
-
} from
|
|
13
|
+
} from '@apollo/server-plugin-landing-page-graphql-playground';
|
|
14
|
+
import { expressMiddleware } from '@apollo/server/express4';
|
|
15
|
+
import express from 'express';
|
|
14
16
|
|
|
15
17
|
const typeList = [];
|
|
16
18
|
const resolverList = [];
|
|
17
19
|
if (typeList.length > 0 && resolverList.length > 0) {
|
|
20
|
+
const expressApp = express();
|
|
18
21
|
const typeDefs = mergeTypeDefs(typeList);
|
|
19
22
|
const resolvers = mergeResolvers(resolverList);
|
|
20
23
|
const server = new ApolloServer({
|
|
@@ -24,12 +27,15 @@ if (typeList.length > 0 && resolverList.length > 0) {
|
|
|
24
27
|
defaultMaxAge: 60, //seconds
|
|
25
28
|
},
|
|
26
29
|
cache: 'bounded',
|
|
27
|
-
context: async ({ req }) => ({
|
|
28
|
-
user: await getUser(req.headers.authorization) || await getUser(req.headers['x-auth-token']) || {},
|
|
29
|
-
}),
|
|
30
30
|
formatError: (err) => {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
if (Meteor.isProduction === 'production') {
|
|
32
|
+
// Don't give specific errors to the client
|
|
33
|
+
sysLogger.error(err);
|
|
34
|
+
err.message = err.extensions.code; // eslint-disable-line no-param-reassign
|
|
35
|
+
return err;
|
|
36
|
+
}
|
|
37
|
+
console.log(err);
|
|
38
|
+
return err;
|
|
33
39
|
},
|
|
34
40
|
plugins: [
|
|
35
41
|
ApolloServerPluginLandingPageGraphQLPlayground()
|
|
@@ -38,12 +44,15 @@ if (typeList.length > 0 && resolverList.length > 0) {
|
|
|
38
44
|
|
|
39
45
|
const startApolloServer = async(server) => {
|
|
40
46
|
await server.start();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
expressApp.use(
|
|
48
|
+
'/graphql',
|
|
49
|
+
expressMiddleware(server, {
|
|
50
|
+
context: async ({ req }) => ({
|
|
51
|
+
user: await getUser(req.headers.authorization) || await getUser(req.headers['x-auth-token']) || {},
|
|
52
|
+
}),
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
55
|
+
WebApp.connectHandlers.use(expressApp);
|
|
47
56
|
};
|
|
48
57
|
|
|
49
58
|
startApolloServer(server);
|
|
@@ -71,6 +80,7 @@ const networkInterface = createMeteorNetworkInterface({
|
|
|
71
80
|
const client = new ApolloClient(meteorClientConfig({ networkInterface, ssrMode: true }));<% } %>
|
|
72
81
|
<% if (config.engines.theme === 'material') { %>
|
|
73
82
|
import { ThemeProvider } from '@mui/material/styles';
|
|
83
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
74
84
|
import { theme } from '../lib/index';<% } %>
|
|
75
85
|
// css bundler
|
|
76
86
|
import createEmotionServer from '@emotion/server/create-instance';
|
|
@@ -97,6 +107,7 @@ onPageLoad((sink) => {
|
|
|
97
107
|
renderToStringWithData(
|
|
98
108
|
<ApolloProvider client={client}>
|
|
99
109
|
<ThemeProvider theme={theme}>
|
|
110
|
+
<CssBaseline />
|
|
100
111
|
<App location={sink.request.url} />
|
|
101
112
|
</ThemeProvider>
|
|
102
113
|
</ApolloProvider>
|
|
@@ -109,6 +120,7 @@ onPageLoad((sink) => {
|
|
|
109
120
|
});<% } else { %>
|
|
110
121
|
const html = renderToStaticMarkup(
|
|
111
122
|
<ThemeProvider theme={theme}>
|
|
123
|
+
<CssBaseline />
|
|
112
124
|
<App location={sink.request.url} />
|
|
113
125
|
</ThemeProvider>
|
|
114
126
|
);
|
|
@@ -10,7 +10,7 @@ import { gql } from '@apollo/client';
|
|
|
10
10
|
// https://www.apollographql.com/docs/react/api/react/hoc/#graphqlquery-configcomponent
|
|
11
11
|
import { graphql } from '@apollo/client/react/hoc';<% } %><% if (theme === 'material' ) { %>
|
|
12
12
|
// https://material-ui.com/styles/basics/#higher-order-component-api
|
|
13
|
-
import { withStyles } from '@mui/
|
|
13
|
+
import { withStyles } from '@mui/system';
|
|
14
14
|
|
|
15
15
|
const styles = (theme) => { };<% } %>
|
|
16
16
|
<% if (!isStore) { %>
|
|
@@ -10,7 +10,7 @@ import { gql } from '@apollo/client';
|
|
|
10
10
|
// https://www.apollographql.com/docs/react/api/react/hoc/#graphqlquery-configcomponent
|
|
11
11
|
import { graphql } from '@apollo/client/react/hoc';<% } %><% if (theme === 'material' ) { %>
|
|
12
12
|
// https://material-ui.com/styles/basics/#higher-order-component-api
|
|
13
|
-
import { withStyles } from '@mui/
|
|
13
|
+
import { withStyles } from '@mui/system';
|
|
14
14
|
|
|
15
15
|
const styles = (theme) => { };<% } %>
|
|
16
16
|
<% if (!isStore && client === 'react') { %>
|
|
@@ -4,10 +4,7 @@ import React, { Component } from 'react';
|
|
|
4
4
|
import { withTracker } from 'meteor/react-meteor-data';<% if(graphql === 'apollo') { %>
|
|
5
5
|
import { gql } from '@apollo/client';
|
|
6
6
|
// https://www.apollographql.com/docs/react/api/react/hoc/#graphqlquery-configcomponent
|
|
7
|
-
import { graphql } from '@apollo/client/react/hoc';<% } %><% if (
|
|
8
|
-
// https://material-ui.com/styles/basics/#higher-order-component-api
|
|
9
|
-
import { withStyles } from '@mui/styles';
|
|
10
|
-
const styles = (theme) => { };<% } %><% if (withTranslations) { %>
|
|
7
|
+
import { graphql } from '@apollo/client/react/hoc';<% } %><% if (withTranslations) { %>
|
|
11
8
|
import { withTranslation } from 'react-i18next';<% } %>
|
|
12
9
|
|
|
13
10
|
class <%= className %>Component extends Component {
|
|
@@ -59,8 +56,7 @@ class <%= className %>Component extends Component {
|
|
|
59
56
|
|
|
60
57
|
const <%= className %> = compose(
|
|
61
58
|
withTracker(() => {}),<% if(graphql === 'apollo') { %>
|
|
62
|
-
//graphql(gql`query Todos { todos }`, { variables: {/* input */} }),<% } %><% if(
|
|
63
|
-
withStyles(styles),<% } %><% if (withTranslations) { %>
|
|
59
|
+
//graphql(gql`query Todos { todos }`, { variables: {/* input */} }),<% } %><% if (withTranslations) { %>
|
|
64
60
|
withTranslation(),<% } %>
|
|
65
61
|
)(<%= className %>Component);
|
|
66
62
|
|
|
@@ -4,10 +4,7 @@ import * as PropTypes from 'prop-types';// https://github.com/meteor/react-packa
|
|
|
4
4
|
import { withTracker } from 'meteor/react-meteor-data';<% if(graphql === 'apollo') { %>
|
|
5
5
|
import { gql } from '@apollo/client';
|
|
6
6
|
// https://www.apollographql.com/docs/react/api/react/hoc/#graphqlquery-configcomponent
|
|
7
|
-
import { graphql } from '@apollo/client/react/hoc';<% } %><% if (
|
|
8
|
-
// https://material-ui.com/styles/basics/#higher-order-component-api
|
|
9
|
-
import { withStyles } from '@mui/styles';
|
|
10
|
-
const styles = (theme) => { };<% } %><% if (withTranslations) { %>
|
|
7
|
+
import { graphql } from '@apollo/client/react/hoc';<% } %><% if (withTranslations) { %>
|
|
11
8
|
import { withTranslation } from 'react-i18next';<% } %>
|
|
12
9
|
|
|
13
10
|
interface I<%= className %> {
|
|
@@ -64,8 +61,7 @@ class <%= className %>Component extends React.Component<I<%= className %>> {
|
|
|
64
61
|
|
|
65
62
|
const <%= className %> = compose(
|
|
66
63
|
withTracker(() => {}),<% if(graphql === 'apollo') { %>
|
|
67
|
-
//graphql(gql`query Todos { todos }`, { variables: {/* input */} }),<% } %><% if(
|
|
68
|
-
withStyles(styles),<% } %><% if (withTranslations) { %>
|
|
64
|
+
//graphql(gql`query Todos { todos }`, { variables: {/* input */} }),<% } %><% if (withTranslations) { %>
|
|
69
65
|
withTranslation(),<% } %>
|
|
70
66
|
)(<%= className %>Component);
|
|
71
67
|
|
|
@@ -2,10 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
// https://github.com/meteor/react-packages/tree/master/packages/react-meteor-data#usetrackerreactivefn-deps-hook
|
|
3
3
|
import { useTracker } from 'meteor/react-meteor-data';<% if(graphql === 'apollo') { %>
|
|
4
4
|
// https://www.apollographql.com/docs/react/api/react/hooks/#example-2
|
|
5
|
-
import { useQuery, gql } from '@apollo/client';<% } %><%
|
|
6
|
-
// https://material-ui.com/styles/basics/#higher-order-component-api
|
|
7
|
-
import { makeStyles } from '@mui/styles';
|
|
8
|
-
const useStyles = makeStyles((theme) => ({}));<% } %><%if (withTranslations) { %>
|
|
5
|
+
import { useQuery, gql } from '@apollo/client';<% } %><%if (withTranslations) { %>
|
|
9
6
|
import { useTranslation } from 'react-i18next';<% } %>
|
|
10
7
|
|
|
11
8
|
|
|
@@ -15,7 +12,6 @@ function <%= className %>(props) {
|
|
|
15
12
|
return { userId }
|
|
16
13
|
});*/<% if(graphql === 'apollo') { %>
|
|
17
14
|
//const { loading, error, data } = useQuery(gql`query Todos { todos }`, { variables: {/* input */} }); <% } %><% if (theme === 'material') { %>
|
|
18
|
-
const classes = useStyles();<% } %><% if (withTranslations) { %>
|
|
19
15
|
const { t } = useTranslation();<% } %>
|
|
20
16
|
|
|
21
17
|
return (
|