@storyshelf/storage-azure 0.7.0 → 0.8.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/dist/client.mjs CHANGED
@@ -2,7 +2,7 @@ import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
4
  import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob";
5
- //#region src/client.ts
5
+ // src/client.ts
6
6
  /** Resolve the container client for the configured credentials. */
7
7
  function resolveContainerClient(options, containerName) {
8
8
  if (options.client) return options.client;
@@ -26,7 +26,6 @@ function buildAccountUrl(accountName) {
26
26
  if (!accountName) return;
27
27
  return `https://${accountName}.blob.core.windows.net`;
28
28
  }
29
- //#endregion
30
29
  export { resolveContainerClient };
31
30
 
32
31
  //# sourceMappingURL=client.mjs.map
package/dist/errors.mjs CHANGED
@@ -2,7 +2,7 @@ import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
4
  import "node:stream";
5
- //#region src/errors.ts
5
+ // src/errors.ts
6
6
  /** Not-found guards and stream/collect helpers for Azure blob I/O. */
7
7
  /** True when an Azure SDK error means the blob (or container) is missing. */
8
8
  function isNotFound(error) {
@@ -35,7 +35,6 @@ async function deleteBlobQuiet(blob) {
35
35
  await withDelete.delete?.();
36
36
  } catch {}
37
37
  }
38
- //#endregion
39
38
  export { collectDownload, collectStream, deleteBlobQuiet, isNotFound };
40
39
 
41
40
  //# sourceMappingURL=errors.mjs.map
package/dist/index.d.mts CHANGED
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
3
3
  import { AzureStorageOptions } from "./types.mjs";
4
4
  import { azureKey } from "./keys.mjs";
5
5
  import { StorageAdapter } from "@storyshelf/core/adapter/storage";
6
- //#region src/index.d.ts
7
6
  /**
8
7
  * Create an Azure Blob Storage-backed StorageAdapter.
9
8
  *
@@ -11,6 +10,5 @@ import { StorageAdapter } from "@storyshelf/core/adapter/storage";
11
10
  * @returns A StorageAdapter backed by the configured Azure container.
12
11
  */
13
12
  declare function createAzureStorage(options: AzureStorageOptions): StorageAdapter;
14
- //#endregion
15
13
  export { type AzureStorageOptions, azureKey, createAzureStorage };
16
14
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import { buildAzureLifecycle } from "./lifecycle.mjs";
6
6
  import { azureKey } from "./keys.mjs";
7
7
  import { azureDelete, azureExists, azureList, azureRead, azureWrite } from "./operations.mjs";
8
8
  import { azureReadStream, azureWriteStream } from "./streams.mjs";
9
- //#region src/index.ts
9
+ // src/index.ts
10
10
  /**
11
11
  * Create an Azure Blob Storage-backed StorageAdapter.
12
12
  *
@@ -23,7 +23,7 @@ function createAzureStorage(options) {
23
23
  return {
24
24
  metadata: {
25
25
  name: "Azure Blob Storage",
26
- version: "0.7.0",
26
+ version: "0.8.0",
27
27
  description: "Azure Blob Storage adapter",
28
28
  kind: "azure",
29
29
  category: "storage"
@@ -52,7 +52,6 @@ function createAzureStorage(options) {
52
52
  }
53
53
  };
54
54
  }
55
- //#endregion
56
55
  export { azureKey, createAzureStorage };
57
56
 
58
57
  //# sourceMappingURL=index.mjs.map
package/dist/keys.d.mts CHANGED
@@ -1,9 +1,7 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
- //#region src/keys.d.ts
4
3
  /** Key join/split for Azure blob names. */
5
4
  /** Join an optional prefix with a storage path. */
6
5
  declare function azureKey(prefix: string, path: string): string;
7
- //#endregion
8
6
  export { azureKey };
9
7
  //# sourceMappingURL=keys.d.mts.map
package/dist/keys.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
- //#region src/keys.ts
4
+ // src/keys.ts
5
5
  /** Key join/split for Azure blob names. */
6
6
  /** Join an optional prefix with a storage path. */
7
7
  function azureKey(prefix, path) {
@@ -11,7 +11,6 @@ function azureKey(prefix, path) {
11
11
  function azureRel(prefix, key) {
12
12
  return prefix === "" ? key : key.slice(prefix.length + 1);
13
13
  }
14
- //#endregion
15
14
  export { azureKey, azureRel };
16
15
 
17
16
  //# sourceMappingURL=keys.mjs.map
@@ -1,7 +1,7 @@
1
1
  import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
- //#region src/lifecycle.ts
4
+ // src/lifecycle.ts
5
5
  /** Build the setup/health/teardown lifecycle for an Azure container. */
6
6
  function buildAzureLifecycle(container, containerName) {
7
7
  return {
@@ -30,7 +30,6 @@ async function containerExists(container, containerName) {
30
30
  await iterator.return?.();
31
31
  }
32
32
  }
33
- //#endregion
34
33
  export { buildAzureLifecycle };
35
34
 
36
35
  //# sourceMappingURL=lifecycle.mjs.map
@@ -3,7 +3,7 @@ import "node:url";
3
3
  import.meta.url;
4
4
  import { collectDownload, isNotFound } from "./errors.mjs";
5
5
  import { azureKey, azureRel } from "./keys.mjs";
6
- //#region src/operations.ts
6
+ // src/operations.ts
7
7
  /** Buffered Azure blob CRUD with SDK-version duck-typing and async-iterator list. */
8
8
  /** Download a blob, preferring `downloadToBuffer` when the SDK offers it. */
9
9
  async function azureRead(ctx, path) {
@@ -48,7 +48,6 @@ async function azureList(ctx, listPrefix) {
48
48
  for await (const item of ctx.container.listBlobsFlat(prefix === "" ? void 0 : { prefix })) blobs.push(azureRel(ctx.prefix, item.name));
49
49
  return blobs;
50
50
  }
51
- //#endregion
52
51
  export { azureDelete, azureExists, azureList, azureRead, azureWrite };
53
52
 
54
53
  //# sourceMappingURL=operations.mjs.map
package/dist/streams.mjs CHANGED
@@ -5,7 +5,7 @@ import { collectStream, deleteBlobQuiet } from "./errors.mjs";
5
5
  import { azureKey } from "./keys.mjs";
6
6
  import { azureExists, azureWrite } from "./operations.mjs";
7
7
  import { Readable } from "node:stream";
8
- //#region src/streams.ts
8
+ // src/streams.ts
9
9
  /** Streamed Azure blob reads and writes, with failure cleanup. */
10
10
  /** Upload a readable, streaming when the SDK supports it and buffering otherwise. */
11
11
  async function azureWriteStream(ctx, path, stream) {
@@ -40,7 +40,6 @@ async function writeStreamBuffered(ctx, path, stream, blob) {
40
40
  throw error;
41
41
  }
42
42
  }
43
- //#endregion
44
43
  export { azureReadStream, azureWriteStream };
45
44
 
46
45
  //# sourceMappingURL=streams.mjs.map
package/dist/types.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { ContainerClient } from "@azure/storage-blob";
4
- //#region src/types.d.ts
5
4
  /** Options for configuring an Azure Blob Storage adapter. */
6
5
  interface AzureStorageOptions {
7
6
  /** Azure container name. */
@@ -21,6 +20,5 @@ interface AzureStorageOptions {
21
20
  /** SAS token (with or without leading `?`). */
22
21
  sasToken?: string;
23
22
  }
24
- //#endregion
25
23
  export { AzureStorageOptions };
26
24
  //# sourceMappingURL=types.d.mts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyshelf/storage-azure",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Azure Blob Storage adapter for StoryShelf.",
5
5
  "keywords": [
6
6
  "azure",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@azure/storage-blob": "^12.26.0",
56
- "@storyshelf/core": "0.7.0"
56
+ "@storyshelf/core": "0.8.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/node": "^26.0.0",
@@ -63,7 +63,7 @@
63
63
  "oxlint-tsgolint": "^7.0.2001",
64
64
  "tsdown": "^0.22.14",
65
65
  "typescript": "^7.0.2",
66
- "vitest": "^5.0.0"
66
+ "vitest": "^5.0.5"
67
67
  },
68
68
  "engines": {
69
69
  "node": ">=24"