netlify-cli 27.8.1 → 27.9.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.
@@ -10,6 +10,7 @@ export const blobsDelete = async (storeName, key, _options, command) => {
10
10
  const store = getStore({
11
11
  apiURL: `${api.scheme}://${api.host}`,
12
12
  name: storeName,
13
+ region: _options.region,
13
14
  siteID: siteInfo.id ?? '',
14
15
  token: api.accessToken ?? '',
15
16
  });
@@ -1,7 +1,9 @@
1
+ import { type GetStoreOptions } from '@netlify/blobs';
1
2
  import { OptionValues } from 'commander';
2
3
  import BaseCommand from '../base-command.js';
3
4
  interface Options extends OptionValues {
4
5
  output?: string;
6
+ region?: GetStoreOptions['region'];
5
7
  }
6
8
  export declare const blobsGet: (storeName: string, key: string, options: Options, command: BaseCommand) => Promise<undefined>;
7
9
  export {};
@@ -8,6 +8,7 @@ export const blobsGet = async (storeName, key, options, command) => {
8
8
  const store = getStore({
9
9
  apiURL: `${api.scheme}://${api.host}`,
10
10
  name: storeName,
11
+ region: options.region,
11
12
  siteID: siteInfo?.id ?? '',
12
13
  token: api.accessToken ?? '',
13
14
  });
@@ -1,9 +1,11 @@
1
+ import { type GetStoreOptions } from '@netlify/blobs';
1
2
  import { OptionValues } from 'commander';
2
3
  import BaseCommand from '../base-command.js';
3
4
  interface Options extends OptionValues {
4
5
  directories?: boolean;
5
6
  json?: boolean;
6
7
  prefix?: string;
8
+ region?: GetStoreOptions['region'];
7
9
  }
8
10
  export declare const blobsList: (storeName: string, options: Options, command: BaseCommand) => Promise<undefined>;
9
11
  export {};
@@ -6,6 +6,7 @@ export const blobsList = async (storeName, options, command) => {
6
6
  const store = getStore({
7
7
  apiURL: `${api.scheme}://${api.host}`,
8
8
  name: storeName,
9
+ region: options.region,
9
10
  siteID: siteInfo.id,
10
11
  token: api.accessToken ?? '',
11
12
  });
@@ -1,8 +1,10 @@
1
+ import { type GetStoreOptions } from '@netlify/blobs';
1
2
  import { OptionValues } from 'commander';
2
3
  import BaseCommand from '../base-command.js';
3
4
  interface Options extends OptionValues {
4
5
  input?: string;
5
6
  force?: string | boolean;
7
+ region?: GetStoreOptions['region'];
6
8
  }
7
9
  export declare const blobsSet: (storeName: string, key: string, valueParts: string[], options: Options, command: BaseCommand) => Promise<undefined>;
8
10
  export {};
@@ -9,6 +9,7 @@ export const blobsSet = async (storeName, key, valueParts, options, command) =>
9
9
  const store = getStore({
10
10
  apiURL: `${api.scheme}://${api.host}`,
11
11
  name: storeName,
12
+ region: options.region,
12
13
  siteID: siteInfo.id,
13
14
  token: api.accessToken ?? '',
14
15
  });
@@ -15,6 +15,7 @@ export const createBlobsCommand = (program) => {
15
15
  .description(`Deletes an object with a given key, if it exists, from a Netlify Blobs store`)
16
16
  .argument('<store>', 'Name of the store')
17
17
  .argument('<key>', 'Object key')
18
+ .option('--region <region>', "The region where the store data is held, such as 'eu-central-1'; when omitted, the default region is used")
18
19
  .alias('blob:delete')
19
20
  .hook('preAction', requiresSiteInfo)
20
21
  .action(async (storeName, key, _options, command) => {
@@ -27,6 +28,7 @@ export const createBlobsCommand = (program) => {
27
28
  .argument('<store>', 'Name of the store')
28
29
  .argument('<key>', 'Object key')
29
30
  .option('-O, --output <path>', 'Defines the filesystem path where the blob data should be persisted')
31
+ .option('--region <region>', "The region where the store data is held, such as 'eu-central-1'; when omitted, the default region is used")
30
32
  .alias('blob:get')
31
33
  .hook('preAction', requiresSiteInfo)
32
34
  .action(async (storeName, key, options, command) => {
@@ -40,6 +42,7 @@ export const createBlobsCommand = (program) => {
40
42
  .option('-d, --directories', `Indicates that keys with the '/' character should be treated as directories, returning a list of sub-directories at a given level rather than all the keys inside them`)
41
43
  .option('-p, --prefix <prefix>', `A string for filtering down the entries; when specified, only the entries whose key starts with that prefix are returned`)
42
44
  .option('--json', 'Output list contents as JSON')
45
+ .option('--region <region>', "The region where the store data is held, such as 'eu-central-1'; when omitted, the default region is used")
43
46
  .alias('blob:list')
44
47
  .hook('preAction', requiresSiteInfo)
45
48
  .action(async (storeName, options, command) => {
@@ -53,6 +56,7 @@ export const createBlobsCommand = (program) => {
53
56
  .argument('<key>', 'Object key')
54
57
  .argument('[value...]', 'Object value')
55
58
  .option('-i, --input <path>', 'Defines the filesystem path where the blob data should be read from')
59
+ .option('--region <region>', "The region where the store data is held, such as 'eu-central-1'; when omitted, the default region is used")
56
60
  .alias('blob:set')
57
61
  .hook('preAction', requiresSiteInfo)
58
62
  .action(async (storeName, key, valueParts, options, command) => {
@@ -76,6 +80,7 @@ For more information about Netlify Blobs, see ${terminalLink(docsUrl, docsUrl, {
76
80
  'netlify blobs:delete my-store my-key',
77
81
  'netlify blobs:list my-store',
78
82
  'netlify blobs:list my-store --json',
83
+ 'netlify blobs:list my-store --region eu-central-1',
79
84
  ])
80
85
  .action(blobs);
81
86
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "27.8.1",
3
+ "version": "27.9.0",
4
4
  "description": "Netlify command line tool",
5
5
  "keywords": [
6
6
  "api",