@contember/cli-common 0.12.0-alpha.9 → 1.0.0-alpha.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/dist/src/application/Application.d.ts +2 -0
- package/dist/src/application/Application.d.ts.map +1 -1
- package/dist/src/application/Application.js +13 -6
- package/dist/src/application/Application.js.map +1 -1
- package/dist/src/application/UsageFormatter.js +1 -1
- package/dist/src/application/UsageFormatter.js.map +1 -1
- package/dist/src/pathUtils.js +2 -2
- package/dist/src/pathUtils.js.map +1 -1
- package/dist/src/tsconfig.tsbuildinfo +1 -1
- package/dist/src/utils/PathMapping.js +7 -6
- package/dist/src/utils/PathMapping.js.map +1 -1
- package/dist/src/utils/Project.d.ts +0 -1
- package/dist/src/utils/Project.d.ts.map +1 -1
- package/dist/src/utils/Project.js +0 -37
- package/dist/src/utils/Project.js.map +1 -1
- package/dist/src/utils/ProjectManager.js +8 -8
- package/dist/src/utils/ProjectManager.js.map +1 -1
- package/dist/src/utils/Workspace.d.ts +7 -7
- package/dist/src/utils/Workspace.d.ts.map +1 -1
- package/dist/src/utils/Workspace.js +21 -60
- package/dist/src/utils/Workspace.js.map +1 -1
- package/dist/src/utils/fs.js +4 -4
- package/dist/src/utils/fs.js.map +1 -1
- package/dist/src/utils/index.d.ts +0 -1
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +0 -1
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/npm.d.ts +1 -1
- package/dist/src/utils/npm.d.ts.map +1 -1
- package/dist/src/utils/npm.js +8 -9
- package/dist/src/utils/npm.js.map +1 -1
- package/dist/src/utils/template.d.ts.map +1 -1
- package/dist/src/utils/template.js +33 -30
- package/dist/src/utils/template.js.map +1 -1
- package/dist/src/utils/version.js +1 -1
- package/dist/src/utils/version.js.map +1 -1
- package/dist/src/utils/yaml.d.ts +0 -6
- package/dist/src/utils/yaml.d.ts.map +1 -1
- package/dist/src/utils/yaml.js +3 -27
- package/dist/src/utils/yaml.js.map +1 -1
- package/package.json +5 -6
- package/resources/templates/template-project/admin/components/Layout.tsx +12 -0
- package/resources/templates/template-project/admin/components/SideMenu.tsx +10 -0
- package/resources/templates/template-project/admin/index.html +9 -0
- package/resources/templates/template-project/admin/index.tsx +18 -0
- package/resources/templates/template-project/admin/pages/Dashboard.tsx +8 -0
- package/resources/templates/template-project/admin/vite-env.d.ts +7 -0
- package/resources/templates/template-project/api/{acl/index.ts → acl.ts} +0 -0
- package/resources/templates/template-project/api/model/index.ts +3 -2
- package/resources/templates/template-project/contember.template.yaml +3 -4
- package/resources/templates/template-project/tsconfig.json +16 -9
- package/resources/templates/template-workspace/.gitignore.dist +3 -0
- package/resources/templates/{template-workspace-single-instance → template-workspace}/contember.template.yaml +5 -1
- package/resources/templates/template-workspace/contember.yaml +4 -0
- package/resources/templates/template-workspace/docker-compose.yaml +159 -0
- package/resources/templates/template-workspace/package.json +17 -0
- package/resources/templates/{template-workspace-single-instance/api → template-workspace/scripts/minio}/s3-entrypoint.sh +0 -0
- package/resources/templates/{template-workspace-single-instance/api → template-workspace/scripts/minio}/s3-policy.json +0 -0
- package/resources/templates/template-workspace/tsconfig.json +16 -0
- package/src/application/Application.ts +14 -7
- package/src/utils/PathMapping.ts +1 -1
- package/src/utils/Project.ts +0 -40
- package/src/utils/Workspace.ts +21 -42
- package/src/utils/fs.ts +2 -2
- package/src/utils/index.ts +0 -1
- package/src/utils/npm.ts +3 -4
- package/src/utils/template.ts +28 -24
- package/src/utils/yaml.ts +3 -35
- package/dist/src/utils/dockerCompose.d.ts +0 -15
- package/dist/src/utils/dockerCompose.d.ts.map +0 -1
- package/dist/src/utils/dockerCompose.js +0 -22
- package/dist/src/utils/dockerCompose.js.map +0 -1
- package/resources/templates/template-project/api/migrations/2019-12-13-110355-init.json +0 -146
- package/resources/templates/template-project/api/model/Image.ts +0 -5
- package/resources/templates/template-project/api/model/Post.ts +0 -8
- package/resources/templates/template-project/package.json +0 -13
- package/resources/templates/template-workspace-single-instance/.dockerignore +0 -1
- package/resources/templates/template-workspace-single-instance/api/config.yaml +0 -0
- package/resources/templates/template-workspace-single-instance/contember.workspace.yaml +0 -2
- package/resources/templates/template-workspace-single-instance/docker-compose.override.dist.yaml +0 -26
- package/resources/templates/template-workspace-single-instance/docker-compose.yaml +0 -88
- package/resources/templates/template-workspace-single-instance/package.json +0 -12
- package/resources/templates/template-workspace-single-instance/projects/.gitkeep +0 -0
- package/resources/templates/template-workspace-single-instance/tsconfig.json +0 -22
- package/src/utils/dockerCompose.ts +0 -38
package/resources/templates/template-workspace-single-instance/docker-compose.override.dist.yaml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
version: '2.4'
|
|
2
|
-
|
|
3
|
-
services:
|
|
4
|
-
contember:
|
|
5
|
-
ports:
|
|
6
|
-
- '1481:4000'
|
|
7
|
-
environment:
|
|
8
|
-
DEFAULT_S3_ENDPOINT: 'http://localhost:1483'
|
|
9
|
-
contember-cli:
|
|
10
|
-
user: '1000:1000'
|
|
11
|
-
volumes:
|
|
12
|
-
- /etc/passwd:/etc/passwd:ro
|
|
13
|
-
- /etc/group:/etc/group:ro
|
|
14
|
-
postgresql:
|
|
15
|
-
ports:
|
|
16
|
-
- '1482:5432'
|
|
17
|
-
s3:
|
|
18
|
-
ports:
|
|
19
|
-
- '1483:1484'
|
|
20
|
-
command: 'server --address :1483 /data'
|
|
21
|
-
mailhog:
|
|
22
|
-
ports:
|
|
23
|
-
- '1484:8025'
|
|
24
|
-
# adminer:
|
|
25
|
-
# ports:
|
|
26
|
-
# - '1485:8080'
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
version: '2.4'
|
|
2
|
-
services:
|
|
3
|
-
contember:
|
|
4
|
-
image: contember/contember:{version}
|
|
5
|
-
environment:
|
|
6
|
-
NODE_ENV: 'development'
|
|
7
|
-
CONTEMBER_S3_SERVER: minio
|
|
8
|
-
|
|
9
|
-
CONTEMBER_ROOT_EMAIL: 'contember@localhost'
|
|
10
|
-
CONTEMBER_ROOT_PASSWORD: 'contember'
|
|
11
|
-
CONTEMBER_ROOT_TOKEN: '0000000000000000000000000000000000000000'
|
|
12
|
-
CONTEMBER_LOGIN_TOKEN: '1111111111111111111111111111111111111111'
|
|
13
|
-
|
|
14
|
-
DEFAULT_DB_HOST: 'postgresql'
|
|
15
|
-
DEFAULT_DB_PORT: '5432'
|
|
16
|
-
DEFAULT_DB_USER: 'contember'
|
|
17
|
-
DEFAULT_DB_PASSWORD: 'contember'
|
|
18
|
-
DEFAULT_S3_BUCKET: 'contember'
|
|
19
|
-
DEFAULT_S3_REGION: ''
|
|
20
|
-
DEFAULT_S3_KEY: 'contember'
|
|
21
|
-
DEFAULT_S3_SECRET: 'contember'
|
|
22
|
-
DEFAULT_S3_PROVIDER: 'minio'
|
|
23
|
-
|
|
24
|
-
TENANT_DB_NAME: 'tenant'
|
|
25
|
-
TENANT_MAILER_HOST: 'mailhog'
|
|
26
|
-
TENANT_MAILER_PORT: '1025'
|
|
27
|
-
TENANT_MAILER_FROM: 'contember@localhost'
|
|
28
|
-
|
|
29
|
-
depends_on:
|
|
30
|
-
postgresql:
|
|
31
|
-
condition: service_healthy
|
|
32
|
-
|
|
33
|
-
contember-cli:
|
|
34
|
-
image: contember/cli:{version}
|
|
35
|
-
volumes:
|
|
36
|
-
- ./:/src:cached
|
|
37
|
-
working_dir: /src
|
|
38
|
-
command: version
|
|
39
|
-
environment:
|
|
40
|
-
CONTEMBER_API_URL: "http://contember:4000/"
|
|
41
|
-
CONTEMBER_API_TOKEN: "0000000000000000000000000000000000000000"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
postgresql:
|
|
45
|
-
image: postgres:10-alpine
|
|
46
|
-
restart: unless-stopped
|
|
47
|
-
environment:
|
|
48
|
-
POSTGRES_PASSWORD: contember
|
|
49
|
-
POSTGRES_USER: contember
|
|
50
|
-
POSTGRES_DB: contember
|
|
51
|
-
volumes:
|
|
52
|
-
- pgsql-data:/var/lib/postgresql/data
|
|
53
|
-
healthcheck:
|
|
54
|
-
test: [ "CMD-SHELL", "pg_isready -U contember" ]
|
|
55
|
-
interval: 5s
|
|
56
|
-
timeout: 5s
|
|
57
|
-
retries: 5
|
|
58
|
-
|
|
59
|
-
s3:
|
|
60
|
-
image: minio/minio
|
|
61
|
-
command: 'server /data'
|
|
62
|
-
volumes:
|
|
63
|
-
- s3-data:/data
|
|
64
|
-
- ./api/s3-policy.json:/bucket-policy.json
|
|
65
|
-
- ./api/s3-entrypoint.sh:/minio-entrypoint.sh
|
|
66
|
-
entrypoint: /minio-entrypoint.sh
|
|
67
|
-
environment:
|
|
68
|
-
MINIO_ACCESS_KEY: contember
|
|
69
|
-
MINIO_SECRET_KEY: contember
|
|
70
|
-
mailhog:
|
|
71
|
-
image: mailhog/mailhog
|
|
72
|
-
|
|
73
|
-
# # optional: database management tool
|
|
74
|
-
# adminer:
|
|
75
|
-
# image: michalhosna/adminer:4.8.0-en_v1
|
|
76
|
-
# depends_on:
|
|
77
|
-
# - postgresql
|
|
78
|
-
# environment:
|
|
79
|
-
# ADMINER_DRIVER: pgsql
|
|
80
|
-
# ADMINER_SERVER: postgresql
|
|
81
|
-
# ADMINER_DB: contember
|
|
82
|
-
# ADMINER_USERNAME: contember
|
|
83
|
-
# ADMINER_PASSWORD: contember
|
|
84
|
-
# ADMINER_AUTOLOGIN: 1
|
|
85
|
-
# ADMINER_NAME: Contember
|
|
86
|
-
volumes:
|
|
87
|
-
pgsql-data: ~
|
|
88
|
-
s3-data: ~
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@contember/template-workspace-single-instance",
|
|
3
|
-
"version": "0.12.0-alpha.9",
|
|
4
|
-
"license": "Apache-2.0",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "echo 'No tests'"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@contember/schema": "^0.12.0-alpha.9",
|
|
10
|
-
"@contember/schema-definition": "^0.12.0-alpha.9"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
File without changes
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"declarationMap": true,
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"sourceMap": true,
|
|
7
|
-
"composite": true,
|
|
8
|
-
"noEmitOnError": true,
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"target": "es6",
|
|
11
|
-
"moduleResolution": "node",
|
|
12
|
-
"module": "commonjs",
|
|
13
|
-
"outDir": "dist",
|
|
14
|
-
"strict": true,
|
|
15
|
-
"jsx": "react",
|
|
16
|
-
"incremental": true,
|
|
17
|
-
"lib": [
|
|
18
|
-
"esnext",
|
|
19
|
-
"dom"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { join } from 'path'
|
|
2
|
-
import { pathExists } from 'fs-extra'
|
|
3
|
-
import { JsonUpdateCallback, updateYaml } from './yaml'
|
|
4
|
-
|
|
5
|
-
const MAIN_CONFIGS = ['docker-compose.yaml', 'docker-compose.yml']
|
|
6
|
-
|
|
7
|
-
export interface DockerComposeServiceConfig {
|
|
8
|
-
image?: string
|
|
9
|
-
command?: string
|
|
10
|
-
user?: string
|
|
11
|
-
environment?: Record<string, string>
|
|
12
|
-
ports?: (string | {})[] // todo long syntax
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface DockerComposeConfig {
|
|
16
|
-
[key: string]: unknown
|
|
17
|
-
|
|
18
|
-
version?: string
|
|
19
|
-
services?: Record<string, DockerComposeServiceConfig>
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const resolvePath = async (dir: string, possibleFileNames: string[], fallbackFileName: string): Promise<string> => {
|
|
23
|
-
for (const file of possibleFileNames) {
|
|
24
|
-
const path = join(dir, file)
|
|
25
|
-
if (await pathExists(path)) {
|
|
26
|
-
return path
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return join(dir, fallbackFileName)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const updateMainDockerComposeConfig = async (
|
|
33
|
-
dir: string,
|
|
34
|
-
updater: JsonUpdateCallback<DockerComposeConfig>,
|
|
35
|
-
): Promise<void> => {
|
|
36
|
-
const path = process.env.COMPOSE_FILE || (await resolvePath(dir, MAIN_CONFIGS, MAIN_CONFIGS[0]))
|
|
37
|
-
return updateYaml(path, updater, { createMissing: true })
|
|
38
|
-
}
|