|
26 | 26 | "required": ["id", "username", "name", "tokenHash", "createdAt"], |
27 | 27 | "additionalProperties": false |
28 | 28 | }, |
29 | | - "Dependency": { |
30 | | - "type": "object", |
31 | | - "properties": { |
32 | | - "id": { |
33 | | - "type": "string", |
34 | | - "description": "UUID primary key" |
35 | | - }, |
36 | | - "stackName": { |
37 | | - "type": "string", |
38 | | - "description": "FK to {@link StackDefinition.name }" |
39 | | - }, |
40 | | - "name": { |
41 | | - "type": "string", |
42 | | - "description": "Human-readable dependency name (e.g. \"Node.js\")" |
43 | | - }, |
44 | | - "checkCommand": { |
45 | | - "type": "string", |
46 | | - "description": "Shell command to check if the dependency is satisfied (e.g. \"node --version\")" |
47 | | - }, |
48 | | - "installationHelp": { |
49 | | - "type": "string", |
50 | | - "description": "Help text shown when the dependency check fails" |
51 | | - }, |
52 | | - "createdAt": { |
53 | | - "type": "string" |
54 | | - }, |
55 | | - "updatedAt": { |
56 | | - "type": "string" |
57 | | - } |
58 | | - }, |
59 | | - "required": ["id", "stackName", "name", "checkCommand", "installationHelp", "createdAt", "updatedAt"], |
60 | | - "additionalProperties": false, |
61 | | - "description": "Shareable dependency definition. Describes an external prerequisite (e.g. Node.js, Docker) that services may require. Included in stack exports and shared between installations." |
62 | | - }, |
63 | 29 | "GitHubRepository": { |
64 | 30 | "type": "object", |
65 | 31 | "properties": { |
|
185 | 151 | "type": "string", |
186 | 152 | "description": "Optional FK to {@link GitHubRepository.id }" |
187 | 153 | }, |
188 | | - "dependencyIds": { |
| 154 | + "prerequisiteIds": { |
189 | 155 | "type": "array", |
190 | 156 | "items": { |
191 | 157 | "type": "string" |
192 | 158 | }, |
193 | | - "description": "IDs of {@link Dependency } entities required by this service" |
| 159 | + "description": "IDs of {@link Prerequisite } entities required by this service" |
194 | 160 | }, |
195 | 161 | "prerequisiteServiceIds": { |
196 | 162 | "type": "array", |
|
223 | 189 | "stackName", |
224 | 190 | "displayName", |
225 | 191 | "description", |
226 | | - "dependencyIds", |
| 192 | + "prerequisiteIds", |
227 | 193 | "prerequisiteServiceIds", |
228 | 194 | "runCommand", |
229 | 195 | "createdAt", |
|
433 | 399 | "required": ["id", "serviceId", "processUid", "stream", "line", "createdAt"], |
434 | 400 | "additionalProperties": false |
435 | 401 | }, |
| 402 | + "PrerequisiteType": { |
| 403 | + "type": "string", |
| 404 | + "enum": [ |
| 405 | + "node", |
| 406 | + "yarn", |
| 407 | + "dotnet-sdk", |
| 408 | + "dotnet-runtime", |
| 409 | + "nuget-feed", |
| 410 | + "git", |
| 411 | + "github-cli", |
| 412 | + "env-variable", |
| 413 | + "custom-script" |
| 414 | + ], |
| 415 | + "description": "The type of prerequisite that must be satisfied before a stack or service can run." |
| 416 | + }, |
| 417 | + "PrerequisiteConfigMap": { |
| 418 | + "type": "object", |
| 419 | + "properties": { |
| 420 | + "node": { |
| 421 | + "type": "object", |
| 422 | + "properties": { |
| 423 | + "minimumVersion": { |
| 424 | + "type": "string" |
| 425 | + } |
| 426 | + }, |
| 427 | + "required": ["minimumVersion"], |
| 428 | + "additionalProperties": false |
| 429 | + }, |
| 430 | + "yarn": { |
| 431 | + "type": "object", |
| 432 | + "properties": { |
| 433 | + "minimumVersion": { |
| 434 | + "type": "string" |
| 435 | + } |
| 436 | + }, |
| 437 | + "required": ["minimumVersion"], |
| 438 | + "additionalProperties": false |
| 439 | + }, |
| 440 | + "dotnet-sdk": { |
| 441 | + "type": "object", |
| 442 | + "properties": { |
| 443 | + "version": { |
| 444 | + "type": "string" |
| 445 | + } |
| 446 | + }, |
| 447 | + "required": ["version"], |
| 448 | + "additionalProperties": false |
| 449 | + }, |
| 450 | + "dotnet-runtime": { |
| 451 | + "type": "object", |
| 452 | + "properties": { |
| 453 | + "version": { |
| 454 | + "type": "string" |
| 455 | + } |
| 456 | + }, |
| 457 | + "required": ["version"], |
| 458 | + "additionalProperties": false |
| 459 | + }, |
| 460 | + "nuget-feed": { |
| 461 | + "type": "object", |
| 462 | + "properties": { |
| 463 | + "feedUrl": { |
| 464 | + "type": "string" |
| 465 | + }, |
| 466 | + "feedName": { |
| 467 | + "type": "string" |
| 468 | + } |
| 469 | + }, |
| 470 | + "required": ["feedUrl"], |
| 471 | + "additionalProperties": false |
| 472 | + }, |
| 473 | + "git": { |
| 474 | + "type": "object", |
| 475 | + "additionalProperties": { |
| 476 | + "not": {} |
| 477 | + } |
| 478 | + }, |
| 479 | + "github-cli": { |
| 480 | + "type": "object", |
| 481 | + "additionalProperties": { |
| 482 | + "not": {} |
| 483 | + } |
| 484 | + }, |
| 485 | + "env-variable": { |
| 486 | + "type": "object", |
| 487 | + "properties": { |
| 488 | + "variableName": { |
| 489 | + "type": "string" |
| 490 | + } |
| 491 | + }, |
| 492 | + "required": ["variableName"], |
| 493 | + "additionalProperties": false |
| 494 | + }, |
| 495 | + "custom-script": { |
| 496 | + "type": "object", |
| 497 | + "properties": { |
| 498 | + "script": { |
| 499 | + "type": "string" |
| 500 | + } |
| 501 | + }, |
| 502 | + "required": ["script"], |
| 503 | + "additionalProperties": false |
| 504 | + } |
| 505 | + }, |
| 506 | + "required": [ |
| 507 | + "node", |
| 508 | + "yarn", |
| 509 | + "dotnet-sdk", |
| 510 | + "dotnet-runtime", |
| 511 | + "nuget-feed", |
| 512 | + "git", |
| 513 | + "github-cli", |
| 514 | + "env-variable", |
| 515 | + "custom-script" |
| 516 | + ], |
| 517 | + "additionalProperties": false, |
| 518 | + "description": "Maps each prerequisite type to its type-specific configuration shape." |
| 519 | + }, |
| 520 | + "PrerequisiteConfig": { |
| 521 | + "anyOf": [ |
| 522 | + { |
| 523 | + "type": "object", |
| 524 | + "properties": { |
| 525 | + "minimumVersion": { |
| 526 | + "type": "string" |
| 527 | + } |
| 528 | + }, |
| 529 | + "required": ["minimumVersion"], |
| 530 | + "additionalProperties": false |
| 531 | + }, |
| 532 | + { |
| 533 | + "type": "object", |
| 534 | + "properties": { |
| 535 | + "minimumVersion": { |
| 536 | + "type": "string" |
| 537 | + } |
| 538 | + }, |
| 539 | + "required": ["minimumVersion"], |
| 540 | + "additionalProperties": false |
| 541 | + }, |
| 542 | + { |
| 543 | + "type": "object", |
| 544 | + "properties": { |
| 545 | + "version": { |
| 546 | + "type": "string" |
| 547 | + } |
| 548 | + }, |
| 549 | + "required": ["version"], |
| 550 | + "additionalProperties": false |
| 551 | + }, |
| 552 | + { |
| 553 | + "type": "object", |
| 554 | + "properties": { |
| 555 | + "version": { |
| 556 | + "type": "string" |
| 557 | + } |
| 558 | + }, |
| 559 | + "required": ["version"], |
| 560 | + "additionalProperties": false |
| 561 | + }, |
| 562 | + { |
| 563 | + "type": "object", |
| 564 | + "properties": { |
| 565 | + "feedUrl": { |
| 566 | + "type": "string" |
| 567 | + }, |
| 568 | + "feedName": { |
| 569 | + "type": "string" |
| 570 | + } |
| 571 | + }, |
| 572 | + "required": ["feedUrl"], |
| 573 | + "additionalProperties": false |
| 574 | + }, |
| 575 | + { |
| 576 | + "type": "object", |
| 577 | + "additionalProperties": { |
| 578 | + "not": {} |
| 579 | + } |
| 580 | + }, |
| 581 | + { |
| 582 | + "type": "object", |
| 583 | + "properties": { |
| 584 | + "variableName": { |
| 585 | + "type": "string" |
| 586 | + } |
| 587 | + }, |
| 588 | + "required": ["variableName"], |
| 589 | + "additionalProperties": false |
| 590 | + }, |
| 591 | + { |
| 592 | + "type": "object", |
| 593 | + "properties": { |
| 594 | + "script": { |
| 595 | + "type": "string" |
| 596 | + } |
| 597 | + }, |
| 598 | + "required": ["script"], |
| 599 | + "additionalProperties": false |
| 600 | + } |
| 601 | + ], |
| 602 | + "description": "Union of all possible prerequisite config shapes." |
| 603 | + }, |
| 604 | + "Prerequisite": { |
| 605 | + "type": "object", |
| 606 | + "properties": { |
| 607 | + "id": { |
| 608 | + "type": "string", |
| 609 | + "description": "UUID primary key" |
| 610 | + }, |
| 611 | + "stackName": { |
| 612 | + "type": "string", |
| 613 | + "description": "FK to {@link StackDefinition.name }" |
| 614 | + }, |
| 615 | + "name": { |
| 616 | + "type": "string", |
| 617 | + "description": "Human-readable prerequisite name (e.g. \"Node.js >= 18\")" |
| 618 | + }, |
| 619 | + "type": { |
| 620 | + "$ref": "#/definitions/PrerequisiteType", |
| 621 | + "description": "Discriminator that determines the check logic and config shape" |
| 622 | + }, |
| 623 | + "config": { |
| 624 | + "$ref": "#/definitions/PrerequisiteConfig", |
| 625 | + "description": "Type-specific configuration (stored as JSON TEXT in the database)" |
| 626 | + }, |
| 627 | + "installationHelp": { |
| 628 | + "type": "string", |
| 629 | + "description": "Help text shown when the prerequisite check fails" |
| 630 | + }, |
| 631 | + "createdAt": { |
| 632 | + "type": "string" |
| 633 | + }, |
| 634 | + "updatedAt": { |
| 635 | + "type": "string" |
| 636 | + } |
| 637 | + }, |
| 638 | + "required": ["id", "stackName", "name", "type", "config", "installationHelp", "createdAt", "updatedAt"], |
| 639 | + "additionalProperties": false, |
| 640 | + "description": "Shareable prerequisite definition. Describes an external requirement (e.g. Node.js, Git, an env variable) that a stack or service may need to be satisfied before it can run. Included in stack exports and shared between installations." |
| 641 | + }, |
436 | 642 | "PublicApiToken": { |
437 | 643 | "type": "object", |
438 | 644 | "properties": { |
|
566 | 772 | "type": "string", |
567 | 773 | "description": "Optional FK to {@link GitHubRepository.id }" |
568 | 774 | }, |
569 | | - "dependencyIds": { |
| 775 | + "prerequisiteIds": { |
570 | 776 | "type": "array", |
571 | 777 | "items": { |
572 | 778 | "type": "string" |
573 | 779 | }, |
574 | | - "description": "IDs of {@link Dependency } entities required by this service" |
| 780 | + "description": "IDs of {@link Prerequisite } entities required by this service" |
575 | 781 | }, |
576 | 782 | "prerequisiteServiceIds": { |
577 | 783 | "type": "array", |
|
600 | 806 | "buildStatus", |
601 | 807 | "cloneStatus", |
602 | 808 | "createdAt", |
603 | | - "dependencyIds", |
604 | 809 | "description", |
605 | 810 | "displayName", |
606 | 811 | "id", |
607 | 812 | "installStatus", |
| 813 | + "prerequisiteIds", |
608 | 814 | "prerequisiteServiceIds", |
609 | 815 | "runCommand", |
610 | 816 | "runStatus", |
|
0 commit comments