@mastra/gcs 0.0.0-feat-change-lifecycle-20260212011237
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/CHANGELOG.md +76 -0
- package/LICENSE.md +15 -0
- package/README.md +58 -0
- package/dist/filesystem/index.d.ts +122 -0
- package/dist/filesystem/index.d.ts.map +1 -0
- package/dist/index.cjs +434 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +432 -0
- package/dist/index.js.map +1 -0
- package/package.json +70 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# @mastra/gcs
|
|
2
|
+
|
|
3
|
+
## 0.0.0-feat-change-lifecycle-20260212011237
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Updated minimum `@mastra/core` peer dependency to support the new `FilesystemLifecycle` and `SandboxLifecycle` interfaces and `onInit` / `onDestroy` lifecycle callbacks. ([`3c7441d`](https://github.com/mastra-ai/mastra/commit/3c7441d6334af60112cc9e4140640ff9091e665f))
|
|
8
|
+
|
|
9
|
+
See the `@mastra/s3` and `@mastra/gcs` patch changesets for usage examples.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- dependencies updates: ([#12931](https://github.com/mastra-ai/mastra/pull/12931))
|
|
14
|
+
- Updated dependency [`@google-cloud/storage@^7.19.0` ↗︎](https://www.npmjs.com/package/@google-cloud/storage/v/7.19.0) (from `^7.18.0`, in `dependencies`)
|
|
15
|
+
|
|
16
|
+
- Add typed metadata to getInfo() return type and ensure all common FilesystemInfo fields (error, readOnly) are returned. ([#12971](https://github.com/mastra-ai/mastra/pull/12971))
|
|
17
|
+
|
|
18
|
+
- Added `overwrite: false` support to `writeFile` and `copyFile`. Previously, the `overwrite` option was ignored, allowing files to be silently overwritten. Now throws `FileExistsError` when `overwrite` is set to `false` and the destination file already exists. ([#12912](https://github.com/mastra-ai/mastra/pull/12912))
|
|
19
|
+
|
|
20
|
+
- Added optional `onInit` and `onDestroy` lifecycle callbacks to `GCSFilesystemOptions`. ([`3c7441d`](https://github.com/mastra-ai/mastra/commit/3c7441d6334af60112cc9e4140640ff9091e665f))
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
const fs = new GCSFilesystem({
|
|
24
|
+
bucket: 'my-bucket',
|
|
25
|
+
projectId: 'my-project',
|
|
26
|
+
onInit: ({ filesystem }) => {
|
|
27
|
+
console.log('GCS filesystem ready:', filesystem.status);
|
|
28
|
+
},
|
|
29
|
+
onDestroy: ({ filesystem }) => {
|
|
30
|
+
console.log('GCS filesystem shutting down');
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [[`7ef618f`](https://github.com/mastra-ai/mastra/commit/7ef618f3c49c27e2f6b27d7f564c557c0734325b), [`b896b41`](https://github.com/mastra-ai/mastra/commit/b896b41343de7fcc14442fb40fe82d189e65bbe2), [`6415277`](https://github.com/mastra-ai/mastra/commit/6415277a438faa00db2af850ead5dee25f40c428), [`0831bbb`](https://github.com/mastra-ai/mastra/commit/0831bbb5bc750c18e9b22b45f18687c964b70828), [`63f7eda`](https://github.com/mastra-ai/mastra/commit/63f7eda605eb3e0c8c35ee3912ffe7c999c69f69), [`a5b67a3`](https://github.com/mastra-ai/mastra/commit/a5b67a3589a74415feb663a55d1858324a2afde9), [`eb36bd8`](https://github.com/mastra-ai/mastra/commit/eb36bd8c52fcd6ec9674ac3b7a6412405b5983e1), [`3c7441d`](https://github.com/mastra-ai/mastra/commit/3c7441d6334af60112cc9e4140640ff9091e665f)]:
|
|
36
|
+
- @mastra/core@0.0.0-feat-change-lifecycle-20260212011237
|
|
37
|
+
|
|
38
|
+
## 0.0.1
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Added `@mastra/gcs` package providing Google Cloud Storage filesystem for Mastra workspaces. Supports credentials as a JSON object, key file path, or Application Default Credentials. ([#12605](https://github.com/mastra-ai/mastra/pull/12605))
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { GCSFilesystem } from '@mastra/gcs';
|
|
46
|
+
|
|
47
|
+
const fs = new GCSFilesystem({
|
|
48
|
+
bucket: 'my-bucket',
|
|
49
|
+
credentials: {
|
|
50
|
+
/* service account key */
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`90f7894`](https://github.com/mastra-ai/mastra/commit/90f7894568dc9481f40a4d29672234fae23090bb), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`8109aee`](https://github.com/mastra-ai/mastra/commit/8109aeeab758e16cd4255a6c36f044b70eefc6a6), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
|
|
56
|
+
- @mastra/core@1.3.0
|
|
57
|
+
|
|
58
|
+
## 0.0.1-alpha.0
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Added `@mastra/gcs` package providing Google Cloud Storage filesystem for Mastra workspaces. Supports credentials as a JSON object, key file path, or Application Default Credentials. ([#12605](https://github.com/mastra-ai/mastra/pull/12605))
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
import { GCSFilesystem } from '@mastra/gcs';
|
|
66
|
+
|
|
67
|
+
const fs = new GCSFilesystem({
|
|
68
|
+
bucket: 'my-bucket',
|
|
69
|
+
credentials: {
|
|
70
|
+
/* service account key */
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
|
|
76
|
+
- @mastra/core@1.3.0-alpha.1
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Apache License 2.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kepler Software, Inc.
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @mastra/gcs
|
|
2
|
+
|
|
3
|
+
Google Cloud Storage filesystem provider for Mastra workspaces.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mastra/gcs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Agent } from '@mastra/core/agent';
|
|
15
|
+
import { Workspace } from '@mastra/core/workspace';
|
|
16
|
+
import { GCSFilesystem } from '@mastra/gcs';
|
|
17
|
+
|
|
18
|
+
const workspace = new Workspace({
|
|
19
|
+
filesystem: new GCSFilesystem({
|
|
20
|
+
bucket: 'my-gcs-bucket',
|
|
21
|
+
// Uses Application Default Credentials by default
|
|
22
|
+
// Or provide a service account key:
|
|
23
|
+
projectId: 'my-project-id',
|
|
24
|
+
credentials: JSON.parse(process.env.GCS_SERVICE_ACCOUNT_KEY),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const agent = new Agent({
|
|
29
|
+
name: 'my-agent',
|
|
30
|
+
model: 'anthropic/claude-opus-4-5',
|
|
31
|
+
workspace,
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### With E2B Sandbox
|
|
36
|
+
|
|
37
|
+
When used with `@mastra/e2b`, GCS filesystems can be mounted into E2B sandboxes via gcsfuse:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { Workspace } from '@mastra/core/workspace';
|
|
41
|
+
import { GCSFilesystem } from '@mastra/gcs';
|
|
42
|
+
import { E2BSandbox } from '@mastra/e2b';
|
|
43
|
+
|
|
44
|
+
const workspace = new Workspace({
|
|
45
|
+
mounts: {
|
|
46
|
+
'/my-bucket': new GCSFilesystem({
|
|
47
|
+
bucket: 'my-gcs-bucket',
|
|
48
|
+
projectId: 'my-project-id',
|
|
49
|
+
credentials: JSON.parse(process.env.GCS_SERVICE_ACCOUNT_KEY),
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
sandbox: new E2BSandbox(),
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Documentation
|
|
57
|
+
|
|
58
|
+
For more information, see the [Mastra Workspaces documentation](https://mastra.ai/docs/workspace/overview).
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GCS Filesystem Provider
|
|
3
|
+
*
|
|
4
|
+
* A filesystem implementation backed by Google Cloud Storage.
|
|
5
|
+
*/
|
|
6
|
+
import type { FileContent, FileStat, FileEntry, ReadOptions, WriteOptions, ListOptions, RemoveOptions, CopyOptions, FilesystemInfo, FilesystemMountConfig, FilesystemIcon, ProviderStatus, MastraFilesystemOptions } from '@mastra/core/workspace';
|
|
7
|
+
import { MastraFilesystem } from '@mastra/core/workspace';
|
|
8
|
+
/**
|
|
9
|
+
* GCS mount configuration.
|
|
10
|
+
* Returned by GCSFilesystem.getMountConfig() for FUSE mounting in sandboxes.
|
|
11
|
+
*/
|
|
12
|
+
export interface GCSMountConfig extends FilesystemMountConfig {
|
|
13
|
+
type: 'gcs';
|
|
14
|
+
/** GCS bucket name */
|
|
15
|
+
bucket: string;
|
|
16
|
+
/** Service account key JSON (optional - omit for public buckets or ADC) */
|
|
17
|
+
serviceAccountKey?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* GCS filesystem provider configuration.
|
|
21
|
+
*/
|
|
22
|
+
export interface GCSFilesystemOptions extends Omit<MastraFilesystemOptions, 'name'> {
|
|
23
|
+
/** Unique identifier for this filesystem instance */
|
|
24
|
+
id?: string;
|
|
25
|
+
/** GCS bucket name */
|
|
26
|
+
bucket: string;
|
|
27
|
+
/** Human-friendly display name for the UI */
|
|
28
|
+
displayName?: string;
|
|
29
|
+
/** Icon identifier for the UI (defaults to 'gcs') */
|
|
30
|
+
icon?: FilesystemIcon;
|
|
31
|
+
/** Description shown in tooltips */
|
|
32
|
+
description?: string;
|
|
33
|
+
/**
|
|
34
|
+
* GCS project ID.
|
|
35
|
+
* Required when using service account credentials.
|
|
36
|
+
*/
|
|
37
|
+
projectId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Service account key JSON object or path to key file.
|
|
40
|
+
* If not provided, uses Application Default Credentials (ADC).
|
|
41
|
+
*/
|
|
42
|
+
credentials?: object | string;
|
|
43
|
+
/** Optional prefix for all keys (acts like a subdirectory) */
|
|
44
|
+
prefix?: string;
|
|
45
|
+
/** Mount as read-only (blocks write operations, mounts read-only in sandboxes) */
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Custom API endpoint URL.
|
|
49
|
+
* Used for local development with emulators like fake-gcs-server.
|
|
50
|
+
*/
|
|
51
|
+
endpoint?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare class GCSFilesystem extends MastraFilesystem {
|
|
54
|
+
readonly id: string;
|
|
55
|
+
readonly name = "GCSFilesystem";
|
|
56
|
+
readonly provider = "gcs";
|
|
57
|
+
readonly readOnly?: boolean;
|
|
58
|
+
status: ProviderStatus;
|
|
59
|
+
readonly displayName?: string;
|
|
60
|
+
readonly icon: FilesystemIcon;
|
|
61
|
+
readonly description?: string;
|
|
62
|
+
private readonly bucketName;
|
|
63
|
+
private readonly projectId?;
|
|
64
|
+
private readonly credentials?;
|
|
65
|
+
private readonly prefix;
|
|
66
|
+
private readonly endpoint?;
|
|
67
|
+
private _storage;
|
|
68
|
+
private _bucket;
|
|
69
|
+
constructor(options: GCSFilesystemOptions);
|
|
70
|
+
/**
|
|
71
|
+
* Get mount configuration for E2B sandbox.
|
|
72
|
+
* Returns GCS-compatible config that works with gcsfuse.
|
|
73
|
+
*/
|
|
74
|
+
getMountConfig(): GCSMountConfig;
|
|
75
|
+
/**
|
|
76
|
+
* Get filesystem info for status reporting.
|
|
77
|
+
*/
|
|
78
|
+
getInfo(): FilesystemInfo<{
|
|
79
|
+
bucket: string;
|
|
80
|
+
endpoint?: string;
|
|
81
|
+
prefix?: string;
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* Get instructions describing this GCS filesystem.
|
|
85
|
+
* Used by agents to understand storage semantics.
|
|
86
|
+
*/
|
|
87
|
+
getInstructions(): string;
|
|
88
|
+
private getStorage;
|
|
89
|
+
private getBucket;
|
|
90
|
+
/**
|
|
91
|
+
* Ensure the filesystem is initialized and return the bucket.
|
|
92
|
+
* Uses base class ensureReady() for status management, then returns bucket.
|
|
93
|
+
*/
|
|
94
|
+
private getReadyBucket;
|
|
95
|
+
private toKey;
|
|
96
|
+
readFile(path: string, options?: ReadOptions): Promise<string | Buffer>;
|
|
97
|
+
writeFile(path: string, content: FileContent, options?: WriteOptions): Promise<void>;
|
|
98
|
+
appendFile(path: string, content: FileContent): Promise<void>;
|
|
99
|
+
deleteFile(path: string, options?: RemoveOptions): Promise<void>;
|
|
100
|
+
copyFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
|
|
101
|
+
moveFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
|
|
102
|
+
mkdir(_path: string, _options?: {
|
|
103
|
+
recursive?: boolean;
|
|
104
|
+
}): Promise<void>;
|
|
105
|
+
rmdir(path: string, options?: RemoveOptions): Promise<void>;
|
|
106
|
+
readdir(path: string, options?: ListOptions): Promise<FileEntry[]>;
|
|
107
|
+
exists(path: string): Promise<boolean>;
|
|
108
|
+
stat(path: string): Promise<FileStat>;
|
|
109
|
+
isFile(path: string): Promise<boolean>;
|
|
110
|
+
isDirectory(path: string): Promise<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* Initialize the GCS client.
|
|
113
|
+
* Status management is handled by the base class.
|
|
114
|
+
*/
|
|
115
|
+
init(): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Clean up the GCS client.
|
|
118
|
+
* Status management is handled by the base class.
|
|
119
|
+
*/
|
|
120
|
+
destroy(): Promise<void>;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filesystem/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,EACX,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAsC,MAAM,wBAAwB,CAAC;AAE9F;;;GAGG;AACH,MAAM,WAAW,cAAe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