@webiny/api 5.40.6 → 5.41.0-beta.1

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,6 +1,6 @@
1
1
  import { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
2
2
  import { GenericRecord } from "./types";
3
- declare type Manifest = GenericRecord<string>;
3
+ type Manifest = GenericRecord<string>;
4
4
  export declare class ServiceDiscovery {
5
5
  static setDocumentClient(client: DynamoDBDocument): void;
6
6
  static load(): Promise<Manifest | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api",
3
- "version": "5.40.6",
3
+ "version": "5.41.0-beta.1",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,19 +13,19 @@
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
15
  "@babel/runtime": "7.24.1",
16
- "@webiny/aws-sdk": "5.40.6",
17
- "@webiny/plugins": "5.40.6"
16
+ "@webiny/aws-sdk": "5.41.0-beta.1",
17
+ "@webiny/plugins": "5.41.0-beta.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@babel/cli": "7.24.1",
21
21
  "@babel/core": "7.24.3",
22
22
  "@babel/preset-env": "7.24.3",
23
23
  "@babel/preset-typescript": "7.24.1",
24
- "@webiny/cli": "5.40.6",
25
- "@webiny/project-utils": "5.40.6",
24
+ "@webiny/cli": "5.41.0-beta.1",
25
+ "@webiny/project-utils": "5.41.0-beta.1",
26
26
  "rimraf": "5.0.5",
27
27
  "ttypescript": "1.5.15",
28
- "typescript": "4.7.4"
28
+ "typescript": "4.9.5"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public",
@@ -35,5 +35,5 @@
35
35
  "build": "yarn webiny run build",
36
36
  "watch": "yarn webiny run watch"
37
37
  },
38
- "gitHead": "f9da84b373e62f9f269599c4301e5e4418a98d51"
38
+ "gitHead": "2035c6fdbac9f52545b5024a381bc568c66ca899"
39
39
  }
package/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { PluginsContainer } from "@webiny/plugins";
2
- export declare type GenericRecordKey = string | number | symbol;
3
- export declare type GenericRecord<K extends GenericRecordKey = GenericRecordKey, V = any> = Record<K, V>;
4
- export declare type BenchmarkRuns = GenericRecord<string, number>;
2
+ export type GenericRecord<K extends PropertyKey = PropertyKey, V = any> = Record<K, V>;
3
+ export type NonEmptyArray<T> = [T, ...T[]];
4
+ export type BenchmarkRuns = GenericRecord<string, number>;
5
5
  export interface BenchmarkMeasurement {
6
6
  name: string;
7
7
  category: string;
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { PluginsContainer } from \"@webiny/plugins\";\n\nexport type GenericRecordKey = string | number | symbol;\n\nexport type GenericRecord<K extends GenericRecordKey = GenericRecordKey, V = any> = Record<K, V>;\n\nexport type BenchmarkRuns = GenericRecord<string, number>;\n\nexport interface BenchmarkMeasurement {\n name: string;\n category: string;\n start: Date;\n end: Date;\n elapsed: number;\n memory: number;\n}\n\nexport interface BenchmarkEnableOnCallable {\n (): Promise<boolean>;\n}\n\nexport interface BenchmarkOutputCallableParams {\n benchmark: Benchmark;\n stop: () => \"stop\";\n}\nexport interface BenchmarkOutputCallable {\n (params: BenchmarkOutputCallableParams): Promise<\"stop\" | undefined | null | void>;\n}\nexport interface BenchmarkMeasureOptions {\n name: string;\n category: string;\n}\nexport interface Benchmark {\n elapsed: number;\n runs: BenchmarkRuns;\n measurements: BenchmarkMeasurement[];\n output: () => Promise<void>;\n onOutput: (cb: BenchmarkOutputCallable) => void;\n enableOn: (cb: BenchmarkEnableOnCallable) => void;\n measure: <T = any>(\n options: BenchmarkMeasureOptions | string,\n cb: () => Promise<T>\n ) => Promise<T>;\n enable: () => void;\n disable: () => void;\n}\n\n/**\n * The main context which is constructed on every request.\n * All other contexts should extend or augment this one.\n */\nexport interface Context {\n plugins: PluginsContainer;\n args: any;\n readonly WEBINY_VERSION: string;\n /**\n * Not to be used outside of Webiny internal code.\n * @internal\n */\n hasResult: () => boolean;\n /**\n * Not to be used outside of Webiny internal code.\n * @internal\n *\n * @private\n */\n _result?: any;\n /**\n * Not to be used outside of Webiny internal code.\n * @internal\n */\n setResult: (value: any) => void;\n /**\n * Not to be used outside of Webiny internal code.\n * @internal\n */\n getResult: () => void;\n /**\n * Wait for property to be defined on the object and then execute the callable.\n * In case of multiple objects defined, wait for all of them.\n */\n waitFor: <T extends Context = Context>(\n obj: string[] | string,\n cb: (context: T) => void\n ) => void;\n\n benchmark: Benchmark;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { PluginsContainer } from \"@webiny/plugins\";\n\nexport type GenericRecord<K extends PropertyKey = PropertyKey, V = any> = Record<K, V>;\n\nexport type NonEmptyArray<T> = [T, ...T[]];\n\nexport type BenchmarkRuns = GenericRecord<string, number>;\n\nexport interface BenchmarkMeasurement {\n name: string;\n category: string;\n start: Date;\n end: Date;\n elapsed: number;\n memory: number;\n}\n\nexport interface BenchmarkEnableOnCallable {\n (): Promise<boolean>;\n}\n\nexport interface BenchmarkOutputCallableParams {\n benchmark: Benchmark;\n stop: () => \"stop\";\n}\nexport interface BenchmarkOutputCallable {\n (params: BenchmarkOutputCallableParams): Promise<\"stop\" | undefined | null | void>;\n}\nexport interface BenchmarkMeasureOptions {\n name: string;\n category: string;\n}\nexport interface Benchmark {\n elapsed: number;\n runs: BenchmarkRuns;\n measurements: BenchmarkMeasurement[];\n output: () => Promise<void>;\n onOutput: (cb: BenchmarkOutputCallable) => void;\n enableOn: (cb: BenchmarkEnableOnCallable) => void;\n measure: <T = any>(\n options: BenchmarkMeasureOptions | string,\n cb: () => Promise<T>\n ) => Promise<T>;\n enable: () => void;\n disable: () => void;\n}\n\n/**\n * The main context which is constructed on every request.\n * All other contexts should extend or augment this one.\n */\nexport interface Context {\n plugins: PluginsContainer;\n args: any;\n readonly WEBINY_VERSION: string;\n /**\n * Not to be used outside of Webiny internal code.\n * @internal\n */\n hasResult: () => boolean;\n /**\n * Not to be used outside of Webiny internal code.\n * @internal\n *\n * @private\n */\n _result?: any;\n /**\n * Not to be used outside of Webiny internal code.\n * @internal\n */\n setResult: (value: any) => void;\n /**\n * Not to be used outside of Webiny internal code.\n * @internal\n */\n getResult: () => void;\n /**\n * Wait for property to be defined on the object and then execute the callable.\n * In case of multiple objects defined, wait for all of them.\n */\n waitFor: <T extends Context = Context>(\n obj: string[] | string,\n cb: (context: T) => void\n ) => void;\n\n benchmark: Benchmark;\n}\n"],"mappings":"","ignoreList":[]}