@aventusjs/cli 0.0.40 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/templateScript/AventusTemplate.ts +17 -11
- package/out/RealServer.js +103 -104
- package/out/cli.js +1 -1
- package/package.json +1 -1
- package/templates/projects/Default/!aventus.conf.avt +26 -0
- package/templates/projects/Default/src/components/.empty +0 -0
- package/templates/projects/Default/src/data/.empty +0 -0
- package/templates/projects/Default/src/lib/.empty +0 -0
- package/templates/projects/Default/src/ram/.empty +0 -0
- package/templates/projects/Default/src/states/.empty +0 -0
- package/templates/projects/Default/static/_theme.gs.avt +3 -0
- package/templates/projects/Default/static/default.gs.avt +9 -0
- package/templates/projects/Default/static/index.html +13 -0
- package/templates/projects/Default/template.avt.ts +51 -0
- package/templates/projects/Empty/!aventus.conf.avt +15 -0
- package/templates/projects/Empty/src/.empty +0 -0
- package/templates/projects/Empty/template.avt.ts +47 -0
- package/templates/projects/Tailwind/!aventus.conf.avt +22 -0
- package/templates/projects/Tailwind/.aventus/templates/TailwindTemplate/${{componentName}}/${{componentName}}.wcl.avt +27 -0
- package/templates/projects/Tailwind/.aventus/templates/TailwindTemplate/${{componentName}}/${{componentName}}.wcs.avt +3 -0
- package/templates/projects/Tailwind/.aventus/templates/TailwindTemplate/${{componentName}}/${{componentName}}.wcv.avt +1 -0
- package/templates/projects/Tailwind/.aventus/templates/TailwindTemplate/template.avt.ts +29 -0
- package/templates/projects/Tailwind/package.json +13 -0
- package/templates/projects/Tailwind/src/components/@TailwindCss.wcs.avt +0 -0
- package/templates/projects/Tailwind/src/components/TailwindBase/TailwindBase.wcl.avt +29 -0
- package/templates/projects/Tailwind/src/components/TailwindBase/TailwindBase.wcs.avt +0 -0
- package/templates/projects/Tailwind/src/components/TailwindBase/TailwindBase.wcv.avt +1 -0
- package/templates/projects/Tailwind/static/index.html +13 -0
- package/templates/projects/Tailwind/tailwind.config.js +8 -0
- package/templates/projects/Tailwind/tailwind.css +3 -0
- package/templates/projects/Tailwind/template.avt.ts +51 -0
- package/templates/storybook/Default/Home.mdx +90 -0
- package/templates/storybook/Default/Home.scss +118 -0
- package/templates/storybook/Default/assets/chart.jpeg +0 -0
- package/templates/storybook/Default/assets/custom.jpeg +0 -0
- package/templates/storybook/Default/assets/discord.svg +15 -0
- package/templates/storybook/Default/assets/generated.jpeg +0 -0
- package/templates/storybook/Default/assets/github.svg +3 -0
- package/templates/storybook/Default/assets/tutorials.svg +12 -0
- package/templates/storybook/Default/assets/youtube.svg +4 -0
- package/templates/storybook/Default/package.json +33 -0
- package/templates/templates/component/${{componentName}}/${{componentName}}.wcl.avt +29 -0
- package/templates/templates/component/${{componentName}}/${{componentName}}.wcs.avt +3 -0
- package/templates/templates/component/${{componentName}}/${{componentName}}.wcv.avt +1 -0
- package/templates/templates/component/${{componentName}}.wc.avt +17 -0
- package/templates/templates/component/template.avt.ts +48 -0
- package/templates/templates/data/${{dataName}}.data.avt +5 -0
- package/templates/templates/data/template.avt.ts +25 -0
- package/templates/templates/library/${{libName}}.lib.avt +5 -0
- package/templates/templates/library/template.avt.ts +24 -0
- package/templates/templates/ramBasic/${{objectName}}.ram.avt +24 -0
- package/templates/templates/ramBasic/template.avt.ts +24 -0
- package/templates/templates/ramCustom/${{objectName}}.ram.avt +50 -0
- package/templates/templates/ramCustom/template.avt.ts +22 -0
- package/templates/templates/state/${{name}}.state.avt +13 -0
- package/templates/templates/state/template.avt.ts +22 -0
- package/templates/templates/stateManager/${{name}}.state.avt +11 -0
- 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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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(),
|