@nocobase/plugin-file-manager 2.1.0-alpha.33 → 2.1.0-alpha.35
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/dist/client/index.js +1 -1
- package/dist/client-v2/125.01d5562df948d974.js +10 -0
- package/dist/client-v2/229.bd72c2d7aa088310.js +10 -0
- package/dist/client-v2/336.1dd1b32466d0c778.js +10 -0
- package/dist/client-v2/43.eb45d53ba3e9828b.js +10 -0
- package/dist/client-v2/450.f590b4c220108742.js +10 -0
- package/dist/client-v2/929.d7e783304cc1f236.js +10 -0
- package/dist/client-v2/942.c10c97317af6dd02.js +10 -0
- package/dist/client-v2/{storageTypes/index.d.ts → components/BaseUrlField.d.ts} +2 -2
- package/dist/client-v2/components/DefaultField.d.ts +18 -0
- package/dist/client-v2/components/FileSizeField.d.ts +10 -0
- package/dist/client-v2/components/MimetypeField.d.ts +10 -0
- package/dist/client-v2/components/NameField.d.ts +10 -0
- package/dist/client-v2/components/ParanoidField.d.ts +10 -0
- package/dist/client-v2/components/PathField.d.ts +18 -0
- package/dist/client-v2/components/RenameModeField.d.ts +10 -0
- package/dist/client-v2/components/TitleField.d.ts +10 -0
- package/dist/client-v2/components/index.d.ts +17 -0
- package/dist/client-v2/index.d.ts +5 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/plugin.d.ts +47 -6
- package/dist/client-v2/storage-forms/AliOssStorageForm.d.ts +10 -0
- package/dist/client-v2/storage-forms/LocalStorageForm.d.ts +10 -0
- package/dist/client-v2/storage-forms/S3StorageForm.d.ts +10 -0
- package/dist/client-v2/storage-forms/TxCosStorageForm.d.ts +10 -0
- package/dist/externalVersion.js +9 -10
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -1
- package/dist/node_modules/@aws-sdk/lib-storage/package.json +1 -1
- package/dist/node_modules/ali-oss/package.json +1 -1
- package/dist/node_modules/mime-match/package.json +1 -1
- package/dist/node_modules/mime-types/package.json +1 -1
- package/dist/node_modules/mkdirp/package.json +1 -1
- package/dist/node_modules/multer-cos/package.json +1 -1
- package/dist/node_modules/url-join/package.json +1 -1
- package/dist/shared/previewer/filePreviewTypes.d.ts +1 -0
- package/dist/shared/previewer/filePreviewTypes.js +21 -0
- package/package.json +2 -2
- package/dist/client-v2/855.e7d2e24a0b457a89.js +0 -10
- package/dist/client-v2/storageTypes/types.d.ts +0 -26
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { Application } from '@nocobase/client-v2';
|
|
10
10
|
import { Plugin } from '@nocobase/client-v2';
|
|
11
|
-
import type
|
|
11
|
+
import type React from 'react';
|
|
12
12
|
type UploadFileResult = {
|
|
13
13
|
errorMessage?: string;
|
|
14
14
|
data?: unknown;
|
|
@@ -25,15 +25,56 @@ type StorageUploadOptions = {
|
|
|
25
25
|
fileCollectionName: string;
|
|
26
26
|
query?: Record<string, string | number | boolean>;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Unified storage type definition. A single entry describes both the
|
|
30
|
+
* settings-page form (UI: `title` + `formLoader` + `defaultValues`) and the
|
|
31
|
+
* optional runtime upload override (`upload` / `createUploadCustomRequest`).
|
|
32
|
+
*
|
|
33
|
+
* Built-in storages register the UI fields only and fall back to the default
|
|
34
|
+
* `apiClient.request` multipart upload. Commercial / third-party storage
|
|
35
|
+
* plugins (e.g. S3 Pro) layer a presigned-PUT pipeline on top by populating
|
|
36
|
+
* the optional runtime fields.
|
|
37
|
+
*/
|
|
38
|
+
export interface StorageType {
|
|
39
|
+
/** Server-side storage type identifier — must match the persisted `storages.type` value. */
|
|
40
|
+
name: string;
|
|
41
|
+
/** Display title shown in the "Add new" dropdown and drawer header. Wrapped with `t(...)` at render time. */
|
|
42
|
+
title: string;
|
|
43
|
+
/**
|
|
44
|
+
* Async loader for the form body — the list of `<Form.Item>` fields inside
|
|
45
|
+
* the storage drawer. The loaded module's default export is used, matching
|
|
46
|
+
* the convention of `componentLoader` and `registerModelLoaders` elsewhere
|
|
47
|
+
* in the codebase.
|
|
48
|
+
*/
|
|
49
|
+
formLoader: () => Promise<{
|
|
50
|
+
default: React.ComponentType;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Optional per-storage initial values merged on top of the page-level
|
|
54
|
+
* defaults (`type` + generated `name`) when creating a new record.
|
|
55
|
+
*/
|
|
56
|
+
defaultValues?: Record<string, any>;
|
|
57
|
+
/**
|
|
58
|
+
* Optional override of the `PluginFileManagerClientV2.uploadFile` pipeline,
|
|
59
|
+
* used when editors (Markdown, Vditor, etc.) paste / drop files outside of
|
|
60
|
+
* an attachment field. When absent, uploads go through the default
|
|
61
|
+
* multipart `apiClient.request` path.
|
|
62
|
+
*/
|
|
29
63
|
upload?: (options: StorageUploadOptions) => Promise<UploadFileResult>;
|
|
30
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Optional `customRequest` factory consumed by `UploadFieldModel` for the
|
|
66
|
+
* inline attachment Upload component. When absent, `UploadFieldModel` falls
|
|
67
|
+
* back to `uploadFile`.
|
|
68
|
+
*/
|
|
69
|
+
createUploadCustomRequest?: (options: any) => (option: any) => void;
|
|
70
|
+
}
|
|
31
71
|
export declare class PluginFileManagerClientV2 extends Plugin<Record<string, never>, Application> {
|
|
32
72
|
static buildInStorage: string[];
|
|
33
|
-
storageTypes: Map<string,
|
|
73
|
+
storageTypes: Map<string, StorageType>;
|
|
34
74
|
load(): Promise<void>;
|
|
35
|
-
registerStorageType(name: string,
|
|
36
|
-
getStorageType(name?: string):
|
|
75
|
+
registerStorageType(name: string, storageType: Omit<StorageType, 'name'>): void;
|
|
76
|
+
getStorageType(name?: string): StorageType;
|
|
77
|
+
private registerBuiltInStorageTypes;
|
|
37
78
|
uploadFile(options?: {
|
|
38
79
|
file: File;
|
|
39
80
|
fileCollectionName?: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export default function AliOssStorageForm(): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export default function LocalStorageForm(): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export default function S3StorageForm(): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export default function TxCosStorageForm(): React.JSX.Element;
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.35",
|
|
12
12
|
"react": "18.2.0",
|
|
13
13
|
"antd": "5.24.2",
|
|
14
14
|
"@ant-design/icons": "5.6.1",
|
|
@@ -18,18 +18,17 @@ module.exports = {
|
|
|
18
18
|
"@formily/antd-v5": "1.2.3",
|
|
19
19
|
"@formily/core": "2.3.7",
|
|
20
20
|
"@formily/react": "2.3.7",
|
|
21
|
-
"@nocobase/flow-engine": "2.1.0-alpha.
|
|
22
|
-
"@nocobase/client-v2": "2.1.0-alpha.
|
|
21
|
+
"@nocobase/flow-engine": "2.1.0-alpha.35",
|
|
22
|
+
"@nocobase/client-v2": "2.1.0-alpha.35",
|
|
23
23
|
"multer": "1.4.5-lts.2",
|
|
24
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
25
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
26
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
27
|
-
"@nocobase/test": "2.1.0-alpha.
|
|
24
|
+
"@nocobase/database": "2.1.0-alpha.35",
|
|
25
|
+
"@nocobase/server": "2.1.0-alpha.35",
|
|
26
|
+
"@nocobase/utils": "2.1.0-alpha.35",
|
|
27
|
+
"@nocobase/test": "2.1.0-alpha.35",
|
|
28
28
|
"@emotion/css": "11.13.0",
|
|
29
29
|
"ahooks": "3.7.8",
|
|
30
|
-
"@nocobase/
|
|
31
|
-
"@nocobase/actions": "2.1.0-alpha.33",
|
|
30
|
+
"@nocobase/actions": "2.1.0-alpha.35",
|
|
32
31
|
"sequelize": "6.35.2",
|
|
33
|
-
"@nocobase/plugin-data-source-main": "2.1.0-alpha.
|
|
32
|
+
"@nocobase/plugin-data-source-main": "2.1.0-alpha.35",
|
|
34
33
|
"axios": "1.7.7"
|
|
35
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@aws-sdk/client-s3","description":"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native","version":"3.750.0","scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3","test":"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.750.0","@aws-sdk/credential-provider-node":"3.750.0","@aws-sdk/middleware-bucket-endpoint":"3.734.0","@aws-sdk/middleware-expect-continue":"3.734.0","@aws-sdk/middleware-flexible-checksums":"3.750.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-location-constraint":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.734.0","@aws-sdk/middleware-sdk-s3":"3.750.0","@aws-sdk/middleware-ssec":"3.734.0","@aws-sdk/middleware-user-agent":"3.750.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/signature-v4-multi-region":"3.750.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.750.0","@aws-sdk/xml-builder":"3.734.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.4","@smithy/eventstream-serde-browser":"^4.0.1","@smithy/eventstream-serde-config-resolver":"^4.0.1","@smithy/eventstream-serde-node":"^4.0.1","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-blob-browser":"^4.0.1","@smithy/hash-node":"^4.0.1","@smithy/hash-stream-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/md5-js":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.5","@smithy/middleware-retry":"^4.0.6","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.2","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.5","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.6","@smithy/util-defaults-mode-node":"^4.0.6","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-stream":"^4.1.1","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.2","tslib":"^2.6.2"},"devDependencies":{"@aws-sdk/signature-v4-crt":"3.750.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.2.2"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-s3"},"_lastModified":"2026-05-
|
|
1
|
+
{"name":"@aws-sdk/client-s3","description":"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native","version":"3.750.0","scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3","test":"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.750.0","@aws-sdk/credential-provider-node":"3.750.0","@aws-sdk/middleware-bucket-endpoint":"3.734.0","@aws-sdk/middleware-expect-continue":"3.734.0","@aws-sdk/middleware-flexible-checksums":"3.750.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-location-constraint":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.734.0","@aws-sdk/middleware-sdk-s3":"3.750.0","@aws-sdk/middleware-ssec":"3.734.0","@aws-sdk/middleware-user-agent":"3.750.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/signature-v4-multi-region":"3.750.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.750.0","@aws-sdk/xml-builder":"3.734.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.4","@smithy/eventstream-serde-browser":"^4.0.1","@smithy/eventstream-serde-config-resolver":"^4.0.1","@smithy/eventstream-serde-node":"^4.0.1","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-blob-browser":"^4.0.1","@smithy/hash-node":"^4.0.1","@smithy/hash-stream-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/md5-js":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.5","@smithy/middleware-retry":"^4.0.6","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.2","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.5","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.6","@smithy/util-defaults-mode-node":"^4.0.6","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-stream":"^4.1.1","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.2","tslib":"^2.6.2"},"devDependencies":{"@aws-sdk/signature-v4-crt":"3.750.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.2.2"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-s3"},"_lastModified":"2026-05-14T03:57:14.950Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@aws-sdk/lib-storage","version":"3.750.0","description":"Storage higher order operation","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline lib-storage","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","test":"yarn g:vitest run","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts --mode development","test:watch":"yarn g:vitest watch","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts"},"engines":{"node":">=18.0.0"},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@smithy/abort-controller":"^4.0.1","@smithy/middleware-endpoint":"^4.0.5","@smithy/smithy-client":"^4.1.5","buffer":"5.6.0","events":"3.3.0","stream-browserify":"3.0.0","tslib":"^2.6.2"},"peerDependencies":{"@aws-sdk/client-s3":"^3.750.0"},"devDependencies":{"@aws-sdk/client-s3":"3.750.0","@smithy/types":"^4.1.0","@tsconfig/recommended":"1.0.1","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.2.2","web-streams-polyfill":"3.2.1"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser","fs":false,"stream":"stream-browserify"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"files":["dist-*/**"],"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/lib/lib-storage","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"lib/lib-storage"},"_lastModified":"2026-05-
|
|
1
|
+
{"name":"@aws-sdk/lib-storage","version":"3.750.0","description":"Storage higher order operation","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline lib-storage","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","test":"yarn g:vitest run","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts --mode development","test:watch":"yarn g:vitest watch","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts"},"engines":{"node":">=18.0.0"},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@smithy/abort-controller":"^4.0.1","@smithy/middleware-endpoint":"^4.0.5","@smithy/smithy-client":"^4.1.5","buffer":"5.6.0","events":"3.3.0","stream-browserify":"3.0.0","tslib":"^2.6.2"},"peerDependencies":{"@aws-sdk/client-s3":"^3.750.0"},"devDependencies":{"@aws-sdk/client-s3":"3.750.0","@smithy/types":"^4.1.0","@tsconfig/recommended":"1.0.1","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.2.2","web-streams-polyfill":"3.2.1"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser","fs":false,"stream":"stream-browserify"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"files":["dist-*/**"],"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/lib/lib-storage","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"lib/lib-storage"},"_lastModified":"2026-05-14T03:57:15.918Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ali-oss","version":"6.20.0","description":"aliyun oss(object storage service) node client","main":"./lib/client.js","files":["lib","shims","dist"],"browser":{"./lib/client.js":"./dist/aliyun-oss-sdk.js","mime":"mime/lite","urllib":"./shims/xhr.js","utility":"./shims/utility.js","crypto":"./shims/crypto/crypto.js","debug":"./shims/debug","fs":false,"child_process":false,"is-type-of":"./shims/is-type-of.js"},"scripts":{"build-change-log":"standard-version","test":"npm run tsc && mocha -t 120000 -r should -r dotenv/config test/node/*.test.js test/node/**/*.test.js","test-cov":"npm run tsc && nyc --reporter=lcov node_modules/.bin/_mocha -t 120000 -r should test/node/*.test.js test/node/**/*.test.js","jshint":"jshint .","build-test":"MINIFY=1 node browser-build.js > test/browser/build/aliyun-oss-sdk.min.js && node -r dotenv/config task/browser-test-build.js > test/browser/build/tests.js","browser-test":"npm run build-test && karma start","build-dist":"npm run tsc && node browser-build.js > dist/aliyun-oss-sdk.js && MINIFY=1 node browser-build.js > dist/aliyun-oss-sdk.min.js","publish-to-npm":"node publish-npm-check.js && npm publish","publish-to-cdn":"node publish.js","snyk-protect":"snyk-protect","lint-staged":"lint-staged","detect-secrets":"node task/detect-secrets","tsc":"npm run tsc:clean && npm run tsc:build","tsc:build":"tsc -b tsconfig.json tsconfig-cjs.json","tsc:watch":"tsc -b tsconfig.json tsconfig-cjs.json --watch","tsc:clean":"tsc -b tsconfig.json tsconfig-cjs.json --clean ","prepare":"husky install"},"git-pre-hooks":{"pre-release":"npm run build-dist","post-release":["npm run publish-to-npm","npm run publish-to-cdn"]},"homepage":"https://github.com/ali-sdk/ali-oss","bugs":{"url":"https://github.com/ali-sdk/ali-oss/issues"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"repository":{"type":"git","url":"https://github.com/ali-sdk/ali-oss.git"},"keywords":["oss","client","file","aliyun"],"author":"dead_horse","license":"MIT","engines":{"node":">=8"},"devDependencies":{"@babel/core":"^7.11.6","@babel/plugin-transform-regenerator":"^7.10.4","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@commitlint/cli":"^17.6.7","@commitlint/config-conventional":"^16.2.4","@octokit/core":"^5.0.0","@semantic-release/exec":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^10.0.5","@snyk/protect":"^1.1196.0","@types/node":"^14.0.12","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","aliasify":"^2.0.0","axios":"0.27.2","babelify":"^10.0.0","beautify-benchmark":"^0.2.4","benchmark":"^2.1.1","bluebird":"^3.1.5","browserify":"^17.0.0","core-js":"^3.6.5","crypto-js":"^3.1.9-1","dotenv":"^8.2.0","eslint":"^8.44.0","eslint-config-airbnb":"^19.0.4","eslint-config-ali":"^13.0.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.21.1","eslint-plugin-jsx-a11y":"^6.0.3","eslint-plugin-prettier":"^4.2.1","filereader":"^0.10.3","form-data":"^4.0.0","git-pre-hooks":"^1.2.0","husky":"^7.0.4","immediate":"^3.3.0","karma":"^6.3.4","karma-browserify":"^8.1.0","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.0.1","karma-ie-launcher":"^1.0.0","karma-mocha":"^2.0.1","karma-safari-launcher":"^1.0.0","lint-staged":"^12.4.1","mm":"^2.0.0","mocha":"^9.1.2","nyc":"^15.1.0","prettier":"^3.0.0","promise-polyfill":"^6.0.2","puppeteer":"19.0.0","semantic-release":"^21.1.1","should":"^11.0.0","sinon":"^15.2.0","standard-version":"^9.3.1","stream-equal":"^1.1.0","timemachine":"^0.3.0","typescript":"^3.9.5","uglify-js":"^3.14.2","watchify":"^4.0.0"},"dependencies":{"address":"^1.2.2","agentkeepalive":"^3.4.1","bowser":"^1.6.0","copy-to":"^2.0.1","dateformat":"^2.0.0","debug":"^4.3.4","destroy":"^1.0.4","end-or-error":"^1.0.1","get-ready":"^1.0.0","humanize-ms":"^1.2.0","is-type-of":"^1.4.0","js-base64":"^2.5.2","jstoxml":"^2.0.0","lodash":"^4.17.21","merge-descriptors":"^1.0.1","mime":"^2.4.5","platform":"^1.3.1","pump":"^3.0.0","qs":"^6.4.0","sdk-base":"^2.0.1","stream-http":"2.8.2","stream-wormhole":"^1.0.4","urllib":"2.41.0","utility":"^1.18.0","xml2js":"^0.6.2"},"snyk":true,"lint-staged":{"**/!(dist)/*":["npm run detect-secrets --"],"**/*.{js,ts}":["eslint --cache --fix --ext .js,.ts","prettier --write","git add"]},"_lastModified":"2026-05-
|
|
1
|
+
{"name":"ali-oss","version":"6.20.0","description":"aliyun oss(object storage service) node client","main":"./lib/client.js","files":["lib","shims","dist"],"browser":{"./lib/client.js":"./dist/aliyun-oss-sdk.js","mime":"mime/lite","urllib":"./shims/xhr.js","utility":"./shims/utility.js","crypto":"./shims/crypto/crypto.js","debug":"./shims/debug","fs":false,"child_process":false,"is-type-of":"./shims/is-type-of.js"},"scripts":{"build-change-log":"standard-version","test":"npm run tsc && mocha -t 120000 -r should -r dotenv/config test/node/*.test.js test/node/**/*.test.js","test-cov":"npm run tsc && nyc --reporter=lcov node_modules/.bin/_mocha -t 120000 -r should test/node/*.test.js test/node/**/*.test.js","jshint":"jshint .","build-test":"MINIFY=1 node browser-build.js > test/browser/build/aliyun-oss-sdk.min.js && node -r dotenv/config task/browser-test-build.js > test/browser/build/tests.js","browser-test":"npm run build-test && karma start","build-dist":"npm run tsc && node browser-build.js > dist/aliyun-oss-sdk.js && MINIFY=1 node browser-build.js > dist/aliyun-oss-sdk.min.js","publish-to-npm":"node publish-npm-check.js && npm publish","publish-to-cdn":"node publish.js","snyk-protect":"snyk-protect","lint-staged":"lint-staged","detect-secrets":"node task/detect-secrets","tsc":"npm run tsc:clean && npm run tsc:build","tsc:build":"tsc -b tsconfig.json tsconfig-cjs.json","tsc:watch":"tsc -b tsconfig.json tsconfig-cjs.json --watch","tsc:clean":"tsc -b tsconfig.json tsconfig-cjs.json --clean ","prepare":"husky install"},"git-pre-hooks":{"pre-release":"npm run build-dist","post-release":["npm run publish-to-npm","npm run publish-to-cdn"]},"homepage":"https://github.com/ali-sdk/ali-oss","bugs":{"url":"https://github.com/ali-sdk/ali-oss/issues"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"repository":{"type":"git","url":"https://github.com/ali-sdk/ali-oss.git"},"keywords":["oss","client","file","aliyun"],"author":"dead_horse","license":"MIT","engines":{"node":">=8"},"devDependencies":{"@babel/core":"^7.11.6","@babel/plugin-transform-regenerator":"^7.10.4","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@commitlint/cli":"^17.6.7","@commitlint/config-conventional":"^16.2.4","@octokit/core":"^5.0.0","@semantic-release/exec":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^10.0.5","@snyk/protect":"^1.1196.0","@types/node":"^14.0.12","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","aliasify":"^2.0.0","axios":"0.27.2","babelify":"^10.0.0","beautify-benchmark":"^0.2.4","benchmark":"^2.1.1","bluebird":"^3.1.5","browserify":"^17.0.0","core-js":"^3.6.5","crypto-js":"^3.1.9-1","dotenv":"^8.2.0","eslint":"^8.44.0","eslint-config-airbnb":"^19.0.4","eslint-config-ali":"^13.0.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.21.1","eslint-plugin-jsx-a11y":"^6.0.3","eslint-plugin-prettier":"^4.2.1","filereader":"^0.10.3","form-data":"^4.0.0","git-pre-hooks":"^1.2.0","husky":"^7.0.4","immediate":"^3.3.0","karma":"^6.3.4","karma-browserify":"^8.1.0","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.0.1","karma-ie-launcher":"^1.0.0","karma-mocha":"^2.0.1","karma-safari-launcher":"^1.0.0","lint-staged":"^12.4.1","mm":"^2.0.0","mocha":"^9.1.2","nyc":"^15.1.0","prettier":"^3.0.0","promise-polyfill":"^6.0.2","puppeteer":"19.0.0","semantic-release":"^21.1.1","should":"^11.0.0","sinon":"^15.2.0","standard-version":"^9.3.1","stream-equal":"^1.1.0","timemachine":"^0.3.0","typescript":"^3.9.5","uglify-js":"^3.14.2","watchify":"^4.0.0"},"dependencies":{"address":"^1.2.2","agentkeepalive":"^3.4.1","bowser":"^1.6.0","copy-to":"^2.0.1","dateformat":"^2.0.0","debug":"^4.3.4","destroy":"^1.0.4","end-or-error":"^1.0.1","get-ready":"^1.0.0","humanize-ms":"^1.2.0","is-type-of":"^1.4.0","js-base64":"^2.5.2","jstoxml":"^2.0.0","lodash":"^4.17.21","merge-descriptors":"^1.0.1","mime":"^2.4.5","platform":"^1.3.1","pump":"^3.0.0","qs":"^6.4.0","sdk-base":"^2.0.1","stream-http":"2.8.2","stream-wormhole":"^1.0.4","urllib":"2.41.0","utility":"^1.18.0","xml2js":"^0.6.2"},"snyk":true,"lint-staged":{"**/!(dist)/*":["npm run detect-secrets --"],"**/*.{js,ts}":["eslint --cache --fix --ext .js,.ts","prettier --write","git add"]},"_lastModified":"2026-05-14T03:57:13.727Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"mime-match","version":"1.0.2","description":"A simple function to check whether a mimetype matches the specified mimetype (with wildcard support)","main":"index.js","scripts":{"test":"node test.js","gendocs":"gendocs > README.md"},"repository":{"type":"git","url":"https://github.com/DamonOehlman/mime-match.git"},"keywords":["mime","wildcard"],"author":"Damon Oehlman <damon.oehlman@gmail.com>","license":"ISC","bugs":{"url":"https://github.com/DamonOehlman/mime-match/issues"},"homepage":"https://github.com/DamonOehlman/mime-match","dependencies":{"wildcard":"^1.1.0"},"devDependencies":{"tape":"^4.5.1"},"_lastModified":"2026-05-
|
|
1
|
+
{"name":"mime-match","version":"1.0.2","description":"A simple function to check whether a mimetype matches the specified mimetype (with wildcard support)","main":"index.js","scripts":{"test":"node test.js","gendocs":"gendocs > README.md"},"repository":{"type":"git","url":"https://github.com/DamonOehlman/mime-match.git"},"keywords":["mime","wildcard"],"author":"Damon Oehlman <damon.oehlman@gmail.com>","license":"ISC","bugs":{"url":"https://github.com/DamonOehlman/mime-match/issues"},"homepage":"https://github.com/DamonOehlman/mime-match","dependencies":{"wildcard":"^1.1.0"},"devDependencies":{"tape":"^4.5.1"},"_lastModified":"2026-05-14T03:57:09.458Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"mime-types","description":"The ultimate javascript content-type utility.","version":"3.0.1","contributors":["Douglas Christopher Wilson <doug@somethingdoug.com>","Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)","Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"],"license":"MIT","keywords":["mime","types"],"repository":"jshttp/mime-types","dependencies":{"mime-db":"^1.54.0"},"devDependencies":{"eslint":"8.33.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.27.5","eslint-plugin-markdown":"3.0.0","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"6.1.1","eslint-plugin-standard":"4.1.0","mocha":"10.2.0","nyc":"15.1.0"},"files":["HISTORY.md","LICENSE","index.js","mimeScore.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec test/test.js","test-ci":"nyc --reporter=lcov --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test"},"_lastModified":"2026-05-
|
|
1
|
+
{"name":"mime-types","description":"The ultimate javascript content-type utility.","version":"3.0.1","contributors":["Douglas Christopher Wilson <doug@somethingdoug.com>","Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)","Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"],"license":"MIT","keywords":["mime","types"],"repository":"jshttp/mime-types","dependencies":{"mime-db":"^1.54.0"},"devDependencies":{"eslint":"8.33.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.27.5","eslint-plugin-markdown":"3.0.0","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"6.1.1","eslint-plugin-standard":"4.1.0","mocha":"10.2.0","nyc":"15.1.0"},"files":["HISTORY.md","LICENSE","index.js","mimeScore.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec test/test.js","test-ci":"nyc --reporter=lcov --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test"},"_lastModified":"2026-05-14T03:57:09.733Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"mkdirp","description":"Recursively mkdir, like `mkdir -p`","version":"0.5.6","publishConfig":{"tag":"legacy"},"author":"James Halliday <mail@substack.net> (http://substack.net)","main":"index.js","keywords":["mkdir","directory"],"repository":{"type":"git","url":"https://github.com/substack/node-mkdirp.git"},"scripts":{"test":"tap test/*.js"},"dependencies":{"minimist":"^1.2.6"},"devDependencies":{"tap":"^16.0.1"},"bin":"bin/cmd.js","license":"MIT","files":["bin","index.js"],"_lastModified":"2026-05-
|
|
1
|
+
{"name":"mkdirp","description":"Recursively mkdir, like `mkdir -p`","version":"0.5.6","publishConfig":{"tag":"legacy"},"author":"James Halliday <mail@substack.net> (http://substack.net)","main":"index.js","keywords":["mkdir","directory"],"repository":{"type":"git","url":"https://github.com/substack/node-mkdirp.git"},"scripts":{"test":"tap test/*.js"},"dependencies":{"minimist":"^1.2.6"},"devDependencies":{"tap":"^16.0.1"},"bin":"bin/cmd.js","license":"MIT","files":["bin","index.js"],"_lastModified":"2026-05-14T03:57:13.815Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"_from":"multer-cos","_id":"multer-cos@1.0.2","_inBundle":false,"_integrity":"sha512-4F8P1VTCSNhiem+BFJFLe3Ixco6cIuAQ6j7U+PBRvdbBJRZgq5Q+vaDMMBWJ1HmPGOOP3AyKS5yk2f0nbFoqqA==","_location":"/multer-cos","_phantomChildren":{},"_requested":{"type":"tag","registry":true,"raw":"multer-cos","name":"multer-cos","escapedName":"multer-cos","rawSpec":"","saveSpec":null,"fetchSpec":"latest"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/multer-cos/-/multer-cos-1.0.2.tgz","_shasum":"95c7c06cdee1b9311675a895481f9d946de6dcf3","_spec":"multer-cos","_where":"/Users/lanbo/workplace/websocket","author":{"name":"lanbosm"},"bugs":{"url":"https://github.com/lanbosm/multer-COS/issues"},"bundleDependencies":false,"deprecated":false,"description":"Streaming multer storage engine for QCloud COS","devDependencies":{"cos-nodejs-sdk-v5":"^2.2.6","dotenv":"^5.0.1","multer":"^1.3.0"},"engines":{"node":">= 6.10.0"},"homepage":"https://github.com/lanbosm/multer-COS#readme","keywords":["express","multer","COS"],"license":"MIT","main":"index.js","name":"multer-cos","repository":{"type":"git","url":"git+ssh://git@github.com/lanbosm/multer-COS.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"version":"1.0.3","_lastModified":"2026-05-
|
|
1
|
+
{"_from":"multer-cos","_id":"multer-cos@1.0.2","_inBundle":false,"_integrity":"sha512-4F8P1VTCSNhiem+BFJFLe3Ixco6cIuAQ6j7U+PBRvdbBJRZgq5Q+vaDMMBWJ1HmPGOOP3AyKS5yk2f0nbFoqqA==","_location":"/multer-cos","_phantomChildren":{},"_requested":{"type":"tag","registry":true,"raw":"multer-cos","name":"multer-cos","escapedName":"multer-cos","rawSpec":"","saveSpec":null,"fetchSpec":"latest"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/multer-cos/-/multer-cos-1.0.2.tgz","_shasum":"95c7c06cdee1b9311675a895481f9d946de6dcf3","_spec":"multer-cos","_where":"/Users/lanbo/workplace/websocket","author":{"name":"lanbosm"},"bugs":{"url":"https://github.com/lanbosm/multer-COS/issues"},"bundleDependencies":false,"deprecated":false,"description":"Streaming multer storage engine for QCloud COS","devDependencies":{"cos-nodejs-sdk-v5":"^2.2.6","dotenv":"^5.0.1","multer":"^1.3.0"},"engines":{"node":">= 6.10.0"},"homepage":"https://github.com/lanbosm/multer-COS#readme","keywords":["express","multer","COS"],"license":"MIT","main":"index.js","name":"multer-cos","repository":{"type":"git","url":"git+ssh://git@github.com/lanbosm/multer-COS.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"version":"1.0.3","_lastModified":"2026-05-14T03:57:19.313Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"url-join","version":"4.0.1","description":"Join urls and normalize as in path.join.","main":"lib/url-join.js","scripts":{"test":"mocha --require should"},"repository":{"type":"git","url":"git://github.com/jfromaniello/url-join.git"},"keywords":["url","join"],"author":"José F. Romaniello <jfromaniello@gmail.com> (http://joseoncode.com)","license":"MIT","devDependencies":{"conventional-changelog":"^1.1.10","mocha":"^3.2.0","should":"~1.2.1"},"_lastModified":"2026-05-
|
|
1
|
+
{"name":"url-join","version":"4.0.1","description":"Join urls and normalize as in path.join.","main":"lib/url-join.js","scripts":{"test":"mocha --require should"},"repository":{"type":"git","url":"git://github.com/jfromaniello/url-join.git"},"keywords":["url","join"],"author":"José F. Romaniello <jfromaniello@gmail.com> (http://joseoncode.com)","license":"MIT","devDependencies":{"conventional-changelog":"^1.1.10","mocha":"^3.2.0","should":"~1.2.1"},"_lastModified":"2026-05-14T03:57:09.547Z"}
|
|
@@ -33,6 +33,7 @@ export declare function getPreviewFileUrl(file: any): any;
|
|
|
33
33
|
export declare function getFileUrl(file: any): any;
|
|
34
34
|
export declare function matchMimetype(file: any, type: string): any;
|
|
35
35
|
export declare const getFileExt: (file: any, url?: string) => string;
|
|
36
|
+
export declare const isActiveContentFile: (file: any, url?: string) => boolean;
|
|
36
37
|
export declare const getFileName: (file: any, url?: string) => any;
|
|
37
38
|
export declare const getDownloadFileName: (file: any, url?: string) => string;
|
|
38
39
|
export declare const getFallbackIcon: (file: any, url?: string) => string;
|
|
@@ -46,6 +46,7 @@ __export(filePreviewTypes_exports, {
|
|
|
46
46
|
getFileUrl: () => getFileUrl,
|
|
47
47
|
getPreviewFileUrl: () => getPreviewFileUrl,
|
|
48
48
|
getPreviewThumbnailUrl: () => getPreviewThumbnailUrl,
|
|
49
|
+
isActiveContentFile: () => isActiveContentFile,
|
|
49
50
|
matchMimetype: () => matchMimetype,
|
|
50
51
|
normalizePreviewFile: () => normalizePreviewFile,
|
|
51
52
|
wrapWithModalPreviewer: () => wrapWithModalPreviewer
|
|
@@ -124,6 +125,8 @@ const FALLBACK_ICON_MAP = {
|
|
|
124
125
|
svg: "/file-placeholder/svg-200-200.png",
|
|
125
126
|
default: "/file-placeholder/unknown-200-200.png"
|
|
126
127
|
};
|
|
128
|
+
const ACTIVE_CONTENT_MIMETYPES = /* @__PURE__ */ new Set(["application/xhtml+xml", "image/svg+xml", "text/html"]);
|
|
129
|
+
const ACTIVE_CONTENT_EXTENSIONS = /* @__PURE__ */ new Set(["htm", "html", "svg", "svgz", "xhtml"]);
|
|
127
130
|
const stripQueryAndHash = (url) => url.split("?")[0].split("#")[0];
|
|
128
131
|
const getExtFromName = (value) => {
|
|
129
132
|
if (!value) {
|
|
@@ -198,6 +201,14 @@ const getFileExt = (file, url) => {
|
|
|
198
201
|
}
|
|
199
202
|
return getExtFromName(url);
|
|
200
203
|
};
|
|
204
|
+
const isActiveContentFile = (file, url) => {
|
|
205
|
+
const mimetype = (file == null ? void 0 : file.mimetype) || (file == null ? void 0 : file.type);
|
|
206
|
+
if (typeof mimetype === "string" && ACTIVE_CONTENT_MIMETYPES.has(mimetype.toLowerCase())) {
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
const ext = getFileExt(file, url);
|
|
210
|
+
return ACTIVE_CONTENT_EXTENSIONS.has(ext);
|
|
211
|
+
};
|
|
201
212
|
const getFileName = (file, url) => {
|
|
202
213
|
const nameFromUrl = getNameFromUrl(url);
|
|
203
214
|
if (!file || typeof file === "string") {
|
|
@@ -221,6 +232,9 @@ const getFallbackIcon = (file, url) => {
|
|
|
221
232
|
const getPreviewThumbnailUrl = (file) => {
|
|
222
233
|
const previewFile = normalizePreviewFile(file);
|
|
223
234
|
const src = getPreviewFileUrl(previewFile);
|
|
235
|
+
if (isActiveContentFile(previewFile, src)) {
|
|
236
|
+
return getFallbackIcon(previewFile, src);
|
|
237
|
+
}
|
|
224
238
|
const { getThumbnailURL } = filePreviewTypes.getTypeByFile(previewFile) ?? {};
|
|
225
239
|
const thumbnail = getThumbnailURL == null ? void 0 : getThumbnailURL(previewFile);
|
|
226
240
|
if (thumbnail) {
|
|
@@ -409,6 +423,12 @@ filePreviewTypes.add({
|
|
|
409
423
|
},
|
|
410
424
|
Previewer: wrapWithModalPreviewer(VideoPreviewer)
|
|
411
425
|
});
|
|
426
|
+
filePreviewTypes.add({
|
|
427
|
+
match(file) {
|
|
428
|
+
return isActiveContentFile(file, getFileUrl(file));
|
|
429
|
+
},
|
|
430
|
+
Previewer: wrapWithModalPreviewer(UnsupportedPreviewer)
|
|
431
|
+
});
|
|
412
432
|
const FilePreviewRenderer = (props) => {
|
|
413
433
|
const normalized = normalizePreviewFile(props.file);
|
|
414
434
|
if (!normalized) {
|
|
@@ -432,6 +452,7 @@ const FilePreviewRenderer = (props) => {
|
|
|
432
452
|
getFileUrl,
|
|
433
453
|
getPreviewFileUrl,
|
|
434
454
|
getPreviewThumbnailUrl,
|
|
455
|
+
isActiveContentFile,
|
|
435
456
|
matchMimetype,
|
|
436
457
|
normalizePreviewFile,
|
|
437
458
|
wrapWithModalPreviewer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-file-manager",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.35",
|
|
4
4
|
"displayName": "File manager",
|
|
5
5
|
"displayName.ru-RU": "Менеджер файлов",
|
|
6
6
|
"displayName.zh-CN": "文件管理器",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"Collections",
|
|
60
60
|
"Collection fields"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "313a9e19e84a99924c86f9855c2ae48943f450b0"
|
|
63
63
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager=self.webpackChunk_nocobase_plugin_file_manager||[]).push([["855"],{138:function(e,t,n){n.r(t),n.d(t,{default:function(){return V}});var r=n(375),a=n(477),l=n(485),o=n(694),u=n(59),i=n(625),c=n(773),s=n(155),d=n.n(s),f=n(624),m=n(301);function p(){var e=(0,o.useFlowEngine)();return function(t,n){return e.context.t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ns:[m.C,"client"]},n))}}var v=n(907),b=n(191);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n,r,a,l,o){try{var u=e[l](o),i=u.value}catch(e){n(e);return}u.done?t(i):Promise.resolve(i).then(r,a)}function g(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var l=e.apply(t,n);function o(e){h(l,r,a,o,u,"next",e)}function u(e){h(l,r,a,o,u,"throw",e)}o(void 0)})}}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var l=[],o=!0,u=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(l.push(n.value),!t||l.length!==t);o=!0);}catch(e){u=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(u)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k(e,t){var n,r,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(o,"next",{value:i(0)}),u(o,"throw",{value:i(1)}),u(o,"return",{value:i(2)}),"function"==typeof Symbol&&u(o,Symbol.iterator,{value:function(){return this}}),o;function i(u){return function(i){var c=[u,i];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(l=0)),l;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(a=(a=l.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){l.label=c[1];break}if(6===c[0]&&l.label<a[1]){l.label=a[1],a=c;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(c);break}a[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function S(){var e=O(["\n .ant-radio-group {\n display: flex;\n flex-wrap: wrap;\n gap: ","px;\n }\n\n .ant-radio-wrapper {\n margin-inline-end: 0;\n max-width: 100%;\n }\n "]);return S=function(){return e},e}function j(){var e=O(["\n &.ant-input-number,\n &.ant-select {\n width: auto;\n min-width: 6em;\n }\n"]);return j=function(){return e},e}function C(){var e=O(["\n display: inline-flex;\n align-items: center;\n gap: 8px;\n margin-left: -8px;\n"]);return C=function(){return e},e}var x=(0,a.css)(j()),I=(0,a.css)(C()),A=[{label:"Append random ID",value:"appendRandomID"},{label:"Random string",value:"random"},{label:"Keep original filename (will be overwrite if filename is existed)",value:"none"}],P=[{value:1,label:"Byte"},{value:1024,label:"KB"},{value:1048576,label:"MB"},{value:0x40000000,label:"GB"}];function D(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1048576,n=e||t,r=P.length-1;r>=0;r-=1){var a=P[r];if(n%a.value==0)return a}return P[0]}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.UW,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.Qj;return Math.min(Math.max(t,e),n)}function T(e){var t,n=f.ZH,r=D(null!=(t=e.value)?t:n),a=null==e.value?e.value:e.value/r.value,l=(0,s.useCallback)(function(){if(null==e.value||e.value<f.UW){var t;null==(t=e.onChange)||t.call(e,f.UW)}},[e]);return d().createElement(u.Space.Compact,null,d().createElement(u.InputNumber,{value:a,disabled:e.disabled,defaultValue:n/D(n).value,step:1,className:x,onBlur:l,onChange:function(t){var n;null==(n=e.onChange)||n.call(e,null==t?void 0:B(Number(t)*r.value))}}),d().createElement(u.Select,{disabled:e.disabled,options:P,value:r.value,className:x,onChange:function(t){var n;null==(n=e.onChange)||n.call(e,null==a?void 0:B(Number(a)*t))}}))}function F(){return(0,o.useFlowContext)().api.resource("storages")}function N(e){var t=e.field,n=e.disabledDefault,r=p();if(t.hidden)return d().createElement(u.Form.Item,{name:t.name,hidden:!0},d().createElement(u.Input,null));if("checkbox"===t.component)return d().createElement(u.Form.Item,{name:t.name,valuePropName:"checked",extra:t.description?r(t.description):void 0},d().createElement(u.Checkbox,{disabled:n&&"default"===t.name},r(t.label)));var a=t.required?[{required:!0,message:r("The field value is required")}]:void 0,o=t.description?r(t.description):void 0;return d().createElement(u.Form.Item,{name:t.name,label:"".concat(r(t.label)," :"),rules:a,extra:o},"variableInput"===t.component?d().createElement(b.EnvVariableInput,{placeholder:t.placeholder?r(t.placeholder):void 0,addonBefore:t.addonBefore}):"passwordVariableInput"===t.component?d().createElement(b.EnvVariableInput,{password:!0}):"number"===t.component?Array.isArray(t.name)&&"rules.size"===t.name.join(".")?d().createElement(T,null):d().createElement(u.InputNumber,{style:{width:"100%"}}):"radio"===t.component?d().createElement(u.Radio.Group,{options:A.map(function(e){var t,n;return t=w({},e),n=n={label:r(e.label)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t})}):"json"===t.component?d().createElement(l.JsonTextArea,{autoSize:{minRows:5}}):d().createElement(u.Input,{placeholder:t.placeholder?r(t.placeholder):void 0,addonBefore:t.addonBefore}))}function M(e){var t,n=p(),l=(0,o.useFlowView)(),i=F(),f=E(u.Form.useForm(),1)[0],m=E((0,s.useState)(!1),2),v=m[0],b=m[1],y=(t=u.theme.useToken().token,(0,s.useMemo)(function(){return(0,a.css)(S(),t.marginSM)},[t.marginSM])),h=(0,s.useMemo)(function(){var t,n;return n="create"===(t={mode:e.mode,storageType:e.storageType,record:e.record}).mode?{type:t.storageType.name,name:"s_".concat(Math.random().toString(36).slice(2,12))}:w({},t.record),function(e,t){var n=(0,c.cloneDeep)(t||{}),r=!0,a=!1,l=void 0;try{for(var o,u=e.fields[Symbol.iterator]();!(r=(o=u.next()).done);r=!0){var i=o.value;void 0!==i.defaultValue&&void 0===(0,c.get)(n,i.name)&&(0,c.set)(n,i.name,i.defaultValue)}}catch(e){a=!0,l=e}finally{try{r||null==u.return||u.return()}finally{if(a)throw l}}return n}(t.storageType,n)},[e.mode,e.record,e.storageType]);(0,s.useEffect)(function(){f.setFieldsValue(h)},[f,h]);var O=(0,s.useCallback)(function(){return g(function(){var t,n;return k(this,function(r){switch(r.label){case 0:return[4,f.validateFields()];case 1:t=r.sent(),b(!0),r.label=2;case 2:if(r.trys.push([2,,8,9]),"create"!==e.mode)return[3,4];return[4,i.create({values:t})];case 3:return r.sent(),[3,6];case 4:return[4,i.update({filterByTk:null==(n=e.record)?void 0:n.id,values:t})];case 5:r.sent(),r.label=6;case 6:return e.onSubmitted(),[4,l.close()];case 7:return r.sent(),[3,9];case 8:return b(!1),[7];case 9:return[2]}})})()},[f,e,i,l]),j="".concat(n("create"===e.mode?"Add new":"Edit")," - ").concat(n(e.storageType.title));return d().createElement("div",null,l.Header?d().createElement(l.Header,{title:d().createElement("span",{className:I},d().createElement(u.Button,{type:"text",size:"small",icon:d().createElement(r.CloseOutlined,null),onClick:function(){return g(function(){return k(this,function(e){switch(e.label){case 0:return[4,l.close()];case 1:return e.sent(),[2]}})})()}}),d().createElement("span",null,j))}):null,d().createElement(u.Form,{form:f,layout:"vertical",initialValues:h,className:y},d().createElement(u.Form.Item,{name:"type",hidden:!0},d().createElement(u.Input,null)),e.storageType.fields.map(function(t){var n;return d().createElement(N,{field:t,key:Array.isArray(t.name)?t.name.join("."):t.name,disabledDefault:"edit"===e.mode&&!!(null==(n=e.record)?void 0:n.default)})})),l.Footer?d().createElement(l.Footer,null,d().createElement(u.Space,null,d().createElement(u.Button,{onClick:function(){return g(function(){return k(this,function(e){switch(e.label){case 0:return[4,l.close()];case 1:return e.sent(),[2]}})})()}},n("Cancel")),d().createElement(u.Button,{type:"primary",loading:v,onClick:O},n("Submit")))):null)}function V(){var e=p(),t=(0,o.useFlowContext)(),n=u.App.useApp(),a=n.modal,l=n.message,c=F(),f=E((0,s.useState)(1),2),m=f[0],b=f[1],y=E((0,s.useState)([]),2),h=y[0],w=y[1],O=(0,i.useRequest)(function(){return g(function(){return k(this,function(e){switch(e.label){case 0:return[4,c.list({page:m,pageSize:50,sort:["id"],appends:[]})];case 1:var t,n,r,a,l;return[2,{records:a=Array.isArray(r=null==(n=null==(t=e.sent())?void 0:t.data)?void 0:n.data)?r:Array.isArray(null==r?void 0:r.data)?r.data:[],total:(l=(null==n?void 0:n.meta)||(null==r?void 0:r.meta)||{}).count||l.total||a.length}]}})})()},{refreshDeps:[m]}),S=O.data,j=O.loading,C=O.refresh,x=(0,s.useCallback)(function(e,n,r){t.viewer.drawer({width:"50%",content:function(){return d().createElement(M,{mode:e,storageType:n,record:r,onSubmitted:function(){return C()}})}})},[t.viewer,C]),I=(0,s.useCallback)(function(t){a.confirm({title:e("Delete"),content:e("Are you sure you want to delete it?"),onOk:function(){return g(function(){return k(this,function(e){switch(e.label){case 0:return[4,c.destroy({filterByTk:t})];case 1:return e.sent(),w([]),C(),[2]}})})()}})},[a,C,c,e]),A=(0,s.useMemo)(function(){return[{title:e("Title"),dataIndex:"title"},{title:e("Storage name"),dataIndex:"name"},{title:e("Default storage"),dataIndex:"default",render:function(e){return d().createElement(u.Checkbox,{checked:!!e,disabled:!0})}},{title:e("Actions"),render:function(t,n){return d().createElement(u.Space,null,d().createElement("a",{onClick:function(){var t=v.N[n.type||""];t?x("edit",t,n):l.error(e("Storage type {{type}} is not registered, please check if related plugin is enabled.").replace("{{type}}",n.type||""))}},e("Edit")),d().createElement("a",{onClick:function(){return I(n.id)}},e("Delete")))}}]},[I,l,x,e]);return d().createElement(u.Card,{variant:"borderless"},d().createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginBottom:16}},d().createElement(u.Button,{icon:d().createElement(r.DeleteOutlined,null),disabled:!h.length,onClick:function(){return I(h)}},e("Delete")),d().createElement(u.Dropdown,{menu:{items:Object.values(v.N).map(function(t){return{key:t.name,label:e(t.title)}}),onClick:function(e){var t=v.N[e.key];t&&x("create",t)}}},d().createElement(u.Button,{type:"primary",icon:d().createElement(r.PlusOutlined,null)},e("Add new")," ",d().createElement(r.DownOutlined,null)))),d().createElement(u.Table,{rowKey:"id",loading:j,columns:A,dataSource:(null==S?void 0:S.records)||[],rowSelection:{selectedRowKeys:h,onChange:w},pagination:{current:m,pageSize:50,total:(null==S?void 0:S.total)||0,showSizeChanger:!1,onChange:b}}))}}}]);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export type StorageFieldComponent = 'checkbox' | 'input' | 'json' | 'number' | 'passwordVariableInput' | 'radio' | 'variableInput';
|
|
10
|
-
export interface StorageFieldMeta {
|
|
11
|
-
name: string | string[];
|
|
12
|
-
label: string;
|
|
13
|
-
component: StorageFieldComponent;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
hidden?: boolean;
|
|
16
|
-
defaultValue?: any;
|
|
17
|
-
description?: string;
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
addonBefore?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface StorageTypeMeta {
|
|
22
|
-
name: string;
|
|
23
|
-
title: string;
|
|
24
|
-
thumbnailRuleLink?: string;
|
|
25
|
-
fields: StorageFieldMeta[];
|
|
26
|
-
}
|