nworks-plus 1.4.1 → 1.4.4
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/LICENSE +190 -190
- package/README.ja.md +392 -393
- package/README.ko.md +1 -2
- package/README.md +1 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +4 -4
- package/dist/mcp.js.map +1 -1
- package/package.json +59 -59
package/README.ko.md
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/nworks-plus)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/nworks-plus)
|
|
6
|
-
[](https://glama.ai/mcp/servers/yjcho9317/nworks)
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
yjcho9317님의 [nworks](https://github.com/yjcho9317/nworks)를 포크한 프로젝트입니다. 원본은 [awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers)에 등재되어 있습니다.
|
|
9
8
|
|
|
10
9
|
[🇺🇸 English](README.md) | 🇰🇷 한국어 | [🇯🇵 日本語](README.ja.md)
|
|
11
10
|
|
package/README.md
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/nworks-plus)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/nworks-plus)
|
|
6
|
-
[](https://glama.ai/mcp/servers/yjcho9317/nworks)
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
A fork of [nworks](https://github.com/yjcho9317/nworks) by yjcho9317, which is featured in [awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers).
|
|
9
8
|
|
|
10
9
|
🇺🇸 English | [🇰🇷 한국어](README.ko.md) | [🇯🇵 日本語](README.ja.md)
|
|
11
10
|
|
package/dist/index.js
CHANGED
|
@@ -818,7 +818,7 @@ async function request(opts, _retryCount = 0) {
|
|
|
818
818
|
}
|
|
819
819
|
|
|
820
820
|
// src/utils/sanitize.ts
|
|
821
|
-
import {
|
|
821
|
+
import { posix, resolve, sep } from "path";
|
|
822
822
|
import { randomBytes as randomBytes3 } from "crypto";
|
|
823
823
|
function sanitizePathSegment(value) {
|
|
824
824
|
if (!value || typeof value !== "string") {
|
|
@@ -834,7 +834,7 @@ function sanitizeFileName(name) {
|
|
|
834
834
|
if (!name || typeof name !== "string") {
|
|
835
835
|
throw new Error("File name must be a non-empty string");
|
|
836
836
|
}
|
|
837
|
-
const base = basename(name);
|
|
837
|
+
const base = posix.basename(name);
|
|
838
838
|
return base.replace(/[\r\n"\\]/g, "_");
|
|
839
839
|
}
|
|
840
840
|
function validateLocalPath(filePath, allowedBase) {
|
|
@@ -1431,7 +1431,7 @@ import { Command as Command7 } from "commander";
|
|
|
1431
1431
|
|
|
1432
1432
|
// src/api/drive.ts
|
|
1433
1433
|
import { readFile as readFile4, stat as stat2 } from "fs/promises";
|
|
1434
|
-
import { basename
|
|
1434
|
+
import { basename } from "path";
|
|
1435
1435
|
var BASE_URL3 = "https://www.worksapis.com/v1.0";
|
|
1436
1436
|
var MAX_UPLOAD_SIZE = 100 * 1024 * 1024;
|
|
1437
1437
|
var ALLOWED_HOSTS = [
|
|
@@ -1475,7 +1475,7 @@ async function listFiles(userId = "me", folderId, count = 20, cursor, profile =
|
|
|
1475
1475
|
return { files: data.files ?? [], responseMetaData: data.responseMetaData };
|
|
1476
1476
|
}
|
|
1477
1477
|
async function uploadFile(localPath, userId = "me", folderId, overwrite = false, profile = "default") {
|
|
1478
|
-
const fileName =
|
|
1478
|
+
const fileName = basename(localPath);
|
|
1479
1479
|
const safeName = sanitizeFileName(fileName);
|
|
1480
1480
|
const fileStat = await stat2(localPath);
|
|
1481
1481
|
const fileSize = fileStat.size;
|