hereya-cli 0.79.6 → 0.81.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/README.md +57 -57
- package/dist/backend/cloud/cloud-backend.js +11 -0
- package/dist/backend/common.d.ts +18 -0
- package/dist/backend/common.js +6 -0
- package/dist/backend/file.d.ts +1 -0
- package/dist/backend/file.js +56 -42
- package/dist/commands/add/index.js +5 -3
- package/dist/commands/deploy/index.js +10 -6
- package/dist/commands/devenv/install/index.js +0 -3
- package/dist/commands/docker/run/index.js +1 -1
- package/dist/commands/down/index.js +5 -3
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/import/index.js +2 -1
- package/dist/commands/remove/index.js +6 -4
- package/dist/commands/run/index.js +1 -1
- package/dist/commands/undeploy/index.js +5 -3
- package/dist/commands/up/index.js +7 -4
- package/dist/commands/workspace/install/index.js +0 -3
- package/dist/commands/workspace/uninstall/index.js +1 -4
- package/dist/lib/parameter/index.d.ts +1 -0
- package/dist/lib/parameter/index.js +17 -6
- package/dist/lib/profile-utils.d.ts +5 -1
- package/dist/lib/profile-utils.js +9 -3
- package/oclif.manifest.json +116 -116
- package/package.json +1 -1
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import { stripOrgPrefix } from './org-utils.js';
|
|
1
2
|
import { resolveWorkspaceName } from './workspace-utils.js';
|
|
2
3
|
export async function getProfileFromWorkspace(backend, workspaceName, project) {
|
|
3
4
|
// Resolve workspace name with org prefix if needed
|
|
4
5
|
const resolvedWorkspaceName = resolveWorkspaceName(workspaceName, project);
|
|
6
|
+
// Strip org prefix for parameter file resolution (e.g., "org/staging-eu" → "staging-eu")
|
|
7
|
+
const bareWorkspaceName = stripOrgPrefix(workspaceName);
|
|
5
8
|
const workspace$ = await backend.getWorkspace(resolvedWorkspaceName);
|
|
6
9
|
if (!workspace$.found || workspace$.hasError) {
|
|
7
10
|
// Fallback to workspace name if workspace not found
|
|
8
|
-
return workspaceName;
|
|
11
|
+
return { profile: bareWorkspaceName, workspaceName: bareWorkspaceName };
|
|
9
12
|
}
|
|
10
|
-
// Use profile if defined, otherwise use workspace name
|
|
11
|
-
return
|
|
13
|
+
// Use profile if defined, otherwise use bare workspace name
|
|
14
|
+
return {
|
|
15
|
+
profile: workspace$.workspace.profile ?? bareWorkspaceName,
|
|
16
|
+
workspaceName: bareWorkspaceName,
|
|
17
|
+
};
|
|
12
18
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1602,53 +1602,6 @@
|
|
|
1602
1602
|
"index.js"
|
|
1603
1603
|
]
|
|
1604
1604
|
},
|
|
1605
|
-
"executor:start": {
|
|
1606
|
-
"aliases": [],
|
|
1607
|
-
"args": {},
|
|
1608
|
-
"description": "Start the remote executor process (polls for jobs from hereya cloud).\n\nJobs are executed in parallel up to the concurrency limit (default: 10). Use --concurrency to adjust.\n\nSet the HEREYA_TOKEN environment variable to authenticate without running `hereya login`.\nSet the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud instance (defaults to https://cloud.hereya.dev).",
|
|
1609
|
-
"examples": [
|
|
1610
|
-
"<%= config.bin %> <%= command.id %> -w my-workspace",
|
|
1611
|
-
"<%= config.bin %> <%= command.id %> -w my-workspace --concurrency 5",
|
|
1612
|
-
"HEREYA_TOKEN=<token> <%= config.bin %> <%= command.id %> -w my-workspace",
|
|
1613
|
-
"HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com <%= config.bin %> <%= command.id %> -w my-workspace"
|
|
1614
|
-
],
|
|
1615
|
-
"flags": {
|
|
1616
|
-
"concurrency": {
|
|
1617
|
-
"char": "c",
|
|
1618
|
-
"description": "maximum number of parallel jobs",
|
|
1619
|
-
"name": "concurrency",
|
|
1620
|
-
"default": 10,
|
|
1621
|
-
"hasDynamicHelp": false,
|
|
1622
|
-
"multiple": false,
|
|
1623
|
-
"type": "option"
|
|
1624
|
-
},
|
|
1625
|
-
"workspace": {
|
|
1626
|
-
"char": "w",
|
|
1627
|
-
"description": "name of the workspace to poll jobs for",
|
|
1628
|
-
"name": "workspace",
|
|
1629
|
-
"required": true,
|
|
1630
|
-
"hasDynamicHelp": false,
|
|
1631
|
-
"multiple": false,
|
|
1632
|
-
"type": "option"
|
|
1633
|
-
}
|
|
1634
|
-
},
|
|
1635
|
-
"hasDynamicHelp": false,
|
|
1636
|
-
"hiddenAliases": [],
|
|
1637
|
-
"id": "executor:start",
|
|
1638
|
-
"pluginAlias": "hereya-cli",
|
|
1639
|
-
"pluginName": "hereya-cli",
|
|
1640
|
-
"pluginType": "core",
|
|
1641
|
-
"strict": true,
|
|
1642
|
-
"enableJsonFlag": false,
|
|
1643
|
-
"isESM": true,
|
|
1644
|
-
"relativePath": [
|
|
1645
|
-
"dist",
|
|
1646
|
-
"commands",
|
|
1647
|
-
"executor",
|
|
1648
|
-
"start",
|
|
1649
|
-
"index.js"
|
|
1650
|
-
]
|
|
1651
|
-
},
|
|
1652
1605
|
"flow:add": {
|
|
1653
1606
|
"aliases": [],
|
|
1654
1607
|
"args": {
|
|
@@ -1714,6 +1667,53 @@
|
|
|
1714
1667
|
"index.js"
|
|
1715
1668
|
]
|
|
1716
1669
|
},
|
|
1670
|
+
"executor:start": {
|
|
1671
|
+
"aliases": [],
|
|
1672
|
+
"args": {},
|
|
1673
|
+
"description": "Start the remote executor process (polls for jobs from hereya cloud).\n\nJobs are executed in parallel up to the concurrency limit (default: 10). Use --concurrency to adjust.\n\nSet the HEREYA_TOKEN environment variable to authenticate without running `hereya login`.\nSet the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud instance (defaults to https://cloud.hereya.dev).",
|
|
1674
|
+
"examples": [
|
|
1675
|
+
"<%= config.bin %> <%= command.id %> -w my-workspace",
|
|
1676
|
+
"<%= config.bin %> <%= command.id %> -w my-workspace --concurrency 5",
|
|
1677
|
+
"HEREYA_TOKEN=<token> <%= config.bin %> <%= command.id %> -w my-workspace",
|
|
1678
|
+
"HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com <%= config.bin %> <%= command.id %> -w my-workspace"
|
|
1679
|
+
],
|
|
1680
|
+
"flags": {
|
|
1681
|
+
"concurrency": {
|
|
1682
|
+
"char": "c",
|
|
1683
|
+
"description": "maximum number of parallel jobs",
|
|
1684
|
+
"name": "concurrency",
|
|
1685
|
+
"default": 10,
|
|
1686
|
+
"hasDynamicHelp": false,
|
|
1687
|
+
"multiple": false,
|
|
1688
|
+
"type": "option"
|
|
1689
|
+
},
|
|
1690
|
+
"workspace": {
|
|
1691
|
+
"char": "w",
|
|
1692
|
+
"description": "name of the workspace to poll jobs for",
|
|
1693
|
+
"name": "workspace",
|
|
1694
|
+
"required": true,
|
|
1695
|
+
"hasDynamicHelp": false,
|
|
1696
|
+
"multiple": false,
|
|
1697
|
+
"type": "option"
|
|
1698
|
+
}
|
|
1699
|
+
},
|
|
1700
|
+
"hasDynamicHelp": false,
|
|
1701
|
+
"hiddenAliases": [],
|
|
1702
|
+
"id": "executor:start",
|
|
1703
|
+
"pluginAlias": "hereya-cli",
|
|
1704
|
+
"pluginName": "hereya-cli",
|
|
1705
|
+
"pluginType": "core",
|
|
1706
|
+
"strict": true,
|
|
1707
|
+
"enableJsonFlag": false,
|
|
1708
|
+
"isESM": true,
|
|
1709
|
+
"relativePath": [
|
|
1710
|
+
"dist",
|
|
1711
|
+
"commands",
|
|
1712
|
+
"executor",
|
|
1713
|
+
"start",
|
|
1714
|
+
"index.js"
|
|
1715
|
+
]
|
|
1716
|
+
},
|
|
1717
1717
|
"flow:down": {
|
|
1718
1718
|
"aliases": [],
|
|
1719
1719
|
"args": {},
|
|
@@ -2579,74 +2579,6 @@
|
|
|
2579
2579
|
"index.js"
|
|
2580
2580
|
]
|
|
2581
2581
|
},
|
|
2582
|
-
"flow:docker:run": {
|
|
2583
|
-
"aliases": [],
|
|
2584
|
-
"args": {
|
|
2585
|
-
"image": {
|
|
2586
|
-
"description": "Docker image to run",
|
|
2587
|
-
"name": "image",
|
|
2588
|
-
"required": true
|
|
2589
|
-
}
|
|
2590
|
-
},
|
|
2591
|
-
"description": "Run a Docker container with hereya env vars in a git branch-based workspace",
|
|
2592
|
-
"examples": [
|
|
2593
|
-
"<%= config.bin %> <%= command.id %> myapp:latest",
|
|
2594
|
-
"<%= config.bin %> <%= command.id %> --profile staging myapp:latest",
|
|
2595
|
-
"<%= config.bin %> <%= command.id %> --pin myapp:latest -- --rm"
|
|
2596
|
-
],
|
|
2597
|
-
"flags": {
|
|
2598
|
-
"chdir": {
|
|
2599
|
-
"description": "directory to run command in",
|
|
2600
|
-
"name": "chdir",
|
|
2601
|
-
"required": false,
|
|
2602
|
-
"hasDynamicHelp": false,
|
|
2603
|
-
"multiple": false,
|
|
2604
|
-
"type": "option"
|
|
2605
|
-
},
|
|
2606
|
-
"pin": {
|
|
2607
|
-
"description": "append git commit SHA to workspace name for commit-specific isolation",
|
|
2608
|
-
"name": "pin",
|
|
2609
|
-
"required": false,
|
|
2610
|
-
"allowNo": false,
|
|
2611
|
-
"type": "boolean"
|
|
2612
|
-
},
|
|
2613
|
-
"port": {
|
|
2614
|
-
"char": "p",
|
|
2615
|
-
"description": "port to forward and set as PORT env var (default: 8080)",
|
|
2616
|
-
"name": "port",
|
|
2617
|
-
"required": false,
|
|
2618
|
-
"default": 8080,
|
|
2619
|
-
"hasDynamicHelp": false,
|
|
2620
|
-
"multiple": false,
|
|
2621
|
-
"type": "option"
|
|
2622
|
-
},
|
|
2623
|
-
"profile": {
|
|
2624
|
-
"description": "profile to use for the workspace (will be appended to workspace name)",
|
|
2625
|
-
"name": "profile",
|
|
2626
|
-
"required": false,
|
|
2627
|
-
"hasDynamicHelp": false,
|
|
2628
|
-
"multiple": false,
|
|
2629
|
-
"type": "option"
|
|
2630
|
-
}
|
|
2631
|
-
},
|
|
2632
|
-
"hasDynamicHelp": false,
|
|
2633
|
-
"hiddenAliases": [],
|
|
2634
|
-
"id": "flow:docker:run",
|
|
2635
|
-
"pluginAlias": "hereya-cli",
|
|
2636
|
-
"pluginName": "hereya-cli",
|
|
2637
|
-
"pluginType": "core",
|
|
2638
|
-
"strict": false,
|
|
2639
|
-
"enableJsonFlag": false,
|
|
2640
|
-
"isESM": true,
|
|
2641
|
-
"relativePath": [
|
|
2642
|
-
"dist",
|
|
2643
|
-
"commands",
|
|
2644
|
-
"flow",
|
|
2645
|
-
"docker",
|
|
2646
|
-
"run",
|
|
2647
|
-
"index.js"
|
|
2648
|
-
]
|
|
2649
|
-
},
|
|
2650
2582
|
"workspace:env:set": {
|
|
2651
2583
|
"aliases": [],
|
|
2652
2584
|
"args": {},
|
|
@@ -2717,6 +2649,74 @@
|
|
|
2717
2649
|
"index.js"
|
|
2718
2650
|
]
|
|
2719
2651
|
},
|
|
2652
|
+
"flow:docker:run": {
|
|
2653
|
+
"aliases": [],
|
|
2654
|
+
"args": {
|
|
2655
|
+
"image": {
|
|
2656
|
+
"description": "Docker image to run",
|
|
2657
|
+
"name": "image",
|
|
2658
|
+
"required": true
|
|
2659
|
+
}
|
|
2660
|
+
},
|
|
2661
|
+
"description": "Run a Docker container with hereya env vars in a git branch-based workspace",
|
|
2662
|
+
"examples": [
|
|
2663
|
+
"<%= config.bin %> <%= command.id %> myapp:latest",
|
|
2664
|
+
"<%= config.bin %> <%= command.id %> --profile staging myapp:latest",
|
|
2665
|
+
"<%= config.bin %> <%= command.id %> --pin myapp:latest -- --rm"
|
|
2666
|
+
],
|
|
2667
|
+
"flags": {
|
|
2668
|
+
"chdir": {
|
|
2669
|
+
"description": "directory to run command in",
|
|
2670
|
+
"name": "chdir",
|
|
2671
|
+
"required": false,
|
|
2672
|
+
"hasDynamicHelp": false,
|
|
2673
|
+
"multiple": false,
|
|
2674
|
+
"type": "option"
|
|
2675
|
+
},
|
|
2676
|
+
"pin": {
|
|
2677
|
+
"description": "append git commit SHA to workspace name for commit-specific isolation",
|
|
2678
|
+
"name": "pin",
|
|
2679
|
+
"required": false,
|
|
2680
|
+
"allowNo": false,
|
|
2681
|
+
"type": "boolean"
|
|
2682
|
+
},
|
|
2683
|
+
"port": {
|
|
2684
|
+
"char": "p",
|
|
2685
|
+
"description": "port to forward and set as PORT env var (default: 8080)",
|
|
2686
|
+
"name": "port",
|
|
2687
|
+
"required": false,
|
|
2688
|
+
"default": 8080,
|
|
2689
|
+
"hasDynamicHelp": false,
|
|
2690
|
+
"multiple": false,
|
|
2691
|
+
"type": "option"
|
|
2692
|
+
},
|
|
2693
|
+
"profile": {
|
|
2694
|
+
"description": "profile to use for the workspace (will be appended to workspace name)",
|
|
2695
|
+
"name": "profile",
|
|
2696
|
+
"required": false,
|
|
2697
|
+
"hasDynamicHelp": false,
|
|
2698
|
+
"multiple": false,
|
|
2699
|
+
"type": "option"
|
|
2700
|
+
}
|
|
2701
|
+
},
|
|
2702
|
+
"hasDynamicHelp": false,
|
|
2703
|
+
"hiddenAliases": [],
|
|
2704
|
+
"id": "flow:docker:run",
|
|
2705
|
+
"pluginAlias": "hereya-cli",
|
|
2706
|
+
"pluginName": "hereya-cli",
|
|
2707
|
+
"pluginType": "core",
|
|
2708
|
+
"strict": false,
|
|
2709
|
+
"enableJsonFlag": false,
|
|
2710
|
+
"isESM": true,
|
|
2711
|
+
"relativePath": [
|
|
2712
|
+
"dist",
|
|
2713
|
+
"commands",
|
|
2714
|
+
"flow",
|
|
2715
|
+
"docker",
|
|
2716
|
+
"run",
|
|
2717
|
+
"index.js"
|
|
2718
|
+
]
|
|
2719
|
+
},
|
|
2720
2720
|
"workspace:env:unset": {
|
|
2721
2721
|
"aliases": [],
|
|
2722
2722
|
"args": {},
|
|
@@ -2881,5 +2881,5 @@
|
|
|
2881
2881
|
]
|
|
2882
2882
|
}
|
|
2883
2883
|
},
|
|
2884
|
-
"version": "0.
|
|
2884
|
+
"version": "0.81.0"
|
|
2885
2885
|
}
|