monorepotime 1.1.14 → 1.1.15
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
CHANGED
|
@@ -57302,6 +57302,62 @@ var import_express17 = __toESM(require_express2());
|
|
|
57302
57302
|
var import_fs_extra12 = __toESM(require_lib4());
|
|
57303
57303
|
var import_path14 = __toESM(require("path"));
|
|
57304
57304
|
var router15 = (0, import_express17.Router)();
|
|
57305
|
+
var defaultmonrepotime = {
|
|
57306
|
+
notes: "",
|
|
57307
|
+
crudtest: [
|
|
57308
|
+
{
|
|
57309
|
+
category: "Internal CRUD Test",
|
|
57310
|
+
devurl: "",
|
|
57311
|
+
produrl: "",
|
|
57312
|
+
items: [
|
|
57313
|
+
{
|
|
57314
|
+
label: "Ping the Tool Server",
|
|
57315
|
+
route: "/ping",
|
|
57316
|
+
methods: "GET",
|
|
57317
|
+
description: "Ping the tool server to check if it is running.",
|
|
57318
|
+
sampleInput: "{}",
|
|
57319
|
+
suggested: [],
|
|
57320
|
+
expectedOutcome: '# You should see the word "pong" as a message \n\n{\n "message": "pong"\n}'
|
|
57321
|
+
},
|
|
57322
|
+
{
|
|
57323
|
+
label: "Check Post",
|
|
57324
|
+
route: "/post",
|
|
57325
|
+
methods: "POST",
|
|
57326
|
+
description: "Send a POST request to check if it sending correctly",
|
|
57327
|
+
sampleInput: '{\n "data": "test",\n "message": "test"\n}',
|
|
57328
|
+
suggested: [
|
|
57329
|
+
{
|
|
57330
|
+
name: "Customer Data",
|
|
57331
|
+
urlparams: "",
|
|
57332
|
+
content: '{\n "name": "Demo Customer",\n "email": "demo@test.com",\n "phone": "123456789",\n "icon": "test icon"\n}'
|
|
57333
|
+
}
|
|
57334
|
+
],
|
|
57335
|
+
expectedOutcome: "# Note \nYou should see the mirror of your inputs"
|
|
57336
|
+
},
|
|
57337
|
+
{
|
|
57338
|
+
label: "Check Stream",
|
|
57339
|
+
route: "/stream",
|
|
57340
|
+
methods: "STREAM",
|
|
57341
|
+
description: "Send a stream request to check if it sending correctly",
|
|
57342
|
+
sampleInput: "{ }",
|
|
57343
|
+
suggested: [
|
|
57344
|
+
{
|
|
57345
|
+
name: "I Wandered Lonely as a Cloud",
|
|
57346
|
+
"urlparams": "poem=I Wandered Lonely as a Cloud",
|
|
57347
|
+
"content": "{}"
|
|
57348
|
+
},
|
|
57349
|
+
{
|
|
57350
|
+
name: "The Sun Has Long Been Set",
|
|
57351
|
+
urlparams: "poem=The Sun Has Long Been Set",
|
|
57352
|
+
content: "{}"
|
|
57353
|
+
}
|
|
57354
|
+
],
|
|
57355
|
+
expectedOutcome: "# Note \nYou should see the stream of words"
|
|
57356
|
+
}
|
|
57357
|
+
]
|
|
57358
|
+
}
|
|
57359
|
+
]
|
|
57360
|
+
};
|
|
57305
57361
|
router15.get("/", async (req, res) => {
|
|
57306
57362
|
try {
|
|
57307
57363
|
const sourcePath = import_path14.default.join(__dirname, "scaffold", "monorepotime.json");
|
|
@@ -57311,7 +57367,7 @@ router15.get("/", async (req, res) => {
|
|
|
57311
57367
|
return;
|
|
57312
57368
|
}
|
|
57313
57369
|
if (!import_fs_extra12.default.existsSync(sourcePath)) {
|
|
57314
|
-
await import_fs_extra12.default.writeJson(destPath,
|
|
57370
|
+
await import_fs_extra12.default.writeJson(destPath, defaultmonrepotime, { spaces: 4 });
|
|
57315
57371
|
res.json({ success: true, message: "Created monorepotime.json with default content (scaffold missing)" });
|
|
57316
57372
|
return;
|
|
57317
57373
|
}
|
|
@@ -57704,7 +57760,7 @@ const EDITOR_URL = 'http://localhost/phpmyadmin'; // Change this to your preferr
|
|
|
57704
57760
|
var PostgreSQL = {
|
|
57705
57761
|
name: "PostgreSQL",
|
|
57706
57762
|
description: "PostgreSQL Database (Docker Compose)",
|
|
57707
|
-
notes: "Requires Docker installed.",
|
|
57763
|
+
notes: "Requires Docker installed. Data stored in ./postgres-data folder.",
|
|
57708
57764
|
templating: [
|
|
57709
57765
|
{
|
|
57710
57766
|
action: "file",
|
|
@@ -57722,7 +57778,7 @@ services:
|
|
|
57722
57778
|
ports:
|
|
57723
57779
|
- "0:5432"
|
|
57724
57780
|
volumes:
|
|
57725
|
-
- postgres-data:/var/lib/postgresql/data
|
|
57781
|
+
- ./postgres-data:/var/lib/postgresql/data
|
|
57726
57782
|
healthcheck:
|
|
57727
57783
|
test: ["CMD-SHELL", "pg_isready -U user -d mydatabase"]
|
|
57728
57784
|
interval: 5s
|
|
@@ -57737,10 +57793,17 @@ services:
|
|
|
57737
57793
|
ports:
|
|
57738
57794
|
- "0:80"
|
|
57739
57795
|
depends_on:
|
|
57740
|
-
- postgres
|
|
57796
|
+
- postgres`
|
|
57797
|
+
},
|
|
57798
|
+
{
|
|
57799
|
+
action: "file",
|
|
57800
|
+
file: ".gitignore",
|
|
57801
|
+
filecontent: `# Database data folder
|
|
57802
|
+
postgres-data/
|
|
57741
57803
|
|
|
57742
|
-
|
|
57743
|
-
|
|
57804
|
+
# Runtime file
|
|
57805
|
+
.runtime.json
|
|
57806
|
+
`
|
|
57744
57807
|
},
|
|
57745
57808
|
{
|
|
57746
57809
|
action: "file",
|
|
@@ -57940,7 +58003,7 @@ var Supabase = {
|
|
|
57940
58003
|
var Redis = {
|
|
57941
58004
|
name: "Redis",
|
|
57942
58005
|
description: "Redis (Docker Compose)",
|
|
57943
|
-
notes: "Requires Docker installed.",
|
|
58006
|
+
notes: "Requires Docker installed. Data stored in ./redis-data folder.",
|
|
57944
58007
|
templating: [
|
|
57945
58008
|
{
|
|
57946
58009
|
action: "file",
|
|
@@ -57954,7 +58017,7 @@ services:
|
|
|
57954
58017
|
ports:
|
|
57955
58018
|
- "0:6379"
|
|
57956
58019
|
volumes:
|
|
57957
|
-
- redis-data:/data
|
|
58020
|
+
- ./redis-data:/data
|
|
57958
58021
|
command: >
|
|
57959
58022
|
redis-server
|
|
57960
58023
|
--appendonly yes
|
|
@@ -57964,10 +58027,17 @@ services:
|
|
|
57964
58027
|
test: ["CMD", "redis-cli", "ping"]
|
|
57965
58028
|
interval: 5s
|
|
57966
58029
|
timeout: 3s
|
|
57967
|
-
retries: 5
|
|
58030
|
+
retries: 5`
|
|
58031
|
+
},
|
|
58032
|
+
{
|
|
58033
|
+
action: "file",
|
|
58034
|
+
file: ".gitignore",
|
|
58035
|
+
filecontent: `# Database data folder
|
|
58036
|
+
redis-data/
|
|
57968
58037
|
|
|
57969
|
-
|
|
57970
|
-
|
|
58038
|
+
# Runtime file
|
|
58039
|
+
.runtime.json
|
|
58040
|
+
`
|
|
57971
58041
|
},
|
|
57972
58042
|
{
|
|
57973
58043
|
action: "file",
|
|
@@ -58100,7 +58170,7 @@ process.on('SIGTERM', cleanup);`
|
|
|
58100
58170
|
var MongoDB = {
|
|
58101
58171
|
name: "MongoDB",
|
|
58102
58172
|
description: "MongoDB (Docker Compose)",
|
|
58103
|
-
notes: "Requires Docker installed.",
|
|
58173
|
+
notes: "Requires Docker installed. Data stored in ./mongo-data folder.",
|
|
58104
58174
|
templating: [
|
|
58105
58175
|
{
|
|
58106
58176
|
action: "file",
|
|
@@ -58115,7 +58185,7 @@ var MongoDB = {
|
|
|
58115
58185
|
ports:
|
|
58116
58186
|
- "0:27017"
|
|
58117
58187
|
volumes:
|
|
58118
|
-
- mongo-data:/data/db
|
|
58188
|
+
- ./mongo-data:/data/db
|
|
58119
58189
|
command: ["mongod", "--quiet"]
|
|
58120
58190
|
logging:
|
|
58121
58191
|
driver: "none"
|
|
@@ -58123,10 +58193,17 @@ var MongoDB = {
|
|
|
58123
58193
|
test: echo "db.runCommand('ping').ok" | mongosh localhost:27017/test --quiet
|
|
58124
58194
|
interval: 10s
|
|
58125
58195
|
timeout: 10s
|
|
58126
|
-
retries: 5
|
|
58196
|
+
retries: 5`
|
|
58197
|
+
},
|
|
58198
|
+
{
|
|
58199
|
+
action: "file",
|
|
58200
|
+
file: ".gitignore",
|
|
58201
|
+
filecontent: `# Database data folder
|
|
58202
|
+
mongo-data/
|
|
58127
58203
|
|
|
58128
|
-
|
|
58129
|
-
|
|
58204
|
+
# Runtime file
|
|
58205
|
+
.runtime.json
|
|
58206
|
+
`
|
|
58130
58207
|
},
|
|
58131
58208
|
{
|
|
58132
58209
|
action: "file",
|
|
@@ -58263,7 +58340,7 @@ process.on('SIGTERM', cleanup);`
|
|
|
58263
58340
|
var Meilisearch = {
|
|
58264
58341
|
name: "Meilisearch",
|
|
58265
58342
|
description: "Meilisearch (Docker Compose)",
|
|
58266
|
-
notes: "Requires Docker installed.
|
|
58343
|
+
notes: "Requires Docker installed. Data stored in ./meili-data folder.",
|
|
58267
58344
|
templating: [
|
|
58268
58345
|
{
|
|
58269
58346
|
action: "file",
|
|
@@ -58278,15 +58355,22 @@ var Meilisearch = {
|
|
|
58278
58355
|
ports:
|
|
58279
58356
|
- "0:7700"
|
|
58280
58357
|
volumes:
|
|
58281
|
-
- meili-data:/meili_data
|
|
58358
|
+
- ./meili-data:/meili_data
|
|
58282
58359
|
healthcheck:
|
|
58283
58360
|
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
|
|
58284
58361
|
interval: 10s
|
|
58285
58362
|
timeout: 5s
|
|
58286
|
-
retries: 5
|
|
58363
|
+
retries: 5`
|
|
58364
|
+
},
|
|
58365
|
+
{
|
|
58366
|
+
action: "file",
|
|
58367
|
+
file: ".gitignore",
|
|
58368
|
+
filecontent: `# Search engine data folder
|
|
58369
|
+
meili-data/
|
|
58287
58370
|
|
|
58288
|
-
|
|
58289
|
-
|
|
58371
|
+
# Runtime file
|
|
58372
|
+
.runtime.json
|
|
58373
|
+
`
|
|
58290
58374
|
},
|
|
58291
58375
|
{
|
|
58292
58376
|
action: "file",
|
|
@@ -58425,7 +58509,7 @@ process.on('SIGTERM', cleanup);`
|
|
|
58425
58509
|
var MinIO = {
|
|
58426
58510
|
name: "MinIO",
|
|
58427
58511
|
description: "MinIO Object Storage (S3 Compatible)",
|
|
58428
|
-
notes: "Requires Docker installed.
|
|
58512
|
+
notes: "Requires Docker installed. Data stored in ./minio-data folder.",
|
|
58429
58513
|
templating: [
|
|
58430
58514
|
{
|
|
58431
58515
|
action: "file",
|
|
@@ -58442,15 +58526,22 @@ var MinIO = {
|
|
|
58442
58526
|
- "0:9000"
|
|
58443
58527
|
- "0:9001"
|
|
58444
58528
|
volumes:
|
|
58445
|
-
- minio-data:/data
|
|
58529
|
+
- ./minio-data:/data
|
|
58446
58530
|
healthcheck:
|
|
58447
58531
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
58448
58532
|
interval: 30s
|
|
58449
58533
|
timeout: 20s
|
|
58450
|
-
retries: 3
|
|
58534
|
+
retries: 3`
|
|
58535
|
+
},
|
|
58536
|
+
{
|
|
58537
|
+
action: "file",
|
|
58538
|
+
file: ".gitignore",
|
|
58539
|
+
filecontent: `# Object storage data folder
|
|
58540
|
+
minio-data/
|
|
58451
58541
|
|
|
58452
|
-
|
|
58453
|
-
|
|
58542
|
+
# Runtime file
|
|
58543
|
+
.runtime.json
|
|
58544
|
+
`
|
|
58454
58545
|
},
|
|
58455
58546
|
{
|
|
58456
58547
|
action: "file",
|
|
@@ -60370,46 +60461,173 @@ var templates3 = [
|
|
|
60370
60461
|
];
|
|
60371
60462
|
var projecttemplate_default = templates3;
|
|
60372
60463
|
|
|
60464
|
+
// ../../packages/template/services_list/n8n/dockerCompose.ts
|
|
60465
|
+
var dockerCompose = `services:
|
|
60466
|
+
n8n:
|
|
60467
|
+
image: n8nio/n8n:latest
|
|
60468
|
+
restart: unless-stopped
|
|
60469
|
+
environment:
|
|
60470
|
+
- N8N_BASIC_AUTH_ACTIVE=true
|
|
60471
|
+
- N8N_BASIC_AUTH_USER=admin
|
|
60472
|
+
- N8N_BASIC_AUTH_PASSWORD=admin
|
|
60473
|
+
- N8N_HOST=localhost
|
|
60474
|
+
- N8N_PORT=5678
|
|
60475
|
+
- N8N_PROTOCOL=http
|
|
60476
|
+
- WEBHOOK_URL=http://localhost:5678/
|
|
60477
|
+
ports:
|
|
60478
|
+
- "5678:5678"
|
|
60479
|
+
volumes:
|
|
60480
|
+
- ./n8n-data:/home/node/.n8n
|
|
60481
|
+
healthcheck:
|
|
60482
|
+
test: ["CMD-SHELL", "wget --spider -q http://localhost:5678/healthz || exit 1"]
|
|
60483
|
+
interval: 10s
|
|
60484
|
+
timeout: 5s
|
|
60485
|
+
retries: 5`;
|
|
60486
|
+
|
|
60487
|
+
// ../../packages/template/services_list/n8n/gitignore.ts
|
|
60488
|
+
var gitignoreContent = `# N8N data folder (contains credentials and workflows)
|
|
60489
|
+
n8n-data/
|
|
60490
|
+
|
|
60491
|
+
# Runtime file
|
|
60492
|
+
.runtime.json
|
|
60493
|
+
`;
|
|
60494
|
+
|
|
60495
|
+
// ../../packages/template/services_list/n8n/server.ts
|
|
60496
|
+
var serverJs = `const http = require('http');
|
|
60497
|
+
const { spawn, exec } = require('child_process');
|
|
60498
|
+
const fs = require('fs');
|
|
60499
|
+
const path = require('path');
|
|
60500
|
+
|
|
60501
|
+
const RUNTIME_FILE = path.join(__dirname, '.runtime.json');
|
|
60502
|
+
|
|
60503
|
+
console.log('Starting N8N...');
|
|
60504
|
+
|
|
60505
|
+
// Start Docker Compose
|
|
60506
|
+
const child = spawn('docker', ['compose', 'up'], { stdio: 'inherit' });
|
|
60507
|
+
|
|
60508
|
+
child.on('close', (code) => {
|
|
60509
|
+
process.exit(code || 0);
|
|
60510
|
+
});
|
|
60511
|
+
|
|
60512
|
+
// Setup Control Server
|
|
60513
|
+
const server = http.createServer((req, res) => {
|
|
60514
|
+
if (req.url === '/stop') {
|
|
60515
|
+
res.writeHead(200);
|
|
60516
|
+
res.end('Stopping...');
|
|
60517
|
+
cleanup();
|
|
60518
|
+
} else {
|
|
60519
|
+
res.writeHead(404);
|
|
60520
|
+
res.end();
|
|
60521
|
+
}
|
|
60522
|
+
});
|
|
60523
|
+
|
|
60524
|
+
server.listen(0, () => {
|
|
60525
|
+
const port = server.address().port;
|
|
60526
|
+
// We update runtime file later when we get the container ID
|
|
60527
|
+
});
|
|
60528
|
+
|
|
60529
|
+
// Check status loop
|
|
60530
|
+
const checkStatus = () => {
|
|
60531
|
+
exec('docker compose port n8n 5678', (err, stdout, stderr) => {
|
|
60532
|
+
if (err || stderr || !stdout) {
|
|
60533
|
+
setTimeout(checkStatus, 2000);
|
|
60534
|
+
return;
|
|
60535
|
+
}
|
|
60536
|
+
const n8nPort = stdout.trim().split(':')[1];
|
|
60537
|
+
if (!n8nPort) {
|
|
60538
|
+
setTimeout(checkStatus, 2000);
|
|
60539
|
+
return;
|
|
60540
|
+
}
|
|
60541
|
+
|
|
60542
|
+
// Verify N8N is actually responding to HTTP
|
|
60543
|
+
http.get(\`http://localhost:\${n8nPort}/healthz\`, (res) => {
|
|
60544
|
+
// Capture Container IDs
|
|
60545
|
+
exec('docker compose ps -q', (err2, stdout2) => {
|
|
60546
|
+
const containerIds = stdout2 ? stdout2.trim().split('\\n') : [];
|
|
60547
|
+
|
|
60548
|
+
try {
|
|
60549
|
+
fs.writeFileSync(RUNTIME_FILE, JSON.stringify({
|
|
60550
|
+
port: server.address().port,
|
|
60551
|
+
pid: process.pid,
|
|
60552
|
+
containerIds: containerIds
|
|
60553
|
+
}));
|
|
60554
|
+
} catch(e) {
|
|
60555
|
+
console.error('Failed to write runtime file:', e);
|
|
60556
|
+
}
|
|
60557
|
+
console.clear();
|
|
60558
|
+
});
|
|
60559
|
+
}).on('error', (e) => {
|
|
60560
|
+
// Connection failed (ECONNREFUSED usually), retry
|
|
60561
|
+
setTimeout(checkStatus, 2000);
|
|
60562
|
+
});
|
|
60563
|
+
});
|
|
60564
|
+
};
|
|
60565
|
+
|
|
60566
|
+
setTimeout(checkStatus, 3000);
|
|
60567
|
+
|
|
60568
|
+
const cleanup = () => {
|
|
60569
|
+
console.log('Stopping N8N...');
|
|
60570
|
+
try {
|
|
60571
|
+
const runtime = JSON.parse(fs.readFileSync(RUNTIME_FILE));
|
|
60572
|
+
if (runtime.containerIds) {
|
|
60573
|
+
console.log(\`Stopping \${runtime.containerIds.length} containers...\`);
|
|
60574
|
+
runtime.containerIds.forEach(id => {
|
|
60575
|
+
exec(\`docker stop \${id}\`, () => {
|
|
60576
|
+
exec(\`docker rm -f \${id}\`);
|
|
60577
|
+
});
|
|
60578
|
+
});
|
|
60579
|
+
}
|
|
60580
|
+
} catch(e) {}
|
|
60581
|
+
try { fs.unlinkSync(RUNTIME_FILE); } catch(e) {}
|
|
60582
|
+
|
|
60583
|
+
exec('docker compose stop', () => {
|
|
60584
|
+
process.exit(0);
|
|
60585
|
+
});
|
|
60586
|
+
};
|
|
60587
|
+
|
|
60588
|
+
process.on('SIGINT', cleanup);
|
|
60589
|
+
process.on('SIGTERM', cleanup);`;
|
|
60590
|
+
|
|
60373
60591
|
// ../../packages/template/services_list/n8n.ts
|
|
60374
60592
|
var N8NLocal = {
|
|
60375
|
-
name: "N8N Local",
|
|
60376
|
-
description: "N8N
|
|
60377
|
-
notes: "Requires
|
|
60593
|
+
name: "N8N Local Dockerized",
|
|
60594
|
+
description: "N8N Workflow Automation",
|
|
60595
|
+
notes: "Requires Docker installed. Data is stored in ./n8n-data folder.",
|
|
60378
60596
|
templating: [
|
|
60379
60597
|
{
|
|
60380
|
-
action: "
|
|
60381
|
-
|
|
60382
|
-
|
|
60598
|
+
action: "file",
|
|
60599
|
+
file: "docker-compose.yml",
|
|
60600
|
+
filecontent: dockerCompose
|
|
60383
60601
|
},
|
|
60384
60602
|
{
|
|
60385
|
-
action: "
|
|
60386
|
-
|
|
60387
|
-
|
|
60603
|
+
action: "file",
|
|
60604
|
+
file: ".gitignore",
|
|
60605
|
+
filecontent: gitignoreContent
|
|
60388
60606
|
},
|
|
60389
60607
|
{
|
|
60390
|
-
action: "
|
|
60391
|
-
|
|
60392
|
-
|
|
60608
|
+
action: "file",
|
|
60609
|
+
file: "index.js",
|
|
60610
|
+
filecontent: serverJs
|
|
60393
60611
|
},
|
|
60394
60612
|
{
|
|
60395
60613
|
action: "command",
|
|
60396
60614
|
cmd: "npm",
|
|
60397
|
-
args: ["pkg", "set", "scripts.
|
|
60615
|
+
args: ["pkg", "set", "scripts.start=node index.js"]
|
|
60398
60616
|
},
|
|
60399
60617
|
{
|
|
60400
60618
|
action: "command",
|
|
60401
60619
|
cmd: "npm",
|
|
60402
|
-
args: ["pkg", "set",
|
|
60620
|
+
args: ["pkg", "set", `scripts.stop=node -e 'const fs=require("fs"); try{const p=JSON.parse(fs.readFileSync(".runtime.json")).port; fetch("http://localhost:"+p+"/stop").catch(e=>{})}catch(e){}'`]
|
|
60403
60621
|
},
|
|
60404
60622
|
{
|
|
60405
60623
|
action: "command",
|
|
60406
60624
|
cmd: "npm",
|
|
60407
|
-
args: ["pkg", "set", "description=N8N (
|
|
60625
|
+
args: ["pkg", "set", "description=N8N Workflow Automation (Docker)"]
|
|
60408
60626
|
},
|
|
60409
60627
|
{
|
|
60410
60628
|
action: "command",
|
|
60411
60629
|
cmd: "npm",
|
|
60412
|
-
args: ["pkg", "set", "
|
|
60630
|
+
args: ["pkg", "set", "fontawesomeIcon=fas fa-project-diagram text-red-500"]
|
|
60413
60631
|
}
|
|
60414
60632
|
]
|
|
60415
60633
|
};
|
|
@@ -60593,7 +60811,7 @@ module.exports = {
|
|
|
60593
60811
|
};`;
|
|
60594
60812
|
|
|
60595
60813
|
// ../../packages/template/services_list/aws/dockerCompose.ts
|
|
60596
|
-
var
|
|
60814
|
+
var dockerCompose2 = `services:
|
|
60597
60815
|
localstack:
|
|
60598
60816
|
image: localstack/localstack
|
|
60599
60817
|
ports:
|
|
@@ -60605,7 +60823,7 @@ var dockerCompose = `services:
|
|
|
60605
60823
|
- DOCKER_HOST=unix:///var/run/docker.sock
|
|
60606
60824
|
- AWS_DEFAULT_REGION=us-east-1
|
|
60607
60825
|
volumes:
|
|
60608
|
-
- localstack-data:/var/lib/localstack
|
|
60826
|
+
- ./localstack-data:/var/lib/localstack
|
|
60609
60827
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
60610
60828
|
networks:
|
|
60611
60829
|
- cloud-net
|
|
@@ -60639,13 +60857,18 @@ var dockerCompose = `services:
|
|
|
60639
60857
|
networks:
|
|
60640
60858
|
- cloud-net
|
|
60641
60859
|
|
|
60642
|
-
volumes:
|
|
60643
|
-
localstack-data: {}
|
|
60644
|
-
|
|
60645
60860
|
networks:
|
|
60646
60861
|
cloud-net:
|
|
60647
60862
|
driver: bridge`;
|
|
60648
60863
|
|
|
60864
|
+
// ../../packages/template/services_list/aws/gitignore.ts
|
|
60865
|
+
var gitignoreContent2 = `# LocalStack data folder
|
|
60866
|
+
localstack-data/
|
|
60867
|
+
|
|
60868
|
+
# Runtime file
|
|
60869
|
+
.runtime.json
|
|
60870
|
+
`;
|
|
60871
|
+
|
|
60649
60872
|
// ../../packages/template/services_list/aws/indexHtml.ts
|
|
60650
60873
|
var indexHtml2 = `<!DOCTYPE html>
|
|
60651
60874
|
<html lang="en" class="dark">
|
|
@@ -60856,7 +61079,7 @@ dynamodb.createTable(params, function(err, data) {
|
|
|
60856
61079
|
</html>`;
|
|
60857
61080
|
|
|
60858
61081
|
// ../../packages/template/services_list/aws/server.ts
|
|
60859
|
-
var
|
|
61082
|
+
var serverJs2 = `const http = require('http');
|
|
60860
61083
|
const fs = require('fs');
|
|
60861
61084
|
const path = require('path');
|
|
60862
61085
|
const { spawn, exec } = require('child_process');
|
|
@@ -60985,12 +61208,17 @@ spawn('docker', ['compose', 'down'], { stdio: 'inherit' });`;
|
|
|
60985
61208
|
var AWSTemplate = {
|
|
60986
61209
|
name: "Localstack (Experimental)",
|
|
60987
61210
|
description: "AWS LocalStack Environment with Manager",
|
|
60988
|
-
notes: "Requires Docker, Node.js, and AWS CLI
|
|
61211
|
+
notes: "Requires Docker, Node.js, and AWS CLI. Data stored in ./localstack-data folder.",
|
|
60989
61212
|
templating: [
|
|
60990
61213
|
{
|
|
60991
61214
|
action: "file",
|
|
60992
61215
|
file: "docker-compose.yml",
|
|
60993
|
-
filecontent:
|
|
61216
|
+
filecontent: dockerCompose2
|
|
61217
|
+
},
|
|
61218
|
+
{
|
|
61219
|
+
action: "file",
|
|
61220
|
+
file: ".gitignore",
|
|
61221
|
+
filecontent: gitignoreContent2
|
|
60994
61222
|
},
|
|
60995
61223
|
{
|
|
60996
61224
|
action: "file",
|
|
@@ -61000,7 +61228,7 @@ var AWSTemplate = {
|
|
|
61000
61228
|
{
|
|
61001
61229
|
action: "file",
|
|
61002
61230
|
file: "server.js",
|
|
61003
|
-
filecontent:
|
|
61231
|
+
filecontent: serverJs2
|
|
61004
61232
|
},
|
|
61005
61233
|
{
|
|
61006
61234
|
action: "file",
|
|
@@ -61027,6 +61255,11 @@ var AWSTemplate = {
|
|
|
61027
61255
|
file: "examples/nodeserver/index.js",
|
|
61028
61256
|
filecontent: 'exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify("Hello from Lambda!") }; };'
|
|
61029
61257
|
},
|
|
61258
|
+
{
|
|
61259
|
+
action: "command",
|
|
61260
|
+
cmd: "npm",
|
|
61261
|
+
args: ["pkg", "set", "scripts.start=node server.js"]
|
|
61262
|
+
},
|
|
61030
61263
|
{
|
|
61031
61264
|
action: "command",
|
|
61032
61265
|
cmd: "npm",
|
|
@@ -61055,8 +61288,8 @@ var AWSTemplate = {
|
|
|
61055
61288
|
]
|
|
61056
61289
|
};
|
|
61057
61290
|
|
|
61058
|
-
// ../../packages/template/services_list/stripe.ts
|
|
61059
|
-
var
|
|
61291
|
+
// ../../packages/template/services_list/stripe/dockerCompose.ts
|
|
61292
|
+
var dockerCompose3 = `services:
|
|
61060
61293
|
stripe-mock:
|
|
61061
61294
|
image: stripe/stripe-mock:latest
|
|
61062
61295
|
container_name: stripe-mock
|
|
@@ -61069,7 +61302,14 @@ var dockerCompose2 = `services:
|
|
|
61069
61302
|
timeout: 5s
|
|
61070
61303
|
retries: 5
|
|
61071
61304
|
`;
|
|
61072
|
-
|
|
61305
|
+
|
|
61306
|
+
// ../../packages/template/services_list/stripe/gitignore.ts
|
|
61307
|
+
var gitignoreContent3 = `# Runtime file
|
|
61308
|
+
.runtime.json
|
|
61309
|
+
`;
|
|
61310
|
+
|
|
61311
|
+
// ../../packages/template/services_list/stripe/server.ts
|
|
61312
|
+
var serverJs3 = `const http = require('http');
|
|
61073
61313
|
const fs = require('fs');
|
|
61074
61314
|
const path = require('path');
|
|
61075
61315
|
const { spawn, exec } = require('child_process');
|
|
@@ -61149,9 +61389,9 @@ const cleanup = () => {
|
|
|
61149
61389
|
try {
|
|
61150
61390
|
const runtime = JSON.parse(fs.readFileSync(RUNTIME_FILE));
|
|
61151
61391
|
if (runtime.containerIds) {
|
|
61152
|
-
console.log(
|
|
61392
|
+
console.log(\`Stopping \${runtime.containerIds.length} containers...\`);
|
|
61153
61393
|
runtime.containerIds.forEach(id => {
|
|
61154
|
-
exec(
|
|
61394
|
+
exec(\`docker stop \${id}\`);
|
|
61155
61395
|
});
|
|
61156
61396
|
}
|
|
61157
61397
|
} catch(e) {}
|
|
@@ -61164,6 +61404,8 @@ const cleanup = () => {
|
|
|
61164
61404
|
// Handle cleanup
|
|
61165
61405
|
process.on('SIGINT', cleanup);
|
|
61166
61406
|
process.on('SIGTERM', cleanup);`;
|
|
61407
|
+
|
|
61408
|
+
// ../../packages/template/services_list/stripe/test.ts
|
|
61167
61409
|
var testJs = `const Stripe = require('stripe');
|
|
61168
61410
|
|
|
61169
61411
|
// Initialize with a fake key and point to the mock server
|
|
@@ -61225,6 +61467,8 @@ const stripe = new Stripe('sk_test_mock_123', {
|
|
|
61225
61467
|
}
|
|
61226
61468
|
})();
|
|
61227
61469
|
`;
|
|
61470
|
+
|
|
61471
|
+
// ../../packages/template/services_list/stripe.ts
|
|
61228
61472
|
var StripeTemplate = {
|
|
61229
61473
|
name: "Stripe Mock (Experimental)",
|
|
61230
61474
|
description: "Stripe API Mock Server",
|
|
@@ -61233,12 +61477,17 @@ var StripeTemplate = {
|
|
|
61233
61477
|
{
|
|
61234
61478
|
action: "file",
|
|
61235
61479
|
file: "docker-compose.yml",
|
|
61236
|
-
filecontent:
|
|
61480
|
+
filecontent: dockerCompose3
|
|
61481
|
+
},
|
|
61482
|
+
{
|
|
61483
|
+
action: "file",
|
|
61484
|
+
file: ".gitignore",
|
|
61485
|
+
filecontent: gitignoreContent3
|
|
61237
61486
|
},
|
|
61238
61487
|
{
|
|
61239
61488
|
action: "file",
|
|
61240
61489
|
file: "server.js",
|
|
61241
|
-
filecontent:
|
|
61490
|
+
filecontent: serverJs3
|
|
61242
61491
|
},
|
|
61243
61492
|
{
|
|
61244
61493
|
action: "file",
|
package/package.json
CHANGED
|
@@ -98,7 +98,7 @@ WARNING: This link could potentially be dangerous`)){const d=window.open();if(d)
|
|
|
98
98
|
`,children:W.name}),B.jsx("span",{className:`
|
|
99
99
|
text-[12px] font-mono truncate block w-full transition-opacity duration-300
|
|
100
100
|
${W.disabled?"text-gray-600":W.bg?"text-white/70":"text-gray-500 group-hover:text-gray-400"}
|
|
101
|
-
`,style:{lineHeight:1},children:W.description})]})]})]},W.name)}function t0({onClose:W}){return B.jsxs(er,{width:"900px",children:[B.jsx(Jn,{title:"CI/CD Tutorial with Vercel",description:"Mastering Continuous Integration & Deployment",icon:"fas fa-infinity",close:W}),B.jsxs("div",{className:"flex flex-col h-[70vh] overflow-hidden text-sm",children:[B.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-12 text-gray-300 custom-scrollbar",children:[B.jsxs("section",{id:"intro",className:"space-y-4",children:[B.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[B.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/20",children:B.jsx("i",{className:"fas fa-infinity text-2xl text-white"})}),B.jsxs("div",{children:[B.jsx("h2",{className:"text-2xl font-bold text-white",children:"What is CI/CD?"}),B.jsx("p",{className:"text-blue-400 text-sm",children:"Continuous Integration & Continuous Delivery"})]})]}),B.jsx("div",{className:"bg-white/5 p-6 rounded-xl border border-white/10",children:B.jsxs("p",{className:"leading-relaxed",children:[B.jsx("strong",{className:"text-white",children:"CI (Continuous Integration)"})," is the practice of automating the integration of code changes from multiple contributors into a single software project.",B.jsx("br",{}),B.jsx("br",{}),B.jsx("strong",{className:"text-white",children:"CD (Continuous Delivery/Deployment)"})," ensures that your code is always in a deployable state and automatically releases it to production when ready."]})})]}),B.jsxs("section",{id:"why",className:"space-y-6",children:[B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-lightbulb text-yellow-500"}),"Why use CI/CD?"]}),B.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[{title:"Speed",desc:"Ship code faster with automated testing and building.",icon:"fa-rocket",color:"text-green-400"},{title:"Reliability",desc:"Catch bugs early before they reach production.",icon:"fa-shield-alt",color:"text-blue-400"},{title:"Efficiency",desc:"Stop wasting time on manual deployments.",icon:"fa-clock",color:"text-orange-400"},{title:"Consistency",desc:"Ensure every environment matches production.",icon:"fa-sync",color:"text-purple-400"}].map(G=>B.jsxs("div",{className:"p-4 rounded-xl bg-white/5 border border-white/10 hover:border-white/20 transition-colors",children:[B.jsx("i",{className:`fas ${G.icon} ${G.color} text-xl mb-3`}),B.jsx("h3",{className:"text-white font-bold mb-1",children:G.title}),B.jsx("p",{className:"text-sm text-gray-400",children:G.desc})]},G.title))})]}),B.jsxs("section",{id:"turbo-vercel",className:"space-y-6",children:[B.jsx("div",{className:"flex items-center justify-between border-b border-white/10 pb-4",children:B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-layer-group text-pink-500"}),"Turborepo + Vercel"]})}),B.jsxs("div",{className:"flex items-center gap-8 justify-center py-8",children:[B.jsxs("div",{className:"text-center",children:[B.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-[#1e1e1e] flex items-center justify-center border border-white/20 mb-3",children:B.jsx("i",{className:"fas fa-cube text-3xl text-transparent bg-clip-text bg-gradient-to-r from-red-500 to-orange-500"})}),B.jsx("span",{className:"font-bold text-white",children:"Turborepo"})]}),B.jsxs("div",{className:"flex flex-col items-center gap-1",children:[B.jsx("span",{className:"text-xs text-green-400 font-bold",children:"CACHE HIT!"}),B.jsx("div",{className:"h-[2px] w-24 bg-gradient-to-r from-red-500 to-white"}),B.jsx("i",{className:"fas fa-arrow-right text-white"})]}),B.jsxs("div",{className:"text-center",children:[B.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-black flex items-center justify-center border border-white/20 mb-3",children:B.jsx("i",{className:"fas fa-triangle text-3xl text-white"})}),B.jsx("span",{className:"font-bold text-white",children:"Vercel"})]})]}),B.jsxs("p",{className:"bg-blue-500/10 border-l-4 border-blue-500 p-4 rounded text-sm",children:["Combining ",B.jsx("strong",{children:"Turborepo's"})," intelligent caching with ",B.jsx("strong",{children:"Vercel's"})," global edge network gives you the fastest build times and deployments possible. Vercel automatically understands your Turborepo structure."]})]}),B.jsxs("section",{id:"guide",className:"space-y-8",children:[B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-tasks text-green-500"}),"Step-by-Step Setup"]}),B.jsx("div",{className:"space-y-6",children:[{step:1,title:"Login with Vercel",desc:"Ensure you have a Vercel account and are logged in via the CLI or Dashboard to authorize deployments.",icon:"fa-sign-in-alt"},{step:2,title:"Connect to GitHub",desc:"Link your Monorepo to a GitHub repository. Vercel uses this to trigger automatic deployments on push.",icon:"fa-code-branch"},{step:3,title:"Add Projects in Vercel",desc:"In the Vercel Dashboard, import your repository. Vercel detects Turborepo and asks which workspace (app) you want to deploy. Add each app (e.g., 'web', 'docs') as a separate Vercel project linked to the same repo.",icon:"fa-plus-circle"},{step:4,title:"Deployment",desc:"Push to 'main' to deploy. Vercel will build only what has changed.",icon:"fa-cloud-upload-alt"}].map(G=>B.jsxs("div",{className:"flex gap-4",children:[B.jsx("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 flex items-center justify-center font-bold text-white border border-white/20",children:G.step}),B.jsxs("div",{className:"space-y-2",children:[B.jsxs("h3",{className:"text-white font-bold flex items-center gap-2",children:[G.title,B.jsx("i",{className:`fas ${G.icon} text-gray-500 text-sm`})]}),B.jsx("p",{className:"text-sm text-gray-400",children:G.desc})]})]},G.step))}),B.jsxs("div",{className:"mt-8 p-5 bg-gradient-to-r from-purple-900/30 to-blue-900/30 rounded-xl border border-purple-500/30",children:[B.jsxs("h3",{className:"text-lg font-bold text-white mb-2 flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-magic text-purple-400"}),'Pro Tip: The "Turbo Build" Button']}),B.jsxs("p",{className:"text-sm text-gray-300",children:["When you use the ",B.jsx("span",{className:"px-2 py-0.5 rounded bg-white/10 text-white font-mono text-xs",children:"turbo build"})," command or button in this dashboard, it can be configured to upload your ",B.jsx("strong",{children:"pre-compiled dist/build artifacts"})," directly to Vercel's cache."]}),B.jsxs("div",{className:"mt-3 flex items-start gap-3 text-xs text-purple-200 bg-purple-500/10 p-3 rounded-lg",children:[B.jsx("i",{className:"fas fa-info-circle mt-0.5"}),B.jsxs("span",{children:["This means Vercel ",B.jsx("strong",{children:"doesn't have to rebuild"})," everything from scratch. It pulls the artifacts you just built locally (or in CI), saving massive amounts of build minutes and time!"]})]})]})]})]}),B.jsxs("div",{className:"p-4 border-t border-white/10 bg-black/40 flex justify-between items-center text-xs text-gray-500",children:[B.jsx("span",{children:"Learn more at:"}),B.jsxs("div",{className:"flex gap-4",children:[B.jsxs("a",{href:"https://vercel.com/docs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:text-white transition-colors",children:[B.jsx("i",{className:"fas fa-triangle text-white"})," Vercel Docs"]}),B.jsxs("a",{href:"https://turbo.build/repo/docs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:text-white transition-colors",children:[B.jsx("i",{className:"fas fa-cube text-red-500"})," Turborepo Docs"]})]})]})]})]})}const i0=[{label:"Install",cmd:"npm install",icon:"fa-download",color:"blueIndigo"},{label:"Build",cmd:"turbo build",icon:"fa-hammer",color:"emeraldTeal"},{label:"Lint",cmd:"turbo lint",icon:"fa-check-double",color:"yellowOrange"},{label:"Test",cmd:"turbo test",icon:"fa-vial",color:"pinkRose"},{label:"Clean",cmd:"turbo clean",icon:"fa-broom",color:"gray"},{label:"Summary",cmd:"turbo run build --dry-run",icon:"fa-list-alt"},{label:"Prune",cmd:"turbo prune",icon:"fa-scissors",color:"red"},{label:"Docker",cmd:"turbo prune --docker",icon:"fa-docker",color:"skyBlue"},{label:"Remote",cmd:"npx turbo link",icon:"fa-cloud",color:"cyanBlue"},{label:"Cache",cmd:"rm -rf node_modules/.cache/turbo .turbo",icon:"fa-trash-alt",color:"darkRed"}];function n0(W){const G=_e.useRef(null),$=Et.use.rootDir(),[D,V]=_e.useState(!1),[R,x]=_e.useState(!1);_e.useEffect(()=>()=>{G.current&&G.current.disconnect()},[]);const p=Xn.use.showModal(),c=Fe.use.workspace();function h(r){G.current&&(G.current.clear(),G.current.disconnect(),G.current.connect($,r),G.current.fit(),G.current.onClose(()=>{V(!1)}),G.current.onCrash(()=>{V(!1)}),V(!0))}function a(r){if(r==="turbo prune"||r==="turbo prune --docker"){p("selection","Select Workspace","Choose a workspace to prune / dockerize",null,o=>{if(o){const s=r.includes("--docker"),l=`turbo prune ${o.info.name}${s?" --docker":""}`;h(l)}},c);return}h(r)}function i(){G.current&&(G.current.disconnect(),V(!1))}return B.jsxs("div",{className:`h-[92%] w-full p-4 gap-4 ${W.isVisible?"flex":"hidden"}`,children:[B.jsxs("div",{className:"w-[500px] flex-none h-full flex flex-col align-center",children:[B.jsxs("button",{onClick:()=>x(!0),className:"mb-6 text-sm w-full text-blue-200 flex items-center justify-center gap-2 transition-all group",children:[B.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-500/20 flex items-center justify-center group-hover:scale-110 transition-transform",children:B.jsx("i",{className:"fas fa-book-reader text-blue-400 text-sm"})}),"CI/CD Tutorial with Vercel"]}),B.jsx("div",{className:"grid grid-cols-2 gap-3",children:i0.map(r=>B.jsx(Jv,{onClick:()=>a(r.cmd),name:r.label,description:r.cmd,color:r.color,icon:r.icon,disabled:D},r.label))})]}),B.jsx("div",{className:"relative flex-1 h-full min-h-0 min-w-0 flex flex-col p-[1px] rounded overflow-hidden shadow-[0_0_100px_-20px_rgba(168,85,247,0.3)]",children:B.jsxs("div",{className:"relative flex-1 h-full flex flex-col rounded-xl overflow-hidden",children:[B.jsxs("header",{className:"px-4 py-2 border-b border-white/10 flex justify-between items-center bg-black/20 flex-none backdrop-blur-sm",children:[B.jsxs("div",{className:"text-md font-bold text-white flex items-center gap-4",children:[B.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-red-500 to-orange-600 flex items-center justify-center shadow-lg shadow-orange-500/20",children:B.jsx("i",{className:"fas fa-rocket text-white text-sm"})}),B.jsxs("div",{className:"flex flex-col",children:[B.jsx("span",{className:"text-xl bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-400 font-bold",children:"Non Interactive Terminal"}),B.jsxs("span",{className:"text-gray-400 font-normal text-sm truncate w-full text-xs",children:["Execute",B.jsx("a",{href:"https://turborepo.org/",target:"_blank",rel:"noopener noreferrer",className:"p-1 text-blue-500 hover:underline",children:"Turborepo.js"}),"commands"]})]})]}),B.jsxs("button",{onClick:i,className:`text-gray-400 transition-colors flex items-center gap-2 ${D?"text-red-500":"text-gray-400"}`,children:[B.jsx("li",{className:"fas fa-stop text-lg"}),"STOP"]})]}),B.jsx("div",{className:"w-full flex-1 min-h-0 p-1",children:B.jsx(co,{ref:G,isInteractive:!1,className:"h-full w-full",socketUrl:Ke.serverPath,onExit:()=>{V(!1)},onCrash:()=>{V(!1)}})})]})}),R&&B.jsx(t0,{onClose:()=>x(!1)})]})}const r0=qn()((W,G)=>({noData:!0,crudData:[],currentCategoryIndex:-1,currentCrudIndex:-1,useDevURL:!0,devURL:"",prodURL:"",params:"",method:"GET",requestStartTime:0,isFetching:!1,executionTime:0,header:`{
|
|
101
|
+
`,style:{lineHeight:1},children:W.description})]})]})]},W.name)}function t0({onClose:W}){return B.jsxs(er,{width:"900px",children:[B.jsx(Jn,{title:"CI/CD Tutorial with Vercel",description:"Mastering Continuous Integration & Deployment",icon:"fas fa-infinity",close:W}),B.jsxs("div",{className:"flex flex-col h-[70vh] overflow-hidden text-sm",children:[B.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-12 text-gray-300 custom-scrollbar",children:[B.jsxs("section",{id:"intro",className:"space-y-4",children:[B.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[B.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/20",children:B.jsx("i",{className:"fas fa-infinity text-2xl text-white"})}),B.jsxs("div",{children:[B.jsx("h2",{className:"text-2xl font-bold text-white",children:"What is CI/CD?"}),B.jsx("p",{className:"text-blue-400 text-sm",children:"Continuous Integration & Continuous Delivery"})]})]}),B.jsx("div",{className:"bg-white/5 p-6 rounded-xl border border-white/10",children:B.jsxs("p",{className:"leading-relaxed",children:[B.jsx("strong",{className:"text-white",children:"CI (Continuous Integration)"})," is the practice of automating the integration of code changes from multiple contributors into a single software project.",B.jsx("br",{}),B.jsx("br",{}),B.jsx("strong",{className:"text-white",children:"CD (Continuous Delivery/Deployment)"})," ensures that your code is always in a deployable state and automatically releases it to production when ready."]})})]}),B.jsxs("section",{id:"why",className:"space-y-6",children:[B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-lightbulb text-yellow-500"}),"Why use CI/CD?"]}),B.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[{title:"Speed",desc:"Ship code faster with automated testing and building.",icon:"fa-rocket",color:"text-green-400"},{title:"Reliability",desc:"Catch bugs early before they reach production.",icon:"fa-shield-alt",color:"text-blue-400"},{title:"Efficiency",desc:"Stop wasting time on manual deployments.",icon:"fa-clock",color:"text-orange-400"},{title:"Consistency",desc:"Ensure every environment matches production.",icon:"fa-sync",color:"text-purple-400"}].map(G=>B.jsxs("div",{className:"p-4 rounded-xl bg-white/5 border border-white/10 hover:border-white/20 transition-colors",children:[B.jsx("i",{className:`fas ${G.icon} ${G.color} text-xl mb-3`}),B.jsx("h3",{className:"text-white font-bold mb-1",children:G.title}),B.jsx("p",{className:"text-sm text-gray-400",children:G.desc})]},G.title))})]}),B.jsxs("section",{id:"turbo-vercel",className:"space-y-6",children:[B.jsx("div",{className:"flex items-center justify-between border-b border-white/10 pb-4",children:B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-layer-group text-pink-500"}),"Turborepo + Vercel"]})}),B.jsxs("div",{className:"flex items-center gap-8 justify-center py-8",children:[B.jsxs("div",{className:"text-center",children:[B.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-[#1e1e1e] flex items-center justify-center border border-white/20 mb-3",children:B.jsx("i",{className:"fas fa-cube text-3xl text-transparent bg-clip-text bg-gradient-to-r from-red-500 to-orange-500"})}),B.jsx("span",{className:"font-bold text-white",children:"Turborepo"})]}),B.jsxs("div",{className:"flex flex-col items-center gap-1",children:[B.jsx("span",{className:"text-xs text-green-400 font-bold",children:"CACHE HIT!"}),B.jsx("div",{className:"h-[2px] w-24 bg-gradient-to-r from-red-500 to-white"}),B.jsx("i",{className:"fas fa-arrow-right text-white"})]}),B.jsxs("div",{className:"text-center",children:[B.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-black flex items-center justify-center border border-white/20 mb-3",children:B.jsx("i",{className:"fas fa-triangle text-3xl text-white"})}),B.jsx("span",{className:"font-bold text-white",children:"Vercel"})]})]}),B.jsxs("p",{className:"bg-blue-500/10 border-l-4 border-blue-500 p-4 rounded text-sm",children:["Combining ",B.jsx("strong",{children:"Turborepo's"})," intelligent caching with ",B.jsx("strong",{children:"Vercel's"})," global edge network gives you the fastest build times and deployments possible. Vercel automatically understands your Turborepo structure."]})]}),B.jsxs("section",{id:"guide",className:"space-y-8",children:[B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-tasks text-green-500"}),"Step-by-Step Setup"]}),B.jsx("div",{className:"space-y-6",children:[{step:1,title:"Login with Vercel",desc:"Ensure you have a Vercel account and are logged in via the CLI or Dashboard to authorize deployments.",icon:"fa-sign-in-alt"},{step:2,title:"Connect to GitHub",desc:"Link your Monorepo to a GitHub repository. Vercel uses this to trigger automatic deployments on push.",icon:"fa-code-branch"},{step:3,title:"Add Projects in Vercel",desc:"In the Vercel Dashboard, import your repository. Vercel detects Turborepo and asks which workspace (app) you want to deploy. Add each app (e.g., 'web', 'docs') as a separate Vercel project linked to the same repo.",icon:"fa-plus-circle"},{step:4,title:"Deployment",desc:"Push to 'main' to deploy. Vercel will build only what has changed.",icon:"fa-cloud-upload-alt"}].map(G=>B.jsxs("div",{className:"flex gap-4",children:[B.jsx("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 flex items-center justify-center font-bold text-white border border-white/20",children:G.step}),B.jsxs("div",{className:"space-y-2",children:[B.jsxs("h3",{className:"text-white font-bold flex items-center gap-2",children:[G.title,B.jsx("i",{className:`fas ${G.icon} text-gray-500 text-sm`})]}),B.jsx("p",{className:"text-sm text-gray-400",children:G.desc})]})]},G.step))}),B.jsxs("div",{className:"mt-8 p-5 bg-gradient-to-r from-purple-900/30 to-blue-900/30 rounded-xl border border-purple-500/30",children:[B.jsxs("h3",{className:"text-lg font-bold text-white mb-2 flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-magic text-purple-400"}),'Pro Tip: The "Turbo Build" Button']}),B.jsxs("p",{className:"text-sm text-gray-300",children:["When you use the ",B.jsx("span",{className:"px-2 py-0.5 rounded bg-white/10 text-white font-mono text-xs",children:"turbo build"})," command or button in this dashboard, it can be configured to upload your ",B.jsx("strong",{children:"pre-compiled dist/build artifacts"})," directly to Vercel's cache."]}),B.jsxs("div",{className:"mt-3 flex items-start gap-3 text-xs text-purple-200 bg-purple-500/10 p-3 rounded-lg",children:[B.jsx("i",{className:"fas fa-info-circle mt-0.5"}),B.jsxs("span",{children:["This means Vercel ",B.jsx("strong",{children:"doesn't have to rebuild"})," everything from scratch. It pulls the artifacts you just built locally (or in CI), saving massive amounts of build minutes and time!"]})]})]})]})]}),B.jsxs("div",{className:"p-4 border-t border-white/10 bg-black/40 flex justify-between items-center text-xs text-gray-500",children:[B.jsx("span",{children:"Learn more at:"}),B.jsxs("div",{className:"flex gap-4",children:[B.jsxs("a",{href:"https://vercel.com/docs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:text-white transition-colors",children:[B.jsx("i",{className:"fas fa-triangle text-white"})," Vercel Docs"]}),B.jsxs("a",{href:"https://turbo.build/repo/docs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:text-white transition-colors",children:[B.jsx("i",{className:"fas fa-cube text-red-500"})," Turborepo Docs"]})]})]})]})]})}const i0=[{label:"Install",cmd:"npm install",icon:"fa-download",color:"blueIndigo"},{label:"Build",cmd:"turbo build",icon:"fa-hammer",color:"emeraldTeal"},{label:"Lint",cmd:"turbo lint",icon:"fa-check-double",color:"yellowOrange"},{label:"Test",cmd:"turbo test",icon:"fa-vial",color:"pinkRose"},{label:"Clean",cmd:"turbo clean",icon:"fa-broom",color:"gray"},{label:"Summary",cmd:"turbo run build --dry-run",icon:"fa-list-alt"},{label:"Prune",cmd:"turbo prune",icon:"fa-scissors",color:"red"},{label:"Docker",cmd:"turbo prune --docker",icon:"fa-docker",color:"skyBlue"},{label:"Remote",cmd:"npx turbo link",icon:"fa-cloud",color:"cyanBlue"},{label:"Cache",cmd:"rm -rf node_modules/.cache/turbo .turbo",icon:"fa-trash-alt",color:"darkRed"}];function n0(W){const G=_e.useRef(null),$=Et.use.rootDir(),[D,V]=_e.useState(!1),[R,x]=_e.useState(!1);_e.useEffect(()=>()=>{G.current&&G.current.disconnect()},[]);const p=Xn.use.showModal(),c=Fe.use.workspace();function h(r){G.current&&(G.current.clear(),G.current.disconnect(),G.current.onClose(()=>{V(!1)}),G.current.onCrash(()=>{V(!1)}),V(!0),G.current.connect($,r),G.current.fit())}function a(r){if(r==="turbo prune"||r==="turbo prune --docker"){p("selection","Select Workspace","Choose a workspace to prune / dockerize",null,o=>{if(o){const s=r.includes("--docker"),l=`turbo prune ${o.info.name}${s?" --docker":""}`;h(l)}},c);return}h(r)}function i(){G.current&&(G.current.disconnect(),V(!1))}return B.jsxs("div",{className:`h-[92%] w-full p-4 gap-4 ${W.isVisible?"flex":"hidden"}`,children:[B.jsxs("div",{className:"w-[500px] flex-none h-full flex flex-col align-center",children:[B.jsxs("button",{onClick:()=>x(!0),className:"mb-6 text-sm w-full text-blue-200 flex items-center justify-center gap-2 transition-all group",children:[B.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-500/20 flex items-center justify-center group-hover:scale-110 transition-transform",children:B.jsx("i",{className:"fas fa-book-reader text-blue-400 text-sm"})}),"CI/CD Tutorial with Vercel"]}),B.jsx("div",{className:"grid grid-cols-2 gap-3",children:i0.map(r=>B.jsx(Jv,{onClick:()=>a(r.cmd),name:r.label,description:r.cmd,color:r.color,icon:r.icon,disabled:D},r.label))})]}),B.jsx("div",{className:"relative flex-1 h-full min-h-0 min-w-0 flex flex-col p-[1px] rounded overflow-hidden shadow-[0_0_100px_-20px_rgba(168,85,247,0.3)]",children:B.jsxs("div",{className:"relative flex-1 h-full flex flex-col rounded-xl overflow-hidden",children:[B.jsxs("header",{className:"px-4 py-2 border-b border-white/10 flex justify-between items-center bg-black/20 flex-none backdrop-blur-sm",children:[B.jsxs("div",{className:"text-md font-bold text-white flex items-center gap-4",children:[B.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-red-500 to-orange-600 flex items-center justify-center shadow-lg shadow-orange-500/20",children:B.jsx("i",{className:"fas fa-rocket text-white text-sm"})}),B.jsxs("div",{className:"flex flex-col",children:[B.jsx("span",{className:"text-xl bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-400 font-bold",children:"Non Interactive Terminal"}),B.jsxs("span",{className:"text-gray-400 font-normal text-sm truncate w-full text-xs",children:["Execute",B.jsx("a",{href:"https://turborepo.org/",target:"_blank",rel:"noopener noreferrer",className:"p-1 text-blue-500 hover:underline",children:"Turborepo.js"}),"commands"]})]})]}),B.jsxs("button",{onClick:i,className:`text-gray-400 transition-colors flex items-center gap-2 ${D?"text-red-500":"text-gray-400"}`,children:[B.jsx("li",{className:"fas fa-stop text-lg"}),"STOP"]})]}),B.jsx("div",{className:"w-full flex-1 min-h-0 p-1",children:B.jsx(co,{ref:G,isInteractive:!1,className:"h-full w-full",socketUrl:Ke.serverPath,onExit:()=>{V(!1)},onCrash:()=>{V(!1)}})})]})}),R&&B.jsx(t0,{onClose:()=>x(!1)})]})}const r0=qn()((W,G)=>({noData:!0,crudData:[],currentCategoryIndex:-1,currentCrudIndex:-1,useDevURL:!0,devURL:"",prodURL:"",params:"",method:"GET",requestStartTime:0,isFetching:!1,executionTime:0,header:`{
|
|
102
102
|
"Content-Type": "application/json",
|
|
103
103
|
"Accept": "application/json",
|
|
104
104
|
"Authorization": "Bearer token",
|
package/public/index.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<meta property="twitter:image" content="/og-image.png" />
|
|
22
22
|
|
|
23
23
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
24
|
-
<script type="module" crossorigin src="/assets/index-
|
|
24
|
+
<script type="module" crossorigin src="/assets/index-BLMIZzXp.js"></script>
|
|
25
25
|
<link rel="stylesheet" crossorigin href="/assets/index-BQZjOvwC.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body class="bg-gray-900 text-gray-100 font-sans overflow-hidden">
|