@yongdall/file 0.4.2 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yongdall/file",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "main": "./index.mjs",
6
6
  "exports": {
@@ -12,15 +12,16 @@
12
12
  "author": "",
13
13
  "license": "ISC",
14
14
  "dependencies": {
15
- "@yongdall/core": "^0.4.0",
16
- "@yongdall/connection": "^0.4.0",
17
- "@yongdall/model": "^0.4.0",
18
- "@yongdall/http": "^0.4.0"
15
+ "@yongdall/core": "^0.5.0",
16
+ "@yongdall/connection": "^0.5.0",
17
+ "@yongdall/model": "^0.5.0",
18
+ "@yongdall/http": "^0.5.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@yongdall/web": "^0.4.0"
21
+ "@yongdall/migrate": "^0.5.0",
22
+ "@yongdall/web": "^0.5.0"
22
23
  },
23
24
  "peerDependencies": {
24
- "@yongdall/web": "^0.4.0"
25
+ "@yongdall/web": "^0.5.0"
25
26
  }
26
27
  }
@@ -1,7 +1,7 @@
1
- import { Query } from "@yongdall/model";
2
1
  import { ApiRouter, Param, e404 } from "@yongdall/http";
3
2
  import { getModel, getUser } from "@yongdall/core";
4
3
  import { useConnection, useDatabase } from "@yongdall/connection";
4
+ import { Query } from "@yongdall/model";
5
5
 
6
6
  //#region plugins/file/getCabinet.mjs
7
7
  /**
@@ -54,17 +54,17 @@ const apiRouter = new ApiRouter();
54
54
  apiRouter.put`${fileCabinetId$1}/files/${filePathParam$1}+`(async (ctx) => {
55
55
  const cabinetId = fileCabinetId$1.param(ctx) || "_";
56
56
  const filePath = filePathParam$1.params(ctx);
57
- if (!filePath?.length) return e404(ctx);
57
+ if (!filePath?.length) return e404();
58
58
  const paths = filePath;
59
59
  const path = filePath.join("/");
60
60
  const fileName = paths.pop()?.replace(/[\\\/#?{}~@:&^$()]/g, "") || "";
61
- if (!fileName) return e404(ctx);
61
+ if (!fileName) return e404();
62
62
  const dirname = paths.join("/");
63
63
  const index = fileName.lastIndexOf(".");
64
64
  const filename = fileName.slice(0, index) || "_";
65
65
  const extname = index >= 0 ? fileName.slice(index) : "";
66
66
  const cabinet = await getCabinet(cabinetId);
67
- if (!cabinet) return e404(ctx);
67
+ if (!cabinet) return e404();
68
68
  const uploadPath = cabinet.uploadPath;
69
69
  const subPath = uploadPath ? replacePath(uploadPath, /* @__PURE__ */ new Date(), {
70
70
  user: await getUser() || "_",
@@ -86,7 +86,7 @@ apiRouter.put`${fileCabinetId$1}/files/${filePathParam$1}+`(async (ctx) => {
86
86
  break;
87
87
  }
88
88
  }
89
- if (!link) return e404(ctx);
89
+ if (!link) return e404();
90
90
  ctx.responseHeaders.set("Location", link.link);
91
91
  return link;
92
92
  });
@@ -100,9 +100,9 @@ const downloadRouter = new ApiRouter();
100
100
  downloadRouter.get`${fileCabinetId}/files/${filePathParam}+`(async (ctx) => {
101
101
  const cabinetId = fileCabinetId.param(ctx) || "_";
102
102
  const filePath = filePathParam.params(ctx);
103
- if (!filePath?.length) return e404(ctx);
103
+ if (!filePath?.length) return e404();
104
104
  const cabinet = await getCabinet(cabinetId);
105
- if (!cabinet) return e404(ctx);
105
+ if (!cabinet) return e404();
106
106
  let link = "";
107
107
  switch (cabinet.mode) {
108
108
  case "map": {
@@ -112,7 +112,7 @@ downloadRouter.get`${fileCabinetId}/files/${filePathParam}+`(async (ctx) => {
112
112
  break;
113
113
  }
114
114
  }
115
- if (!link) return e404(ctx);
115
+ if (!link) return e404();
116
116
  ctx.responseHeaders.set("Location", link);
117
117
  ctx.status = 302;
118
118
  });
@@ -1 +1 @@
1
- {"version":3,"file":"routers.yongdall.mjs","names":["fileCabinetId","filePathParam","apiRouter","download"],"sources":["../../plugins/file/getCabinet.mjs","../../plugins/file/common/replacePath.mjs","../../plugins/file/routers/api.mjs","../../plugins/file/routers/download.mjs","../../plugins/file/routers/index.mjs"],"sourcesContent":["import { getModel } from '@yongdall/core';\nimport { Query } from '@yongdall/model';\nimport { useDatabase } from '@yongdall/connection';\n\n\n\n/**\n * \n * @param {string} cabinetId \n * @returns {Promise<{mode: string; storeId: string; storePath: string; uploadPath: string; public: boolean}?>}\n */\nexport default async function getCabinet(cabinetId) {\n\n\tconst pageModel = await getModel('fileCabinet');\n\tif (!pageModel) { return null; }\n\n\tconst sql = new Query(pageModel, true).where('id', cabinetId);\n\tconst database = useDatabase(pageModel.databaseId);\n\treturn await database.first(sql) || null;\n}\n","\n/**\n * \n * @param {string} path \n * @param {Date} date \n * @param {Record<string, any>} data \n */\nexport default function replacePath(path, date, data) {\n\treturn path.replace(/\\{([a-zA-Z]+)\\}/g, (_, v) => {\n\t\tswitch (v) {\n\t\t\tcase 'YYYY':\n\t\t\tcase 'YYY':\n\t\t\tcase 'YY':\n\t\t\t\tconst year = date.getFullYear();\n\t\t\t\treturn `${year}`.slice(-v.length);\n\t\t\tcase 'MM':\n\t\t\tcase 'M':\n\t\t\t\tconst month = date.getMonth() + 1;\n\t\t\t\treturn `${month}`.padStart(v.length, '0');\n\t\t\tcase 'DD':\n\t\t\tcase 'D':\n\t\t\t\tconst day = date.getDate();\n\t\t\t\treturn `${day}`.padStart(v.length, '0');\n\t\t\tcase 'hh':\n\t\t\tcase 'h':\n\t\t\t\tconst hour = date.getHours();\n\t\t\t\treturn `${hour}`.padStart(v.length, '0');\n\t\t\tcase 'mm':\n\t\t\tcase 'm':\n\t\t\t\tconst minute = date.getMinutes();\n\t\t\t\treturn `${minute}`.padStart(v.length, '0');\n\t\t\tcase 'ss':\n\t\t\tcase 's':\n\t\t\t\tconst second = date.getSeconds();\n\t\t\t\treturn `${second}`.padStart(v.length, '0');\n\t\t\tdefault: {\n\t\t\t\tif (Object.hasOwn(data, v)) {\n\t\t\t\t\treturn data[v];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn _;\n\t});\n}\n","import { ApiRouter, Param } from '@yongdall/http';\nimport { e404 } from '@yongdall/http';\nimport { getUser } from '@yongdall/core';\nimport { useConnection } from '@yongdall/connection';\nimport getCabinet from '../getCabinet.mjs';\nimport replacePath from '../common/replacePath.mjs';\n\n\n\n\nconst fileCabinetId = new Param();\nconst filePathParam = new Param();\n\n\n\nconst apiRouter = new ApiRouter();\n\napiRouter.put`${fileCabinetId}/files/${filePathParam}+`(async ctx => {\n\tconst cabinetId = fileCabinetId.param(ctx) || '_';\n\tconst filePath = filePathParam.params(ctx);\n\tif (!filePath?.length) { return e404(ctx); }\n\tconst paths = filePath;\n\tconst path = filePath.join('/');\n\tconst fileName = paths.pop()?.replace(/[\\\\\\/#?{}~@:&^$()]/g, '') || '';\n\tif (!fileName) { return e404(ctx); }\n\tconst dirname = paths.join('/');\n\n\tconst index = fileName.lastIndexOf('.');\n\tconst filename = fileName.slice(0, index) || '_';\n\tconst extname = index >= 0 ? fileName.slice(index) : '';\n\n\tconst cabinet = await getCabinet(cabinetId);\n\tif (!cabinet) { return e404(ctx); }\n\tconst uploadPath = cabinet.uploadPath;\n\tconst subPath = uploadPath ? replacePath(uploadPath, new Date, {\n\t\tuser: await getUser() || '_', filename, extname, dirname,\n\t}) : path;\n\t/** @type {{id?: number, link: string; domain: string; path: string}?} */\n\tlet link = null;\n\tswitch (cabinet.mode) {\n\t\tcase 'map': {\n\t\t\tconst store = useConnection('fs', cabinet.storeId);\n\t\t\tconst path = [\n\t\t\t\t...cabinet.storePath?.split('/')?.filter(Boolean) || [],\n\t\t\t\tsubPath,\n\t\t\t].join('/');\n\t\t\tlink = {\n\t\t\t\tlink: await store.urlWrite(path),\n\t\t\t\tpath: subPath, domain: cabinetId,\n\t\t\t};\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!link) { return e404(ctx); }\n\n\tctx.responseHeaders.set('Location', link.link);\n\treturn link;\n});\nexport default apiRouter;\n","import { ApiRouter, Param } from '@yongdall/http';\nimport { e404 } from '@yongdall/http';\nimport { useConnection } from '@yongdall/connection';\nimport getCabinet from '../getCabinet.mjs';\n\n\nconst fileCabinetId = new Param();\nconst filePathParam = new Param();\nconst downloadRouter = new ApiRouter();\n\ndownloadRouter.get`${fileCabinetId}/files/${filePathParam}+`(async ctx => {\n\tconst cabinetId = fileCabinetId.param(ctx) || '_';\n\tconst filePath = filePathParam.params(ctx);\n\tif (!filePath?.length) { return e404(ctx); }\n\tconst cabinet = await getCabinet(cabinetId);\n\tif (!cabinet) { return e404(ctx); }\n\n\tlet link = '';\n\tswitch (cabinet.mode) {\n\t\tcase 'map': {\n\t\t\tconst store = useConnection('fs', cabinet.storeId);\n\t\t\tconst path = [\n\t\t\t\t...cabinet.storePath?.split('/')?.filter(Boolean) || [],\n\t\t\t\t...filePath,\n\t\t\t].join('/');\n\t\t\tlink = await store.urlRead(path);\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!link) { return e404(ctx); }\n\tctx.responseHeaders.set('Location', link);\n\tctx.status = 302;\n});\nexport default downloadRouter;\n","import apiRouter from './api.mjs';\nimport download from './download.mjs';\n\nexport const api = {\n\tfileCabinets: apiRouter,\n}\nexport const root = {\n\tfileCabinets: download,\n}\n"],"mappings":";;;;;;;;;;;AAWA,eAA8B,WAAW,WAAW;CAEnD,MAAM,YAAY,MAAM,SAAS,cAAc;AAC/C,KAAI,CAAC,UAAa,QAAO;CAEzB,MAAM,MAAM,IAAI,MAAM,WAAW,KAAK,CAAC,MAAM,MAAM,UAAU;AAE7D,QAAO,MADU,YAAY,UAAU,WAAW,CAC5B,MAAM,IAAI,IAAI;;;;;;;;;;;ACXrC,SAAwB,YAAY,MAAM,MAAM,MAAM;AACrD,QAAO,KAAK,QAAQ,qBAAqB,GAAG,MAAM;AACjD,UAAQ,GAAR;GACC,KAAK;GACL,KAAK;GACL,KAAK,KAEJ,QAAO,GADM,KAAK,aAAa,GACd,MAAM,CAAC,EAAE,OAAO;GAClC,KAAK;GACL,KAAK,IAEJ,QAAO,GADO,KAAK,UAAU,GAAG,I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AK;AACzC,KAAI,SAAS;EACZ;AACF,uBAAe;;;;AC9Bf,MAAa,MAAM,EAClB,cAAcC,aACd;AACD,MAAa,OAAO,EACnB,cAAcC,kBACd"}
1
+ {"version":3,"file":"routers.yongdall.mjs","names":["fileCabinetId","filePathParam","apiRouter","download"],"sources":["../../plugins/file/getCabinet.mjs","../../plugins/file/common/replacePath.mjs","../../plugins/file/routers/api.mjs","../../plugins/file/routers/download.mjs","../../plugins/file/routers/index.mjs"],"sourcesContent":["import { getModel } from '@yongdall/core';\nimport { Query } from '@yongdall/model';\nimport { useDatabase } from '@yongdall/connection';\n\n\n\n/**\n * \n * @param {string} cabinetId \n * @returns {Promise<{mode: string; storeId: string; storePath: string; uploadPath: string; public: boolean}?>}\n */\nexport default async function getCabinet(cabinetId) {\n\n\tconst pageModel = await getModel('fileCabinet');\n\tif (!pageModel) { return null; }\n\n\tconst sql = new Query(pageModel, true).where('id', cabinetId);\n\tconst database = useDatabase(pageModel.databaseId);\n\treturn await database.first(sql) || null;\n}\n","\n/**\n * \n * @param {string} path \n * @param {Date} date \n * @param {Record<string, any>} data \n */\nexport default function replacePath(path, date, data) {\n\treturn path.replace(/\\{([a-zA-Z]+)\\}/g, (_, v) => {\n\t\tswitch (v) {\n\t\t\tcase 'YYYY':\n\t\t\tcase 'YYY':\n\t\t\tcase 'YY':\n\t\t\t\tconst year = date.getFullYear();\n\t\t\t\treturn `${year}`.slice(-v.length);\n\t\t\tcase 'MM':\n\t\t\tcase 'M':\n\t\t\t\tconst month = date.getMonth() + 1;\n\t\t\t\treturn `${month}`.padStart(v.length, '0');\n\t\t\tcase 'DD':\n\t\t\tcase 'D':\n\t\t\t\tconst day = date.getDate();\n\t\t\t\treturn `${day}`.padStart(v.length, '0');\n\t\t\tcase 'hh':\n\t\t\tcase 'h':\n\t\t\t\tconst hour = date.getHours();\n\t\t\t\treturn `${hour}`.padStart(v.length, '0');\n\t\t\tcase 'mm':\n\t\t\tcase 'm':\n\t\t\t\tconst minute = date.getMinutes();\n\t\t\t\treturn `${minute}`.padStart(v.length, '0');\n\t\t\tcase 'ss':\n\t\t\tcase 's':\n\t\t\t\tconst second = date.getSeconds();\n\t\t\t\treturn `${second}`.padStart(v.length, '0');\n\t\t\tdefault: {\n\t\t\t\tif (Object.hasOwn(data, v)) {\n\t\t\t\t\treturn data[v];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn _;\n\t});\n}\n","import { ApiRouter, Param } from '@yongdall/http';\nimport { e404 } from '@yongdall/http';\nimport { getUser } from '@yongdall/core';\nimport { useConnection } from '@yongdall/connection';\nimport getCabinet from '../getCabinet.mjs';\nimport replacePath from '../common/replacePath.mjs';\n\n\n\n\nconst fileCabinetId = new Param();\nconst filePathParam = new Param();\n\n\n\nconst apiRouter = new ApiRouter();\n\napiRouter.put`${fileCabinetId}/files/${filePathParam}+`(async ctx => {\n\tconst cabinetId = fileCabinetId.param(ctx) || '_';\n\tconst filePath = filePathParam.params(ctx);\n\tif (!filePath?.length) { return e404(); }\n\tconst paths = filePath;\n\tconst path = filePath.join('/');\n\tconst fileName = paths.pop()?.replace(/[\\\\\\/#?{}~@:&^$()]/g, '') || '';\n\tif (!fileName) { return e404(); }\n\tconst dirname = paths.join('/');\n\n\tconst index = fileName.lastIndexOf('.');\n\tconst filename = fileName.slice(0, index) || '_';\n\tconst extname = index >= 0 ? fileName.slice(index) : '';\n\n\tconst cabinet = await getCabinet(cabinetId);\n\tif (!cabinet) { return e404(); }\n\tconst uploadPath = cabinet.uploadPath;\n\tconst subPath = uploadPath ? replacePath(uploadPath, new Date, {\n\t\tuser: await getUser() || '_', filename, extname, dirname,\n\t}) : path;\n\t/** @type {{id?: number, link: string; domain: string; path: string}?} */\n\tlet link = null;\n\tswitch (cabinet.mode) {\n\t\tcase 'map': {\n\t\t\tconst store = useConnection('fs', cabinet.storeId);\n\t\t\tconst path = [\n\t\t\t\t...cabinet.storePath?.split('/')?.filter(Boolean) || [],\n\t\t\t\tsubPath,\n\t\t\t].join('/');\n\t\t\tlink = {\n\t\t\t\tlink: await store.urlWrite(path),\n\t\t\t\tpath: subPath, domain: cabinetId,\n\t\t\t};\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!link) { return e404(); }\n\n\tctx.responseHeaders.set('Location', link.link);\n\treturn link;\n});\nexport default apiRouter;\n","import { ApiRouter, Param } from '@yongdall/http';\nimport { e404 } from '@yongdall/http';\nimport { useConnection } from '@yongdall/connection';\nimport getCabinet from '../getCabinet.mjs';\n\n\nconst fileCabinetId = new Param();\nconst filePathParam = new Param();\nconst downloadRouter = new ApiRouter();\n\ndownloadRouter.get`${fileCabinetId}/files/${filePathParam}+`(async ctx => {\n\tconst cabinetId = fileCabinetId.param(ctx) || '_';\n\tconst filePath = filePathParam.params(ctx);\n\tif (!filePath?.length) { return e404(); }\n\tconst cabinet = await getCabinet(cabinetId);\n\tif (!cabinet) { return e404(); }\n\n\tlet link = '';\n\tswitch (cabinet.mode) {\n\t\tcase 'map': {\n\t\t\tconst store = useConnection('fs', cabinet.storeId);\n\t\t\tconst path = [\n\t\t\t\t...cabinet.storePath?.split('/')?.filter(Boolean) || [],\n\t\t\t\t...filePath,\n\t\t\t].join('/');\n\t\t\tlink = await store.urlRead(path);\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!link) { return e404(); }\n\tctx.responseHeaders.set('Location', link);\n\tctx.status = 302;\n});\nexport default downloadRouter;\n","import apiRouter from './api.mjs';\nimport download from './download.mjs';\n\nexport const api = {\n\tfileCabinets: apiRouter,\n}\nexport const root = {\n\tfileCabinets: download,\n}\n"],"mappings":";;;;;;;;;;;AAWA,eAA8B,WAAW,WAAW;CAEnD,MAAM,YAAY,MAAM,SAAS,cAAc;AAC/C,KAAI,CAAC,UAAa,QAAO;CAEzB,MAAM,MAAM,IAAI,MAAM,WAAW,KAAK,CAAC,MAAM,MAAM,UAAU;AAE7D,QAAO,MADU,YAAY,UAAU,WAAW,CAC5B,MAAM,IAAI,IAAI;;;;;;;;;;;ACXrC,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AAQ,WAAW,MAAM,IAAI,EAAE,OAAO,QAAQ,IAAI,EAAE,EACvD,GAAG,SACH,CAAC,KAAK,IAAI;AACX,UAAO,MAAM,MAAM,QAAQ,KAAK;AAChC;;;AAGF,KAAI,CAAC,KAAQ,QAAO,MAAM;AAC1B,KAAI,gBAAgB,IAAI,YAAY,KAAK;AACzC,KAAI,SAAS;EACZ;AACF,uBAAe;;;;AC9Bf,MAAa,MAAM,EAClB,cAAcC,aACd;AACD,MAAa,OAAO,EACnB,cAAcC,kBACd"}
@@ -0,0 +1,10 @@
1
+ import { t as FileCabinet_default } from "../file-DqyOTm3m.mjs";
2
+
3
+ //#region plugins/file/yongdall/migration.mjs
4
+ /** @import { Profile } from '@yongdall/migrate' */
5
+ /** @type {Profile['models']} */
6
+ const models = [FileCabinet_default];
7
+
8
+ //#endregion
9
+ export { models };
10
+ //# sourceMappingURL=migration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.mjs","names":["FileCabinet"],"sources":["../../../plugins/file/yongdall/migration.mjs"],"sourcesContent":["/** @import { Profile } from '@yongdall/migrate' */\nimport { FileCabinet } from '../index.mjs';\n\n\n/** @type {Profile['models']} */\nexport const models = [\n\tFileCabinet,\n]\n"],"mappings":";;;;;AAKA,MAAa,SAAS,CACrBA,oBACA"}
@@ -0,0 +1,10 @@
1
+ import { t as FileCabinet_default } from "../file-DqyOTm3m.mjs";
2
+
3
+ //#region plugins/file/yongdall/model.mjs
4
+ /** @import { ModelProfile } from '@yongdall/core' */
5
+ /** @type {ModelProfile['models']} */
6
+ const models = { fileCabinet: FileCabinet_default };
7
+
8
+ //#endregion
9
+ export { models };
10
+ //# sourceMappingURL=model.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.mjs","names":["FileCabinet"],"sources":["../../../plugins/file/yongdall/model.mjs"],"sourcesContent":["/** @import { ModelProfile } from '@yongdall/core' */\nimport { FileCabinet } from '../index.mjs';\n\n/** @type {ModelProfile['models']} */\nexport const models = {\n\tfileCabinet: FileCabinet,\n};\n"],"mappings":";;;;;AAIA,MAAa,SAAS,EACrB,aAAaA,qBACb"}
@@ -0,0 +1 @@
1
+ label: 文件管理
@@ -1,12 +0,0 @@
1
- import { t as FileCabinet_default } from "./file-DqyOTm3m.mjs";
2
-
3
- //#region plugins/file/hooks.yongdall.mjs
4
- /** @import { Hooks } from '@yongdall/core' */
5
- /** @type {Hooks.Define['models']} */
6
- const models = { fileCabinet: FileCabinet_default };
7
- /** @type {Hooks.Define['migrationModels']} */
8
- const migrationModels = [FileCabinet_default];
9
-
10
- //#endregion
11
- export { migrationModels, models };
12
- //# sourceMappingURL=hooks.yongdall.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hooks.yongdall.mjs","names":["FileCabinet"],"sources":["../../plugins/file/hooks.yongdall.mjs"],"sourcesContent":["import { FileCabinet } from './index.mjs';\n/** @import { Hooks } from '@yongdall/core' */\n\n/** @type {Hooks.Define['models']} */\nexport const models = {\n\tfileCabinet: FileCabinet,\n};\n\n\n/** @type {Hooks.Define['migrationModels']} */\nexport const migrationModels = [\n\tFileCabinet,\n]\n"],"mappings":";;;;;AAIA,MAAa,SAAS,EACrB,aAAaA,qBACb;;AAID,MAAa,kBAAkB,CAC9BA,oBACA"}