@vectorx/cloud-toolkit 0.0.0-beta-20251112071515 → 0.0.0-beta-20251209102230
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/lib/agent.kit.js +38 -6
- package/lib/config/api.config.js +1 -0
- package/package.json +3 -3
package/lib/agent.kit.js
CHANGED
|
@@ -172,13 +172,45 @@ function build(options) {
|
|
|
172
172
|
reject(err);
|
|
173
173
|
});
|
|
174
174
|
archive.pipe(output);
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
const filesToAdd = [];
|
|
176
|
+
const collectFiles = (dir, basePath = "") => {
|
|
177
|
+
const files = fs_1.default.readdirSync(dir);
|
|
178
|
+
for (const file of files) {
|
|
179
|
+
const fullPath = path_1.default.join(dir, file);
|
|
180
|
+
const relativePath = path_1.default.join(basePath, file);
|
|
181
|
+
const stat = fs_1.default.statSync(fullPath);
|
|
182
|
+
const excludePatterns = [/^\.git/, /^dist/, /\.zip$/, /\.DS_Store$/];
|
|
183
|
+
if (excludePatterns.some((pattern) => pattern.test(relativePath))) {
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
if (stat.isDirectory()) {
|
|
187
|
+
collectFiles(fullPath, relativePath);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
const isExecutable = relativePath.startsWith("bin/") ||
|
|
191
|
+
relativePath.includes("/bin/") ||
|
|
192
|
+
(() => {
|
|
193
|
+
try {
|
|
194
|
+
const content = fs_1.default.readFileSync(fullPath, "utf8");
|
|
195
|
+
return content.startsWith("#!/");
|
|
196
|
+
}
|
|
197
|
+
catch (_a) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
})();
|
|
201
|
+
filesToAdd.push({ fullPath, relativePath, isExecutable });
|
|
202
|
+
}
|
|
179
203
|
}
|
|
180
|
-
|
|
181
|
-
|
|
204
|
+
};
|
|
205
|
+
collectFiles(workDir);
|
|
206
|
+
for (const { fullPath, relativePath, isExecutable } of filesToAdd) {
|
|
207
|
+
if (isExecutable) {
|
|
208
|
+
archive.file(fullPath, { name: relativePath, mode: 0o755 });
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
archive.file(fullPath, { name: relativePath });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
182
214
|
archive.finalize();
|
|
183
215
|
});
|
|
184
216
|
const size = fs_1.default.statSync(outputPath).size;
|
package/lib/config/api.config.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBaseUrl = getBaseUrl;
|
|
4
4
|
const apiUrls = {
|
|
5
|
+
sit: "http://miniapp-tailiang.sl.sit.xiaohongshu.com",
|
|
5
6
|
development: "https://miniapp.beta.xiaohongshu.com",
|
|
6
7
|
production: "https://miniapp.xiaohongshu.com",
|
|
7
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vectorx/cloud-toolkit",
|
|
3
|
-
"version": "0.0.0-beta-
|
|
3
|
+
"version": "0.0.0-beta-20251209102230",
|
|
4
4
|
"description": "VectorX Cloud Toolkit",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"node": ">=18.0.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vectorx/agent-simulator": "0.0.0-beta-
|
|
25
|
-
"@vectorx/functions-framework": "0.0.0-beta-
|
|
24
|
+
"@vectorx/agent-simulator": "0.0.0-beta-20251209102230",
|
|
25
|
+
"@vectorx/functions-framework": "0.0.0-beta-20251209102230",
|
|
26
26
|
"archiver": "^5.3.1",
|
|
27
27
|
"cos-nodejs-sdk-v5": "2.x",
|
|
28
28
|
"crypto": "^1.0.1",
|