@cloudbase/manager-node 5.8.8-beta.0 → 5.8.8
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/CHANGELOG.md +7 -0
- package/lib/env/index.js +22 -1
- package/lib/environment.js +8 -0
- package/lib/error.js +2 -1
- package/lib/hosting/index.js +3 -2
- package/lib/index.js +7 -0
- package/lib/platform/index.js +177 -0
- package/lib/platform/type.js +2 -0
- package/lib/storage/index.js +24 -5
- package/lib/utils/storage-config.js +12 -6
- package/package.json +1 -1
- package/types/env/index.d.ts +16 -1
- package/types/env/type.d.ts +112 -4
- package/types/environment.d.ts +6 -0
- package/types/error.d.ts +2 -0
- package/types/index.d.ts +6 -0
- package/types/platform/index.d.ts +133 -0
- package/types/platform/type.d.ts +525 -0
- package/types/storage/index.d.ts +16 -0
- package/types/utils/storage-config.d.ts +7 -2
|
@@ -16,13 +16,18 @@ export declare function toPhysicalKey(basePath: string, cloudPath?: string): str
|
|
|
16
16
|
export declare function toLogicalPath(basePath: string, key: string): string;
|
|
17
17
|
/**
|
|
18
18
|
* 解析环境的有效云存储配置
|
|
19
|
-
* 共享桶环境(Storages[0].
|
|
19
|
+
* 共享桶环境(Storages[0].ExternalStorage.Enabled 为 true)下,BasePath 从 ExternalStorage 读取,桶名、地域在顶层为空时回退到 ExternalStorage;
|
|
20
20
|
* 普通环境保持读取 Storages[0].Bucket / Region,basePath 为空串
|
|
21
21
|
*/
|
|
22
22
|
export declare function resolveStorageConfig(envConfig: EnvInfo): IStorageConfig;
|
|
23
23
|
/**
|
|
24
24
|
* 按共享桶规则解析有效桶,云存储(Storages)与静态托管(DescribeStaticStore)共用
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
|
+
* 是否共享桶只看 ExternalStorage.Enabled,不看顶层 Bucket 是否为空:
|
|
27
|
+
* 目前线上共享桶环境的顶层 Bucket 均返回空串,但接口定义并未保证这一点,
|
|
28
|
+
* 若后端回填桶名而 basePath 仍按「Bucket 为空」判定,文件会静默写到桶根目录,
|
|
29
|
+
* 造成同一共享桶内跨环境污染。因此 basePath 只由 Enabled + BasePath 决定,
|
|
30
|
+
* 桶名则优先用顶层 Bucket,为空时回退到 ExternalStorage.BucketName。
|
|
26
31
|
*/
|
|
27
32
|
export declare function resolveBucketConfig(options: {
|
|
28
33
|
envId: string;
|