proteum 1.0.0-1 → 1.0.0
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/changelog.md +5 -0
- package/client/components/Dialog/index.less +1 -3
- package/package.json +3 -69
- package/server/app/container/console/index.ts +1 -1
- package/templates/composant.tsx +40 -0
- package/templates/form.ts +30 -0
- package/templates/modal.tsx +47 -0
- package/templates/modele.ts +56 -0
- package/templates/page.tsx +74 -0
- package/templates/route.ts +43 -0
- package/templates/service.ts +75 -0
- package/tsconfig.common.json +1 -2
- package/vscode/copyimportationpath/.eslintrc.json +24 -0
- package/vscode/copyimportationpath/.vscodeignore +12 -0
- package/vscode/copyimportationpath/CHANGELOG.md +9 -0
- package/vscode/copyimportationpath/README.md +3 -0
- package/vscode/copyimportationpath/copyimportationpath-0.0.1.vsix +0 -0
- package/vscode/copyimportationpath/out/extension.js +206 -0
- package/vscode/copyimportationpath/out/extension.js.map +1 -0
- package/vscode/copyimportationpath/package-lock.json +4536 -0
- package/vscode/copyimportationpath/package.json +86 -0
- package/vscode/copyimportationpath/src/extension.ts +300 -0
- package/vscode/copyimportationpath/tsconfig.json +22 -0
- package/vscode/copyimportationpath/vsc-extension-quickstart.md +42 -0
- package/cli/app/config.ts +0 -54
- package/cli/app/index.ts +0 -195
- package/cli/bin.js +0 -11
- package/cli/commands/build.ts +0 -34
- package/cli/commands/deploy/app.ts +0 -29
- package/cli/commands/deploy/web.ts +0 -60
- package/cli/commands/dev.ts +0 -109
- package/cli/commands/init.ts +0 -85
- package/cli/compiler/client/identite.ts +0 -72
- package/cli/compiler/client/index.ts +0 -334
- package/cli/compiler/common/babel/index.ts +0 -170
- package/cli/compiler/common/babel/plugins/index.ts +0 -0
- package/cli/compiler/common/babel/plugins/services.ts +0 -579
- package/cli/compiler/common/babel/routes/imports.ts +0 -127
- package/cli/compiler/common/babel/routes/routes.ts +0 -1130
- package/cli/compiler/common/files/autres.ts +0 -39
- package/cli/compiler/common/files/images.ts +0 -35
- package/cli/compiler/common/files/style.ts +0 -78
- package/cli/compiler/common/index.ts +0 -154
- package/cli/compiler/index.ts +0 -532
- package/cli/compiler/server/index.ts +0 -211
- package/cli/index.ts +0 -189
- package/cli/paths.ts +0 -165
- package/cli/print.ts +0 -12
- package/cli/tsconfig.json +0 -38
- package/cli/utils/index.ts +0 -22
- package/cli/utils/keyboard.ts +0 -78
package/cli/utils/keyboard.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/*----------------------------------
|
|
2
|
-
- DEPENDANCES
|
|
3
|
-
----------------------------------*/
|
|
4
|
-
|
|
5
|
-
// npm
|
|
6
|
-
import readline, { Key } from 'readline';
|
|
7
|
-
|
|
8
|
-
/*----------------------------------
|
|
9
|
-
- TYPES
|
|
10
|
-
----------------------------------*/
|
|
11
|
-
|
|
12
|
-
type TKeyboardCommand = {
|
|
13
|
-
remove?: boolean,
|
|
14
|
-
run: (str: string, chunk: string, key: Key) => void
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/*----------------------------------
|
|
18
|
-
- METHODS
|
|
19
|
-
----------------------------------*/
|
|
20
|
-
class KeyboardCommands {
|
|
21
|
-
|
|
22
|
-
private commands: { [input: string]: TKeyboardCommand } = {}
|
|
23
|
-
|
|
24
|
-
public constructor() {
|
|
25
|
-
this.listen();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
private listen() {
|
|
29
|
-
|
|
30
|
-
readline.emitKeypressEvents(process.stdin);
|
|
31
|
-
process.stdin.setRawMode(true);
|
|
32
|
-
process.stdin.on('keypress', async (chunk: string, key: Key) => {
|
|
33
|
-
|
|
34
|
-
let str = key.name;
|
|
35
|
-
if (!str) return;
|
|
36
|
-
if (str === 'return') str = 'enter';
|
|
37
|
-
|
|
38
|
-
if (key.ctrl) str = 'ctrl+' + str;
|
|
39
|
-
if (key.shift) str = 'shift+' + str;
|
|
40
|
-
if (key.meta) str = 'meta+' + str;
|
|
41
|
-
|
|
42
|
-
const kCommand = this.commands[str] || this.commands.fallback;
|
|
43
|
-
if (kCommand) {
|
|
44
|
-
|
|
45
|
-
kCommand.run(str, chunk, key);
|
|
46
|
-
|
|
47
|
-
if (kCommand.remove)
|
|
48
|
-
delete this.commands[str];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (str === 'ctrl+c') {
|
|
52
|
-
|
|
53
|
-
console.log(`Exiting ...`);
|
|
54
|
-
process.exit(0);
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
public input(str: string, run: TKeyboardCommand["run"], options: Omit<TKeyboardCommand, 'run'> = {}) {
|
|
64
|
-
this.commands[str] = { run, ...options }
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
public waitForInput(str: string): Promise<void> {
|
|
68
|
-
return new Promise((resolve) => {
|
|
69
|
-
this.commands[str] = {
|
|
70
|
-
run: () => resolve(),
|
|
71
|
-
remove: true
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export default new KeyboardCommands
|