indraq_cli 1.9.1 → 2.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/LICENSE +21 -21
- package/README.md +1043 -1517
- package/cloud-api/.env +6 -0
- package/cloud-api/.env.example +14 -14
- package/cloud-api/README.md +145 -141
- package/cloud-api/package.json +29 -29
- package/cloud-api/sql/001_init.sql +8 -8
- package/cloud-api/sql/002_user_providers_and_project_resources.sql +40 -40
- package/cloud-api/sql/003_environment_infrastructure.sql +19 -19
- package/cloud-api/sql/004_managed_aws_credentials.sql +20 -20
- package/cloud-api/sql/005_project_members_and_resource_grants.sql +22 -22
- package/cloud-api/sql/006_catalog_identity_password_security.sql +96 -96
- package/cloud-api/sql/007_aws_access_key_rotation.sql +16 -16
- package/cloud-api/src/index.ts +1329 -1254
- package/cloud-api/tsconfig.json +18 -18
- package/dist/cli/help-content.d.ts.map +1 -1
- package/dist/cli/help-content.js +254 -251
- package/dist/cli/help-content.js.map +1 -1
- package/dist/modules/access/commands/access.command.d.ts +19 -0
- package/dist/modules/access/commands/access.command.d.ts.map +1 -1
- package/dist/modules/access/commands/access.command.js +57 -46
- package/dist/modules/access/commands/access.command.js.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.d.ts.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.js +18 -2
- package/dist/modules/cloud/commands/cloud.command.js.map +1 -1
- package/dist/modules/cloud/config/cloud-config.d.ts +1 -1
- package/dist/modules/cloud/config/cloud-config.js +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts +13 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.js +173 -77
- package/dist/modules/cloud/services/cloud-jenkins.service.js.map +1 -1
- package/dist/modules/cloud/services/managed-aws-credential.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/managed-aws-credential.service.js +11 -4
- package/dist/modules/cloud/services/managed-aws-credential.service.js.map +1 -1
- package/dist/modules/jenkins/commands/admin.command.d.ts +3 -0
- package/dist/modules/jenkins/commands/admin.command.d.ts.map +1 -1
- package/dist/modules/jenkins/commands/admin.command.js +91 -1
- package/dist/modules/jenkins/commands/admin.command.js.map +1 -1
- package/dist/modules/jenkins/index.d.ts.map +1 -1
- package/dist/modules/jenkins/index.js +3 -0
- package/dist/modules/jenkins/index.js.map +1 -1
- package/dist/modules/scaffold/services/docker-template.service.js +95 -95
- package/dist/modules/users/commands/user.command.d.ts.map +1 -1
- package/dist/modules/users/commands/user.command.js +290 -44
- package/dist/modules/users/commands/user.command.js.map +1 -1
- package/dist/modules/users/providers/aws-user.provider.d.ts.map +1 -1
- package/dist/modules/users/providers/aws-user.provider.js +9 -2
- package/dist/modules/users/providers/aws-user.provider.js.map +1 -1
- package/dist/modules/users/providers/jenkins-user.provider.d.ts +11 -4
- package/dist/modules/users/providers/jenkins-user.provider.d.ts.map +1 -1
- package/dist/modules/users/providers/jenkins-user.provider.js +174 -72
- package/dist/modules/users/providers/jenkins-user.provider.js.map +1 -1
- package/dist/modules/users/providers/npm-user.provider.d.ts.map +1 -1
- package/dist/modules/users/providers/npm-user.provider.js +3 -1
- package/dist/modules/users/providers/npm-user.provider.js.map +1 -1
- package/dist/shared/config/config-files.js +7 -7
- package/docs/ARCHITECTURE.md +29 -29
- package/docs/CREATE-DEPLOYMENT-reference.groovy +1105 -1105
- package/package.json +77 -76
- package/templates/jenkins/CREATE-DEPLOYMENT.groovy +1105 -1105
- package/templates/jenkins/Jenkinsfile-Mobile-App +759 -759
- package/cloud-api/.dockerignore +0 -18
- package/cloud-api/Dockerfile +0 -19
- package/cloud-api/package-lock.json +0 -2250
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.dockerArtifacts = void 0;
|
|
4
|
-
const nginx = `server {
|
|
5
|
-
listen 80;
|
|
6
|
-
server_name _;
|
|
7
|
-
root /usr/share/nginx/html;
|
|
8
|
-
index index.html;
|
|
9
|
-
location / { try_files $uri $uri/ /index.html; }
|
|
10
|
-
location = /health { access_log off; return 200 'healthy\\n'; add_header Content-Type text/plain; }
|
|
4
|
+
const nginx = `server {
|
|
5
|
+
listen 80;
|
|
6
|
+
server_name _;
|
|
7
|
+
root /usr/share/nginx/html;
|
|
8
|
+
index index.html;
|
|
9
|
+
location / { try_files $uri $uri/ /index.html; }
|
|
10
|
+
location = /health { access_log off; return 200 'healthy\\n'; add_header Content-Type text/plain; }
|
|
11
11
|
}\n`;
|
|
12
12
|
// Docker build contexts are copied wholesale. This ignore file is therefore the
|
|
13
13
|
// single place that decides which local files are excluded from the image.
|
|
14
14
|
// Company policy: environment files are intentionally NOT ignored so they are
|
|
15
15
|
// baked into images when present in the project build context.
|
|
16
|
-
const ignore = `node_modules
|
|
17
|
-
npm-debug.log*
|
|
18
|
-
yarn-debug.log*
|
|
19
|
-
yarn-error.log*
|
|
20
|
-
pnpm-debug.log*
|
|
21
|
-
*.log
|
|
22
|
-
.git
|
|
23
|
-
.gitignore
|
|
24
|
-
.indraq
|
|
25
|
-
dist
|
|
26
|
-
build
|
|
27
|
-
.next
|
|
28
|
-
coverage
|
|
29
|
-
.cache
|
|
30
|
-
.vite
|
|
31
|
-
.turbo
|
|
32
|
-
.DS_Store
|
|
33
|
-
Thumbs.db
|
|
16
|
+
const ignore = `node_modules
|
|
17
|
+
npm-debug.log*
|
|
18
|
+
yarn-debug.log*
|
|
19
|
+
yarn-error.log*
|
|
20
|
+
pnpm-debug.log*
|
|
21
|
+
*.log
|
|
22
|
+
.git
|
|
23
|
+
.gitignore
|
|
24
|
+
.indraq
|
|
25
|
+
dist
|
|
26
|
+
build
|
|
27
|
+
.next
|
|
28
|
+
coverage
|
|
29
|
+
.cache
|
|
30
|
+
.vite
|
|
31
|
+
.turbo
|
|
32
|
+
.DS_Store
|
|
33
|
+
Thumbs.db
|
|
34
34
|
`;
|
|
35
35
|
const installDependencies = `RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi`;
|
|
36
36
|
const dockerArtifacts = (spec) => {
|
|
@@ -39,91 +39,91 @@ const dockerArtifacts = (spec) => {
|
|
|
39
39
|
const files = { '.dockerignore': ignore };
|
|
40
40
|
if (spec.framework === 'vite' || spec.framework === 'react') {
|
|
41
41
|
const output = spec.buildOutput || (spec.framework === 'vite' ? 'dist' : 'build');
|
|
42
|
-
dockerfile = `FROM node:${node}-alpine AS build
|
|
43
|
-
WORKDIR /myapp
|
|
44
|
-
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
45
|
-
COPY . .
|
|
46
|
-
${installDependencies}
|
|
47
|
-
RUN npm run build
|
|
48
|
-
|
|
49
|
-
FROM nginx:alpine
|
|
50
|
-
RUN apk add --no-cache curl
|
|
51
|
-
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
52
|
-
# Static frontends are served from their compiled output; the build stage above
|
|
53
|
-
# received the complete project context without guessing source/config filenames.
|
|
54
|
-
COPY --from=build /myapp/${output} /usr/share/nginx/html
|
|
55
|
-
EXPOSE 80
|
|
56
|
-
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1/health >/dev/null || exit 1
|
|
57
|
-
CMD ["nginx", "-g", "daemon off;"]
|
|
42
|
+
dockerfile = `FROM node:${node}-alpine AS build
|
|
43
|
+
WORKDIR /myapp
|
|
44
|
+
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
45
|
+
COPY . .
|
|
46
|
+
${installDependencies}
|
|
47
|
+
RUN npm run build
|
|
48
|
+
|
|
49
|
+
FROM nginx:alpine
|
|
50
|
+
RUN apk add --no-cache curl
|
|
51
|
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
52
|
+
# Static frontends are served from their compiled output; the build stage above
|
|
53
|
+
# received the complete project context without guessing source/config filenames.
|
|
54
|
+
COPY --from=build /myapp/${output} /usr/share/nginx/html
|
|
55
|
+
EXPOSE 80
|
|
56
|
+
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1/health >/dev/null || exit 1
|
|
57
|
+
CMD ["nginx", "-g", "daemon off;"]
|
|
58
58
|
`;
|
|
59
59
|
files['nginx.conf'] = nginx;
|
|
60
60
|
}
|
|
61
61
|
else if (spec.framework === 'vanilla') {
|
|
62
|
-
dockerfile = `FROM nginx:alpine
|
|
63
|
-
RUN apk add --no-cache curl
|
|
64
|
-
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
65
|
-
COPY . /usr/share/nginx/html
|
|
66
|
-
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
67
|
-
EXPOSE 80
|
|
68
|
-
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1/health >/dev/null || exit 1
|
|
69
|
-
CMD ["nginx", "-g", "daemon off;"]
|
|
62
|
+
dockerfile = `FROM nginx:alpine
|
|
63
|
+
RUN apk add --no-cache curl
|
|
64
|
+
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
65
|
+
COPY . /usr/share/nginx/html
|
|
66
|
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
67
|
+
EXPOSE 80
|
|
68
|
+
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1/health >/dev/null || exit 1
|
|
69
|
+
CMD ["nginx", "-g", "daemon off;"]
|
|
70
70
|
`;
|
|
71
71
|
files['nginx.conf'] = nginx;
|
|
72
72
|
}
|
|
73
73
|
else if (spec.framework === 'next') {
|
|
74
|
-
dockerfile = `FROM node:${node}-alpine AS build
|
|
75
|
-
WORKDIR /myapp
|
|
76
|
-
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
77
|
-
COPY . .
|
|
78
|
-
${installDependencies}
|
|
79
|
-
RUN npm run build
|
|
80
|
-
RUN npm prune --omit=dev
|
|
81
|
-
|
|
82
|
-
FROM node:${node}-alpine AS runtime
|
|
83
|
-
WORKDIR /myapp
|
|
84
|
-
RUN apk add --no-cache curl
|
|
85
|
-
ENV NODE_ENV=production PORT=${spec.appPort}
|
|
86
|
-
# Copy the complete filtered project from the build stage, including generated
|
|
87
|
-
# build output and production node_modules. No project filenames are guessed.
|
|
88
|
-
COPY --from=build --chown=node:node /myapp ./
|
|
89
|
-
USER node
|
|
90
|
-
EXPOSE ${spec.appPort}
|
|
91
|
-
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1:${spec.appPort}/ >/dev/null || exit 1
|
|
92
|
-
CMD ["npm", "start"]
|
|
74
|
+
dockerfile = `FROM node:${node}-alpine AS build
|
|
75
|
+
WORKDIR /myapp
|
|
76
|
+
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
77
|
+
COPY . .
|
|
78
|
+
${installDependencies}
|
|
79
|
+
RUN npm run build
|
|
80
|
+
RUN npm prune --omit=dev
|
|
81
|
+
|
|
82
|
+
FROM node:${node}-alpine AS runtime
|
|
83
|
+
WORKDIR /myapp
|
|
84
|
+
RUN apk add --no-cache curl
|
|
85
|
+
ENV NODE_ENV=production PORT=${spec.appPort}
|
|
86
|
+
# Copy the complete filtered project from the build stage, including generated
|
|
87
|
+
# build output and production node_modules. No project filenames are guessed.
|
|
88
|
+
COPY --from=build --chown=node:node /myapp ./
|
|
89
|
+
USER node
|
|
90
|
+
EXPOSE ${spec.appPort}
|
|
91
|
+
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1:${spec.appPort}/ >/dev/null || exit 1
|
|
92
|
+
CMD ["npm", "start"]
|
|
93
93
|
`;
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
|
-
dockerfile = `FROM node:${node}-alpine AS build
|
|
97
|
-
WORKDIR /myapp
|
|
98
|
-
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
99
|
-
COPY . .
|
|
100
|
-
${installDependencies}
|
|
101
|
-
RUN npm run build
|
|
102
|
-
RUN npm prune --omit=dev
|
|
103
|
-
|
|
104
|
-
FROM node:${node}-alpine AS runtime
|
|
105
|
-
WORKDIR /myapp
|
|
106
|
-
RUN apk add --no-cache curl
|
|
107
|
-
ENV NODE_ENV=production PORT=${spec.appPort}
|
|
108
|
-
# Copy the complete filtered project from the build stage, including generated
|
|
109
|
-
# build output and production node_modules. No project filenames are guessed.
|
|
110
|
-
COPY --from=build --chown=node:node /myapp ./
|
|
111
|
-
USER node
|
|
112
|
-
EXPOSE ${spec.appPort}
|
|
113
|
-
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1:${spec.appPort}${spec.healthEndpoint || '/health'} >/dev/null || exit 1
|
|
114
|
-
CMD ["npm", "start"]
|
|
96
|
+
dockerfile = `FROM node:${node}-alpine AS build
|
|
97
|
+
WORKDIR /myapp
|
|
98
|
+
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
99
|
+
COPY . .
|
|
100
|
+
${installDependencies}
|
|
101
|
+
RUN npm run build
|
|
102
|
+
RUN npm prune --omit=dev
|
|
103
|
+
|
|
104
|
+
FROM node:${node}-alpine AS runtime
|
|
105
|
+
WORKDIR /myapp
|
|
106
|
+
RUN apk add --no-cache curl
|
|
107
|
+
ENV NODE_ENV=production PORT=${spec.appPort}
|
|
108
|
+
# Copy the complete filtered project from the build stage, including generated
|
|
109
|
+
# build output and production node_modules. No project filenames are guessed.
|
|
110
|
+
COPY --from=build --chown=node:node /myapp ./
|
|
111
|
+
USER node
|
|
112
|
+
EXPOSE ${spec.appPort}
|
|
113
|
+
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1:${spec.appPort}${spec.healthEndpoint || '/health'} >/dev/null || exit 1
|
|
114
|
+
CMD ["npm", "start"]
|
|
115
115
|
`;
|
|
116
116
|
}
|
|
117
117
|
files.Dockerfile = dockerfile;
|
|
118
118
|
if (spec.compose)
|
|
119
|
-
files['docker-compose.yml'] = `services:
|
|
120
|
-
app:
|
|
121
|
-
build: .
|
|
122
|
-
ports:
|
|
123
|
-
- "${spec.appPort}:${spec.framework === 'express' || spec.framework === 'next' ? spec.appPort : 80}"
|
|
124
|
-
env_file:
|
|
125
|
-
- .env.development
|
|
126
|
-
restart: unless-stopped
|
|
119
|
+
files['docker-compose.yml'] = `services:
|
|
120
|
+
app:
|
|
121
|
+
build: .
|
|
122
|
+
ports:
|
|
123
|
+
- "${spec.appPort}:${spec.framework === 'express' || spec.framework === 'next' ? spec.appPort : 80}"
|
|
124
|
+
env_file:
|
|
125
|
+
- .env.development
|
|
126
|
+
restart: unless-stopped
|
|
127
127
|
`;
|
|
128
128
|
return files;
|
|
129
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.command.d.ts","sourceRoot":"","sources":["../../../../src/modules/users/commands/user.command.ts"],"names":[],"mappings":"AAWA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG3E,UAAU,WAAY,SAAQ,cAAc;IAAG,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;CAAE;
|
|
1
|
+
{"version":3,"file":"user.command.d.ts","sourceRoot":"","sources":["../../../../src/modules/users/commands/user.command.ts"],"names":[],"mappings":"AAWA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG3E,UAAU,WAAY,SAAQ,cAAc;IAAG,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;CAAE;AA8NvR,eAAO,MAAM,gBAAgB,GAAU,SAAS,cAAc,KAAG,OAAO,CAAC,IAAI,CAI5E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,aAAa,MAAM,GAAG,SAAS,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC,IAAI,CAqI3G,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,aAAa,MAAM,GAAG,SAAS,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC,IAAI,CAkF3G,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,aAAa,MAAM,GAAG,SAAS,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC,IAAI,CAuF3G,CAAC"}
|