@bluealba/platform-cli 1.0.1 → 1.1.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/index.js +278 -15
- package/docs/404.mdx +5 -0
- package/docs/architecture/api-explorer.mdx +478 -0
- package/docs/architecture/architecture-diagrams.mdx +12 -0
- package/docs/architecture/authentication-system.mdx +903 -0
- package/docs/architecture/authorization-system.mdx +886 -0
- package/docs/architecture/bootstrap.mdx +1442 -0
- package/docs/architecture/gateway-architecture.mdx +845 -0
- package/docs/architecture/multi-tenancy.mdx +1150 -0
- package/docs/architecture/overview.mdx +776 -0
- package/docs/architecture/scheduler.mdx +818 -0
- package/docs/architecture/shell.mdx +885 -0
- package/docs/architecture/ui-extension-points.mdx +781 -0
- package/docs/architecture/user-states.mdx +794 -0
- package/docs/development/overview.mdx +21 -0
- package/docs/development/workflow.mdx +914 -0
- package/docs/getting-started/core-concepts.mdx +892 -0
- package/docs/getting-started/installation.mdx +780 -0
- package/docs/getting-started/overview.mdx +83 -0
- package/docs/getting-started/quick-start.mdx +940 -0
- package/docs/guides/adding-documentation-sites.mdx +1367 -0
- package/docs/guides/creating-services.mdx +1736 -0
- package/docs/guides/creating-ui-modules.mdx +1860 -0
- package/docs/guides/identity-providers.mdx +1007 -0
- package/docs/guides/mermaid-diagrams.mdx +212 -0
- package/docs/guides/using-feature-flags.mdx +1059 -0
- package/docs/guides/working-with-rooms.mdx +566 -0
- package/docs/index.mdx +57 -0
- package/docs/platform-cli/commands.mdx +604 -0
- package/docs/platform-cli/overview.mdx +195 -0
- package/package.json +5 -2
- package/skills/ba-platform/platform-cli.skill.md +26 -0
- package/skills/ba-platform/platform.skill.md +35 -0
- package/templates/application-monorepo-template/gitignore +95 -0
- package/templates/bootstrap-service-template/Dockerfile.development +1 -1
- package/templates/bootstrap-service-template/gitignore +57 -0
- package/templates/bootstrap-service-template/package.json +1 -1
- package/templates/bootstrap-service-template/src/main.ts +6 -16
- package/templates/customization-ui-module-template/Dockerfile.development +1 -1
- package/templates/customization-ui-module-template/gitignore +73 -0
- package/templates/nestjs-service-module-template/Dockerfile.development +1 -1
- package/templates/nestjs-service-module-template/gitignore +56 -0
- package/templates/platform-init-template/{{platformName}}-core/gitignore +97 -0
- package/templates/platform-init-template/{{platformName}}-core/local/.env.example +1 -1
- package/templates/platform-init-template/{{platformName}}-core/local/platform-docker-compose.yml +1 -1
- package/templates/platform-init-template/{{platformName}}-core/local/{{platformName}}-core-docker-compose.yml +0 -1
- package/templates/react-ui-module-template/Dockerfile +1 -1
- package/templates/react-ui-module-template/Dockerfile.development +1 -3
- package/templates/react-ui-module-template/caddy/Caddyfile +1 -1
- package/templates/react-ui-module-template/gitignore +72 -0
- package/templates/react-ui-module-template/Dockerfile_nginx +0 -11
- package/templates/react-ui-module-template/nginx/default.conf +0 -23
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Platform CLI Overview
|
|
3
|
+
description: Introduction to the Blue Alba Platform CLI — how to install it, use the interactive command palette, and run commands in headless mode
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { Steps, Aside, Card, CardGrid, Tabs, TabItem } from '@astrojs/starlight/components';
|
|
7
|
+
|
|
8
|
+
The `@bluealba/platform-cli` (invoked as `platform`) is the official scaffolding and management tool for the Blue Alba Platform. It handles the complete lifecycle of a platform environment: initializing a new product repository structure, adding applications and modules, configuring identity providers, managing local development environments, and checking platform health.
|
|
9
|
+
|
|
10
|
+
The CLI ships in two modes that can be freely combined:
|
|
11
|
+
|
|
12
|
+
- **Interactive mode** — a terminal UI built with [Ink](https://github.com/vadimdemedes/ink) and a fuzzy-searchable command palette. No arguments needed; the CLI guides you through every step with prompts.
|
|
13
|
+
- **Headless mode** — a non-interactive path where all inputs are supplied as `key=value` arguments on the command line. Suitable for CI pipelines, scripts, and AI agent automation.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
<Tabs>
|
|
20
|
+
<TabItem label="Global install (recommended)">
|
|
21
|
+
Install the CLI globally so the `platform` command is available anywhere on your system:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g @bluealba/platform-cli
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Verify the installation:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
platform --version
|
|
31
|
+
```
|
|
32
|
+
</TabItem>
|
|
33
|
+
|
|
34
|
+
<TabItem label="From monorepo source">
|
|
35
|
+
If you are working inside the Blue Alba Platform monorepo you can build and install the CLI from source with a single command from the repository root:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm run cli:install-local
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This builds the CLI with `tsup`, packs it into a `.tgz`, installs it globally, and removes the tarball. After it completes the `platform` command reflects your latest local changes.
|
|
42
|
+
</TabItem>
|
|
43
|
+
</Tabs>
|
|
44
|
+
|
|
45
|
+
### Prerequisites
|
|
46
|
+
|
|
47
|
+
| Requirement | Version |
|
|
48
|
+
|-------------|---------|
|
|
49
|
+
| Node.js | >= 22 |
|
|
50
|
+
| npm | >= 10 |
|
|
51
|
+
| Docker | Any recent version with the Compose plugin (required for local environment commands) |
|
|
52
|
+
|
|
53
|
+
<Aside type="tip">
|
|
54
|
+
The CLI requires a real TTY for interactive mode. If you are running inside a script or CI pipeline, always supply all arguments on the command line (headless mode).
|
|
55
|
+
</Aside>
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Interactive Mode
|
|
60
|
+
|
|
61
|
+
Running `platform` with no arguments launches the interactive terminal UI.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
platform
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
You are presented with a status banner and a blinking cursor. The interface is intentionally minimal — most of the time you will open the command palette to do something.
|
|
68
|
+
|
|
69
|
+
### The Command Palette
|
|
70
|
+
|
|
71
|
+
Press `/` at any time to open the command palette. Start typing to fuzzy-search across all available commands by name or description.
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
> /init
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Use the arrow keys to move through results and press `Enter` to run the highlighted command.
|
|
78
|
+
|
|
79
|
+
<Aside type="note" title="Context-aware visibility">
|
|
80
|
+
Commands that require a platform to be initialized (such as `create-application`, `install`, `build`, `start`, `stop`, `destroy`, `status`, and `manage-platform-admins`) are hidden from the palette until `init` has been run in the current directory. This prevents accidentally running lifecycle commands against the wrong directory.
|
|
81
|
+
</Aside>
|
|
82
|
+
|
|
83
|
+
### Interactive Prompt Types
|
|
84
|
+
|
|
85
|
+
Depending on the command, the CLI may present:
|
|
86
|
+
|
|
87
|
+
| Prompt type | Behaviour |
|
|
88
|
+
|-------------|-----------|
|
|
89
|
+
| Text input | Free-form text; press `Enter` to confirm |
|
|
90
|
+
| Confirm (`y/n`) | Yes/No question; the default is shown in brackets |
|
|
91
|
+
| Single-select list | Arrow keys to navigate, `Enter` to select |
|
|
92
|
+
| Multi-select list | Arrow keys to navigate, `Space` to toggle, `Enter` to confirm |
|
|
93
|
+
|
|
94
|
+
### Keyboard Shortcuts
|
|
95
|
+
|
|
96
|
+
| Key | Action |
|
|
97
|
+
|-----|--------|
|
|
98
|
+
| `/` | Open command palette |
|
|
99
|
+
| `Arrow Up / Down` | Navigate palette or select lists |
|
|
100
|
+
| `Enter` | Confirm selection or submit input |
|
|
101
|
+
| `Escape` | Abort the running command and return to the idle state |
|
|
102
|
+
| `Ctrl+C` | Exit the CLI |
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Headless Mode
|
|
107
|
+
|
|
108
|
+
Supply the command name as the first argument followed by any required inputs as `key=value` pairs:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
platform <command> key1=value1 key2=value2
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
All key-value pairs are positional after the command name and can appear in any order.
|
|
115
|
+
|
|
116
|
+
### Example
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
platform init \
|
|
120
|
+
organizationName=acme \
|
|
121
|
+
platformName=my-platform \
|
|
122
|
+
platformDisplayName="My Platform"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
If a required argument is missing the CLI prints an error message and exits with a non-zero code, making it safe to use in scripts that check exit codes.
|
|
126
|
+
|
|
127
|
+
### Boolean Arguments
|
|
128
|
+
|
|
129
|
+
Boolean flags use the string values `"yes"` and `"no"`:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
platform create-application \
|
|
133
|
+
applicationName=billing \
|
|
134
|
+
applicationDisplayName="Billing" \
|
|
135
|
+
applicationDescription="Invoice and payment management" \
|
|
136
|
+
hasUserInterface=yes \
|
|
137
|
+
hasBackendService=yes
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Comma-separated Lists
|
|
141
|
+
|
|
142
|
+
Some commands accept multiple values as a comma-separated string:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
platform manage-platform-admins action=add usernames=alice,bob,carol
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Platform Lifecycle
|
|
151
|
+
|
|
152
|
+
The CLI models a four-stage lifecycle for every platform environment:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
init → install → build → start
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
| Stage | What it does | CLI command |
|
|
159
|
+
|-------|-------------|-------------|
|
|
160
|
+
| **init** | Scaffolds the core directory structure, product manifest, bootstrap service, and customization UI | `platform init` |
|
|
161
|
+
| **install** | Runs `npm install` across the platform and all registered applications | `platform install` |
|
|
162
|
+
| **build** | Compiles TypeScript and builds Docker images via Turborepo | `platform build` |
|
|
163
|
+
| **start** | Brings up the full local environment with Docker Compose | `platform start` |
|
|
164
|
+
|
|
165
|
+
The `status` command checks where you are in this lifecycle and offers to run the next required step automatically.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Working Directory Convention
|
|
170
|
+
|
|
171
|
+
The CLI determines the platform root by looking for a `*-core/` directory in the current working directory or its parents. This directory contains the product manifest (`product.manifest.json`) and the `local/` subdirectory with Docker Compose files.
|
|
172
|
+
|
|
173
|
+
Run all CLI commands from the root of your product repository (the directory that contains the `*-core/` folder):
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
my-product/
|
|
177
|
+
├── my-product-core/ ← The CLI looks for this directory
|
|
178
|
+
│ ├── product.manifest.json
|
|
179
|
+
│ ├── local/
|
|
180
|
+
│ │ ├── .env
|
|
181
|
+
│ │ └── *.yml
|
|
182
|
+
│ └── services/
|
|
183
|
+
│ └── ...
|
|
184
|
+
└── my-application/
|
|
185
|
+
└── ...
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Next Steps
|
|
191
|
+
|
|
192
|
+
- [Command Reference](./commands/) — Complete documentation for every command
|
|
193
|
+
- [Quick Start Guide](../getting-started/quick-start/) — Get the platform running for the first time
|
|
194
|
+
- [Creating Services Guide](../guides/creating-services/) — Add a backend service to your platform
|
|
195
|
+
- [Creating UI Modules Guide](../guides/creating-ui-modules/) — Add a React micro-frontend module
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluealba/platform-cli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Blue Alba Platform CLI",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"type": "module",
|
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
|
-
"templates"
|
|
12
|
+
"templates",
|
|
13
|
+
"docs",
|
|
14
|
+
"skills"
|
|
13
15
|
],
|
|
14
16
|
"scripts": {
|
|
17
|
+
"prebuild": "node scripts/copy-docs.mjs",
|
|
15
18
|
"build": "tsup",
|
|
16
19
|
"dev": "tsup --watch",
|
|
17
20
|
"start": "node dist/index.js",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Blue Alba Platform CLI — Expert Knowledge
|
|
2
|
+
|
|
3
|
+
You are an expert on the Blue Alba Platform CLI (`@bluealba/platform-cli`, command: `platform`). Use the documentation files referenced below to answer questions accurately.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Read these files for comprehensive CLI knowledge:
|
|
8
|
+
|
|
9
|
+
- `{{docsPath}}/platform-cli/overview.mdx` — What the CLI is, installation, interactive mode (command palette), headless mode, platform lifecycle
|
|
10
|
+
- `{{docsPath}}/platform-cli/commands.mdx` — Complete reference for all commands: init, configure-idp, create-application, create-service-module, create-ui-module, status, manage-platform-admins, install-ai-plugin, install, build, start, stop, destroy
|
|
11
|
+
|
|
12
|
+
## When to Use This Knowledge
|
|
13
|
+
|
|
14
|
+
- When the user asks how to use the platform CLI
|
|
15
|
+
- When guiding users through scaffolding, configuration, or environment management
|
|
16
|
+
- When explaining what a specific CLI command does or what parameters it accepts
|
|
17
|
+
- When helping users troubleshoot CLI errors
|
|
18
|
+
|
|
19
|
+
## Instructions
|
|
20
|
+
|
|
21
|
+
1. Always read both documentation files above before answering CLI-specific questions
|
|
22
|
+
2. Provide concrete command examples with the correct parameter syntax
|
|
23
|
+
3. Explain side effects and what files or infrastructure a command creates
|
|
24
|
+
4. When a user's goal can be achieved with a CLI command, prefer the CLI over manual steps
|
|
25
|
+
5. For interactive mode: the command palette is opened with `/` inside the TUI
|
|
26
|
+
6. For headless mode: args are passed as `key=value` pairs (e.g. `platform create-application applicationName=my-app`)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Blue Alba Platform — Expert Knowledge
|
|
2
|
+
|
|
3
|
+
You are an expert on the Blue Alba Platform monorepo. Use the documentation files referenced below to answer questions accurately.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Read these files for comprehensive platform knowledge:
|
|
8
|
+
|
|
9
|
+
- `{{docsPath}}/getting-started/overview.mdx` — Platform overview and core concepts
|
|
10
|
+
- `{{docsPath}}/getting-started/core-concepts.mdx` — Core concepts explained in depth
|
|
11
|
+
- `{{docsPath}}/getting-started/installation.mdx` — Installation and local setup
|
|
12
|
+
- `{{docsPath}}/architecture/overview.mdx` — Architecture overview and system components
|
|
13
|
+
- `{{docsPath}}/architecture/gateway-architecture.mdx` — NestJS Gateway Service architecture
|
|
14
|
+
- `{{docsPath}}/architecture/authentication-system.mdx` — JWT, OAuth 2.0, API keys, impersonation
|
|
15
|
+
- `{{docsPath}}/architecture/authorization-system.mdx` — RBAC model, operations, roles, rules
|
|
16
|
+
- `{{docsPath}}/architecture/multi-tenancy.mdx` — Tenant isolation and context
|
|
17
|
+
- `{{docsPath}}/architecture/shell.mdx` — Shell UI architecture and extension points
|
|
18
|
+
- `{{docsPath}}/architecture/scheduler.mdx` — Job scheduling system
|
|
19
|
+
- `{{docsPath}}/development/workflow.mdx` — Development workflow, git branching, changesets, testing
|
|
20
|
+
- `{{docsPath}}/platform-cli/overview.mdx` — Platform CLI tool: installation, interactive mode, headless mode
|
|
21
|
+
- `{{docsPath}}/platform-cli/commands.mdx` — All CLI commands reference
|
|
22
|
+
|
|
23
|
+
## When to Use This Knowledge
|
|
24
|
+
|
|
25
|
+
- When the user asks about the platform's architecture, services, or conventions
|
|
26
|
+
- When explaining how the gateway, microservices, or UI applications work
|
|
27
|
+
- When guiding development decisions that must align with platform patterns
|
|
28
|
+
- When reviewing code against platform conventions
|
|
29
|
+
|
|
30
|
+
## Instructions
|
|
31
|
+
|
|
32
|
+
1. Always read the relevant documentation files above before answering platform-specific questions
|
|
33
|
+
2. Reference specific sections from the docs when explaining concepts
|
|
34
|
+
3. Follow the conventions and patterns described in the architecture documentation
|
|
35
|
+
4. When uncertain, prefer the documented approach over assumptions
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
|
|
8
|
+
# Runtime data
|
|
9
|
+
pids
|
|
10
|
+
*.pid
|
|
11
|
+
*.seed
|
|
12
|
+
*.pid.lock
|
|
13
|
+
|
|
14
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
15
|
+
lib-cov
|
|
16
|
+
|
|
17
|
+
# Coverage directory used by tools like istanbul
|
|
18
|
+
coverage
|
|
19
|
+
|
|
20
|
+
# nyc test coverage
|
|
21
|
+
.nyc_output
|
|
22
|
+
|
|
23
|
+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
|
24
|
+
.grunt
|
|
25
|
+
|
|
26
|
+
# Bower dependency directory (https://bower.io/)
|
|
27
|
+
bower_components
|
|
28
|
+
|
|
29
|
+
# node-waf configuration
|
|
30
|
+
.lock-wscript
|
|
31
|
+
|
|
32
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
33
|
+
build/Release
|
|
34
|
+
|
|
35
|
+
# Dependency directories
|
|
36
|
+
node_modules/
|
|
37
|
+
jspm_packages/
|
|
38
|
+
|
|
39
|
+
# TypeScript v1 declaration files
|
|
40
|
+
typings/
|
|
41
|
+
|
|
42
|
+
# Optional npm cache directory
|
|
43
|
+
.npm
|
|
44
|
+
|
|
45
|
+
# Optional eslint cache
|
|
46
|
+
.eslintcache
|
|
47
|
+
|
|
48
|
+
# Optional REPL history
|
|
49
|
+
.node_repl_history
|
|
50
|
+
|
|
51
|
+
# Output of 'npm pack'
|
|
52
|
+
*.tgz
|
|
53
|
+
|
|
54
|
+
# Yarn Integrity file
|
|
55
|
+
.yarn-integrity
|
|
56
|
+
|
|
57
|
+
# dotenv environment variables file
|
|
58
|
+
# .env
|
|
59
|
+
|
|
60
|
+
# next.js build output
|
|
61
|
+
.next
|
|
62
|
+
dist
|
|
63
|
+
|
|
64
|
+
# Editor directories and files
|
|
65
|
+
.idea
|
|
66
|
+
.vscode
|
|
67
|
+
*.suo
|
|
68
|
+
*.ntvs*
|
|
69
|
+
*.njsproj
|
|
70
|
+
*.sln
|
|
71
|
+
*.sw?
|
|
72
|
+
.DS_Store
|
|
73
|
+
|
|
74
|
+
# Monorepo directories
|
|
75
|
+
core/*/node_modules
|
|
76
|
+
core/*/dist
|
|
77
|
+
services/*/node_modules
|
|
78
|
+
services/*/dist
|
|
79
|
+
ui/*/node_modules
|
|
80
|
+
ui/*/dist
|
|
81
|
+
|
|
82
|
+
# Turbo directories
|
|
83
|
+
.turbo
|
|
84
|
+
|
|
85
|
+
# dependencies management script
|
|
86
|
+
.package-json-backup.json
|
|
87
|
+
.changeset-in-progress
|
|
88
|
+
.tools
|
|
89
|
+
|
|
90
|
+
*storybook.log
|
|
91
|
+
storybook-static
|
|
92
|
+
|
|
93
|
+
version.json
|
|
94
|
+
|
|
95
|
+
.release-notes/
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# compiled output
|
|
2
|
+
/dist
|
|
3
|
+
/node_modules
|
|
4
|
+
/build
|
|
5
|
+
|
|
6
|
+
# Logs
|
|
7
|
+
logs
|
|
8
|
+
*.log
|
|
9
|
+
npm-debug.log*
|
|
10
|
+
pnpm-debug.log*
|
|
11
|
+
yarn-debug.log*
|
|
12
|
+
yarn-error.log*
|
|
13
|
+
lerna-debug.log*
|
|
14
|
+
|
|
15
|
+
# OS
|
|
16
|
+
.DS_Store
|
|
17
|
+
|
|
18
|
+
# Tests
|
|
19
|
+
/coverage
|
|
20
|
+
/.nyc_output
|
|
21
|
+
|
|
22
|
+
# IDEs and editors
|
|
23
|
+
/.idea
|
|
24
|
+
/.vscode
|
|
25
|
+
.project
|
|
26
|
+
.classpath
|
|
27
|
+
.c9/
|
|
28
|
+
*.launch
|
|
29
|
+
.settings/
|
|
30
|
+
*.sublime-workspace
|
|
31
|
+
|
|
32
|
+
# IDE - VSCode
|
|
33
|
+
.vscode/*
|
|
34
|
+
!.vscode/settings.json
|
|
35
|
+
!.vscode/tasks.json
|
|
36
|
+
!.vscode/launch.json
|
|
37
|
+
!.vscode/extensions.json
|
|
38
|
+
|
|
39
|
+
# dotenv environment variable files
|
|
40
|
+
.env
|
|
41
|
+
.env.development.local
|
|
42
|
+
.env.test.local
|
|
43
|
+
.env.production.local
|
|
44
|
+
.env.local
|
|
45
|
+
|
|
46
|
+
# temp directory
|
|
47
|
+
.temp
|
|
48
|
+
.tmp
|
|
49
|
+
|
|
50
|
+
# Runtime data
|
|
51
|
+
pids
|
|
52
|
+
*.pid
|
|
53
|
+
*.seed
|
|
54
|
+
*.pid.lock
|
|
55
|
+
|
|
56
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
57
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
@@ -13,26 +13,16 @@ const createApp = async (): Promise<express.Application> => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const serviceAccessName = process.env.SERVICE_ACCESS_NAME;
|
|
16
|
-
if (!serviceAccessName) {
|
|
17
|
-
console.error('No SERVICE_ACCESS_NAME env variable set !');
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
16
|
|
|
21
17
|
// fire it up
|
|
22
18
|
createApp().then(app => {
|
|
23
19
|
app.listen(config.port, () => {
|
|
24
20
|
console.log('Server listening on Port', config.port);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.then(() => console.log('\n\n\n\n>\n> Platform Successfully Synchronized !!!\n>'))
|
|
32
|
-
.catch(e => {
|
|
33
|
-
console.error('\n\n\n\n>\n> Error Synchronizing Platform !!!\n>', e);
|
|
34
|
-
process.exit(1);
|
|
35
|
-
});
|
|
36
|
-
}, config.waitTime);
|
|
21
|
+
bootstrapPlatform({
|
|
22
|
+
path: join(process.cwd(), 'src', 'data'),
|
|
23
|
+
scopedTo: serviceAccessName ?? '',
|
|
24
|
+
initialDelay: config.waitTime,
|
|
25
|
+
retries: 10
|
|
26
|
+
}).catch(e => console.error('[Bootstrap] Unhandled error:', e));
|
|
37
27
|
});
|
|
38
28
|
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
|
|
8
|
+
# Runtime data
|
|
9
|
+
pids
|
|
10
|
+
*.pid
|
|
11
|
+
*.seed
|
|
12
|
+
*.pid.lock
|
|
13
|
+
|
|
14
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
15
|
+
lib-cov
|
|
16
|
+
|
|
17
|
+
# Coverage directory used by tools like istanbul
|
|
18
|
+
coverage
|
|
19
|
+
|
|
20
|
+
# nyc test coverage
|
|
21
|
+
.nyc_output
|
|
22
|
+
|
|
23
|
+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
|
24
|
+
.grunt
|
|
25
|
+
|
|
26
|
+
# Bower dependency directory (https://bower.io/)
|
|
27
|
+
bower_components
|
|
28
|
+
|
|
29
|
+
# node-waf configuration
|
|
30
|
+
.lock-wscript
|
|
31
|
+
|
|
32
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
33
|
+
build/Release
|
|
34
|
+
|
|
35
|
+
# Dependency directories
|
|
36
|
+
node_modules/
|
|
37
|
+
jspm_packages/
|
|
38
|
+
|
|
39
|
+
# TypeScript v1 declaration files
|
|
40
|
+
typings/
|
|
41
|
+
|
|
42
|
+
# Optional npm cache directory
|
|
43
|
+
.npm
|
|
44
|
+
|
|
45
|
+
# Optional eslint cache
|
|
46
|
+
.eslintcache
|
|
47
|
+
|
|
48
|
+
# Optional REPL history
|
|
49
|
+
.node_repl_history
|
|
50
|
+
|
|
51
|
+
# Output of 'npm pack'
|
|
52
|
+
*.tgz
|
|
53
|
+
|
|
54
|
+
# Yarn Integrity file
|
|
55
|
+
.yarn-integrity
|
|
56
|
+
|
|
57
|
+
# dotenv environment variables file
|
|
58
|
+
.env
|
|
59
|
+
|
|
60
|
+
# next.js build output
|
|
61
|
+
.next
|
|
62
|
+
dist
|
|
63
|
+
distLib
|
|
64
|
+
|
|
65
|
+
# Editor directories and files
|
|
66
|
+
.idea
|
|
67
|
+
.vscode
|
|
68
|
+
*.suo
|
|
69
|
+
*.ntvs*
|
|
70
|
+
*.njsproj
|
|
71
|
+
*.sln
|
|
72
|
+
*.sw?
|
|
73
|
+
.DS_Store
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# compiled output
|
|
2
|
+
/dist
|
|
3
|
+
/node_modules
|
|
4
|
+
/build
|
|
5
|
+
|
|
6
|
+
# Logs
|
|
7
|
+
logs
|
|
8
|
+
*.log
|
|
9
|
+
npm-debug.log*
|
|
10
|
+
pnpm-debug.log*
|
|
11
|
+
yarn-debug.log*
|
|
12
|
+
yarn-error.log*
|
|
13
|
+
lerna-debug.log*
|
|
14
|
+
|
|
15
|
+
# OS
|
|
16
|
+
.DS_Store
|
|
17
|
+
|
|
18
|
+
# Tests
|
|
19
|
+
/coverage
|
|
20
|
+
/.nyc_output
|
|
21
|
+
|
|
22
|
+
# IDEs and editors
|
|
23
|
+
/.idea
|
|
24
|
+
.project
|
|
25
|
+
.classpath
|
|
26
|
+
.c9/
|
|
27
|
+
*.launch
|
|
28
|
+
.settings/
|
|
29
|
+
*.sublime-workspace
|
|
30
|
+
|
|
31
|
+
# IDE - VSCode
|
|
32
|
+
.vscode/*
|
|
33
|
+
!.vscode/settings.json
|
|
34
|
+
!.vscode/tasks.json
|
|
35
|
+
!.vscode/launch.json
|
|
36
|
+
!.vscode/extensions.json
|
|
37
|
+
|
|
38
|
+
# dotenv environment variable files
|
|
39
|
+
.env
|
|
40
|
+
.env.development.local
|
|
41
|
+
.env.test.local
|
|
42
|
+
.env.production.local
|
|
43
|
+
.env.local
|
|
44
|
+
|
|
45
|
+
# temp directory
|
|
46
|
+
.temp
|
|
47
|
+
.tmp
|
|
48
|
+
|
|
49
|
+
# Runtime data
|
|
50
|
+
pids
|
|
51
|
+
*.pid
|
|
52
|
+
*.seed
|
|
53
|
+
*.pid.lock
|
|
54
|
+
|
|
55
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
56
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|