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/changelog.md
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proteum",
|
|
3
3
|
"description": "Convenient TypeScript framework designed for Performance and Productivity.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/proteum.git",
|
|
7
7
|
"license": "MIT",
|
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
"keywords": [
|
|
13
13
|
"framework"
|
|
14
14
|
],
|
|
15
|
-
"bin": {
|
|
16
|
-
"proteum": "cli/bin.js"
|
|
17
|
-
},
|
|
18
15
|
"dependencies": {
|
|
19
16
|
"@lexical/file": "^0.19.0",
|
|
20
17
|
"@lexical/headless": "^0.18.0",
|
|
@@ -71,6 +68,7 @@
|
|
|
71
68
|
"preact-render-to-string": "^6.6.1",
|
|
72
69
|
"prettier": "^3.3.3",
|
|
73
70
|
"react-scrollbars-custom": "^4.0.27",
|
|
71
|
+
"react-slider": "^2.0.1",
|
|
74
72
|
"react-textarea-autosize": "^8.5.9",
|
|
75
73
|
"regenerator-runtime": "^0.13.9",
|
|
76
74
|
"request": "^2.88.2",
|
|
@@ -87,80 +85,16 @@
|
|
|
87
85
|
"yargs-parser": "^21.1.1",
|
|
88
86
|
"youch": "^3.3.3",
|
|
89
87
|
"youch-terminal": "^2.2.3",
|
|
90
|
-
"zod": "^4.1.5"
|
|
91
|
-
"@babel/cli": "^7.15.4",
|
|
92
|
-
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
|
93
|
-
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
94
|
-
"@babel/plugin-proposal-private-methods": "^7.14.5",
|
|
95
|
-
"@babel/plugin-proposal-private-property-in-object": "^7.15.4",
|
|
96
|
-
"@babel/plugin-transform-react-constant-elements": "^7.14.5",
|
|
97
|
-
"@babel/preset-env": "^7.15.6",
|
|
98
|
-
"@babel/preset-react": "^7.14.5",
|
|
99
|
-
"@babel/preset-typescript": "^7.15.0",
|
|
100
|
-
"@prefresh/webpack": "^3.3.2",
|
|
101
|
-
"@squoosh/lib": "^0.4.0",
|
|
102
|
-
"@tailwindcss/postcss": "^4.1.17",
|
|
103
|
-
"autoprefixer": "^10.4.21",
|
|
104
|
-
"babel-loader": "^10.0.0",
|
|
105
|
-
"babel-plugin-glob-import": "^0.0.9-1",
|
|
106
|
-
"babel-plugin-transform-imports": "^2.0.0",
|
|
107
|
-
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
108
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
109
|
-
"brotli-webpack-plugin": "^1.1.0",
|
|
110
|
-
"browser-sync": "^2.27.5",
|
|
111
|
-
"compression-webpack-plugin": "^8.0.1",
|
|
112
|
-
"console-table-printer": "^2.10.0",
|
|
113
|
-
"css-loader": "^6.2.0",
|
|
114
|
-
"css-minimizer-webpack-plugin": "^7.0.4",
|
|
115
|
-
"favicons": "^7.2.0",
|
|
116
|
-
"filesize": "^8.0.3",
|
|
117
|
-
"image-minimizer-webpack-plugin": "^4.1.4",
|
|
118
|
-
"imagemin": "^9.0.1",
|
|
119
|
-
"imagemin-svgo": "^10.0.0",
|
|
120
|
-
"imagemin-webp": "^6.0.0",
|
|
121
|
-
"json5": "^2.2.0",
|
|
122
|
-
"less-loader": "^10.0.1",
|
|
123
|
-
"less-vars-to-js": "^1.3.0",
|
|
124
|
-
"mini-css-extract-plugin": "^2.2.2",
|
|
125
|
-
"minimatch": "^3.0.4",
|
|
126
|
-
"node-cmd": "^5.0.0",
|
|
127
|
-
"node-notifier": "^10.0.0",
|
|
128
|
-
"null-loader": "^4.0.1",
|
|
129
|
-
"postcss-loader": "^8.2.0",
|
|
130
|
-
"prompts": "^2.4.2",
|
|
131
|
-
"react-dev-utils": "^11.0.4",
|
|
132
|
-
"replace-once": "^1.0.0",
|
|
133
|
-
"responsive-loader": "^3.1.2",
|
|
134
|
-
"serialize-javascript": "^6.0.2",
|
|
135
|
-
"sharp": "^0.34.3",
|
|
136
|
-
"speed-measure-webpack-plugin": "^1.5.0",
|
|
137
|
-
"tailwindcss": "^4.1.17",
|
|
138
|
-
"terser-webpack-plugin": "^5.2.4",
|
|
139
|
-
"ts-alias": "^0.0.7",
|
|
140
|
-
"ts-node": "^10.9.1",
|
|
141
|
-
"webfont": "^11.2.26",
|
|
142
|
-
"webpack": "^5.98.0",
|
|
143
|
-
"webpack-assets-manifest": "^5.0.6",
|
|
144
|
-
"webpack-bundle-analyzer": "^4.4.2",
|
|
145
|
-
"webpack-dev-middleware": "^5.1.0",
|
|
146
|
-
"webpack-hot-middleware": "^2.25.0",
|
|
147
|
-
"webpack-node-externals": "^3.0.0",
|
|
148
|
-
"webpack-virtual-modules": "^0.4.3"
|
|
88
|
+
"zod": "^4.1.5"
|
|
149
89
|
},
|
|
150
90
|
"devDependencies": {
|
|
151
|
-
"@types/babel__core": "^7.1.16",
|
|
152
|
-
"@types/babel__preset-env": "^7.9.6",
|
|
153
91
|
"@types/cookie": "^0.4.1",
|
|
154
92
|
"@types/express": "^4.17.13",
|
|
155
|
-
"@types/favicons": "^6.2.2",
|
|
156
93
|
"@types/fs-extra": "^9.0.12",
|
|
157
94
|
"@types/markdown-it": "^12.2.3",
|
|
158
95
|
"@types/mime-types": "^2.1.1",
|
|
159
96
|
"@types/node": "^16.9.1",
|
|
160
97
|
"@types/nodemailer": "^6.4.4",
|
|
161
|
-
"@types/pg": "^8.6.1",
|
|
162
|
-
"@types/pg-escape": "^0.2.1",
|
|
163
|
-
"@types/prompts": "^2.0.14",
|
|
164
98
|
"@types/sharp": "^0.31.1",
|
|
165
99
|
"@types/universal-analytics": "^0.4.5",
|
|
166
100
|
"@types/webpack-env": "^1.16.2",
|
|
@@ -258,7 +258,7 @@ export default class Console {
|
|
|
258
258
|
if (filepath.startsWith( projectRoot ))
|
|
259
259
|
filepath = filepath.substring( projectRoot.length )
|
|
260
260
|
|
|
261
|
-
const frameworkRoot = '/node_modules/
|
|
261
|
+
const frameworkRoot = '/node_modules/5htp-core/';
|
|
262
262
|
if (filepath.startsWith( frameworkRoot ))
|
|
263
263
|
filepath = '@' + filepath.substring( frameworkRoot.length )
|
|
264
264
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Regex: \/[A-Z][a-zA-Z]+(\/index)?\.tsx$
|
|
2
|
+
|
|
3
|
+
/*----------------------------------
|
|
4
|
+
- DEPENDENCIES
|
|
5
|
+
----------------------------------*/
|
|
6
|
+
|
|
7
|
+
// Npm
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
// Core libs
|
|
11
|
+
import useContext from '@/client/context';
|
|
12
|
+
|
|
13
|
+
// Core components
|
|
14
|
+
import Button from '@client/components/Button';
|
|
15
|
+
|
|
16
|
+
// App
|
|
17
|
+
|
|
18
|
+
/*----------------------------------
|
|
19
|
+
- TYPES
|
|
20
|
+
----------------------------------*/
|
|
21
|
+
|
|
22
|
+
type Props = {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/*----------------------------------
|
|
27
|
+
- COMPONENT
|
|
28
|
+
----------------------------------*/
|
|
29
|
+
export default ({ }: Props) => {
|
|
30
|
+
|
|
31
|
+
const { api, user } = useContext();
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div>
|
|
35
|
+
|
|
36
|
+
</div>
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Regex: \/common\/forms\/.+\.ts$
|
|
2
|
+
|
|
3
|
+
/*----------------------------------
|
|
4
|
+
- DEPENDANCES
|
|
5
|
+
----------------------------------*/
|
|
6
|
+
|
|
7
|
+
// Core libs
|
|
8
|
+
import schema from '@validator';
|
|
9
|
+
|
|
10
|
+
// Core components
|
|
11
|
+
import Input from '@client/components/input';
|
|
12
|
+
|
|
13
|
+
/*----------------------------------
|
|
14
|
+
- TYPES
|
|
15
|
+
----------------------------------*/
|
|
16
|
+
|
|
17
|
+
export type TFormData = {
|
|
18
|
+
email: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/*----------------------------------
|
|
22
|
+
- VALIDTEURS
|
|
23
|
+
----------------------------------*/
|
|
24
|
+
// Rappel: Les validateurs associés au type de la propriété sont executés en priorité
|
|
25
|
+
export default schema.new({
|
|
26
|
+
email: schema.string({
|
|
27
|
+
rendu: Input,
|
|
28
|
+
titre: "Your Email Address",
|
|
29
|
+
}),
|
|
30
|
+
})
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Regex: \/Modal([A-Z][a-zA-Z]+)?\.tsx$
|
|
2
|
+
|
|
3
|
+
/*----------------------------------
|
|
4
|
+
- DEPENDANCES
|
|
5
|
+
----------------------------------*/
|
|
6
|
+
|
|
7
|
+
// Npm
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
// Cre libs
|
|
11
|
+
import useContext from '@/client/context';
|
|
12
|
+
|
|
13
|
+
// Core components
|
|
14
|
+
import Card, { Props as CardProps } from '@client/components/Dialog/card';
|
|
15
|
+
import Button from '@client/components/Button';
|
|
16
|
+
|
|
17
|
+
/*----------------------------------
|
|
18
|
+
- COMPOSANT
|
|
19
|
+
----------------------------------*/
|
|
20
|
+
export default ({ close, ...props }: Partial<CardProps>) => {
|
|
21
|
+
|
|
22
|
+
const { api, modal } = useContext();
|
|
23
|
+
|
|
24
|
+
const send = () => api.post('/auth/getinvite', { }).then(() => {
|
|
25
|
+
|
|
26
|
+
modal.success('Yeah !', "It's ok");
|
|
27
|
+
close(true);
|
|
28
|
+
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div class="card col" title="Hello" {...props}>
|
|
33
|
+
|
|
34
|
+
<header class="row">
|
|
35
|
+
<h2>Hello</h2>
|
|
36
|
+
</header>
|
|
37
|
+
|
|
38
|
+
<p>This is a text</p>
|
|
39
|
+
|
|
40
|
+
<footer class="row actions fill">
|
|
41
|
+
<Button iconR="long-arrow-right" async onClick={send}>
|
|
42
|
+
Continue
|
|
43
|
+
</Button>
|
|
44
|
+
</footer>
|
|
45
|
+
</div>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Regex: \/server\/models\/.+\.ts$
|
|
2
|
+
|
|
3
|
+
/*----------------------------------
|
|
4
|
+
- DEPENDANCES
|
|
5
|
+
----------------------------------*/
|
|
6
|
+
import Modele, {
|
|
7
|
+
// Définitions
|
|
8
|
+
Table, Column, API, Scopes,
|
|
9
|
+
// Associations
|
|
10
|
+
HasOne, HasMany
|
|
11
|
+
} from '@serveur/database/modele';
|
|
12
|
+
|
|
13
|
+
import Query from '@serveur/database/jsql/query/runner';
|
|
14
|
+
|
|
15
|
+
/*----------------------------------
|
|
16
|
+
- IMPORTATIONS TYPES
|
|
17
|
+
----------------------------------*/
|
|
18
|
+
|
|
19
|
+
import { Utilisateur } from '@modeles';
|
|
20
|
+
|
|
21
|
+
/*----------------------------------
|
|
22
|
+
- DEFINITIONS TYPES
|
|
23
|
+
----------------------------------*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/*----------------------------------
|
|
27
|
+
- MODELE
|
|
28
|
+
----------------------------------*/
|
|
29
|
+
@Scopes([])
|
|
30
|
+
@Table('content', 'ModuleNames')
|
|
31
|
+
export default class ModuleName extends Modele {
|
|
32
|
+
|
|
33
|
+
/*----------------------------------
|
|
34
|
+
- IDENTIFICATION
|
|
35
|
+
----------------------------------*/
|
|
36
|
+
@API() @Column()
|
|
37
|
+
public id!: number;
|
|
38
|
+
|
|
39
|
+
/*----------------------------------
|
|
40
|
+
- AFFICHAGE
|
|
41
|
+
----------------------------------*/
|
|
42
|
+
|
|
43
|
+
@API() @Column()
|
|
44
|
+
public titre!: string;
|
|
45
|
+
|
|
46
|
+
@Column()
|
|
47
|
+
public createur_id!: number;
|
|
48
|
+
@API() @HasOne(() => Utilisateur, { fk: 'createur_id' })
|
|
49
|
+
public createur?: Utilisateur;
|
|
50
|
+
|
|
51
|
+
/*----------------------------------
|
|
52
|
+
- SCOPES
|
|
53
|
+
----------------------------------*/
|
|
54
|
+
/*public static StatusStatic = () =>
|
|
55
|
+
new Query<ModuleName>(Scope, {})*/
|
|
56
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Regex: \/client\/pages\/(?<PATH>.+)\.tsx$
|
|
2
|
+
|
|
3
|
+
/*----------------------------------
|
|
4
|
+
- DEPENDANCES
|
|
5
|
+
----------------------------------*/
|
|
6
|
+
|
|
7
|
+
// Npm
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
// Core
|
|
11
|
+
import route from '@router';
|
|
12
|
+
import { useState } from '@/client/context';
|
|
13
|
+
|
|
14
|
+
// Core components
|
|
15
|
+
import Button from '@client/components/Button';
|
|
16
|
+
|
|
17
|
+
// App
|
|
18
|
+
import Page from '@client/pages/_layout/app/Page';
|
|
19
|
+
import type { NAME } from '@/server/libs/PATH';
|
|
20
|
+
|
|
21
|
+
/*----------------------------------
|
|
22
|
+
- CONTROLEUR
|
|
23
|
+
----------------------------------*/
|
|
24
|
+
route.page('/PATH', { }, ({}, { api }) => ({
|
|
25
|
+
|
|
26
|
+
NAMELOWERs: api.get('/PATH')
|
|
27
|
+
|
|
28
|
+
}), ({ NAMELOWERs }, { api, modal, toast, user }) => {
|
|
29
|
+
|
|
30
|
+
/*----------------------------------
|
|
31
|
+
- STATE
|
|
32
|
+
----------------------------------*/
|
|
33
|
+
|
|
34
|
+
const [{ state }, setState] = useState<{
|
|
35
|
+
state: string
|
|
36
|
+
}>({
|
|
37
|
+
state: ""
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/*----------------------------------
|
|
41
|
+
- ACTIONS
|
|
42
|
+
----------------------------------*/
|
|
43
|
+
|
|
44
|
+
const action = () => api.post('/PATH', { }).then(() => {
|
|
45
|
+
modal.success('Yeah !', "It's ok");
|
|
46
|
+
close(true);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/*----------------------------------
|
|
50
|
+
- RENDER
|
|
51
|
+
----------------------------------*/
|
|
52
|
+
return (
|
|
53
|
+
<Page breadcrumb={{ Parent: null }} title="NAME" subtitle="Subtitle" actions={<>
|
|
54
|
+
|
|
55
|
+
<ul id="actions" class="row al-left wrap">
|
|
56
|
+
|
|
57
|
+
<li class="row stat m card color-1">
|
|
58
|
+
<i src="wallet" class="solid" />
|
|
59
|
+
<div class="label">
|
|
60
|
+
Name
|
|
61
|
+
<strong>Number</strong>
|
|
62
|
+
</div>
|
|
63
|
+
</li>
|
|
64
|
+
|
|
65
|
+
</ul>
|
|
66
|
+
|
|
67
|
+
</>}>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
</Page>
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Regex: \/server\/routes\/(?<PATH>.+)\.ts$
|
|
2
|
+
|
|
3
|
+
/*----------------------------------
|
|
4
|
+
- DEPENDANCES
|
|
5
|
+
----------------------------------*/
|
|
6
|
+
|
|
7
|
+
// Core
|
|
8
|
+
import route from '@router';
|
|
9
|
+
|
|
10
|
+
// App
|
|
11
|
+
import NAME from '@/server/libs/PATH';
|
|
12
|
+
|
|
13
|
+
/*----------------------------------
|
|
14
|
+
- ROUTES
|
|
15
|
+
----------------------------------*/
|
|
16
|
+
|
|
17
|
+
route.get('/PATH', async ({ user, request }) => {
|
|
18
|
+
|
|
19
|
+
return await NAME.List(user, false, request);
|
|
20
|
+
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
route.get('/PATH/:id', async ({ schema, user }) => {
|
|
24
|
+
|
|
25
|
+
const { id } = await schema.validate({
|
|
26
|
+
id: schema.string()
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
return await NAME.Get(id, user);
|
|
30
|
+
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
route.post('/PATH/:id', async ({ auth, schema }) => {
|
|
34
|
+
|
|
35
|
+
const user = await auth.check("USER");
|
|
36
|
+
|
|
37
|
+
const { id } = await schema.validate({
|
|
38
|
+
id: schema.string(),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
return await NAME.Action(id, user);
|
|
42
|
+
|
|
43
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Regex: \/server\/libs\/.+\.ts$
|
|
2
|
+
|
|
3
|
+
/*----------------------------------
|
|
4
|
+
- DEPENDANCES
|
|
5
|
+
----------------------------------*/
|
|
6
|
+
|
|
7
|
+
// Npm
|
|
8
|
+
|
|
9
|
+
// Core
|
|
10
|
+
import { $ } from '@server/app';
|
|
11
|
+
|
|
12
|
+
// App
|
|
13
|
+
import User from '@/server/models';
|
|
14
|
+
|
|
15
|
+
/*----------------------------------
|
|
16
|
+
- CONFIG
|
|
17
|
+
----------------------------------*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/*----------------------------------
|
|
22
|
+
- TYPES
|
|
23
|
+
----------------------------------*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/*----------------------------------
|
|
27
|
+
- SERVICE
|
|
28
|
+
----------------------------------*/
|
|
29
|
+
class NAMEs {
|
|
30
|
+
|
|
31
|
+
/*----------------------------------
|
|
32
|
+
- INFORMATIONS
|
|
33
|
+
----------------------------------*/
|
|
34
|
+
public async List( user: User | null ): Promise<NAME[]> {
|
|
35
|
+
|
|
36
|
+
const NAMELOWER = await $.sql<NAME>`
|
|
37
|
+
SELECT
|
|
38
|
+
id
|
|
39
|
+
FROM core.NAME
|
|
40
|
+
ORDER BY date DESC
|
|
41
|
+
LIMIT 25
|
|
42
|
+
`.all();
|
|
43
|
+
|
|
44
|
+
return NAMELOWER;
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public async Get( id: string, user: User ): Promise<NAME> {
|
|
49
|
+
|
|
50
|
+
const NAMELOWERs = await $.sql<NAME>`
|
|
51
|
+
SELECT
|
|
52
|
+
id
|
|
53
|
+
FROM core.NAME
|
|
54
|
+
WHERE id = ${id}
|
|
55
|
+
`.firstOrFail();
|
|
56
|
+
|
|
57
|
+
return NAMELOWERs;
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/*----------------------------------
|
|
62
|
+
- ACTIONS
|
|
63
|
+
----------------------------------*/
|
|
64
|
+
public async Action( id: string, user: User ): Promise<NAME> {
|
|
65
|
+
|
|
66
|
+
const NAMELOWER = await this.Get(id, user);
|
|
67
|
+
|
|
68
|
+
return true;
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default new NAMEs
|
package/tsconfig.common.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"parser": "@typescript-eslint/parser",
|
|
4
|
+
"parserOptions": {
|
|
5
|
+
"ecmaVersion": 6,
|
|
6
|
+
"sourceType": "module"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
"@typescript-eslint"
|
|
10
|
+
],
|
|
11
|
+
"rules": {
|
|
12
|
+
"@typescript-eslint/naming-convention": "warn",
|
|
13
|
+
"@typescript-eslint/semi": "warn",
|
|
14
|
+
"curly": "warn",
|
|
15
|
+
"eqeqeq": "warn",
|
|
16
|
+
"no-throw-literal": "warn",
|
|
17
|
+
"semi": "off"
|
|
18
|
+
},
|
|
19
|
+
"ignorePatterns": [
|
|
20
|
+
"out",
|
|
21
|
+
"dist",
|
|
22
|
+
"**/*.d.ts"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
Binary file
|