netlify-cli 17.23.7 → 17.24.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.
@@ -1,3 +1,4 @@
1
+ import { $TSFixMe } from '../../commands/types.js';
1
2
  export declare const AVAILABLE_CONTEXTS: string[];
2
3
  export declare const AVAILABLE_SCOPES: string[];
3
4
  /**
@@ -44,12 +45,12 @@ export declare const filterEnvBySource: (env: any, source: any) => {
44
45
  * },
45
46
  * }
46
47
  */
47
- export declare const formatEnvelopeData: ({ context, envelopeItems, scope, source }: {
48
+ export declare const formatEnvelopeData: ({ context, envelopeItems, scope, source, }: {
48
49
  context?: string | undefined;
49
- envelopeItems?: never[] | undefined;
50
+ envelopeItems: $TSFixMe[];
50
51
  scope?: string | undefined;
51
- source: any;
52
- }) => {};
52
+ source: string;
53
+ }) => any;
53
54
  /**
54
55
  * Collects env vars from multiple sources and arranges them in the correct order of precedence
55
56
  * @param {object} api - The api singleton object
@@ -69,7 +70,7 @@ export declare const getEnvelopeEnv: ({ api, context, env, key, raw, scope, site
69
70
  raw?: boolean | undefined;
70
71
  scope?: string | undefined;
71
72
  siteInfo: any;
72
- }) => Promise<{}>;
73
+ }) => Promise<any>;
73
74
  /**
74
75
  * Returns a human-readable, comma-separated list of scopes
75
76
  * @param {Array<enum<builds,functions,runtime,post_processing>>} scopes - An array of scopes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/env/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,UAAkE,CAAA;AACjG,eAAO,MAAM,gBAAgB,UAAwD,CAAA;AAErF;;;GAGG;AAEH,eAAO,MAAM,gBAAgB,uBAmB5B,CAAA;AAED;;;;;GAKG;AAEH,eAAO,MAAM,iBAAiB,oCAQ1B,CAAA;AAEJ;;;;;GAKG;AAEH,eAAO,MAAM,iBAAiB;;CAEoE,CAAA;AA+BlG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,eAAO,MAAM,kBAAkB;;;;;QA0BrB,CAAA;AAEV;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,cAAc;;;;;;;;iBAyC1B,CAAA;AAED;;;;GAIG;AAEH,eAAO,MAAM,sBAAsB,sBAoBlC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;;;GAaxC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,6CAe/B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/env/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAGlD,eAAO,MAAM,kBAAkB,UAAkE,CAAA;AACjG,eAAO,MAAM,gBAAgB,UAAwD,CAAA;AAErF;;;GAGG;AAEH,eAAO,MAAM,gBAAgB,uBAmB5B,CAAA;AAED;;;;;GAKG;AAEH,eAAO,MAAM,iBAAiB,oCAQ1B,CAAA;AAEJ;;;;;GAKG;AAEH,eAAO,MAAM,iBAAiB;;CAEoE,CAAA;AAiClG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,kBAAkB;;mBAOd,QAAQ,EAAE;;YAEjB,MAAM;SAsBN,CAAA;AAEV;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,cAAc;;;;;;;;kBAyC1B,CAAA;AAED;;;;GAIG;AAEH,eAAO,MAAM,sBAAsB,sBAoBlC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;;;GAaxC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,6CAe/B,CAAA"}
@@ -52,18 +52,10 @@ values.find((val) => {
52
52
  export const filterEnvBySource = (env, source) =>
53
53
  // @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
54
54
  Object.fromEntries(Object.entries(env).filter(([, variable]) => variable.sources[0] === source));
55
- /**
56
- * Fetches data from Envelope
57
- * @param {string} accountId - The account id
58
- * @param {object} api - The api singleton object
59
- * @param {string} key - If present, fetch a single key (case-sensitive)
60
- * @param {string} siteId - The site id
61
- * @returns {Array<object>} An array of environment variables from the Envelope service
62
- */
63
- // @ts-expect-error TS(7031) FIXME: Binding element 'accountId' implicitly has an 'any... Remove this comment to see the full error message
64
- const fetchEnvelopeItems = async function ({ accountId, api, key, siteId }) {
55
+ // Fetches data from Envelope
56
+ const fetchEnvelopeItems = async function ({ accountId, api, key, siteId, }) {
65
57
  if (accountId === undefined) {
66
- return {};
58
+ return [];
67
59
  }
68
60
  try {
69
61
  // if a single key is passed, fetch that single env var
@@ -104,27 +96,21 @@ const fetchEnvelopeItems = async function ({ accountId, api, key, siteId }) {
104
96
  * },
105
97
  * }
106
98
  */
107
- // @ts-expect-error TS(7031) FIXME: Binding element 'source' implicitly has an 'any' t... Remove this comment to see the full error message
108
- export const formatEnvelopeData = ({ context = 'dev', envelopeItems = [], scope = 'any', source }) => envelopeItems
99
+ export const formatEnvelopeData = ({ context = 'dev', envelopeItems = [], scope = 'any', source, }) => envelopeItems
109
100
  // filter by context
110
101
  .filter(({ values }) => Boolean(findValueInValues(values, context)))
111
102
  // filter by scope
112
- // @ts-expect-error TS(2339) FIXME: Property 'includes' does not exist on type 'never'... Remove this comment to see the full error message
113
103
  .filter(({ scopes }) => (scope === 'any' ? true : scopes.includes(scope)))
114
104
  // sort alphabetically, case insensitive
115
- // @ts-expect-error TS(2339) FIXME: Property 'key' does not exist on type 'never'.
116
105
  .sort((left, right) => (left.key.toLowerCase() < right.key.toLowerCase() ? -1 : 1))
117
106
  // format the data
118
107
  .reduce((acc, cur) => {
119
- // @ts-expect-error TS(2339) FIXME: Property 'values' does not exist on type 'never'.
120
108
  const { context: ctx, context_parameter: branch, value } = findValueInValues(cur.values, context);
121
109
  return {
122
110
  ...acc,
123
- // @ts-expect-error TS(2339) FIXME: Property 'key' does not exist on type 'never'.
124
111
  [cur.key]: {
125
112
  context: ctx,
126
113
  branch,
127
- // @ts-expect-error TS(2339) FIXME: Property 'scopes' does not exist on type 'never'.
128
114
  scopes: cur.scopes,
129
115
  sources: [source],
130
116
  value,
@@ -8,7 +8,7 @@ version = "0.1.0"
8
8
  [dependencies]
9
9
  aws_lambda_events = "0.15.0"
10
10
  http = "0.2.9"
11
- lambda_runtime = "0.7.3"
11
+ lambda_runtime = "0.11.0"
12
12
  log = "0.4.17"
13
13
  simple_logger = "1.16.0"
14
14
  tokio = "1.26.0"