@fullstackunicorn/root 1.0.16 → 1.0.18
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/assets/templates/.devtools/git.sh +12 -0
- package/assets/templates/.devtools/gitlab.sh +11 -0
- package/assets/templates/assets/.env +6 -0
- package/assets/templates/assets/modules/sync.auth.js +3 -0
- package/assets/templates/assets/package.json +19 -0
- package/assets/templates/backend/.env +15 -0
- package/assets/templates/backend/package.json +22 -0
- package/assets/templates/backend/server/middleware.auth.js +4 -0
- package/assets/templates/frontend/.env +3 -0
- package/assets/templates/frontend/assets/index.webmanifest +21 -0
- package/assets/templates/frontend/configure/cache.json +3 -0
- package/assets/templates/frontend/configure/env.json +8 -0
- package/assets/templates/frontend/configure/env.prod.json +8 -0
- package/assets/templates/frontend/configure/layout.json +9 -0
- package/assets/templates/frontend/configure/logo.json +5 -0
- package/assets/templates/frontend/configure/services.json +10 -0
- package/assets/templates/frontend/configure/trademark.json +6 -0
- package/assets/templates/frontend/package.json +23 -0
- package/assets/templates/gitignore +55 -0
- package/assets/templates/manager/.env +15 -0
- package/assets/templates/manager/package.json +22 -0
- package/assets/templates/manager/server/middleware.auth.js +4 -0
- package/index.def.js +1 -0
- package/modules/targets/@tools.js +7 -1
- package/modules/targets/devtools.js +6 -0
- package/modules/upgrade.js +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
# USER
|
|
5
|
+
GIT_USER_NAME="{{GIT_USER_NAME}}"
|
|
6
|
+
GIT_USER_EMAIL="{{GIT_USER_EMAIL}}"
|
|
7
|
+
# REPOSITORY
|
|
8
|
+
REPO_NAMESPACE="{{REPO_NAMESPACE}}"
|
|
9
|
+
REPO_NAME="{{REPO_NAME}}"
|
|
10
|
+
# SSH
|
|
11
|
+
SSH_KEY="$HOME/.ssh/id_ed25519"
|
|
12
|
+
SSH_CONFIG="$HOME/.ssh/config"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
# ============================================================
|
|
5
|
+
GITLAB_TOKEN="{{GITLAB_TOKEN}}"
|
|
6
|
+
GITLAB_NAMESPACE_ID="{{GITLAB_NAMESPACE_ID}}"
|
|
7
|
+
GITLAB_PROJECT_NAME="{{GITLAB_PROJECT_NAME}}"
|
|
8
|
+
# ============================================================
|
|
9
|
+
# GENERATED
|
|
10
|
+
GITLAB_PROJECT_ID=""
|
|
11
|
+
GITLAB_DEPLOY_TOKEN=""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "root.fullstackunicorn.dev",
|
|
3
|
+
"author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"private": true,
|
|
8
|
+
"main": "run.js",
|
|
9
|
+
"imports": {
|
|
10
|
+
"#@": "./",
|
|
11
|
+
"#@/*": "./*"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"cmd": "chmod +x ./config.cmd.sh && env-cmd -f .env bash ./config.cmd.sh",
|
|
15
|
+
"test": "exit 1"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {},
|
|
18
|
+
"devDependencies": {}
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
SERVER_TYPE="backend"
|
|
2
|
+
SERVER_NAME="{{SERVER_NAME}}"
|
|
3
|
+
SERVER_PORT="{{SERVER_PORT}}"
|
|
4
|
+
|
|
5
|
+
CLIENT_ID="{{CLIENT_ID}}"
|
|
6
|
+
|
|
7
|
+
AUTH_CLIENT="{{AUTH_CLIENT}}"
|
|
8
|
+
AUTH_URL_CERTIFICATE="https://api.auth.minderable.com/certificate"
|
|
9
|
+
AUTH_URL_VERIFY="https://api.auth.minderable.com/verify"
|
|
10
|
+
AUTH_URL_ISSUER="https://auth.loginner.com/realms/Minderable"
|
|
11
|
+
|
|
12
|
+
DEV_AUTH_CLIENT="Develop"
|
|
13
|
+
DEV_AUTH_URL_CERTIFICATE="https://api.auth.minderable.com/certificate"
|
|
14
|
+
DEV_AUTH_URL_VERIFY="https://api.auth.minderable.com/verify"
|
|
15
|
+
DEV_AUTH_URL_ISSUER="https://auth.loginner.com/realms/Develop"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "root.fullstackunicorn.dev",
|
|
3
|
+
"homepage": "https://root.fullstackunicorn.dev/api",
|
|
4
|
+
"author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"license": "UNLICENSED",
|
|
9
|
+
"private": true,
|
|
10
|
+
"imports": {
|
|
11
|
+
"#@": "./",
|
|
12
|
+
"#@/*": "./*"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"cmd": "chmod +x ./config.cmd.sh && ./config.cmd.sh",
|
|
16
|
+
"start": "env-cmd -f .env node index.js",
|
|
17
|
+
"start:prod": "NODE_ENV=production node index.js",
|
|
18
|
+
"start:nodemon": "env-cmd -f .env nodemon --ignore ./volume/ --ignore ./private/ --trace-warnings -L index.js"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {},
|
|
21
|
+
"devDependencies": {}
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Root",
|
|
3
|
+
"short_name": "Root",
|
|
4
|
+
"theme_color": "#ffffff",
|
|
5
|
+
"background_color": "#ffffff",
|
|
6
|
+
"display": "fullscreen",
|
|
7
|
+
"icons": [
|
|
8
|
+
{
|
|
9
|
+
"src": "/icons/icon-192.png",
|
|
10
|
+
"sizes": "192x192",
|
|
11
|
+
"type": "image/png",
|
|
12
|
+
"purpose": "maskable"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"src": "/icons/icon-512.png",
|
|
16
|
+
"sizes": "512x512",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"purpose": "maskable"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"PLATFORM": "web",
|
|
3
|
+
"PROTOCOL_AUTH": "https",
|
|
4
|
+
"CLIENT_ID": "clientxx-xxxx-4xxx-8xxx-xxxxxxxxxxxx",
|
|
5
|
+
"CLIENT_URL_AUTH": "https://auth.minderable.com",
|
|
6
|
+
"CLIENT_URL_ACCOUNT": "https://account.minderable.com",
|
|
7
|
+
"SERVER_URL_AUTH": "https://api.auth.minderable.com"
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"PLATFORM": "web",
|
|
3
|
+
"PROTOCOL_AUTH": "https",
|
|
4
|
+
"CLIENT_ID": "clientxx-xxxx-4xxx-8xxx-xxxxxxxxxxxx",
|
|
5
|
+
"CLIENT_URL_AUTH": "https://auth.minderable.com",
|
|
6
|
+
"CLIENT_URL_ACCOUNT": "https://account.minderable.com",
|
|
7
|
+
"SERVER_URL_AUTH": "https://api.auth.minderable.com"
|
|
8
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "root.fullstackunicorn.dev",
|
|
3
|
+
"homepage": "https://root.fullstackunicorn.dev",
|
|
4
|
+
"author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"main": "App.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"license": "UNLICENSED",
|
|
9
|
+
"private": true,
|
|
10
|
+
"imports": {
|
|
11
|
+
"#@": "./",
|
|
12
|
+
"#@/*": "./*"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"cmd": "chmod +x ./config.cmd.sh && ./config.cmd.sh",
|
|
16
|
+
"build": "vite build",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"start": "env-cmd vite --host",
|
|
19
|
+
"check": "eslint . --max-warnings 0"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {},
|
|
22
|
+
"devDependencies": {}
|
|
23
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# === PROJECT ==============================================
|
|
2
|
+
private/
|
|
3
|
+
public/
|
|
4
|
+
volume/
|
|
5
|
+
volume
|
|
6
|
+
store/
|
|
7
|
+
workspace/
|
|
8
|
+
|
|
9
|
+
# === DEFAULTS =============================================
|
|
10
|
+
node_modules/
|
|
11
|
+
.devtools/
|
|
12
|
+
.npmrc
|
|
13
|
+
|
|
14
|
+
# === BUILD OUTPUT =========================================
|
|
15
|
+
dist/
|
|
16
|
+
build/
|
|
17
|
+
.output/
|
|
18
|
+
.cache/
|
|
19
|
+
|
|
20
|
+
# === SYSTEM TRASH =========================================
|
|
21
|
+
.DS_Store
|
|
22
|
+
Thumbs.db
|
|
23
|
+
ehthumbs.db
|
|
24
|
+
Desktop.ini
|
|
25
|
+
.AppleDouble
|
|
26
|
+
.LSOverride
|
|
27
|
+
|
|
28
|
+
# === TEMP & LOG FILES =====================================
|
|
29
|
+
*.log
|
|
30
|
+
*.tmp
|
|
31
|
+
*.temp
|
|
32
|
+
*.bak
|
|
33
|
+
*.swp
|
|
34
|
+
*.swo
|
|
35
|
+
*~
|
|
36
|
+
|
|
37
|
+
# === CONFIG / CERTS / SECRETS =============================
|
|
38
|
+
*.conf
|
|
39
|
+
*.crt
|
|
40
|
+
*.key
|
|
41
|
+
*.pem
|
|
42
|
+
|
|
43
|
+
# === ARCHIVES =============================================
|
|
44
|
+
*.zip
|
|
45
|
+
*.tar
|
|
46
|
+
*.tar.gz
|
|
47
|
+
*.tgz
|
|
48
|
+
|
|
49
|
+
# === IDE FOLDERS ==========================================
|
|
50
|
+
.idea/
|
|
51
|
+
.vscode/
|
|
52
|
+
*.iml
|
|
53
|
+
|
|
54
|
+
# === OS METADATA ==========================================
|
|
55
|
+
._*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
SERVER_TYPE="manager"
|
|
2
|
+
SERVER_NAME="{{SERVER_NAME}}"
|
|
3
|
+
SERVER_PORT="{{SERVER_PORT}}"
|
|
4
|
+
|
|
5
|
+
CLIENT_ID="{{CLIENT_ID}}"
|
|
6
|
+
|
|
7
|
+
AUTH_CLIENT="{{AUTH_CLIENT}}"
|
|
8
|
+
AUTH_URL_CERTIFICATE="https://api.auth.minderable.com/certificate"
|
|
9
|
+
AUTH_URL_VERIFY="https://api.auth.minderable.com/verify"
|
|
10
|
+
AUTH_URL_ISSUER="https://auth.loginner.com/realms/Minderable"
|
|
11
|
+
|
|
12
|
+
DEV_AUTH_CLIENT="Develop"
|
|
13
|
+
DEV_AUTH_URL_CERTIFICATE="https://api.auth.minderable.com/certificate"
|
|
14
|
+
DEV_AUTH_URL_VERIFY="https://api.auth.minderable.com/verify"
|
|
15
|
+
DEV_AUTH_URL_ISSUER="https://auth.loginner.com/realms/Develop"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cms.root.fullstackunicorn.dev",
|
|
3
|
+
"homepage": "https://cms.root.fullstackunicorn.dev",
|
|
4
|
+
"author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"license": "UNLICENSED",
|
|
9
|
+
"private": true,
|
|
10
|
+
"imports": {
|
|
11
|
+
"#@": "./",
|
|
12
|
+
"#@/*": "./*"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"cmd": "chmod +x ./config.cmd.sh && ./config.cmd.sh",
|
|
16
|
+
"start": "env-cmd -f .env node index.js",
|
|
17
|
+
"start:prod": "NODE_ENV=production node index.js",
|
|
18
|
+
"start:nodemon": "env-cmd -f .env nodemon --ignore ./volume/ --ignore ./private/ --trace-warnings -L index.js"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {},
|
|
21
|
+
"devDependencies": {}
|
|
22
|
+
}
|
package/index.def.js
CHANGED
|
@@ -19,6 +19,7 @@ export class Def {
|
|
|
19
19
|
this.folders = {}
|
|
20
20
|
// devtools
|
|
21
21
|
this.files.devtools = {}
|
|
22
|
+
this.files.devtools.gitignore = `.gitignore`
|
|
22
23
|
this.files.devtools.git = `.devtools/git.sh`
|
|
23
24
|
this.files.devtools.gitlab = `.devtools/gitlab.sh` // da capire a cosa serviva
|
|
24
25
|
// frontend
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fsa } from '#@/index.dep.js'
|
|
1
|
+
import { fsa, path } from '#@/index.dep.js'
|
|
2
2
|
|
|
3
3
|
export class Tools {
|
|
4
4
|
|
|
@@ -133,6 +133,12 @@ export class Tools {
|
|
|
133
133
|
return true
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
copyFile = async ({ templatePath, outputPath }) => {
|
|
137
|
+
await fsa.ensureFileDir(outputPath)
|
|
138
|
+
await fsa.copyFile(templatePath, outputPath)
|
|
139
|
+
return true
|
|
140
|
+
}
|
|
141
|
+
|
|
136
142
|
patchPackage = async ({ templatePath, outputPath, values, dependencies, devDependencies }) => {
|
|
137
143
|
|
|
138
144
|
const template = await fsa.readJSON(templatePath)
|
|
@@ -6,6 +6,12 @@ export class Devtools {
|
|
|
6
6
|
this.tools = init.tools
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
async gitignore() {
|
|
10
|
+
const templatePath = `${this.def.templates}/gitignore`
|
|
11
|
+
const outputPath = `${this.def.cwd}/${this.def.files.devtools.gitignore}`
|
|
12
|
+
await this.tools.copyFile({ templatePath, outputPath })
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
async git() {
|
|
10
16
|
// GIT_USER_NAME, GIT_USER_EMAIL, REPO_NAMESPACE, REPO_NAME
|
|
11
17
|
const templatePath = `${this.def.templates}/${this.def.files.devtools.git}`
|
package/modules/upgrade.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.18",
|
|
3
3
|
"name": "@fullstackunicorn/root",
|
|
4
4
|
"author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
|
|
5
5
|
"description": "Root CLI: init config, generate project, upgrade project",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"private": false,
|
|
9
9
|
"readme": "package.md",
|
|
10
10
|
"files": [
|
|
11
|
+
"assets/",
|
|
11
12
|
"index.cmd.js",
|
|
12
13
|
"index.def.js",
|
|
13
14
|
"index.dep.js",
|