@be-link/cos 1.12.8 → 1.12.10

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/bin/upload.js CHANGED
@@ -62,9 +62,11 @@ async function getTempCredentials(mode) {
62
62
 
63
63
  try {
64
64
  const response = await fetch(url, { method: 'POST' });
65
+ console.error('🔐 响应:', response);
65
66
  const result = await response.json();
66
67
  const data = result?.data || {};
67
68
  const credentials = data?.credentials;
69
+ console.error('🔐 结果:', result);
68
70
 
69
71
  if (!credentials) {
70
72
  throw new Error('获取临时密钥失败:返回数据格式错误');
@@ -116,21 +118,21 @@ async function initCOS() {
116
118
  console.warn('⚠️ 临时密钥获取失败:', err.message);
117
119
  console.warn('⚠️ 尝试使用环境变量 COS_SECRET_ID 和 COS_SECRET_KEY');
118
120
 
119
- const secretId = process.env.COS_SECRET_ID;
120
- const secretKey = process.env.COS_SECRET_KEY;
121
+ // const secretId = process.env.COS_SECRET_ID;
122
+ // const secretKey = process.env.COS_SECRET_KEY;
121
123
 
122
- if (!secretId || !secretKey) {
123
- console.error('❌ 错误:未找到 COS 密钥配置');
124
- console.error(' 请设置环境变量:');
125
- console.error(' - COS_SECRET_ID');
126
- console.error(' - COS_SECRET_KEY');
127
- process.exit(1);
128
- }
124
+ // if (!secretId || !secretKey) {
125
+ // console.error('❌ 错误:未找到 COS 密钥配置');
126
+ // console.error(' 请设置环境变量:');
127
+ // console.error(' - COS_SECRET_ID');
128
+ // console.error(' - COS_SECRET_KEY');
129
+ // process.exit(1);
130
+ // }
129
131
 
130
132
  console.log('✅ 使用环境变量中的密钥');
131
133
  cos = new COS({
132
- SecretId: secretId,
133
- SecretKey: secretKey,
134
+ SecretId: 'AKIDx3wfJo5e4FAqHSOJ5cu2y3zh9MK2Uhy6',
135
+ SecretKey: '3sgW7V7W1PZWIqAKI8krpY3JL9j5C3e1',
134
136
  });
135
137
 
136
138
  return cos;
package/dist/index.cjs.js CHANGED
@@ -31,8 +31,8 @@ const BUCKETS_CONFIG = {
31
31
  const PROJECT_BUCKETS_CONFIG = {
32
32
  'be-link-live-h5': {
33
33
  production: {
34
- name: 'release-belink-1304510571',
35
- host: 'release-belink-1304510571.cos.ap-shanghai.myqcloud.com',
34
+ name: 'release-belink-ec-1304510571',
35
+ host: 'release-belink-ec-1304510571.cos.ap-nanjing.myqcloud.com',
36
36
  protocol: 'https',
37
37
  },
38
38
  },
package/dist/index.esm.js CHANGED
@@ -29,8 +29,8 @@ const BUCKETS_CONFIG = {
29
29
  const PROJECT_BUCKETS_CONFIG = {
30
30
  'be-link-live-h5': {
31
31
  production: {
32
- name: 'release-belink-1304510571',
33
- host: 'release-belink-1304510571.cos.ap-shanghai.myqcloud.com',
32
+ name: 'release-belink-ec-1304510571',
33
+ host: 'release-belink-ec-1304510571.cos.ap-nanjing.myqcloud.com',
34
34
  protocol: 'https',
35
35
  },
36
36
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/cos",
3
- "version": "1.12.8",
3
+ "version": "1.12.10",
4
4
  "description": "前端项目产物上传cos",
5
5
  "homepage": "https://github.com/snowmountain-top/be-link#readme",
6
6
  "author": "zhuiyi",