@maka/maka-cli 3.3.67 → 4.0.71

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 (274) hide show
  1. package/.eslintrc.json +19 -0
  2. package/.mocharc.json +3 -0
  3. package/README.md +4 -10
  4. package/dist/README.md +27 -0
  5. package/dist/command.js +1 -0
  6. package/dist/commands/_index.js +1 -0
  7. package/dist/commands/aws/_index.js +1 -0
  8. package/dist/commands/aws/aws.command.js +1 -0
  9. package/dist/commands/aws/ci.sub.cmd.js +1 -0
  10. package/dist/commands/aws/ckp.sub.cmd.js +1 -0
  11. package/dist/commands/aws/csg.sub.cmd.js +1 -0
  12. package/dist/commands/aws/di.sub.cmd.js +1 -0
  13. package/dist/commands/aws/dks.sub.cmd.js +1 -0
  14. package/dist/commands/aws/rbi.sub.cmd.js +1 -0
  15. package/dist/commands/aws/sth.sub.cmd.js +1 -0
  16. package/dist/commands/aws/ti.sub.cmd.js +1 -0
  17. package/dist/commands/build/_index.js +1 -0
  18. package/dist/commands/build/build.js +1 -0
  19. package/dist/commands/build/docker.sub.cmd.js +1 -0
  20. package/dist/commands/create.js +1 -0
  21. package/dist/commands/debug.js +1 -0
  22. package/dist/commands/deploy.js +1 -0
  23. package/dist/commands/game/_index.js +1 -0
  24. package/dist/commands/game/battleship.sub.cmd.js +1 -0
  25. package/dist/commands/game/game.command.js +1 -0
  26. package/dist/commands/game/pong.sub.cmd.js +1 -0
  27. package/dist/commands/game/snake.sub.cmd.js +1 -0
  28. package/dist/commands/game/tetris.sub.cmd.js +1 -0
  29. package/dist/commands/generate.js +1 -0
  30. package/dist/commands/get/_index.js +1 -0
  31. package/dist/commands/get/get.command.js +1 -0
  32. package/dist/commands/get/global.sub.cmd.js +1 -0
  33. package/dist/commands/get/local.sub.cmd.js +1 -0
  34. package/dist/commands/help.js +1 -0
  35. package/dist/commands/install.js +1 -0
  36. package/dist/commands/jsdoc.js +1 -0
  37. package/dist/commands/login.js +1 -0
  38. package/dist/commands/logout.js +1 -0
  39. package/dist/commands/logs.js +1 -0
  40. package/dist/commands/maka.cmd.js +1 -0
  41. package/dist/commands/murder.js +1 -0
  42. package/dist/commands/reconfig.js +1 -0
  43. package/dist/commands/run.js +1 -0
  44. package/dist/commands/set/_index.js +1 -0
  45. package/dist/commands/set/global.sub.cmd.js +1 -0
  46. package/dist/commands/set/local.sub.cmd.js +1 -0
  47. package/dist/commands/set/set.command.js +1 -0
  48. package/dist/commands/ssh.js +1 -0
  49. package/dist/commands/ssl.js +1 -0
  50. package/dist/commands/test.js +1 -0
  51. package/dist/commands/version.js +1 -0
  52. package/dist/error.js +1 -0
  53. package/dist/generator.js +1 -0
  54. package/dist/generators/_index.js +1 -0
  55. package/dist/generators/api.js +1 -0
  56. package/dist/generators/collection.js +1 -0
  57. package/dist/generators/component.js +1 -0
  58. package/dist/generators/config.js +1 -0
  59. package/dist/generators/dbc.js +1 -0
  60. package/dist/generators/dockerfile.js +1 -0
  61. package/dist/generators/hook.js +1 -0
  62. package/dist/generators/kit.js +1 -0
  63. package/dist/generators/layout.js +1 -0
  64. package/dist/generators/maka.gen.js +1 -0
  65. package/dist/generators/methods.js +1 -0
  66. package/dist/generators/package.js +1 -0
  67. package/dist/generators/page.js +1 -0
  68. package/dist/generators/publish.js +1 -0
  69. package/dist/generators/route.js +1 -0
  70. package/dist/generators/scaffold.js +1 -0
  71. package/dist/generators/service.js +1 -0
  72. package/dist/maka.js +2 -0
  73. package/dist/templates/meteor/api/api.js +11 -0
  74. package/dist/templates/meteor/api/api.js.ts +11 -0
  75. package/dist/templates/meteor/api/collection.js +86 -0
  76. package/dist/templates/meteor/api/collection.js.ts +94 -0
  77. package/dist/templates/meteor/api/fixtures.js +23 -0
  78. package/dist/templates/meteor/api/fixtures.js.ts +23 -0
  79. package/dist/templates/meteor/api/methods.js +136 -0
  80. package/dist/templates/meteor/api/methods.js.ts +137 -0
  81. package/dist/templates/meteor/api/publications.js +31 -0
  82. package/dist/templates/meteor/api/publications.js.ts +31 -0
  83. package/dist/templates/meteor/api/register-api.js +15 -0
  84. package/dist/templates/meteor/api/register-api.js.ts +15 -0
  85. package/dist/templates/meteor/api/resolvers.js +9 -0
  86. package/dist/templates/meteor/api/resolvers.js.ts +9 -0
  87. package/dist/templates/meteor/api/tests.js +1 -0
  88. package/dist/templates/meteor/api/tests.js.ts +1 -0
  89. package/dist/templates/meteor/api/typeDefs.js +5 -0
  90. package/dist/templates/meteor/api/typeDefs.js.ts +5 -0
  91. package/dist/templates/meteor/app/client/.gitkeep +0 -0
  92. package/dist/templates/meteor/app/client/body.html +3 -0
  93. package/dist/templates/meteor/app/client/head.html +25 -0
  94. package/dist/templates/meteor/app/client/main.app-tests.js +9 -0
  95. package/dist/templates/meteor/app/client/main.app-tests.js.jsx +9 -0
  96. package/dist/templates/meteor/app/client/main.app-tests.js.ts +9 -0
  97. package/dist/templates/meteor/app/client/main.app-tests.js.tsx +9 -0
  98. package/dist/templates/meteor/app/client/main.js +1 -0
  99. package/dist/templates/meteor/app/client/main.js.jsx +1 -0
  100. package/dist/templates/meteor/app/client/main.js.ts +1 -0
  101. package/dist/templates/meteor/app/client/main.js.tsx +1 -0
  102. package/dist/templates/meteor/app/imports/api/.gitkeep +0 -0
  103. package/dist/templates/meteor/app/imports/startup/client/index.js +19 -0
  104. package/dist/templates/meteor/app/imports/startup/client/index.js.jsx +100 -0
  105. package/dist/templates/meteor/app/imports/startup/client/index.js.ts +19 -0
  106. package/dist/templates/meteor/app/imports/startup/client/index.js.tsx +101 -0
  107. package/dist/templates/meteor/app/imports/startup/client/routes.js +39 -0
  108. package/dist/templates/meteor/app/imports/startup/client/routes.js.jsx +48 -0
  109. package/dist/templates/meteor/app/imports/startup/client/routes.js.ts +24 -0
  110. package/dist/templates/meteor/app/imports/startup/client/routes.js.tsx +48 -0
  111. package/dist/templates/meteor/app/imports/startup/client/templates.js +9 -0
  112. package/dist/templates/meteor/app/imports/startup/client/templates.js.jsx +9 -0
  113. package/dist/templates/meteor/app/imports/startup/client/templates.js.ts +9 -0
  114. package/dist/templates/meteor/app/imports/startup/client/templates.js.tsx +9 -0
  115. package/dist/templates/meteor/app/imports/startup/lib/index.js +1 -0
  116. package/dist/templates/meteor/app/imports/startup/lib/index.js.jsx +10 -0
  117. package/dist/templates/meteor/app/imports/startup/lib/index.js.ts +1 -0
  118. package/dist/templates/meteor/app/imports/startup/lib/index.js.tsx +10 -0
  119. package/dist/templates/meteor/app/imports/startup/lib/routes.js.jsx +48 -0
  120. package/dist/templates/meteor/app/imports/startup/lib/routes.js.tsx +48 -0
  121. package/dist/templates/meteor/app/imports/startup/lib/templates.js.jsx +0 -0
  122. package/dist/templates/meteor/app/imports/startup/lib/templates.js.tsx +0 -0
  123. package/dist/templates/meteor/app/imports/startup/server/index.js +1 -0
  124. package/dist/templates/meteor/app/imports/startup/server/index.js.jsx +139 -0
  125. package/dist/templates/meteor/app/imports/startup/server/index.js.ts +0 -0
  126. package/dist/templates/meteor/app/imports/startup/server/index.js.tsx +138 -0
  127. package/dist/templates/meteor/app/imports/ui/test-helpers.js +24 -0
  128. package/dist/templates/meteor/app/imports/ui/test-helpers.js.ts +24 -0
  129. package/dist/templates/meteor/app/lib/.gitkeep +0 -0
  130. package/dist/templates/meteor/app/lib/main.js +1 -0
  131. package/dist/templates/meteor/app/lib/main.js.jsx +1 -0
  132. package/dist/templates/meteor/app/lib/main.js.ts +1 -0
  133. package/dist/templates/meteor/app/lib/main.js.tsx +1 -0
  134. package/dist/templates/meteor/app/maka.d.ts +160 -0
  135. package/dist/templates/meteor/app/meteor.d.ts +955 -0
  136. package/dist/templates/meteor/app/packages/.gitkeep +0 -0
  137. package/dist/templates/meteor/app/private/.gitkeep +0 -0
  138. package/dist/templates/meteor/app/public/.gitkeep +0 -0
  139. package/dist/templates/meteor/app/public/favicon.ico +0 -0
  140. package/dist/templates/meteor/app/public/manifest.json +9 -0
  141. package/dist/templates/meteor/app/public/sw.js +30 -0
  142. package/dist/templates/meteor/app/public/sw.js.jsx +30 -0
  143. package/dist/templates/meteor/app/public/sw.js.ts +30 -0
  144. package/dist/templates/meteor/app/public/sw.js.tsx +30 -0
  145. package/dist/templates/meteor/app/server/.gitkeep +0 -0
  146. package/dist/templates/meteor/app/server/main.app-tests.js +9 -0
  147. package/dist/templates/meteor/app/server/main.app-tests.js.jsx +9 -0
  148. package/dist/templates/meteor/app/server/main.app-tests.js.ts +9 -0
  149. package/dist/templates/meteor/app/server/main.app-tests.js.tsx +9 -0
  150. package/dist/templates/meteor/app/server/main.js +3 -0
  151. package/dist/templates/meteor/app/server/main.js.jsx +3 -0
  152. package/dist/templates/meteor/app/server/main.js.ts +3 -0
  153. package/dist/templates/meteor/app/server/main.js.tsx +3 -0
  154. package/dist/templates/meteor/app/tsconfig.json +26 -0
  155. package/dist/templates/meteor/collection/collection.js +85 -0
  156. package/dist/templates/meteor/collection/collection.js.ts +97 -0
  157. package/dist/templates/meteor/collection/tests.js +27 -0
  158. package/dist/templates/meteor/collection/tests.js.ts +27 -0
  159. package/dist/templates/meteor/config/docker-compose.yaml +17 -0
  160. package/dist/templates/meteor/config/pm2.config.js +25 -0
  161. package/dist/templates/meteor/config/process.env +5 -0
  162. package/dist/templates/meteor/config/settings.json +8 -0
  163. package/dist/templates/meteor/config/ssh.json +6 -0
  164. package/dist/templates/meteor/dbc/config.js +70 -0
  165. package/dist/templates/meteor/dbc/config.js.ts +70 -0
  166. package/dist/templates/meteor/dbc/conn.js +37 -0
  167. package/dist/templates/meteor/dbc/conn.js.ts +37 -0
  168. package/dist/templates/meteor/dbc/register-dbc.js +3 -0
  169. package/dist/templates/meteor/dbc/register-dbc.js.ts +3 -0
  170. package/dist/templates/meteor/method/method.js +48 -0
  171. package/dist/templates/meteor/method/method.js.ts +48 -0
  172. package/dist/templates/meteor/package/client/package.js +0 -0
  173. package/dist/templates/meteor/package/client/package.js.jsx +0 -0
  174. package/dist/templates/meteor/package/client/package.js.ts +0 -0
  175. package/dist/templates/meteor/package/client/package.js.tsx +0 -0
  176. package/dist/templates/meteor/package/lib/package.js +0 -0
  177. package/dist/templates/meteor/package/lib/package.js.jsx +0 -0
  178. package/dist/templates/meteor/package/lib/package.js.ts +0 -0
  179. package/dist/templates/meteor/package/lib/package.js.tsx +0 -0
  180. package/dist/templates/meteor/package/package.js +37 -0
  181. package/dist/templates/meteor/package/package.js.jsx +37 -0
  182. package/dist/templates/meteor/package/package.js.ts +36 -0
  183. package/dist/templates/meteor/package/package.js.tsx +37 -0
  184. package/dist/templates/meteor/package/server/package.js +0 -0
  185. package/dist/templates/meteor/package/server/package.js.jsx +0 -0
  186. package/dist/templates/meteor/package/server/package.js.ts +0 -0
  187. package/dist/templates/meteor/package/server/package.js.tsx +0 -0
  188. package/dist/templates/meteor/package/tests/client/package.js +5 -0
  189. package/dist/templates/meteor/package/tests/client/package.js.jsx +5 -0
  190. package/dist/templates/meteor/package/tests/client/package.js.ts +5 -0
  191. package/dist/templates/meteor/package/tests/client/package.js.tsx +5 -0
  192. package/dist/templates/meteor/package/tests/server/package.js +5 -0
  193. package/dist/templates/meteor/package/tests/server/package.js.jsx +5 -0
  194. package/dist/templates/meteor/package/tests/server/package.js.ts +5 -0
  195. package/dist/templates/meteor/package/tests/server/package.js.tsx +5 -0
  196. package/dist/templates/meteor/project/.maka/config.json +29 -0
  197. package/dist/templates/meteor/project/README.md +1 -0
  198. package/dist/templates/meteor/project/build/.gitkeep +0 -0
  199. package/dist/templates/meteor/project/build/README +4 -0
  200. package/dist/templates/meteor/project/gitignore +6 -0
  201. package/dist/templates/meteor/publish/publish.js +3 -0
  202. package/dist/templates/meteor/publish/publish.js.jsx +3 -0
  203. package/dist/templates/meteor/publish/publish.js.tsx +3 -0
  204. package/dist/templates/meteor/publish/publish.ts +3 -0
  205. package/dist/templates/meteor/service/logger/logger.js +17 -0
  206. package/dist/templates/meteor/service/logger/logger.js.ts +17 -0
  207. package/dist/templates/meteor/service/logger/transports.js +31 -0
  208. package/dist/templates/meteor/service/logger/transports.js.ts +31 -0
  209. package/dist/templates/meteor/stylesheet/stylesheet.css +5 -0
  210. package/dist/templates/meteor/stylesheet/stylesheet.css.less +5 -0
  211. package/dist/templates/meteor/template/template-tests.js +1 -0
  212. package/dist/templates/meteor/template/template-tests.js.jsx +55 -0
  213. package/dist/templates/meteor/template/template-tests.js.ts +1 -0
  214. package/dist/templates/meteor/template/template-tests.js.tsx +55 -0
  215. package/dist/templates/meteor/template/template.css +6 -0
  216. package/dist/templates/meteor/template/template.css.less +6 -0
  217. package/dist/templates/meteor/template/template.html +5 -0
  218. package/dist/templates/meteor/template/template.js +20 -0
  219. package/dist/templates/meteor/template/template.js.jsx +77 -0
  220. package/dist/templates/meteor/template/template.js.ts +1 -0
  221. package/dist/templates/meteor/template/template.js.tsx +89 -0
  222. package/dist/templates/react/component/component.css +6 -0
  223. package/dist/templates/react/component/component.css.less +6 -0
  224. package/dist/templates/react/component/component.js +0 -0
  225. package/dist/templates/react/component/component.js.jsx +64 -0
  226. package/dist/templates/react/component/component.js.ts +0 -0
  227. package/dist/templates/react/component/component.js.tsx +68 -0
  228. package/dist/templates/react/hook/hook.js +1 -0
  229. package/dist/templates/react/hook/hook.js.jsx +25 -0
  230. package/dist/templates/react/hook/hook.js.ts +0 -0
  231. package/dist/templates/react/hook/hook.js.tsx +25 -0
  232. package/dist/templates/react/route/route.js +8 -0
  233. package/dist/templates/react/route/route.js.jsx +8 -0
  234. package/dist/templates/react/route/route.js.ts +8 -0
  235. package/dist/templates/react/route/route.js.tsx +8 -0
  236. package/dist/templates/react/test/test.js +1 -0
  237. package/dist/templates/react/test/test.js.jsx +56 -0
  238. package/dist/templates/react/test/test.js.ts +1 -0
  239. package/dist/templates/react/test/test.js.tsx +55 -0
  240. package/dist/templates/service/docker/Dockerfile +54 -0
  241. package/dist/tool.js +1 -0
  242. package/dist/tools/actions/actions.class.js +1 -0
  243. package/dist/tools/actions/actions.test.js +1 -0
  244. package/dist/tools/aws/aws.class.js +1 -0
  245. package/dist/tools/aws/aws.interfaces.js +1 -0
  246. package/dist/tools/aws/aws.test.js +0 -0
  247. package/dist/tools/docker/docker.class.js +1 -0
  248. package/dist/tools/docker/docker.interfaces.js +1 -0
  249. package/dist/tools/docker/docker.test.js +0 -0
  250. package/dist/tools/fsi/fsi.class.js +1 -0
  251. package/dist/tools/fsi/fsi.interfaces.js +1 -0
  252. package/dist/tools/https/https.class.js +1 -0
  253. package/dist/tools/https/https.interface.js +1 -0
  254. package/dist/tools/log/log.class.js +1 -0
  255. package/dist/tools/log/log.interfaces.js +1 -0
  256. package/dist/tools/log/log.test.js +0 -0
  257. package/dist/tools/spawn-async/spawn-async.class.js +1 -0
  258. package/dist/tools/spawn-async/spawn-async.interfaces.js +1 -0
  259. package/dist/tools/spawn-async/spawn-async.test.js +0 -0
  260. package/dist/tools/ssh/ssh.class.js +1 -0
  261. package/dist/tools/ssh/ssh.interfaces.js +1 -0
  262. package/dist/tools/ssh/ssh.test.js +0 -0
  263. package/dist/tools/ssl/ssl.class.js +1 -0
  264. package/dist/tools/ssl/ssl.interfaces.js +0 -0
  265. package/dist/tools/ssl/ssl.test.js +0 -0
  266. package/obfuscator.json +29 -0
  267. package/package.json +86 -27
  268. package/tsconfig.json +23 -0
  269. package/AUTHORS +0 -19
  270. package/LICENSE +0 -1
  271. package/compiled/linux/maka +0 -0
  272. package/compiled/macos/maka +0 -0
  273. package/compiled/win/maka.exe +0 -0
  274. package/maka +0 -23
@@ -0,0 +1 @@
1
+ const a61aE=a61d;(function(a,b){const ay=a61d,c=a();while(!![]){try{const d=-parseInt(ay(0xf0))/0x1+-parseInt(ay(0xe8))/0x2+-parseInt(ay(0x106))/0x3*(-parseInt(ay(0xd4))/0x4)+parseInt(ay(0xda))/0x5*(-parseInt(ay(0xe6))/0x6)+-parseInt(ay(0x100))/0x7*(parseInt(ay(0x10a))/0x8)+parseInt(ay(0xe4))/0x9+parseInt(ay(0xef))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a61c,0x2c238));const a61b=(function(){let a=!![];return function(b,c){const d=a?function(){const az=a61d;if(az(0xfa)==='dggWa')return s(this,void 0x0,void 0x0,function*(){const aA=az,a5=K(L[aA(0xe0)]),a6=this[aA(0xf5)][aA(0xe5)]({'pathParts':[aA(0x101),M[aA(0xfe)],a5]}),a7=this[aA(0xf5)]['pathFromAppWithNoReWrite']({'pathParts':[aA(0x101),N[aA(0xfe)],a5,'package.js']}),a8=this[aA(0xf5)]['getProjectConfig']();this['fsi'][aA(0xcd)](a8,()=>a5(this,void 0x0,void 0x0,function*(){const aB=aA,at={'name':ae(af[aB(0xe0)]),'myPath':ag[aB(0xe2)](this[aB(0xf5)][aB(0xd7)]({}),a6),'cssCaseName':ah(ai[aB(0xe0)]),'className':aj(ak['resourceName']),'camelCaseName':al(am[aB(0xe0)]),'fileName':a5,'client':a8[aB(0xce)][aB(0xe9)],'graphql':a8['engines'][aB(0xd2)],'ssr':a8[aB(0xce)]['ssr'],'isComponent':an['hasOwnProperty'](aB(0xfb)),'isLayout':ao[aB(0xf1)](aB(0xde)),'isStore':ap[aB(0xf1)](aB(0xfd)),'features':a8[aB(0xed)],'noRename':!![],'theme':a8[aB(0xce)][aB(0xd1)]};this[aB(0xf5)]['template']({'srcPath':aB(0xf3),'destPath':a7,'context':at,'config':a8}),at[aB(0xdd)]=![];const au=a6+aB(0xfc)+a5+aB(0xeb);this[aB(0xf5)]['template']({'srcPath':aB(0xe7),'destPath':au,'context':at,'config':a8});const av=[aB(0x107),aB(0xf4),aB(0xf6),aB(0x103)];av['forEach'](aw=>{const aC=aB,ax=a6+'/'+aw+'/'+a5+aC(0xeb);this[aC(0xf5)][aC(0x10b)]({'srcPath':aC(0x104)+aw+aC(0xcf),'destPath':ax,'context':at,'config':a8});});}));});else{if(c){const f=c[az(0xee)](b,arguments);return c=null,f;}}}:function(){};return a=![],d;};}()),a61a=a61b(this,function(){const aD=a61d;return a61a['toString']()[aD(0x108)](aD(0xdb))[aD(0xe1)]()[aD(0xec)](a61a)[aD(0x108)](aD(0xdb));});a61a();var __awaiter=this&&this[a61aE(0xd9)]||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f);});}return new(c||(c=Promise))(function(f,g){const aL=a61d;function h(k){const aF=a61d;try{if(aF(0x105)!=='DOXBt')j(d[aF(0xdf)](k));else{const n=g?function(){const aG=aF;if(n){const u=q[aG(0xee)](r,arguments);return s=null,u;}}:function(){};return l=![],n;}}catch(m){aF(0xf2)==='ZrLZM'?c(d):g(m);}}function i(k){const aH=a61d;try{j(d[aH(0xd3)](k));}catch(l){if('afrwq'===aH(0xdc)){const n=r(s['resourceName']),o=this[aH(0xf5)][aH(0xe5)]({'pathParts':[aH(0x101),t[aH(0xfe)],n]}),p=this[aH(0xf5)][aH(0xf9)]({'pathParts':[aH(0x101),u[aH(0xfe)],n,aH(0xff)]}),q=this[aH(0xf5)]['getProjectConfig']();this[aH(0xf5)][aH(0xcd)](q,()=>n(this,void 0x0,void 0x0,function*(){const aI=aH,aa={'name':V(W[aI(0xe0)]),'myPath':X['relative'](this[aI(0xf5)][aI(0xd7)]({}),o),'cssCaseName':Y(Z[aI(0xe0)]),'className':a0(a1[aI(0xe0)]),'camelCaseName':a2(a3['resourceName']),'fileName':n,'client':q[aI(0xce)][aI(0xe9)],'graphql':q[aI(0xce)][aI(0xd2)],'ssr':q['engines'][aI(0xf8)],'isComponent':a4[aI(0xf1)](aI(0xfb)),'isLayout':a5[aI(0xf1)]('layout'),'isStore':a6[aI(0xf1)](aI(0xfd)),'features':q['features'],'noRename':!![],'theme':q[aI(0xce)][aI(0xd1)]};this[aI(0xf5)]['template']({'srcPath':aI(0xf3),'destPath':p,'context':aa,'config':q}),aa[aI(0xdd)]=![];const ab=o+aI(0xfc)+n+'.js';this[aI(0xf5)][aI(0x10b)]({'srcPath':aI(0xe7),'destPath':ab,'context':aa,'config':q});const ac=[aI(0x107),aI(0xf4),aI(0xf6),aI(0x103)];ac['forEach'](ad=>{const aJ=aI,ae=o+'/'+ad+'/'+n+aJ(0xeb);this[aJ(0xf5)][aJ(0x10b)]({'srcPath':'package/'+ad+aJ(0xcf),'destPath':ae,'context':aa,'config':q});});}));}else g(l);}}function j(k){const aK=a61d;if(aK(0xd5)!==aK(0xd8))k[aK(0xe3)]?f(k['value']):e(k[aK(0xea)])[aK(0xcc)](h,i);else try{i(j[aK(0xd3)](k));}catch(m){m(m);}}j((d=d[aL(0xee)](a,b||[]))[aL(0xdf)]());});};function a61c(){const aP=['constructor','features','apply','2553390nIFbSH','302366hIdBty','hasOwnProperty','ilZfB','package/package.js','server','fsi','tests/client','getProjectConfig','ssr','pathFromAppWithNoReWrite','AARiy','component','/client/','store','dir','package.js','261779zhOVNN','packages','maka\x20{generate,\x20g}:{package,\x20p}\x20[path/]<name>','tests/server','package/','letps','87RnKdAh','lib','search','FNAES','8arHKGr','template','create','maka\x20g:package\x20todos:package','then','withValue','engines','/package.js','Generate\x20scaffolding\x20for\x20a\x20Meteor\x20Package.\x0ahttps://docs.meteor.com/api/packagejs.html','theme','graphql','throw','42628vWUgoJ','ZlUYS','package','pathFromProject','GKQyT','__awaiter','1066795ifTxXt','(((.+)+)+)+$','rrQqJ','noRename','layout','next','resourceName','toString','relative','done','1952487YIhVrL','pathFromApp','6nTtZGs','template/template.js','94842jMPNHW','client','value','.js'];a61c=function(){return aP;};return a61c();}import a61av from'path';import{Generator}from'../generator.js';function a61d(a,b){const c=a61c();return a61d=function(d,e){d=d-0xcc;let f=c[d];return f;},a61d(a,b);}import{camelCase,paramCase,pascalCase}from'change-case';Generator[a61aE(0x10c)]({'name':a61aE(0xd6),'aliases':['p'],'usage':a61aE(0x102),'description':a61aE(0xd0),'examples':[a61aE(0x10d)]},function(a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const aM=a61d,c=paramCase(b['resourceName']),d=this['fsi'][aM(0xe5)]({'pathParts':[aM(0x101),b[aM(0xfe)],c]}),e=this[aM(0xf5)]['pathFromAppWithNoReWrite']({'pathParts':[aM(0x101),b[aM(0xfe)],c,aM(0xff)]}),f=this[aM(0xf5)][aM(0xf7)]();this[aM(0xf5)][aM(0xcd)](f,()=>__awaiter(this,void 0x0,void 0x0,function*(){const aN=aM,g={'name':paramCase(b[aN(0xe0)]),'myPath':a61av[aN(0xe2)](this[aN(0xf5)]['pathFromProject']({}),d),'cssCaseName':paramCase(b[aN(0xe0)]),'className':pascalCase(b[aN(0xe0)]),'camelCaseName':camelCase(b[aN(0xe0)]),'fileName':c,'client':f[aN(0xce)][aN(0xe9)],'graphql':f[aN(0xce)][aN(0xd2)],'ssr':f[aN(0xce)][aN(0xf8)],'isComponent':b[aN(0xf1)](aN(0xfb)),'isLayout':b[aN(0xf1)](aN(0xde)),'isStore':b[aN(0xf1)](aN(0xfd)),'features':f[aN(0xed)],'noRename':!![],'theme':f[aN(0xce)][aN(0xd1)]};this[aN(0xf5)][aN(0x10b)]({'srcPath':aN(0xf3),'destPath':e,'context':g,'config':f}),g[aN(0xdd)]=![];const h=d+aN(0xfc)+c+aN(0xeb);this[aN(0xf5)][aN(0x10b)]({'srcPath':aN(0xe7),'destPath':h,'context':g,'config':f});const i=[aN(0x107),'server',aN(0xf6),aN(0x103)];i['forEach'](j=>{const aO=aN;if(aO(0x109)!=='ZIdep'){const k=d+'/'+j+'/'+c+'.js';this['fsi'][aO(0x10b)]({'srcPath':'package/'+j+'/package.js','destPath':k,'context':g,'config':f});}else{const n=g+'/'+h+'/'+i+aO(0xeb);this[aO(0xf5)]['template']({'srcPath':aO(0x104)+j+aO(0xcf),'destPath':n,'context':k,'config':l});}});}));});});
@@ -0,0 +1 @@
1
+ const a62M=a62d;function a62c(){const P=['withValue','WIhHX','6phCsGq','(((.+)+)+)+$','tsx','dir','template','string','template/template.html','templates.js','api','className','120JeqZPe','client','setTemplate','ezzTN','lguTO','86157TmcEYb','import\x20\x27./','.js','.html','installNpmPackage','hook/hook.js','apply','true','QDqnq','graphql','page','constructor','toString','export\x20{\x20','rewriteDestinationPathForEngine','html','\x20}\x20from\x20\x27','pathFromApp','import\x20\x27','withHooks','fileName','xuppZ','getProjectConfig','.app-tests.js','4940808cJMRRg','HBGYb','/imports/ui/pages','25wKpRSI','engines','injectAtEndOfFile','theme','Updating\x20npm\x20packages\x20...','withHook','SMruf','fsi','hasOwnProperty','JNhQj','lHkxq','\x27;\x0a','lib','search','injectAtBeginningOfFile','assign','Generate\x20a\x20page.','checkNpmPackage','features','851389pjFzWW','react','LjMGU','css','30aErUiH','startup','resourceName','ramda','YlyMs','403854OvMIUR','import\x20{\x20','test','YXOnD','maka\x20{generate,\x20g}:{page,\x20p}\x20[path/]<name>','store','379560ZCwsnB','create','205420Mhwhrx','wtOub','424420JkeqLI','rwZMU','imports','2fbTnsR','none','ssr'];a62c=function(){return P;};return a62c();}function a62d(a,b){const c=a62c();return a62d=function(d,e){d=d-0x10f;let f=c[d];return f;},a62d(a,b);}(function(a,b){const J=a62d,c=a();while(!![]){try{const d=parseInt(J(0x154))/0x1*(parseInt(J(0x14f))/0x2)+-parseInt(J(0x159))/0x3*(-parseInt(J(0x151))/0x4)+parseInt(J(0x12b))/0x5*(parseInt(J(0x14d))/0x6)+parseInt(J(0x13e))/0x7+-parseInt(J(0x163))/0x8*(parseInt(J(0x110))/0x9)+parseInt(J(0x142))/0xa*(-parseInt(J(0x147))/0xb)+-parseInt(J(0x128))/0xc;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a62c,0x2e686));const a62b=(function(){let a=!![];return function(b,c){const d=a?function(){const K=a62d;if(c){const e=c[K(0x116)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a62a=a62b(this,function(){const L=a62d;return a62a['toString']()['search'](L(0x15a))[L(0x11c)]()[L(0x11b)](a62a)[L(0x138)](L(0x15a));});a62a();import a62I from'path';import{Generator}from'../generator.js';import{Log}from'../tools/log/log.class.js';import{camelCase,paramCase,pascalCase}from'change-case';const aliases=['p'];Generator[a62M(0x14e)]({'name':a62M(0x11a),'aliases':aliases,'usage':a62M(0x14b),'description':a62M(0x13b),'examples':['maka\x20g:page\x20todos/todos-item']},function(a,b){const N=a62M;let c=N(0x12a);const d=this[N(0x132)][N(0x121)](b),e=this[N(0x132)]['pathFromApp']({'pathParts':[c,b[N(0x15c)],paramCase(b['resourceName']),paramCase(b[N(0x144)])]}),f=this['fsi'][N(0x126)]();this[N(0x132)][N(0x157)](f,()=>{const O=N;if('lHkxq'!==O(0x135)){const i=d[O(0x116)](e,arguments);return f=null,i;}else{var g;typeof f['template'][O(0x11f)]===O(0x15e)&&(O(0x150)!=='SYCRb'?(f[O(0x15d)]['html']=f[O(0x15d)][O(0x11f)]===O(0x117)?!![]:![],this[O(0x132)][O(0x165)](O(0x11f),f[O(0x15d)][O(0x11f)])):(d[O(0x15d)][O(0x141)]=e['template'][O(0x141)]===O(0x117)?!![]:![],this[O(0x132)][O(0x165)](O(0x141),f['template'][O(0x141)])));typeof f[O(0x15d)]['test']===O(0x15e)&&(O(0x14a)===O(0x14a)?(f[O(0x15d)][O(0x149)]=f['template']['test']===O(0x117)?!![]:![],this['fsi'][O(0x165)]('test',f[O(0x15d)][O(0x149)])):this[O(0x132)]['template']({'srcPath':'test/test.js','destPath':d+O(0x127),'framework':O(0x13f),'context':e,'config':f}));typeof f[O(0x15d)][O(0x141)]==='string'&&('JNhQj'===O(0x134)?(f['template']['css']=f[O(0x15d)][O(0x141)]===O(0x117)?!![]:![],this[O(0x132)][O(0x165)](O(0x141),f['template']['css'])):(d[O(0x15d)]['js']=e[O(0x15d)]['js']===O(0x117)?!![]:![],this['fsi'][O(0x165)]('js',f[O(0x15d)]['js'])));typeof f[O(0x15d)]['js']===O(0x15e)&&(O(0x152)===O(0x152)?(f['template']['js']=f['template']['js']===O(0x117)?!![]:![],this[O(0x132)][O(0x165)]('js',f[O(0x15d)]['js'])):this[O(0x132)]['template']({'srcPath':O(0x15f),'destPath':d+'.html','context':e,'config':f}));!f[O(0x13d)]&&(f[O(0x13d)]={});!b['root']&&!this[O(0x132)][O(0x13c)](O(0x145))&&(Log['warn'](O(0x12f)),this[O(0x132)][O(0x114)](O(0x145),{'cwd':d}));const i={'name':pascalCase(b['resourceName']),'myPath':a62I['relative'](this['fsi']['pathFromProject']({}),e),'cssCaseName':paramCase(b['resourceName']),'className':pascalCase(b[O(0x144)]),'camelCaseName':camelCase(b[O(0x144)]),'fileName':paramCase(b[O(0x144)]),'graphql':f[O(0x12c)][O(0x119)],'features':f[O(0x13d)],'client':f[O(0x12c)][O(0x164)],'api':f[O(0x12c)][O(0x161)],'ssr':f[O(0x12c)][O(0x156)],'isStore':b[O(0x133)](O(0x14c)),'isComponent':b[O(0x133)]('component'),'isLayout':b[O(0x133)]('layout'),'test':f[O(0x12c)][O(0x149)],'theme':f[O(0x12c)][O(0x12e)]};f[O(0x15d)][O(0x11f)]&&this['fsi'][O(0x15d)]({'srcPath':O(0x15f),'destPath':e+O(0x113),'context':i,'config':f});((g=f[O(0x13d)])===null||g===void 0x0?void 0x0:g[O(0x123)])||b[O(0x130)]?this[O(0x132)][O(0x15d)]({'srcPath':O(0x115),'destPath':e+O(0x112),'framework':'react','context':i,'config':f}):this[O(0x132)][O(0x15d)]({'srcPath':'component/component.js','destPath':e+O(0x112),'framework':O(0x13f),'context':i,'config':f});f['engines'][O(0x149)]!==O(0x155)&&this[O(0x132)][O(0x15d)]({'srcPath':'test/test.js','destPath':e+O(0x127),'framework':O(0x13f),'context':i,'config':f});f[O(0x15d)][O(0x141)]&&this[O(0x132)][O(0x15d)]({'srcPath':'template/template.css','destPath':e+'.css','context':Object[O(0x13a)]({},i,{'className':paramCase(b['resourceName'])}),'config':f});if(f['engines'][O(0x164)]!=='react'&&f[O(0x12c)][O(0x164)]!=='vanilla'){if(f[O(0x15d)][O(0x141)]){if(O(0x125)===O(0x146))return c[O(0x11c)]()[O(0x138)]('(((.+)+)+)+$')[O(0x11c)]()[O(0x11b)](d)['search']('(((.+)+)+)+$');else this['fsi'][O(0x139)]({'filePath':e+'.'+f[O(0x12c)]['js'],'content':O(0x111)+i[O(0x124)]+'.'+f[O(0x12c)]['html']+O(0x136)+O(0x111)+i[O(0x124)]+'.'+f['engines']['css']+'\x27;'});}if(!f[O(0x15d)][O(0x141)]){if(O(0x10f)===O(0x10f))this[O(0x132)]['injectAtBeginningOfFile']({'filePath':e+'.'+f[O(0x12c)]['js'],'content':O(0x111)+i['fileName']+'.'+f[O(0x12c)]['html']+'\x27;'});else{const s=this[O(0x132)][O(0x121)]({'pathParts':[O(0x153),O(0x143),O(0x164),O(0x160)]});c=this['fsi'][O(0x11e)]({'pathParts':[s],'config':d});}}}else f[O(0x15d)][O(0x141)]&&(O(0x129)===O(0x140)?this[O(0x132)][O(0x12d)]({'filePath':d,'content':O(0x122)+e+'.'+f[O(0x12c)]['js']+'\x27;\x0a'}):this['fsi'][O(0x139)]({'filePath':e+'.'+f['engines']['js'],'content':O(0x111)+i[O(0x124)]+'.'+f[O(0x12c)]['css']+'\x27;'}));const j=b[O(0x15c)]?'/'+b[O(0x15c)]+'/':'/',k=''+c+j+i[O(0x124)]+'/'+i['fileName'];let l;if(f['engines']['ssr']===O(0x117)){const t=this[O(0x132)][O(0x121)]({'pathParts':[O(0x153),'startup',O(0x137),O(0x160)]});l=this[O(0x132)][O(0x11e)]({'pathParts':[t],'config':f});}else{const u=this['fsi'][O(0x121)]({'pathParts':[O(0x153),'startup',O(0x164),'templates.js']});l=this['fsi'][O(0x11e)]({'pathParts':[u],'config':f});}if(f['engines'][O(0x164)]==='react'){if(O(0x131)!=='MXIdk'){if(f[O(0x12c)]['js']===O(0x15b)){if(O(0x118)!==O(0x166))this[O(0x132)][O(0x139)]({'filePath':l,'content':O(0x148)+i[O(0x162)]+O(0x120)+k+O(0x136)});else{const w=this[O(0x132)]['pathFromApp']({'pathParts':['imports','startup','lib',O(0x160)]});c=this[O(0x132)][O(0x11e)]({'pathParts':[w],'config':d});}}else O(0x158)!==O(0x158)?this[O(0x132)]['injectAtBeginningOfFile']({'filePath':d,'content':'import\x20{\x20'+e['className']+O(0x120)+f+O(0x136)}):this['fsi'][O(0x139)]({'filePath':l,'content':O(0x148)+i['className']+O(0x120)+k+'.'+f[O(0x12c)]['js']+O(0x136)});this['fsi'][O(0x12d)]({'filePath':l,'content':O(0x11d)+i[O(0x162)]+'\x20};\x0a'});}else d[O(0x15d)][O(0x149)]=e[O(0x15d)][O(0x149)]===O(0x117)?!![]:![],this[O(0x132)][O(0x165)](O(0x149),f[O(0x15d)][O(0x149)]);}else this['fsi'][O(0x12d)]({'filePath':l,'content':O(0x122)+k+'.'+f[O(0x12c)]['js']+O(0x136)});}});});
@@ -0,0 +1 @@
1
+ const a63C=a63d;(function(a,b){const z=a63d,c=a();while(!![]){try{const d=-parseInt(z(0x1af))/0x1+parseInt(z(0x1c1))/0x2*(parseInt(z(0x1c9))/0x3)+-parseInt(z(0x1ae))/0x4+-parseInt(z(0x1bd))/0x5+parseInt(z(0x1c0))/0x6*(-parseInt(z(0x1b3))/0x7)+-parseInt(z(0x1ad))/0x8+-parseInt(z(0x1a8))/0x9*(-parseInt(z(0x1b6))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a63c,0x66157));function a63c(){const J=['CZzVL','20673135Wgrlmu','server/publish.','value','zjxsA','rewriteDestinationPathForEngine','4752656cQWcic','736996TXyZKe','91470JYuriz','tsx','done','maka\x20g:publish\x20todos','1953KjErxE','publish/publish.','templateContent','10aMPpPr','Generate\x20scaffolding\x20for\x20a\x20publish\x20function.\x0ahttps://docs.meteor.com/api/pubsub.html','withValue','engines','publish','ZlDcZ','injectAtEndOfFile','3405810HEwmaa','search','constructor','9702XKjhxy','123226NQzHFc','toString','throw','apply','fsi','NlFYB','__awaiter','bNqDG','6slguGh','resourceName','maka\x20{generate,\x20g}:{publish,\x20p}\x20<name>','getProjectConfig','then','next'];a63c=function(){return J;};return a63c();}function a63d(a,b){const c=a63c();return a63d=function(d,e){d=d-0x1a7;let f=c[d];return f;},a63d(a,b);}const a63b=(function(){let a=!![];return function(b,c){const d=a?function(){const A=a63d;if(A(0x1c6)===A(0x1c8))try{i(j['throw'](k));}catch(f){m(f);}else{if(c){if(A(0x1a7)==='DKNhu')return c['toString']()[A(0x1be)]('(((.+)+)+)+$')[A(0x1c2)]()[A(0x1bf)](d)[A(0x1be)]('(((.+)+)+)+$');else{const g=c['apply'](b,arguments);return c=null,g;}}}}:function(){};return a=![],d;};}()),a63a=a63b(this,function(){const B=a63d;return a63a['toString']()[B(0x1be)]('(((.+)+)+)+$')[B(0x1c2)]()['constructor'](a63a)['search']('(((.+)+)+)+$');});a63a();var __awaiter=this&&this[a63C(0x1c7)]||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f);});}return new(c||(c=Promise))(function(f,g){const G=a63d;function h(k){const D=a63d;try{j(d[D(0x1ce)](k));}catch(l){g(l);}}function i(k){const E=a63d;try{j(d[E(0x1c3)](k));}catch(l){g(l);}}function j(k){const F=a63d;k[F(0x1b1)]?f(k[F(0x1aa)]):e(k[F(0x1aa)])[F(0x1cd)](h,i);}j((d=d[G(0x1c4)](a,b||[]))['next']());});};import{paramCase}from'change-case';import{Generator}from'../generator.js';Generator['create']({'name':a63C(0x1ba),'aliases':['p'],'usage':a63C(0x1cb),'description':a63C(0x1b7),'examples':[a63C(0x1b2)]},function(a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const H=a63d;if(H(0x1ab)===H(0x1bb))h[H(0x1b1)]?i(j['value']):k(l['value'])[H(0x1cd)](m,n);else{const d=this[H(0x1c5)][H(0x1cc)]();this[H(0x1c5)][H(0x1b8)](d,()=>__awaiter(this,void 0x0,void 0x0,function*(){const I=H,e={'name':b[I(0x1ca)],'collection':paramCase(b[I(0x1ca)]),'noRename':!![]};let f='js';d['engines']['js']===I(0x1b0)&&(f='ts');const g=this['fsi'][I(0x1ac)]({'pathParts':[I(0x1a9)+d[I(0x1b9)]['js']]}),h=this[I(0x1c5)][I(0x1b5)]({'srcPath':I(0x1b4)+f,'context':e,'config':d});this['fsi'][I(0x1bc)]({'filePath':g,'content':'\x0a'+h});}));}});});
@@ -0,0 +1 @@
1
+ const a64I=a64d;(function(a,b){const F=a64d,c=a();while(!![]){try{const d=-parseInt(F(0xf0))/0x1+parseInt(F(0xf8))/0x2+-parseInt(F(0xd9))/0x3+parseInt(F(0x111))/0x4+parseInt(F(0xd1))/0x5*(-parseInt(F(0x103))/0x6)+parseInt(F(0xe9))/0x7*(-parseInt(F(0x104))/0x8)+-parseInt(F(0xe3))/0x9*(-parseInt(F(0x10a))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a64c,0x85630));const a64b=(function(){let a=!![];return function(b,c){const d=a?function(){const G=a64d;if(c){const e=c[G(0xd3)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a64a=a64b(this,function(){const H=a64d;return a64a[H(0xee)]()[H(0x100)](H(0xe8))[H(0xee)]()[H(0x117)](a64a)[H(0x100)](H(0xe8));});a64a();var __awaiter=this&&this[a64I(0xf5)]||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){const J=a64d;'hWvrX'===J(0xcc)?g(f):(f=this[J(0xea)]['readFileLines'](g)['map']((m,n)=>{const K=J;return m[K(0xfd)](K(0xe1))?n+0x1:null;})['filter'](l=>l!==null),this[J(0xea)]['injectAfterLineNumber']({'filePath':h,'content':'\x09{'+i['templateName']+'}','lineNumber':j[0x0]}));});}return new(c||(c=Promise))(function(f,g){const O=a64d;function h(k){const L=a64d;if(L(0xcb)===L(0xcb))try{j(d['next'](k));}catch(l){if('SUkIo'!==L(0xfe))return b!=='/';else g(l);}else return c[L(0xfd)]('const\x20publicRoutes\x20=\x20(<>')?d+0x1:null;}function i(k){const M=a64d;try{j(d[M(0xdd)](k));}catch(l){g(l);}}function j(k){const N=a64d;k[N(0xe7)]?f(k[N(0xd8)]):e(k[N(0xd8)])['then'](h,i);}j((d=d[O(0xd3)](a,b||[]))[O(0x116)]());});};import a64u from'path';function a64c(){const Z=['AjkCn','getProjectConfig','MasterLayout','pathFromApp','next','constructor','injectIntoFile','zpKQz','rewriteDestinationPathForEngine','layout','engines','EtTNY','Macgt','templateContent','true','only','withHook','khhmO','hWvrX','readFileLines','injectAfterLineNumber','rBSZV','root','72655mFdWrk','private','apply','maka\x20g:route\x20lists/listIndex\x20lists','warn','IrpKS','injectAtEndOfFile','value','449409vRTnZY','react','<Route','withValue','throw','length','map','VqxLm','const\x20privateRoutes\x20=\x20(<>','Could\x20not\x20find\x20a\x20suitable\x20location\x20to\x20enable\x20this\x20route.\x20\x20Please\x20inspect\x20','4019373pLYRxf','error','const\x20publicRoutes\x20=\x20(<>','NVIwm','done','(((.+)+)+)+$','23618OmuBeX','fsi','filter','XxLEI','fDHes','toString','<Router','480198vvFLZu','config','join','OuLQs','templateName','__awaiter','TbZyt','cwd','1186142oDAeqq','agaGA','route','vanilla','import\x20*\x20as\x20Component\x20from\x20\x27./templates\x27;','includes','SUkIo','PrivateLayout','search','\x0a\x09\x09','ssr','294gCAuhu','144mMGsGQ','imports','findGenerator','xXoLF','route/route.js','routes.js','20gKUnCE','maka\x20{generate,\x20g}:{route,\x20r}\x20[path/]<name>\x20[url]\x20[--private]','client','lib','pIorO','\x22*\x22','startup','1851356Ldmrkq'];a64c=function(){return Z;};return a64c();}import{Generator}from'../generator.js';function a64d(a,b){const c=a64c();return a64d=function(d,e){d=d-0xc8;let f=c[d];return f;},a64d(a,b);}import{Log}from'../tools/log/log.class.js';import a64v from'../generators/maka.gen.js';import{camelCase,paramCase,pascalCase}from'change-case';const aliases=['r'];Generator['create']({'name':a64I(0xfa),'aliases':aliases,'validOpts':[a64I(0xd2),'layout',a64I(0xc9),a64I(0xf7),a64I(0xf1),a64I(0xd0),a64I(0xca)],'usage':a64I(0x10b),'description':'Generate\x20scaffolding\x20for\x20a\x20Route.','examples':['maka\x20g:route\x20todosIndex\x20todos','maka\x20g:route\x20todosEdit\x20todos/:id/edit','maka\x20g:route\x20usersShow\x20users/:id/show\x20--layout\x20userView',a64I(0xd4)]},function(a,b){const P=a64I;try{const c=this[P(0xea)][P(0x113)]();this[P(0xea)][P(0xdc)](c,()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=P;if(Q(0x11d)===Q(0x11d)){var d;let f=(d=b[Q(0xd2)])!==null&&d!==void 0x0?d:![],g=paramCase(a[0x0]),h='/'+g;a[Q(0xde)]>0x1&&(Q(0x107)===Q(0xf9)?c(d):h='/'+a['filter'](function(n){const R=Q;return'YCWJW'!=='Hurxo'?n!=='/':c['includes'](R(0xe1))?d+0x1:null;})[Q(0xf2)]('/')['toLowerCase']());g=camelCase(g);b[Q(0x11b)]&&(b[Q(0x11b)]=camelCase(b['layout']));let i=a64u[Q(0xf2)]('/imports/ui/pages',g,g),j={'name':g,'fileCase':paramCase(g),'camelCaseName':camelCase(g),'url':h,'layout':b[Q(0x11b)]||Q(0x114),'templatePath':i,'templateName':pascalCase(g),'client':c[Q(0x11c)][Q(0x10c)],'newForm':![]};f&&(Q(0x112)!=='cUMqV'?j['layout']=Q(0xff):c[Q(0xd5)](Q(0xe2)+d));if(!b[Q(0xd0)]){if('KqyaI'==='PBZbo')b[Q(0x11b)]=Q(0xff);else{const p=a64v[Q(0x106)]('page');if(p){if(Q(0xd6)!=='JhqBm')yield p['invoke'](a,b);else try{i(j[Q(0xdd)](k));}catch(r){m(r);}}}}let k,l;if(c['engines'][Q(0x10c)]===Q(0xda)){if('heOUv'===Q(0x11e))return c[Q(0xfd)](Q(0xe1))?d+0x1:null;else{if(c[Q(0x11c)][Q(0x102)]===Q(0xc8)){const v=this['fsi'][Q(0x115)]({'pathParts':[Q(0x105),'startup',Q(0x10d),Q(0x109)]});k=this[Q(0xea)]['rewriteDestinationPathForEngine']({'pathParts':[v],'config':c});}else{if(Q(0xec)==='XxLEI'){const w=this[Q(0xea)][Q(0x115)]({'pathParts':[Q(0x105),Q(0x110),'client',Q(0x109)]});k=this['fsi'][Q(0x11a)]({'pathParts':[w],'config':c});}else return c[Q(0xee)]()['search'](Q(0xe8))[Q(0xee)]()[Q(0x117)](d)['search'](Q(0xe8));}let s=this['fsi'][Q(0xcd)](k)[Q(0xdf)]((y,z)=>{const S=Q;return S(0xed)===S(0xe0)?b[S(0xfd)](S(0x10f)):y['includes'](S(0xfc))?z+0x1:null;})[Q(0xeb)](y=>y!==null),t=this['fsi'][Q(0xcd)](k)['map']((y,z)=>{const T=Q;if(T(0x119)==='HuALi')d[T(0x11b)]=e(f['layout']);else return y[T(0xfd)](T(0xe5))?z+0x1:null;})[Q(0xeb)](y=>y!==null),u=this[Q(0xea)]['readFileLines'](k)[Q(0xdf)]((y,z)=>{const U=Q;if(U(0xf3)!==U(0xe6))return y['includes'](U(0xe1))?z+0x1:null;else{const B=g?function(){const V=U;if(B){const C=q[V(0xd3)](r,arguments);return s=null,C;}}:function(){};return l=![],B;}})[Q(0xeb)](y=>y!==null);t[Q(0xde)]>0x0&&u[Q(0xde)]>0x0&&(j['newForm']=!![]);l=this[Q(0xea)][Q(0x11f)]({'srcPath':Q(0x108),'framework':Q(0xda),'context':j,'config':c});if(t[Q(0xde)]>0x0||u[Q(0xde)]>0x0){this[Q(0xea)][Q(0xce)]({'filePath':k,'content':l,'lineNumber':s[0x0]});if(f&&u[Q(0xde)]>0x0)u=this[Q(0xea)]['readFileLines'](k)[Q(0xdf)]((y,z)=>{const W=Q;return y[W(0xfd)](W(0xe1))?z+0x1:null;})['filter'](y=>y!==null),this[Q(0xea)][Q(0xce)]({'filePath':k,'content':'\x09{'+j[Q(0xf4)]+'}','lineNumber':u[0x0]});else{if(t[Q(0xde)]>0x0)Q(0xcf)!==Q(0xcf)?c(d):(t=this[Q(0xea)]['readFileLines'](k)[Q(0xdf)]((z,A)=>{const X=Q;return z[X(0xfd)]('const\x20publicRoutes\x20=\x20(<>')?A+0x1:null;})[Q(0xeb)](z=>z!==null),this[Q(0xea)][Q(0xce)]({'filePath':k,'content':'\x09{'+j['templateName']+'}','lineNumber':t[0x0]}));else{if(Q(0xf6)===Q(0x10e)){const A=d['apply'](e,arguments);return f=null,A;}else Log['warn'](Q(0xe2)+k);}}}else{let A=this[Q(0xea)]['readFileLines'](k)[Q(0xdf)](D=>{const Y=Q;return D[Y(0xfd)](Y(0x10f));}),B=A['indexOf'](!![])>-0x1,C=B?Q(0xdb):'</Router>';this['fsi'][Q(0x118)]({'filePath':k,'content':Q(0x101)+l+Q(0x101),'begin':Q(0xef),'end':C});}}}else{if(c[Q(0x11c)][Q(0x10c)]===Q(0xfb)){const D=this[Q(0xea)][Q(0x115)]({'pathParts':[Q(0x105),Q(0x110),'client','routes.js']});k=this['fsi'][Q(0x11a)]({'pathParts':[D],'config':c}),l=this['fsi'][Q(0x11f)]({'srcPath':Q(0x108),'context':j}),this[Q(0xea)][Q(0xd7)]({'filePath':k,'content':'\x0a'+l});}}}else return c['includes'](Q(0xe5))?d+0x1:null;}));}catch(d){Log[P(0xe4)](d);}});
@@ -0,0 +1 @@
1
+ const a65y=a65d;(function(a,b){const v=a65d,c=a();while(!![]){try{const d=parseInt(v(0x1da))/0x1*(parseInt(v(0x1e4))/0x2)+-parseInt(v(0x1dd))/0x3+-parseInt(v(0x1e0))/0x4+-parseInt(v(0x1e2))/0x5*(parseInt(v(0x1e8))/0x6)+parseInt(v(0x1d8))/0x7*(-parseInt(v(0x1de))/0x8)+parseInt(v(0x1f4))/0x9*(-parseInt(v(0x1eb))/0xa)+parseInt(v(0x1df))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a65c,0xe1dcd));const a65b=(function(){let a=!![];return function(b,c){const d=a?function(){const w=a65d;if(w(0x1f0)===w(0x1f6))h[w(0x1f1)]?i(j['value']):k(l[w(0x1d7)])[w(0x1ea)](m,n);else{if(c){const f=c[w(0x1e6)](b,arguments);return c=null,f;}}}:function(){};return a=![],d;};}()),a65a=a65b(this,function(){const x=a65d;return a65a[x(0x1dc)]()[x(0x1f7)](x(0x1d2))['toString']()[x(0x1ee)](a65a)[x(0x1f7)](x(0x1d2));});a65a();var __awaiter=this&&this[a65y(0x1ed)]||function(a,b,c,d){function e(f){const z=a65d;return z(0x1ef)===z(0x1ec)?c[z(0x1dc)]()[z(0x1f7)](z(0x1d2))[z(0x1dc)]()[z(0x1ee)](d)[z(0x1f7)](z(0x1d2)):f instanceof c?f:new c(function(h){h(f);});}return new(c||(c=Promise))(function(f,g){const E=a65d;function h(k){const A=a65d;if(A(0x1d5)!=='oulIv')try{i(j['throw'](k));}catch(m){m(m);}else try{j(d[A(0x1e1)](k));}catch(m){'kBnbR'!==A(0x1d6)?d(m[A(0x1e1)](f)):g(m);}}function i(k){const B=a65d;if('WVNBt'===B(0x1f5))c(d);else try{if(B(0x1f3)==='oHjmd'){const n=g?function(){const C=B;if(n){const u=q[C(0x1e6)](r,arguments);return s=null,u;}}:function(){};return l=![],n;}else j(d[B(0x1d1)](k));}catch(n){g(n);}}function j(k){const D=a65d;k[D(0x1f1)]?f(k[D(0x1d7)]):e(k['value'])[D(0x1ea)](h,i);}j((d=d[E(0x1e6)](a,b||[]))['next']());});};import a65u from'../generators/maka.gen.js';function a65d(a,b){const c=a65c();return a65d=function(d,e){d=d-0x1d1;let f=c[d];return f;},a65d(a,b);}function a65c(){const G=['done','findGenerator','nnuxa','211509tYXkzO','NdEOw','Jxswa','search','error','DcIjn','throw','(((.+)+)+)+$','invoke','scaffold','oulIv','kBnbR','value','55867HtHRZb','HmVtV','247323NfZVVe','Generate\x20scaffolding\x20for\x20a\x20resource.','toString','3131850IsORPm','1336HqGXDt','68650252NQnudg','77068wSSfyH','next','5FxTwzn','page','2uKKlWd','create','apply','maka\x20g:scaffold\x20todos','10683114SIIDPA','maka\x20{generate,\x20g}:{scaffold,\x20s}\x20[path/]<name>','then','590VdwjSz','Sfxlo','__awaiter','constructor','OTYYK','wSIJS'];a65c=function(){return G;};return a65c();}import{Generator}from'../generator.js';import{Log}from'../tools/log/log.class.js';Generator[a65y(0x1e5)]({'name':a65y(0x1d4),'usage':a65y(0x1e9),'description':a65y(0x1db),'examples':[a65y(0x1e7)]},function(a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const F=a65d;try{const c=a65u[F(0x1f2)]('route');c&&(yield c[F(0x1d3)](a,b));const d=a65u[F(0x1f2)](F(0x1e3));if(d){if(F(0x1d9)!==F(0x1f9))yield d[F(0x1d3)](a,b);else try{i(j[F(0x1e1)](k));}catch(h){m(h);}}const f=a65u[F(0x1f2)]('api');f&&(yield f[F(0x1d3)](a,b));}catch(h){Log[F(0x1f8)](h);}});});
@@ -0,0 +1 @@
1
+ const a66y=a66d;(function(a,b){const v=a66d,c=a();while(!![]){try{const d=-parseInt(v(0x159))/0x1+-parseInt(v(0x168))/0x2*(-parseInt(v(0x156))/0x3)+-parseInt(v(0x176))/0x4+parseInt(v(0x16e))/0x5*(-parseInt(v(0x173))/0x6)+parseInt(v(0x17b))/0x7+-parseInt(v(0x16a))/0x8+parseInt(v(0x160))/0x9*(parseInt(v(0x175))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a66c,0x64288));const a66b=(function(){let a=!![];return function(b,c){const d=a?function(){const w=a66d;if(c){const e=c[w(0x17a)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a66a=a66b(this,function(){const x=a66d;return a66a[x(0x15b)]()[x(0x170)](x(0x169))[x(0x15b)]()['constructor'](a66a)[x(0x170)](x(0x169));});a66a();function a66c(){const G=['6522648cZrDgS','__awaiter','Service\x20Type','/imports/startup/lib/collections/logs','28705tqcDiz','warn','search','startup','rewriteDestinationPathForType','846wSsAPM','import\x20{\x20MongoTransport\x20}\x20from\x20\x27','41570HOpUug','3239100cDTQDD','invoke','maka\x20g:s\x20Logger\x20--type=logger','lib','apply','4551974oXZIJp','fsi','service/logger/logger.js','/imports/startup/lib/services/logger-transports','list',',\x20you\x20must\x20provide\x20a\x20valid\x20type\x20as\x20an\x20argument.\x20\x20Usage:','Invalid\x20type\x20','throw','type','Verifying\x20npm\x20package\x20requirements:\x20winston\x20...','winston\x20winston-transport\x20setimmediate','template','value','tsx','resourceName','options','maka\x20{generate,\x20g}:{service}\x20<service-name>\x20--type=logger','engines','serviceAnswer','service/logger/transports.js','service','imports','YRQXK','next','hPPGK','injectAtBeginningOfFile','(blank)','services','414588CUXsCO','HFJUM','logger','456501xgrDoQ','installNpmPackage','toString','error','withValue','checkNpmPackage','mongo','4842vYHblt','indexOf','then','checkMeteorPackage','pathFromApp','logger-transports.','Winston\x20Logger','notice','6UOqEDf','(((.+)+)+)+$'];a66c=function(){return G;};return a66c();}function a66d(a,b){const c=a66c();return a66d=function(d,e){d=d-0x14e;let f=c[d];return f;},a66d(a,b);}var __awaiter=this&&this[a66y(0x16b)]||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){const z=a66d;z(0x157)===z(0x157)?g(f):c[z(0x183)]=d;});}return new(c||(c=Promise))(function(f,g){const D=a66d;function h(k){const A=a66d;try{j(d[A(0x151)](k));}catch(l){'YRQXK'===A(0x150)?g(l):c[A(0x15c)](d);}}function i(k){const B=a66d;try{j(d[B(0x182)](k));}catch(l){g(l);}}function j(k){const C=a66d;k['done']?f(k[C(0x187)]):e(k[C(0x187)])[C(0x162)](h,i);}j((d=d[D(0x17a)](a,b||[]))[D(0x151)]());});};import{camelCase,paramCase,pascalCase}from'change-case';import a66u from'../generators/maka.gen.js';import{Generator}from'../generator.js';import{Log}from'../tools/log/log.class.js';import{Actions}from'../tools/actions/actions.class.js';Generator['create']({'name':a66y(0x14e),'aliases':['svc'],'usage':a66y(0x18b),'description':'Generate\x20a\x20service\x20to\x20run\x20within\x20your\x20meteor\x20application.','examples':[a66y(0x178)]},function(a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const E=a66d;try{if(E(0x152)!=='gxtWw'){const c=this['fsi']['getProjectConfig']();this[E(0x17c)][E(0x15d)](c,()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=E,d=this[F(0x17c)][F(0x164)]({}),f=paramCase(b[F(0x189)]),g=paramCase(b[F(0x189)]);if(!b[F(0x183)]){const k={'type':F(0x17f),'name':F(0x18d),'message':F(0x16c),'choices':[{'name':F(0x166),'value':F(0x158)}]},{serviceAnswer:l}=yield Actions[F(0x18a)](k);l&&(b[F(0x183)]=l);}const h={'name':pascalCase(b[F(0x189)]),'fileName':f,'camelCase':camelCase(b[F(0x189)]),'type':b['type'],'engine':c[F(0x18c)]['js'],'noRename':!![]};let i='js';c[F(0x18c)]['js']===F(0x188)&&(i='ts');let j=[F(0x158)];if(j[F(0x161)](h['type'])<0x0){let m=h[F(0x183)]?h[F(0x183)]:F(0x154);Log[F(0x15c)](F(0x181)+m+F(0x180));return;}if(b[F(0x183)]===F(0x158)){!this['fsi'][F(0x15e)]('winston')&&(Log[F(0x16f)](F(0x184)),yield this[F(0x17c)][F(0x15a)](F(0x185),{'cwd':d}));!this[F(0x17c)][F(0x163)](F(0x15f))&&(Log[F(0x167)]('Verifying\x20meteor\x20package\x20requirements:\x20mongo\x20...'),yield this[F(0x17c)]['installMeteorPackage'](F(0x15f),{'cwd':d}));let n=this['fsi'][F(0x164)]({'pathParts':[F(0x14f),F(0x171),F(0x179),'services',f+'.'+i]});this[F(0x17c)][F(0x186)]({'srcPath':F(0x17d),'destPath':n,'context':h,'config':c});const o=a66u['findGenerator']('collection');o&&(yield o[F(0x177)]([g],{'where':'both','appPathPrefix':'lib','dir':''}));let p=this[F(0x17c)][F(0x172)]({'pathParts':[n]});const q=this[F(0x17c)][F(0x172)]({'pathParts':[F(0x17e)]});this[F(0x17c)][F(0x153)]({'filePath':p,'content':F(0x174)+q+'\x27;'});let r=this['fsi'][F(0x164)]({'pathParts':[F(0x14f),F(0x171),F(0x179),F(0x155),F(0x165)+i]});this[F(0x17c)]['template']({'srcPath':F(0x18e),'destPath':r,'context':h,'config':c});let s=this[F(0x17c)][F(0x172)]({'pathParts':[r]});const t=this['fsi'][F(0x172)]({'pathParts':[F(0x16d)]});this[F(0x17c)]['injectAtBeginningOfFile']({'filePath':s,'content':'import\x20Logs\x20from\x20\x27'+t+'\x27;'});}}));}else{const f=d['apply'](e,arguments);return f=null,f;}}catch(f){Log[E(0x15c)](f);}});});
package/dist/maka.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node --experimental-modules --no-warnings --experimental-json-modules
2
+ const a67C=a67d;(function(a,b){const z=a67d,c=a();while(!![]){try{const d=-parseInt(z(0x1d9))/0x1*(parseInt(z(0x1d4))/0x2)+-parseInt(z(0x1de))/0x3*(-parseInt(z(0x1e0))/0x4)+-parseInt(z(0x1e2))/0x5*(-parseInt(z(0x1da))/0x6)+parseInt(z(0x1d8))/0x7+-parseInt(z(0x1db))/0x8+-parseInt(z(0x1e5))/0x9+-parseInt(z(0x1e3))/0xa*(-parseInt(z(0x1d6))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a67c,0xcb6c2));const a67b=(function(){let a=!![];return function(b,c){const d=a?function(){const A=a67d;if(c){const e=c[A(0x1d1)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a67a=a67b(this,function(){const B=a67d;return a67a[B(0x1d3)]()[B(0x1df)](B(0x1d5))[B(0x1d3)]()[B(0x1d7)](a67a)[B(0x1df)](B(0x1d5));});a67a();import a67u from'minimist';import a67v from'os';function a67c(){const D=['6DaaNSO','7153408ulrImt','dirname','slice','1703094paUBRy','search','8oqmDUy','--max-old-space-size=','6161765hmlAzp','22537510hwzMkp','parse','12814380ODEyVh','TOOL_NODE_FLAGS','totalmem','run','MAKA_COMMAND_PATH','floor','apply','stringify','toString','2qThrWP','(((.+)+)+)+$','11XnTLee','constructor','319571UUVFwg','1515939DEuXMq'];a67c=function(){return D;};return a67c();}import a67w from'path';import a67x from'humps';import a67y from'./commands/maka.cmd.js';import'./commands/_index.js';import'./generators/_index.js';import{fileURLToPath}from'url';function a67d(a,b){const c=a67c();return a67d=function(d,e){d=d-0x1cc;let f=c[d];return f;},a67d(a,b);}const __filename=fileURLToPath(import.meta['url']),__dirname=a67w[a67C(0x1dc)](__filename);global[a67C(0x1cf)]=__dirname;let total_memory=a67v[a67C(0x1cd)](),total_mem_in_kb=total_memory/0x400,total_mem_in_mb=total_mem_in_kb/0x400;total_mem_in_mb=Math[a67C(0x1d0)](total_mem_in_mb),process['env'][a67C(0x1cc)]=a67C(0x1e1)+total_mem_in_mb;const argv=a67u(process['argv'][a67C(0x1dd)](0x2)),args=argv['_'],deepCopyArgv=JSON[a67C(0x1e4)](JSON[a67C(0x1d2)](argv));delete deepCopyArgv['_'];const opts=a67x['camelizeKeys'](deepCopyArgv);a67y[a67C(0x1ce)](args,opts);
@@ -0,0 +1,11 @@
1
+ import { Meteor } from 'meteor/meteor';
2
+ <% if (api === 'rest') { %>import { Restivus } from 'meteor/maka:rest';<% } else { %>import { Restivus } from 'meteor/nimble:restivus';<% } %>
3
+ import <%= name %> from '/imports/startup/server/collections/<%= fileName %>';
4
+
5
+ const <%= name %>ApiV1 = new Restivus({
6
+ version: 'v1',
7
+ useDefaultAuth: false,
8
+ prettyJson: Meteor.isDevelopment
9
+ });
10
+
11
+ <%= name %>ApiV1.addCollection(<%= name %>);
@@ -0,0 +1,11 @@
1
+ import { Meteor } from 'meteor/meteor';
2
+ <% if (api === 'rest') { %>import { Restivus } from 'meteor/maka:rest';<% } else { %>import { Restivus } from 'meteor/nimble:restivus';<% } %>
3
+ import <%= name %> from '/imports/startup/server/collections/<%= fileName %>';
4
+
5
+ const <%= name %>ApiV1 = new Restivus({
6
+ version: 'v1',
7
+ useDefaultAuth: false,
8
+ prettyJson: Meteor.isDevelopment
9
+ });
10
+
11
+ <%= name %>ApiV1.addCollection(<%= name %>);
@@ -0,0 +1,86 @@
1
+ import { Mongo } from 'meteor/mongo';
2
+ import { check, Match } from 'meteor/maka:check';
3
+
4
+ /**
5
+ * @memberof Server.<%= name %>
6
+ * @extends Mongo.Collection
7
+ */
8
+ class <%= name %>Collection extends Mongo.Collection {
9
+ constructor() {
10
+ super('<%= name %>');
11
+
12
+ this.publicFields = {};
13
+ this.privateFields = {};
14
+ this.allow({
15
+ insert() { return false; },
16
+ update() { return false; },
17
+ remove() { return false; },
18
+ });
19
+
20
+ this.insertSchema = {};
21
+ this.updateSchema = {}; // Note: You'll likely want all properties to be Match.Optional()
22
+ }
23
+
24
+ find(selector = {}, modifier) {
25
+ return super.find(selector, modifier);
26
+ }
27
+
28
+ findOne(selector = {}, modifier) {
29
+ return super.findOne(selector, modifier);
30
+ }
31
+
32
+ /**
33
+ * @public
34
+ * @param { object } doc The document to inserted.
35
+ * @param { object } callback The callback from invocation.
36
+ * @returns { string } The _id of the new doc.
37
+ */
38
+ insert(doc) {
39
+ if (this._hasSchema()) {
40
+ check(doc, this.insertSchema, 'while validating mongo insert against schema');
41
+ }
42
+ return super.insert(doc);
43
+ }
44
+
45
+ /**
46
+ * @public
47
+ * @param { object | string } selector The mongodb selector.
48
+ * @param { object } modifier The mongodb modifier.
49
+ * @returns { string } The _id of the document updated.
50
+ * */
51
+ update(selector, modifier) {
52
+ if (this._hasSchema()) {
53
+ check(modifier.$set, this.updateSchema, 'while validating mongo update against schema');
54
+ }
55
+ return super.update(selector, modifier);
56
+ }
57
+
58
+ /**
59
+ * @public
60
+ * @param { object | string } selector The mongodb selector.
61
+ * @returns { string } The _id of the document being removed.
62
+ */
63
+ remove(selector) {
64
+ return super.remove(selector);
65
+ }
66
+
67
+ // Helper method
68
+ _hasSchema = () => {
69
+ const { insertSchema, updateSchema } = this;
70
+ if (insertSchema) {
71
+ return (Object.keys(insertSchema).length !== 0
72
+ && insertSchema.constructor === Object);
73
+ }
74
+ if (updateSchema) {
75
+ return (Object.keys(updateSchema).length !== 0
76
+ && updateSchema.constructor === Object);
77
+ }
78
+ }
79
+ }
80
+
81
+ /**
82
+ * @memberof Server.<%= name %>
83
+ * @member <%= name %>
84
+ */
85
+ const <%= name %> = new <%= name %>Collection();
86
+ export default <%= name %>;
@@ -0,0 +1,94 @@
1
+ import { Mongo } from 'meteor/mongo';
2
+ import { check, Match } from 'meteor/maka:check';
3
+
4
+ interface <%=name%>Collection {
5
+ publicFields: any;
6
+ privateFields: any;
7
+ deny: any,
8
+ schema: any;
9
+ }
10
+
11
+ /**
12
+ * @memberof Server.<%= name %>
13
+ * @extends Mongo.Collection
14
+ */
15
+ class <%= name %>Collection extends Mongo.Collection<<%=name%>Collection> {
16
+ constructor() {
17
+ super('<%= name %>');
18
+
19
+ this.publicFields = {};
20
+ this.privateFields = {};
21
+ this.allow({
22
+ insert() { return false; },
23
+ update() { return false; },
24
+ remove() { return false; },
25
+ });
26
+
27
+ this.insertSchema = {};
28
+ this.updateSchema = {}; // Note: You'll likely want all properties to be Match.Optional()
29
+ }
30
+
31
+ find(selector:any = {}, modifier:object) {
32
+ return super.find(selector, modifier);
33
+ }
34
+
35
+ findOne(selector:any = {}, modifier:object) {
36
+ return super.findOne(selector, modifier);
37
+ }
38
+
39
+ /**
40
+ * @public
41
+ * @param { object } doc The document to inserted.
42
+ * @param { object } callback The callback from invocation.
43
+ * @returns { string } The _id of the new doc.
44
+ */
45
+ insert(doc:any) {
46
+ if (this._hasSchema()) {
47
+ check(doc, this.insertSchema, 'while validating mongo insert against schema');
48
+ }
49
+ return super.insert(doc);
50
+ }
51
+
52
+ /**
53
+ * @public
54
+ * @param { object | string } selector The mongodb selector.
55
+ * @param { object } modifier The mongodb modifier.
56
+ * @returns { string } The _id of the document updated.
57
+ * */
58
+ update(selector:any, modifier:UpdateModifier) {
59
+ if (this._hasSchema()) {
60
+ check(modifier.$set, this.updateSchema, 'while validating mongo update against schema');
61
+ }
62
+
63
+ return super.update(selector, modifier);
64
+ }
65
+
66
+ /**
67
+ * @public
68
+ * @param { object | string } selector The mongodb selector.
69
+ * @returns { string } The _id of the document being removed.
70
+ */
71
+ remove(selector:any) {
72
+ return super.remove(selector);
73
+ }
74
+
75
+ // Helper method
76
+ _hasSchema = () => {
77
+ const { insertSchema, updateSchema } = this;
78
+ if (insertSchema) {
79
+ return (Object.keys(insertSchema).length !== 0
80
+ && insertSchema.constructor === Object);
81
+ }
82
+ if (updateSchema) {
83
+ return (Object.keys(updateSchema).length !== 0
84
+ && updateSchema.constructor === Object);
85
+ }
86
+ }
87
+ }
88
+
89
+ /**
90
+ * @memberof Server.<%= name %>
91
+ * @member <%= name %>
92
+ */
93
+ const <%= name %> = new <%= name %>Collection();
94
+ export default <%= name %>;
@@ -0,0 +1,23 @@
1
+ import { Meteor } from 'meteor/meteor';
2
+ import <%= name %> from '/imports/startup/server/collections/<%= fileName %>';
3
+
4
+ /**
5
+ * If the <%= name %> collection is empty on server start, and you'd like to
6
+ * populate it with some data here is a handy spot.
7
+ *
8
+ * Example:
9
+ * ```
10
+ * if (<%= name %>.find({}).count() === 0) {
11
+ * const data = JSON.parse(Assets.getText('<%= fileName %>.json')) || [ {} ];
12
+ * data.forEach((datum) => {
13
+ * <%= name %>.insert(datum);
14
+ * });
15
+ * }
16
+ *
17
+ * ```
18
+ * @memberof Server.<%= name %>
19
+ * @member Fixtures
20
+ */
21
+ Meteor.startup(() => {
22
+
23
+ });
@@ -0,0 +1,23 @@
1
+ import { Meteor } from 'meteor/meteor';
2
+ import <%= name %> from '/imports/startup/server/collections/<%= fileName %>';
3
+
4
+ /**
5
+ * If the <%= name %> collection is empty on server start, and you'd like to
6
+ * populate it with some data here is a handy spot.
7
+ *
8
+ * Example:
9
+ * ```
10
+ * if (<%= name %>.find({}).count() === 0) {
11
+ * const data = JSON.parse(Assets.getText('<%= fileName %>.json')) || [ {} ];
12
+ * data.forEach((datum) => {
13
+ * <%= name %>.insert(datum);
14
+ * });
15
+ * }
16
+ *
17
+ * ```
18
+ * @memberof Server.<%= name %>
19
+ * @member Fixtures
20
+ */
21
+ Meteor.startup(() => {
22
+
23
+ });
@@ -0,0 +1,136 @@
1
+ import { Meteor } from 'meteor/meteor';
2
+ import { ValidatedMethod } from 'meteor/mdg:validated-method';
3
+ import { DDPRateLimiter } from 'meteor/ddp-rate-limiter';
4
+ import { check, Match } from 'meteor/maka:check';
5
+
6
+ import <%= name %> from '/imports/startup/server/collections/<%= fileName %>';
7
+
8
+ /**
9
+ * Using ValidatedMethod (maintained by MDG) is the best
10
+ * practice by Meteor Development Group (MDG),
11
+ * and as such is used here to validate that method
12
+ * calls from the client are properly handled.
13
+ *
14
+ */
15
+
16
+ /**
17
+ * Client side insert method.
18
+ *
19
+ * @memberof Server.<%= name %>
20
+ * @method
21
+ * @property { string } name String that defines the method.
22
+ * @property { function } validate Is run before the main execution.
23
+ * @property { function } run The main action that is executed.
24
+ */
25
+ const insert<%= name %> = new ValidatedMethod({
26
+ name: '<%= fileName %>.insert',
27
+ validate(doc) {
28
+ check(doc, Object, 'while checking insert doc');
29
+ //check(this.userId, String, 'while validating user');
30
+ },
31
+ run(doc) {
32
+ //return <%= name %>.insert(doc);
33
+ }
34
+ });
35
+
36
+ /**
37
+ * Client side find method.
38
+ *
39
+ * @memberof Server.<%= name %>
40
+ * @method
41
+ * @property { string } name String that defines the method.
42
+ * @property { function } validate Is run before the main execution.
43
+ * @property { function } run The main action that is executed.
44
+ */
45
+ const find<%= name %> = new ValidatedMethod({
46
+ name: '<%= fileName %>.find',
47
+ validate(doc = {}) {
48
+ check(doc, Match.OneOf(String, Object), 'while checking find selector');
49
+ //check(this.userId, String, 'while validating user');
50
+ },
51
+ run(doc = {}) {
52
+ //return <%= name %>.find(doc).fetch();
53
+ }
54
+ });
55
+
56
+ /**
57
+ * Client side findOne method.
58
+ *
59
+ * @memberof Server.<%= name %>
60
+ * @method
61
+ * @property { string } name String that defines the method.
62
+ * @property { function } validate Is run before the main execution.
63
+ * @property { function } run The main action that is executed.
64
+ */
65
+ const findOne<%= name %> = new ValidatedMethod({
66
+ name: '<%= fileName %>.findOne',
67
+ validate(doc = {}) {
68
+ check(doc, Match.OneOf(String, Object), 'while checking findOne selector');
69
+ //check(this.userId, String, 'while validating user');
70
+ },
71
+ run(doc = {}) {
72
+ //return <%= name %>.findOne(doc);
73
+ }
74
+ });
75
+
76
+
77
+ /**
78
+ * Client side update method.
79
+ *
80
+ * @memberof Server.<%= name %>
81
+ * @method
82
+ * @property { string } name String that defines the method.
83
+ * @property { function } validate Is run before the main execution.
84
+ * @property { function } run The main action that is executed.
85
+ */
86
+ const update<%= name %> = new ValidatedMethod({
87
+ name: '<%= fileName %>.update',
88
+ validate({_id, set}) {
89
+ if (typeof _id !== 'string' && typeof set !== 'object') throw 'Usage Error: Expecting signature { _id: <string>, set: <object> }';
90
+ check(_id, String, 'while checking _id selector');
91
+ check(set, Object, 'while checking update set object');
92
+ //check(this.userId, String, 'while validating user');
93
+ },
94
+ run({_id, set}) {
95
+ //return <%= name %>.update(_id, {$set: set});
96
+ }
97
+ });
98
+
99
+ /**
100
+ * Client side remove method.
101
+ *
102
+ * @memberof Server.<%= name %>
103
+ * @method
104
+ * @property { string } name String that defines the method.
105
+ * @property { function } validate Is run before the main execution.
106
+ * @property { function } run The main action that is executed.
107
+ */
108
+ const remove<%= name %> = new ValidatedMethod({
109
+ name: '<%= fileName %>.remove',
110
+ validate(_id) {
111
+ // NOTE: May want to use object removal, but dangerous!!!
112
+ check(_id, String, 'while checking remove _id selector');
113
+ //check(this.userId, String, 'while validating user');
114
+ },
115
+ run(_id) {
116
+ //return <%= name %>.remove(_id);
117
+ }
118
+ });
119
+
120
+ const RATE_LIMITED_METHODS = [
121
+ insert<%= name %> , find<%= name %>, findOne<%= name %>, update<%= name %> , remove<%= name %>
122
+ ].map(value => value['name']);
123
+
124
+ if (Meteor.isServer) {
125
+ const OPERATIONS = 5;
126
+ const PER_SECOND = 1 * 1000; // milliseconds
127
+ // Only allow 5 list operations per connection per second.
128
+ DDPRateLimiter.addRule({
129
+ name(name) {
130
+ return RATE_LIMITED_METHODS.includes(name);
131
+ },
132
+
133
+ // Rate limit per connection ID.
134
+ connectionId() { return true; },
135
+ }, OPERATIONS, PER_SECOND);
136
+ }
@@ -0,0 +1,137 @@
1
+ import { Meteor } from 'meteor/meteor';
2
+ import { ValidatedMethod } from 'meteor/mdg:validated-method';
3
+ import { DDPRateLimiter } from 'meteor/ddp-rate-limiter';
4
+ import { check, Match } from 'meteor/maka:check';
5
+
6
+ import <%= name %> from '/imports/startup/server/collections/<%= fileName %>';
7
+
8
+ /**
9
+ * Using ValidatedMethod (maintained by MDG) is the best
10
+ * practice by Meteor Development Group (MDG),
11
+ * and as such is used here to validate that method
12
+ * calls from the client are properly handled.
13
+ *
14
+ */
15
+
16
+ /**
17
+ * Client side insert method.
18
+ *
19
+ * @memberof Server.<%= name %>
20
+ * @method
21
+ * @property { string } name String that defines the method.
22
+ * @property { function } validate Is run before the main execution.
23
+ * @property { function } run The main action that is executed.
24
+ */
25
+ const insert<%= name %> = new ValidatedMethod({
26
+ name: '<%= fileName %>.insert',
27
+ validate(doc) {
28
+ check(doc, Object, 'while checking insert doc');
29
+ //check(this.userId, String, 'while validating user');
30
+ },
31
+ run(doc) {
32
+ //return <%= name %>.insert(doc);
33
+ }
34
+ });
35
+
36
+ /**
37
+ * Client side find method.
38
+ *
39
+ * @memberof Server.<%= name %>
40
+ * @method
41
+ * @property { string } name String that defines the method.
42
+ * @property { function } validate Is run before the main execution.
43
+ * @property { function } run The main action that is executed.
44
+ */
45
+ const find<%= name %> = new ValidatedMethod({
46
+ name: '<%= fileName %>.find',
47
+ validate(doc = {}) {
48
+ check(doc, Match.OneOf(String, Object), 'while checking find selector');
49
+ //check(this.userId, String, 'while validating user');
50
+ },
51
+ run(doc = {}) {
52
+ //return <%= name %>.find(doc).fetch();
53
+ }
54
+ });
55
+
56
+ /**
57
+ * Client side findOne method.
58
+ *
59
+ * @memberof Server.<%= name %>
60
+ * @method
61
+ * @property { string } name String that defines the method.
62
+ * @property { function } validate Is run before the main execution.
63
+ * @property { function } run The main action that is executed.
64
+ */
65
+ const findOne<%= name %> = new ValidatedMethod({
66
+ name: '<%= fileName %>.findOne',
67
+ validate(doc = {}) {
68
+ check(doc, Match.OneOf(String, Object), 'while checking findOne selector');
69
+ //check(this.userId, String, 'while validating user');
70
+ },
71
+ run(doc = {}) {
72
+ //return <%= name %>.findOne(doc);
73
+ }
74
+ });
75
+
76
+
77
+ /**
78
+ * Client side update method.
79
+ *
80
+ * @memberof Server.<%= name %>
81
+ * @method
82
+ * @property { string } name String that defines the method.
83
+ * @property { function } validate Is run before the main execution.
84
+ * @property { function } run The main action that is executed.
85
+ */
86
+ const update<%= name %> = new ValidatedMethod({
87
+ name: '<%= fileName %>.update',
88
+ validate({_id, set}) {
89
+ if (typeof _id !== 'string' && typeof set !== 'object') throw 'Usage Error: Expecting signature { _id: <string>, set: <object> }';
90
+ check(_id, String, 'while checking _id selector');
91
+ check(set, Object, 'while checking update set object');
92
+ //check(this.userId, String, 'while validating user');
93
+ },
94
+ run({_id, set}) {
95
+ //return <%= name %>.update(_id, {$set: set});
96
+ }
97
+ });
98
+
99
+ /**
100
+ * Client side remove method.
101
+ *
102
+ * @memberof Server.<%= name %>
103
+ * @method
104
+ * @property { string } name String that defines the method.
105
+ * @property { function } validate Is run before the main execution.
106
+ * @property { function } run The main action that is executed.
107
+ */
108
+ const remove<%= name %> = new ValidatedMethod({
109
+ name: '<%= fileName %>.remove',
110
+ validate(_id) {
111
+ // NOTE: May want to use object removal, but dangerous!!!
112
+ check(_id, String, 'while checking remove _id selector');
113
+ //check(this.userId, String, 'while validating user');
114
+ },
115
+ run(_id) {
116
+ //return <%= name %>.remove(_id);
117
+ }
118
+ });
119
+
120
+ const RATE_LIMITED_METHODS = [
121
+ insert<%= name %> , find<%= name %>, findOne<%= name %>, update<%= name %> , remove<%= name %>
122
+ ].map(value => value['name']);
123
+
124
+ if (Meteor.isServer) {
125
+ const OPERATIONS = 5;
126
+ const PER_SECOND = 1 * 1000; // milliseconds
127
+ // Only allow 5 list operations per connection per second.
128
+ DDPRateLimiter.addRule({
129
+ name(name) {
130
+ return RATE_LIMITED_METHODS.includes(name);
131
+ },
132
+
133
+ // Rate limit per connection ID.
134
+ connectionId() { return true; },
135
+ }, OPERATIONS, PER_SECOND);
136
+ }
137
+