@walkeros/server-source-gcp 0.3.0 → 0.3.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.
- package/dist/index.d.mts +38 -61
- package/dist/index.d.ts +38 -61
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
import * as _walkeros_core from '@walkeros/core';
|
|
1
2
|
import { z, Source, WalkerOS } from '@walkeros/core';
|
|
2
|
-
import * as zod_to_json_schema from 'zod-to-json-schema';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* HTTP methods enum
|
|
6
6
|
*/
|
|
7
|
-
declare const HttpMethod: z.ZodEnum<
|
|
7
|
+
declare const HttpMethod: z.ZodEnum<{
|
|
8
|
+
GET: "GET";
|
|
9
|
+
POST: "POST";
|
|
10
|
+
PUT: "PUT";
|
|
11
|
+
PATCH: "PATCH";
|
|
12
|
+
DELETE: "DELETE";
|
|
13
|
+
OPTIONS: "OPTIONS";
|
|
14
|
+
HEAD: "HEAD";
|
|
15
|
+
}>;
|
|
8
16
|
/**
|
|
9
17
|
* CORS origin configuration
|
|
10
18
|
* Accepts:
|
|
@@ -12,83 +20,52 @@ declare const HttpMethod: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "O
|
|
|
12
20
|
* - Single URL string
|
|
13
21
|
* - Array of URL strings
|
|
14
22
|
*/
|
|
15
|
-
declare const CorsOrigin: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
23
|
+
declare const CorsOrigin: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>;
|
|
16
24
|
/**
|
|
17
25
|
* CORS options schema
|
|
18
26
|
* Configuration for Cross-Origin Resource Sharing
|
|
19
27
|
*/
|
|
20
28
|
declare const CorsOptionsSchema: z.ZodObject<{
|
|
21
|
-
origin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
22
|
-
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
23
|
-
|
|
29
|
+
origin: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
|
|
30
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
31
|
+
GET: "GET";
|
|
32
|
+
POST: "POST";
|
|
33
|
+
PUT: "PUT";
|
|
34
|
+
PATCH: "PATCH";
|
|
35
|
+
DELETE: "DELETE";
|
|
36
|
+
OPTIONS: "OPTIONS";
|
|
37
|
+
HEAD: "HEAD";
|
|
38
|
+
}>>>;
|
|
39
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
40
|
credentials: z.ZodOptional<z.ZodBoolean>;
|
|
25
41
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
26
|
-
},
|
|
27
|
-
origin?: string | string[] | undefined;
|
|
28
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
29
|
-
headers?: string[] | undefined;
|
|
30
|
-
credentials?: boolean | undefined;
|
|
31
|
-
maxAge?: number | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
origin?: string | string[] | undefined;
|
|
34
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
35
|
-
headers?: string[] | undefined;
|
|
36
|
-
credentials?: boolean | undefined;
|
|
37
|
-
maxAge?: number | undefined;
|
|
38
|
-
}>;
|
|
42
|
+
}, z.core.$strip>;
|
|
39
43
|
type CorsOptions$1 = z.infer<typeof CorsOptionsSchema>;
|
|
40
44
|
|
|
41
45
|
/**
|
|
42
46
|
* GCP CloudFunction source settings schema
|
|
43
47
|
*/
|
|
44
48
|
declare const SettingsSchema: z.ZodObject<{
|
|
45
|
-
cors: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
46
|
-
origin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
47
|
-
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
48
|
-
|
|
49
|
+
cors: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
50
|
+
origin: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
|
|
51
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
52
|
+
GET: "GET";
|
|
53
|
+
POST: "POST";
|
|
54
|
+
PUT: "PUT";
|
|
55
|
+
PATCH: "PATCH";
|
|
56
|
+
DELETE: "DELETE";
|
|
57
|
+
OPTIONS: "OPTIONS";
|
|
58
|
+
HEAD: "HEAD";
|
|
59
|
+
}>>>;
|
|
60
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
61
|
credentials: z.ZodOptional<z.ZodBoolean>;
|
|
50
62
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
51
|
-
},
|
|
52
|
-
origin?: string | string[] | undefined;
|
|
53
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
54
|
-
headers?: string[] | undefined;
|
|
55
|
-
credentials?: boolean | undefined;
|
|
56
|
-
maxAge?: number | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
origin?: string | string[] | undefined;
|
|
59
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
60
|
-
headers?: string[] | undefined;
|
|
61
|
-
credentials?: boolean | undefined;
|
|
62
|
-
maxAge?: number | undefined;
|
|
63
|
-
}>]>>;
|
|
63
|
+
}, z.core.$strip>]>>;
|
|
64
64
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
65
|
-
},
|
|
66
|
-
cors?: boolean | {
|
|
67
|
-
origin?: string | string[] | undefined;
|
|
68
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
69
|
-
headers?: string[] | undefined;
|
|
70
|
-
credentials?: boolean | undefined;
|
|
71
|
-
maxAge?: number | undefined;
|
|
72
|
-
} | undefined;
|
|
73
|
-
timeout?: number | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
cors?: boolean | {
|
|
76
|
-
origin?: string | string[] | undefined;
|
|
77
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
78
|
-
headers?: string[] | undefined;
|
|
79
|
-
credentials?: boolean | undefined;
|
|
80
|
-
maxAge?: number | undefined;
|
|
81
|
-
} | undefined;
|
|
82
|
-
timeout?: number | undefined;
|
|
83
|
-
}>;
|
|
65
|
+
}, z.core.$strip>;
|
|
84
66
|
type Settings$1 = z.infer<typeof SettingsSchema>;
|
|
85
67
|
|
|
86
|
-
declare const settings:
|
|
87
|
-
$schema?: string | undefined;
|
|
88
|
-
definitions?: {
|
|
89
|
-
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
90
|
-
} | undefined;
|
|
91
|
-
};
|
|
68
|
+
declare const settings: _walkeros_core.JSONSchema;
|
|
92
69
|
|
|
93
70
|
declare const index$1_CorsOptionsSchema: typeof CorsOptionsSchema;
|
|
94
71
|
declare const index$1_CorsOrigin: typeof CorsOrigin;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
import * as _walkeros_core from '@walkeros/core';
|
|
1
2
|
import { z, Source, WalkerOS } from '@walkeros/core';
|
|
2
|
-
import * as zod_to_json_schema from 'zod-to-json-schema';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* HTTP methods enum
|
|
6
6
|
*/
|
|
7
|
-
declare const HttpMethod: z.ZodEnum<
|
|
7
|
+
declare const HttpMethod: z.ZodEnum<{
|
|
8
|
+
GET: "GET";
|
|
9
|
+
POST: "POST";
|
|
10
|
+
PUT: "PUT";
|
|
11
|
+
PATCH: "PATCH";
|
|
12
|
+
DELETE: "DELETE";
|
|
13
|
+
OPTIONS: "OPTIONS";
|
|
14
|
+
HEAD: "HEAD";
|
|
15
|
+
}>;
|
|
8
16
|
/**
|
|
9
17
|
* CORS origin configuration
|
|
10
18
|
* Accepts:
|
|
@@ -12,83 +20,52 @@ declare const HttpMethod: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "O
|
|
|
12
20
|
* - Single URL string
|
|
13
21
|
* - Array of URL strings
|
|
14
22
|
*/
|
|
15
|
-
declare const CorsOrigin: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
23
|
+
declare const CorsOrigin: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>;
|
|
16
24
|
/**
|
|
17
25
|
* CORS options schema
|
|
18
26
|
* Configuration for Cross-Origin Resource Sharing
|
|
19
27
|
*/
|
|
20
28
|
declare const CorsOptionsSchema: z.ZodObject<{
|
|
21
|
-
origin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
22
|
-
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
23
|
-
|
|
29
|
+
origin: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
|
|
30
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
31
|
+
GET: "GET";
|
|
32
|
+
POST: "POST";
|
|
33
|
+
PUT: "PUT";
|
|
34
|
+
PATCH: "PATCH";
|
|
35
|
+
DELETE: "DELETE";
|
|
36
|
+
OPTIONS: "OPTIONS";
|
|
37
|
+
HEAD: "HEAD";
|
|
38
|
+
}>>>;
|
|
39
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
40
|
credentials: z.ZodOptional<z.ZodBoolean>;
|
|
25
41
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
26
|
-
},
|
|
27
|
-
origin?: string | string[] | undefined;
|
|
28
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
29
|
-
headers?: string[] | undefined;
|
|
30
|
-
credentials?: boolean | undefined;
|
|
31
|
-
maxAge?: number | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
origin?: string | string[] | undefined;
|
|
34
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
35
|
-
headers?: string[] | undefined;
|
|
36
|
-
credentials?: boolean | undefined;
|
|
37
|
-
maxAge?: number | undefined;
|
|
38
|
-
}>;
|
|
42
|
+
}, z.core.$strip>;
|
|
39
43
|
type CorsOptions$1 = z.infer<typeof CorsOptionsSchema>;
|
|
40
44
|
|
|
41
45
|
/**
|
|
42
46
|
* GCP CloudFunction source settings schema
|
|
43
47
|
*/
|
|
44
48
|
declare const SettingsSchema: z.ZodObject<{
|
|
45
|
-
cors: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
46
|
-
origin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
47
|
-
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
48
|
-
|
|
49
|
+
cors: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
50
|
+
origin: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
|
|
51
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
52
|
+
GET: "GET";
|
|
53
|
+
POST: "POST";
|
|
54
|
+
PUT: "PUT";
|
|
55
|
+
PATCH: "PATCH";
|
|
56
|
+
DELETE: "DELETE";
|
|
57
|
+
OPTIONS: "OPTIONS";
|
|
58
|
+
HEAD: "HEAD";
|
|
59
|
+
}>>>;
|
|
60
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
61
|
credentials: z.ZodOptional<z.ZodBoolean>;
|
|
50
62
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
51
|
-
},
|
|
52
|
-
origin?: string | string[] | undefined;
|
|
53
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
54
|
-
headers?: string[] | undefined;
|
|
55
|
-
credentials?: boolean | undefined;
|
|
56
|
-
maxAge?: number | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
origin?: string | string[] | undefined;
|
|
59
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
60
|
-
headers?: string[] | undefined;
|
|
61
|
-
credentials?: boolean | undefined;
|
|
62
|
-
maxAge?: number | undefined;
|
|
63
|
-
}>]>>;
|
|
63
|
+
}, z.core.$strip>]>>;
|
|
64
64
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
65
|
-
},
|
|
66
|
-
cors?: boolean | {
|
|
67
|
-
origin?: string | string[] | undefined;
|
|
68
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
69
|
-
headers?: string[] | undefined;
|
|
70
|
-
credentials?: boolean | undefined;
|
|
71
|
-
maxAge?: number | undefined;
|
|
72
|
-
} | undefined;
|
|
73
|
-
timeout?: number | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
cors?: boolean | {
|
|
76
|
-
origin?: string | string[] | undefined;
|
|
77
|
-
methods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD")[] | undefined;
|
|
78
|
-
headers?: string[] | undefined;
|
|
79
|
-
credentials?: boolean | undefined;
|
|
80
|
-
maxAge?: number | undefined;
|
|
81
|
-
} | undefined;
|
|
82
|
-
timeout?: number | undefined;
|
|
83
|
-
}>;
|
|
65
|
+
}, z.core.$strip>;
|
|
84
66
|
type Settings$1 = z.infer<typeof SettingsSchema>;
|
|
85
67
|
|
|
86
|
-
declare const settings:
|
|
87
|
-
$schema?: string | undefined;
|
|
88
|
-
definitions?: {
|
|
89
|
-
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
90
|
-
} | undefined;
|
|
91
|
-
};
|
|
68
|
+
declare const settings: _walkeros_core.JSONSchema;
|
|
92
69
|
|
|
93
70
|
declare const index$1_CorsOptionsSchema: typeof CorsOptionsSchema;
|
|
94
71
|
declare const index$1_CorsOrigin: typeof CorsOrigin;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/server-source-gcp",
|
|
3
3
|
"description": "Google Cloud Platform server sources for walkerOS (Cloud Functions)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"update": "npx npm-check-updates -u && npm update"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@walkeros/core": "0.3.
|
|
21
|
+
"@walkeros/core": "0.3.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@google-cloud/functions-framework": "^3.0.0"
|