2.1.4 • Published 12 months ago

minio-sync v2.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

MinIO folders sync

NPM package for folders synchronization via MinIO

Install

npm install minio-sync

Usage

import minioSync from 'minio-sync';

minioSync(
    "path/to/folder",
    {
        Permissions: {
            /** Read from MinIO storage */
            Read: true,
            /** Write to MinIO storage */
            Write: true,
        },
        MinIO: {
            Bucket: "test-store",
            EndPoint: "127.0.0.1",
            Port: 9000,
            UseSSL: false,
            AccessKey: "<YOUR_MINIO_ACCESSKEY>",
            SecretKey: "<YOUR_MINIO_SECRETKEY>",
        },
        WatchOptions: {
            ignored: [
                // Ignore by string glob pattern
                "ignore_folder/**",
                // Ignore by regex pattern
                /SomeIgnoreRegexPattern/,
                // Ignore by callback function
                function (path: string): boolean {
                    return path.split("/").length > 10; // Don't sync deep more than 10 levels
                }
            ]
        }
});
  • Permissions: its highly recommended to use Write permissions only for one application node, cause there is no object blocking implementation on storage side now.
  • WatchOptions: options from chokidar

Path filtering

  • ignoreInitial - always will be false due to current implementation
  • ignored (anymatch-compatible definition) Defines files/paths to be ignored. The whole relative or absolute path is tested, not just filename. If a function with two arguments is provided, it gets called twice per path - once with a single argument (the path), second time with two arguments (the path and the instantiating the watching as chokidar discovers these file paths (before the ready event).
2.1.4

12 months ago

2.1.3

12 months ago

2.1.2

1 year ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.4.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.0.0

2 years ago