@saptools/cf-export 0.1.1 → 0.1.2
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 +19 -11
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -53,16 +53,22 @@ npm install @saptools/cf-export
|
|
|
53
53
|
export SAP_EMAIL="you@company.com"
|
|
54
54
|
export SAP_PASSWORD="your-sap-password"
|
|
55
55
|
|
|
56
|
-
#
|
|
57
|
-
|
|
56
|
+
# (Recommended) Set your CF target once — then you can skip region/org/space
|
|
57
|
+
cf target -o my-org -s dev
|
|
58
|
+
|
|
59
|
+
# Export all artifacts — region/org/space are auto-detected from `cf target`!
|
|
60
|
+
cf-export -a my-cap-app --out ./exported
|
|
61
|
+
|
|
62
|
+
# You can still pass them explicitly when needed
|
|
63
|
+
cf-export -r ap10 -o my-org -s dev -a my-cap-app --out ./exported
|
|
58
64
|
|
|
59
65
|
# Export with a custom remote root
|
|
60
|
-
|
|
66
|
+
cf-export -a my-cap-app \
|
|
61
67
|
--remote-root /home/vcap/app/srv \
|
|
62
68
|
--out ./exported
|
|
63
69
|
|
|
64
70
|
# Export only specific files
|
|
65
|
-
|
|
71
|
+
cf-export -a my-cap-app \
|
|
66
72
|
--file package.json --file pnpm-lock.yaml --file default-env.json
|
|
67
73
|
```
|
|
68
74
|
|
|
@@ -75,7 +81,7 @@ After export you will have the requested files locally, ready for local CAP deve
|
|
|
75
81
|
The default (and only) command is `export`.
|
|
76
82
|
|
|
77
83
|
```bash
|
|
78
|
-
|
|
84
|
+
cf-export [options]
|
|
79
85
|
```
|
|
80
86
|
|
|
81
87
|
### Common examples
|
|
@@ -83,7 +89,7 @@ saptools-cf-export [options]
|
|
|
83
89
|
**Export everything (recommended default)**
|
|
84
90
|
|
|
85
91
|
```bash
|
|
86
|
-
|
|
92
|
+
cf-export \
|
|
87
93
|
-r ap10 \
|
|
88
94
|
-o my-org \
|
|
89
95
|
-s dev \
|
|
@@ -94,7 +100,7 @@ saptools-cf-export \
|
|
|
94
100
|
**With custom remote root**
|
|
95
101
|
|
|
96
102
|
```bash
|
|
97
|
-
|
|
103
|
+
cf-export -r ap10 -o my-org -s dev -a my-cap-app \
|
|
98
104
|
--remote-root /home/vcap/app \
|
|
99
105
|
--out ./out
|
|
100
106
|
```
|
|
@@ -102,16 +108,18 @@ saptools-cf-export -r ap10 -o my-org -s dev -a my-cap-app \
|
|
|
102
108
|
**Selective export**
|
|
103
109
|
|
|
104
110
|
```bash
|
|
105
|
-
|
|
111
|
+
cf-export ... --file package.json --file default-env.json
|
|
106
112
|
```
|
|
107
113
|
|
|
108
114
|
### Options
|
|
109
115
|
|
|
116
|
+
Region/org/space flags are **optional**. They are auto-detected from your current `cf target` (recommended: run `cf target -o ORG -s SPACE` first).
|
|
117
|
+
|
|
110
118
|
| Flag | Description | Required |
|
|
111
119
|
|-----------------------|-----------------------------------------------------------------------------|----------|
|
|
112
|
-
| `-r, --region <key>` | CF region key (e.g. `ap10`, `eu10`)
|
|
113
|
-
| `-o, --org <name>` | CF org name
|
|
114
|
-
| `-s, --space <name>` | CF space name
|
|
120
|
+
| `-r, --region <key>` | CF region key (e.g. `ap10`, `eu10`). Auto-detected from current `cf target` | No |
|
|
121
|
+
| `-o, --org <name>` | CF org name. Auto-detected from current `cf target` | No |
|
|
122
|
+
| `-s, --space <name>` | CF space name. Auto-detected from current `cf target` | No |
|
|
115
123
|
| `-a, --app <name>` | CF app name | Yes |
|
|
116
124
|
| `--out <dir>` | Output directory (default: current working directory) | No |
|
|
117
125
|
| `--remote-root <path>`| Hint for the base directory inside the container (the "root url") | No |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saptools/cf-export",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Export CAP/CF project artifacts (package.json, lockfiles, .cdsrc.json, default-env.json, .npmrc) from running SAP BTP Cloud Foundry apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
|
-
"
|
|
11
|
+
"cf-export": "dist/cli.js"
|
|
12
12
|
},
|
|
13
13
|
"main": "./dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@saptools/cf-files": "^0.3.3",
|
|
50
|
+
"@saptools/cf-sync": "^0.4.13",
|
|
50
51
|
"commander": "^13.0.0"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|