@newbeebox/newbeebox-app-engine-cli 1.3.0 → 1.4.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 CHANGED
@@ -80,6 +80,7 @@ nae apps
80
80
  nae create --app-id myweb --tag latest --port 8080 \
81
81
  --cpu 500m --mem 512Mi --env '{"FOO":"bar"}'
82
82
  # 自带 basePath 的框架(如 Next.js)加 --keep-path-prefix
83
+ # 仅内部访问(不导出外链,只在集群内经 DNS+端口调用)加 --internal-only(创建后不可改)
83
84
  ```
84
85
 
85
86
  创建模板应用:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newbeebox/newbeebox-app-engine-cli",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "NewBee App Engine 命令行客户端(nae)——参数直达、默认人类可读(加 -o json 出 JSON),便于在终端使用与脚本/管道里解析。",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -15,7 +15,7 @@ const program = new Command()
15
15
  program
16
16
  .name('nae')
17
17
  .description('NewBee App Engine CLI —— 默认人类可读,-o json 输出 JSON 供脚本解析')
18
- .version('1.3.0')
18
+ .version('1.4.0')
19
19
  .option('--base-url <url>', '覆盖平台地址(也可用环境变量 NAE_BASE_URL)')
20
20
  .option('--token <token>', '覆盖访问密钥(也可用环境变量 NAE_TOKEN)')
21
21
  .option('-o, --output <format>', '输出格式:text(默认,人类可读)| json', 'text')
@@ -199,6 +199,7 @@ program
199
199
  .option('--mem <limit>', '内存上限,如 512Mi / 1Gi')
200
200
  .option('--max-restarts <n>', '失败重启上限,0=不封顶', (v) => parseInt(v, 10))
201
201
  .option('--keep-path-prefix', '不剥离 /apps/<appid> 前缀(自带 basePath 的框架用)')
202
+ .option('--internal-only', '普通应用:不导出外部链接,只在集群内经 DNS+端口访问(创建后不可改)')
202
203
  .option('--template <key>', '模板应用:模板 key')
203
204
  .option('--storage <size>', '模板应用:持久卷大小,如 10Gi')
204
205
  .option('--replicas <n>', '副本数', (v) => parseInt(v, 10))
@@ -219,6 +220,9 @@ program
219
220
  # 自带 basePath 的框架(Next.js Node server 等):保留 /apps/<appid> 前缀
220
221
  nae create --app-id mynext --tag latest --port 3000 --keep-path-prefix
221
222
 
223
+ # 仅内部访问:不导出外部链接,只在集群内经 DNS+端口被其它应用调用(如后端 API)
224
+ nae create --app-id myapi --tag latest --port 8080 --internal-only
225
+
222
226
  # 模板应用 Redis:--config 取该模板的服务特性参数(见 nae templates)
223
227
  nae create --kind template --app-id myredis --template redis --storage 2Gi \\
224
228
  --config '{"password":"s3cret","persistence":"rdb"}'
@@ -244,6 +248,7 @@ program
244
248
  mem_limit: opts.mem,
245
249
  max_restarts: opts.maxRestarts,
246
250
  keep_path_prefix: opts.keepPathPrefix || undefined,
251
+ internal_only: opts.internalOnly || undefined,
247
252
  template_key: opts.template,
248
253
  storage_size: opts.storage,
249
254
  replicas: opts.replicas,