@aventusjs/cli 0.0.40 → 0.0.42

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 (60) hide show
  1. package/lib/Aventus@Main.package.avt +3077 -3084
  2. package/lib/Aventus@Sharp.package.avt +1099 -1099
  3. package/lib/templateScript/AventusTemplate.ts +17 -11
  4. package/out/RealServer.js +145 -146
  5. package/out/cli.js +1 -1
  6. package/package.json +1 -1
  7. package/templates/projects/Default/!aventus.conf.avt +26 -0
  8. package/templates/projects/Default/src/components/.empty +0 -0
  9. package/templates/projects/Default/src/data/.empty +0 -0
  10. package/templates/projects/Default/src/lib/.empty +0 -0
  11. package/templates/projects/Default/src/ram/.empty +0 -0
  12. package/templates/projects/Default/src/states/.empty +0 -0
  13. package/templates/projects/Default/static/_theme.gs.avt +3 -0
  14. package/templates/projects/Default/static/default.gs.avt +9 -0
  15. package/templates/projects/Default/static/index.html +13 -0
  16. package/templates/projects/Default/template.avt.ts +51 -0
  17. package/templates/projects/Empty/!aventus.conf.avt +15 -0
  18. package/templates/projects/Empty/src/.empty +0 -0
  19. package/templates/projects/Empty/template.avt.ts +47 -0
  20. package/templates/projects/Tailwind/!aventus.conf.avt +22 -0
  21. package/templates/projects/Tailwind/.aventus/templates/TailwindTemplate/${{componentName}}/${{componentName}}.wcl.avt +27 -0
  22. package/templates/projects/Tailwind/.aventus/templates/TailwindTemplate/${{componentName}}/${{componentName}}.wcs.avt +3 -0
  23. package/templates/projects/Tailwind/.aventus/templates/TailwindTemplate/${{componentName}}/${{componentName}}.wcv.avt +1 -0
  24. package/templates/projects/Tailwind/.aventus/templates/TailwindTemplate/template.avt.ts +29 -0
  25. package/templates/projects/Tailwind/package.json +13 -0
  26. package/templates/projects/Tailwind/src/components/@TailwindCss.wcs.avt +0 -0
  27. package/templates/projects/Tailwind/src/components/TailwindBase/TailwindBase.wcl.avt +29 -0
  28. package/templates/projects/Tailwind/src/components/TailwindBase/TailwindBase.wcs.avt +0 -0
  29. package/templates/projects/Tailwind/src/components/TailwindBase/TailwindBase.wcv.avt +1 -0
  30. package/templates/projects/Tailwind/static/index.html +13 -0
  31. package/templates/projects/Tailwind/tailwind.config.js +8 -0
  32. package/templates/projects/Tailwind/tailwind.css +3 -0
  33. package/templates/projects/Tailwind/template.avt.ts +51 -0
  34. package/templates/storybook/Default/Home.mdx +90 -0
  35. package/templates/storybook/Default/Home.scss +118 -0
  36. package/templates/storybook/Default/assets/chart.jpeg +0 -0
  37. package/templates/storybook/Default/assets/custom.jpeg +0 -0
  38. package/templates/storybook/Default/assets/discord.svg +15 -0
  39. package/templates/storybook/Default/assets/generated.jpeg +0 -0
  40. package/templates/storybook/Default/assets/github.svg +3 -0
  41. package/templates/storybook/Default/assets/tutorials.svg +12 -0
  42. package/templates/storybook/Default/assets/youtube.svg +4 -0
  43. package/templates/storybook/Default/package.json +33 -0
  44. package/templates/templates/component/${{componentName}}/${{componentName}}.wcl.avt +29 -0
  45. package/templates/templates/component/${{componentName}}/${{componentName}}.wcs.avt +3 -0
  46. package/templates/templates/component/${{componentName}}/${{componentName}}.wcv.avt +1 -0
  47. package/templates/templates/component/${{componentName}}.wc.avt +17 -0
  48. package/templates/templates/component/template.avt.ts +48 -0
  49. package/templates/templates/data/${{dataName}}.data.avt +5 -0
  50. package/templates/templates/data/template.avt.ts +25 -0
  51. package/templates/templates/library/${{libName}}.lib.avt +5 -0
  52. package/templates/templates/library/template.avt.ts +24 -0
  53. package/templates/templates/ramBasic/${{objectName}}.ram.avt +24 -0
  54. package/templates/templates/ramBasic/template.avt.ts +24 -0
  55. package/templates/templates/ramCustom/${{objectName}}.ram.avt +50 -0
  56. package/templates/templates/ramCustom/template.avt.ts +22 -0
  57. package/templates/templates/state/${{name}}.state.avt +13 -0
  58. package/templates/templates/state/template.avt.ts +22 -0
  59. package/templates/templates/stateManager/${{name}}.state.avt +11 -0
  60. package/templates/templates/stateManager/template.avt.ts +27 -0
@@ -116,20 +116,26 @@ export abstract class AventusTemplate {
116
116
  this.templatePath = templatePath;
117
117
  this.workspacePath = workspacePath;
118
118
  this.defaultBlocks();
119
+ let inputBuffer = '';
119
120
  process.stdin.on("data", (data) => {
120
- try {
121
- const txt = data.toString().trim();
122
- const payload: { cmd: string, result: string | null } = JSON.parse(txt);
123
- if (payload.result == 'NULL') {
124
- payload.result = null;
125
- }
126
- if (this.waitingResponse[payload.cmd]) {
127
- this.waitingResponse[payload.cmd](payload.result);
121
+ inputBuffer += data.toString();
122
+ let newline: number;
123
+ while ((newline = inputBuffer.indexOf('\n')) !== -1) {
124
+ const txt = inputBuffer.slice(0, newline).trim();
125
+ inputBuffer = inputBuffer.slice(newline + 1);
126
+ if (!txt) continue;
127
+ try {
128
+ const payload: { cmd: string, result: string | null } = JSON.parse(txt);
129
+ if (payload.result == 'NULL') {
130
+ payload.result = null;
131
+ }
132
+ if (this.waitingResponse[payload.cmd]) {
133
+ this.waitingResponse[payload.cmd](payload.result);
134
+ }
135
+ } catch (e) {
136
+ this.runCommand("error", String(e));
128
137
  }
129
138
  }
130
- catch (e) {
131
- this.runCommand("error", e);
132
- }
133
139
  })
134
140
  this.run(destination).then(
135
141
  () => process.exit(),