@whook/gcp-functions 8.5.1 → 10.0.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/README.md +51 -40
- package/dist/commands/testHTTPFunction.d.ts +1 -1
- package/dist/commands/testHTTPFunction.js +119 -150
- package/dist/commands/testHTTPFunction.js.map +1 -1
- package/dist/index.d.ts +3 -6
- package/dist/index.js +182 -269
- package/dist/index.js.map +1 -1
- package/dist/libs/utils.js +16 -35
- package/dist/libs/utils.js.map +1 -1
- package/dist/services/_autoload.d.ts +14 -2
- package/dist/services/_autoload.js +85 -105
- package/dist/services/_autoload.js.map +1 -1
- package/dist/services/log.d.ts +4 -1
- package/dist/services/log.js +2 -12
- package/dist/services/log.js.map +1 -1
- package/dist/services/log.test.js +4 -9
- package/dist/services/log.test.js.map +1 -1
- package/dist/wrappers/googleHTTPFunction.js +246 -292
- package/dist/wrappers/googleHTTPFunction.js.map +1 -1
- package/package.json +55 -98
- package/src/commands/testHTTPFunction.ts +12 -19
- package/src/index.ts +48 -62
- package/src/libs/utils.ts +4 -5
- package/src/services/_autoload.ts +127 -122
- package/src/services/log.test.ts +2 -2
- package/src/wrappers/googleHTTPFunction.ts +34 -32
- package/dist/commands/testHTTPFunction.mjs +0 -136
- package/dist/commands/testHTTPFunction.mjs.map +0 -1
- package/dist/index.mjs +0 -265
- package/dist/index.mjs.map +0 -1
- package/dist/libs/utils.mjs +0 -27
- package/dist/libs/utils.mjs.map +0 -1
- package/dist/services/_autoload.mjs +0 -107
- package/dist/services/_autoload.mjs.map +0 -1
- package/dist/services/log.mjs +0 -4
- package/dist/services/log.mjs.map +0 -1
- package/dist/services/log.test.mjs +0 -7
- package/dist/services/log.test.mjs.map +0 -1
- package/dist/wrappers/googleHTTPFunction.mjs +0 -288
- package/dist/wrappers/googleHTTPFunction.mjs.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { Injector, Autoloader, Initializer, Dependencies } from 'knifecycle';
|
|
3
|
+
import type { LogService } from 'common-services';
|
|
3
4
|
/**
|
|
4
5
|
* Wrap the _autoload service in order to build AWS
|
|
5
6
|
* Lambda compatible code.
|
|
@@ -14,4 +15,15 @@ declare const _default: import("knifecycle").ServiceInitializer<unknown, Autoloa
|
|
|
14
15
|
* @return {Promise<Object>}
|
|
15
16
|
* A promise of an object containing the reshaped env vars.
|
|
16
17
|
*/
|
|
18
|
+
declare const _default: import("knifecycle").ServiceInitializer<import("@whook/whook/dist/services/_autoload.js").AutoloadConfig & {
|
|
19
|
+
PROJECT_SRC: string;
|
|
20
|
+
CONFIGS?: import("@whook/whook").CONFIGSService | undefined;
|
|
21
|
+
WRAPPERS?: import("@whook/whook").WhookWrapper<unknown, import("@whook/http-transaction").WhookHandler<import("knifecycle").Parameters<any>, import("@whook/http-transaction").WhookResponse<number, void | import("@whook/http-transaction").WhookHeaders, void | import("type-fest").JsonValue | import("stream").Readable>, import("@whook/http-transaction").WhookOperation<Record<string, unknown>>>>[] | undefined;
|
|
22
|
+
$injector: Injector<any>;
|
|
23
|
+
importer: import("@whook/whook").ImporterService<{
|
|
24
|
+
default: Initializer<any, Dependencies<any>>;
|
|
25
|
+
}>;
|
|
26
|
+
resolve: import("@whook/whook").ResolveService;
|
|
27
|
+
log?: LogService | undefined;
|
|
28
|
+
}, Autoloader<Initializer<unknown, Dependencies<any>>>>;
|
|
17
29
|
export default _default;
|
|
@@ -1,26 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { initAutoload, noop, cleanupOpenAPI } from '@whook/whook';
|
|
2
|
+
import { SPECIAL_PROPS, wrapInitializer, constant, alsoInject, } from 'knifecycle';
|
|
3
|
+
import { YError } from 'yerror';
|
|
4
|
+
import { dereferenceOpenAPIOperations, getOpenAPIOperations, } from '@whook/http-router';
|
|
5
|
+
const initializerWrapper = (async ({ BUILD_CONSTANTS = {}, $injector, $instance, log = noop, }, $autoload) => {
|
|
6
|
+
let API;
|
|
7
|
+
let OPERATION_APIS;
|
|
8
|
+
const getAPIOperation = (() => {
|
|
9
|
+
return async (serviceName) => {
|
|
10
|
+
// eslint-disable-next-line
|
|
11
|
+
API = API || (await $injector(['API'])).API;
|
|
12
|
+
// eslint-disable-next-line
|
|
13
|
+
OPERATION_APIS =
|
|
14
|
+
OPERATION_APIS ||
|
|
15
|
+
getOpenAPIOperations(API);
|
|
16
|
+
const OPERATION = OPERATION_APIS.find((operation) => serviceName ===
|
|
17
|
+
(((operation['x-whook'] || {}).sourceOperationId &&
|
|
18
|
+
'OPERATION_API_' +
|
|
19
|
+
(operation['x-whook'] || {}).sourceOperationId) ||
|
|
20
|
+
'OPERATION_API_' + operation.operationId) +
|
|
21
|
+
((operation['x-whook'] || {}).suffix || ''));
|
|
22
|
+
if (!OPERATION) {
|
|
23
|
+
log('error', '💥 - Unable to find a lambda operation definition!');
|
|
24
|
+
throw new YError('E_OPERATION_NOT_FOUND', serviceName);
|
|
25
|
+
}
|
|
26
|
+
// eslint-disable-next-line
|
|
27
|
+
const OPERATION_API = cleanupOpenAPI({
|
|
28
|
+
...API,
|
|
29
|
+
paths: {
|
|
30
|
+
[OPERATION.path]: {
|
|
31
|
+
[OPERATION.method]: API.paths[OPERATION.path]?.[OPERATION.method],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
return {
|
|
36
|
+
...OPERATION_API,
|
|
37
|
+
paths: {
|
|
38
|
+
[OPERATION.path]: {
|
|
39
|
+
[OPERATION.method]: (await dereferenceOpenAPIOperations(OPERATION_API, [
|
|
40
|
+
{
|
|
41
|
+
path: OPERATION.path,
|
|
42
|
+
method: OPERATION.method,
|
|
43
|
+
...OPERATION_API.paths[OPERATION.path]?.[OPERATION.method],
|
|
44
|
+
parameters: OPERATION.parameters,
|
|
45
|
+
},
|
|
46
|
+
]))[0],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
log('debug', '🤖 - Initializing the `$autoload` build wrapper.');
|
|
53
|
+
return async (serviceName) => {
|
|
54
|
+
try {
|
|
55
|
+
// TODO: add initializer map to knifecycle public API
|
|
56
|
+
const initializer = $instance._initializers.get(serviceName);
|
|
57
|
+
if (initializer && initializer[SPECIAL_PROPS.TYPE] === 'constant') {
|
|
58
|
+
log('debug', `🤖 - Reusing a constant initializer directly from the Knifecycle instance: "${serviceName}".`);
|
|
59
|
+
return {
|
|
60
|
+
initializer,
|
|
61
|
+
path: `instance://${serviceName}`,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
if (serviceName.startsWith('OPERATION_API_')) {
|
|
65
|
+
const OPERATION_API = await getAPIOperation(serviceName);
|
|
66
|
+
return {
|
|
67
|
+
initializer: constant(serviceName, OPERATION_API),
|
|
68
|
+
path: `api://${serviceName}`,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (BUILD_CONSTANTS[serviceName]) {
|
|
72
|
+
return {
|
|
73
|
+
initializer: constant(serviceName, BUILD_CONSTANTS[serviceName]),
|
|
74
|
+
path: `constant://${serviceName}`,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return $autoload(serviceName);
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
log('error', `Build error while loading "${serviceName}".`);
|
|
81
|
+
log('error-stack', err.stack || 'no_stack_trace');
|
|
82
|
+
throw err;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
5
85
|
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _whook = require("@whook/whook");
|
|
9
|
-
|
|
10
|
-
var _knifecycle = require("knifecycle");
|
|
11
|
-
|
|
12
|
-
var _yerror = _interopRequireDefault(require("yerror"));
|
|
13
|
-
|
|
14
|
-
var _httpRouter = require("@whook/http-router");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
-
|
|
22
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
-
|
|
24
86
|
/**
|
|
25
87
|
* Wrap the _autoload service in order to build AWS
|
|
26
88
|
* Lambda compatible code.
|
|
@@ -35,87 +97,5 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
35
97
|
* @return {Promise<Object>}
|
|
36
98
|
* A promise of an object containing the reshaped env vars.
|
|
37
99
|
*/
|
|
38
|
-
|
|
39
|
-
BUILD_CONSTANTS = {},
|
|
40
|
-
$injector,
|
|
41
|
-
$instance,
|
|
42
|
-
log = _whook.noop
|
|
43
|
-
}, $autoload) => {
|
|
44
|
-
let API;
|
|
45
|
-
let OPERATION_APIS;
|
|
46
|
-
|
|
47
|
-
const getAPIOperation = (() => {
|
|
48
|
-
return async serviceName => {
|
|
49
|
-
// eslint-disable-next-line
|
|
50
|
-
API = API || (await $injector(['API'])).API; // eslint-disable-next-line
|
|
51
|
-
|
|
52
|
-
OPERATION_APIS = OPERATION_APIS || (0, _httpRouter.getOpenAPIOperations)(API);
|
|
53
|
-
const OPERATION = OPERATION_APIS.find(operation => serviceName === ((operation['x-whook'] || {}).sourceOperationId && 'OPERATION_API_' + (operation['x-whook'] || {}).sourceOperationId || 'OPERATION_API_' + operation.operationId) + ((operation['x-whook'] || {}).suffix || ''));
|
|
54
|
-
|
|
55
|
-
if (!OPERATION) {
|
|
56
|
-
log('error', '💥 - Unable to find a lambda operation definition!');
|
|
57
|
-
throw new _yerror.default('E_OPERATION_NOT_FOUND', serviceName);
|
|
58
|
-
} // eslint-disable-next-line
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const OPERATION_API = (0, _whook.cleanupOpenAPI)(_objectSpread(_objectSpread({}, API), {}, {
|
|
62
|
-
paths: {
|
|
63
|
-
[OPERATION.path]: {
|
|
64
|
-
[OPERATION.method]: API.paths[OPERATION.path][OPERATION.method]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}));
|
|
68
|
-
return _objectSpread(_objectSpread({}, OPERATION_API), {}, {
|
|
69
|
-
paths: {
|
|
70
|
-
[OPERATION.path]: {
|
|
71
|
-
[OPERATION.method]: (await (0, _httpRouter.dereferenceOpenAPIOperations)(OPERATION_API, [_objectSpread(_objectSpread({
|
|
72
|
-
path: OPERATION.path,
|
|
73
|
-
method: OPERATION.method
|
|
74
|
-
}, OPERATION_API.paths[OPERATION.path][OPERATION.method]), {}, {
|
|
75
|
-
parameters: OPERATION.parameters
|
|
76
|
-
})]))[0]
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
})();
|
|
82
|
-
|
|
83
|
-
log('debug', '🤖 - Initializing the `$autoload` build wrapper.');
|
|
84
|
-
return async serviceName => {
|
|
85
|
-
try {
|
|
86
|
-
// TODO: add initializer map to knifecycle public API
|
|
87
|
-
const initializer = $instance._initializers.get(serviceName);
|
|
88
|
-
|
|
89
|
-
if (initializer && initializer[_knifecycle.SPECIAL_PROPS.TYPE] === 'constant') {
|
|
90
|
-
log('debug', `🤖 - Reusing a constant initializer directly from the Knifecycle instance: "${serviceName}".`);
|
|
91
|
-
return {
|
|
92
|
-
initializer,
|
|
93
|
-
path: `instance://${serviceName}`
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (serviceName.startsWith('OPERATION_API_')) {
|
|
98
|
-
const OPERATION_API = await getAPIOperation(serviceName);
|
|
99
|
-
return {
|
|
100
|
-
initializer: (0, _knifecycle.constant)(serviceName, OPERATION_API),
|
|
101
|
-
path: `api://${serviceName}`
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (BUILD_CONSTANTS[serviceName]) {
|
|
106
|
-
return {
|
|
107
|
-
initializer: (0, _knifecycle.constant)(serviceName, BUILD_CONSTANTS[serviceName]),
|
|
108
|
-
path: `constant://${serviceName}`
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return $autoload(serviceName);
|
|
113
|
-
} catch (err) {
|
|
114
|
-
log('error', `Build error while loading "${serviceName}".`);
|
|
115
|
-
log('stack', err.stack);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
}, _whook.initAutoload));
|
|
119
|
-
|
|
120
|
-
exports.default = _default;
|
|
100
|
+
export default alsoInject(['?BUILD_CONSTANTS', '$instance', '$injector', '?log'], wrapInitializer(initializerWrapper, initAutoload));
|
|
121
101
|
//# sourceMappingURL=_autoload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/_autoload.ts"],"names":[
|
|
1
|
+
{"version":3,"file":"_autoload.js","sourceRoot":"","sources":["../../src/services/_autoload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAEL,aAAa,EACb,eAAe,EACf,QAAQ,EACR,UAAU,GACX,MAAM,YAAY,CAAC;AAC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,WAAW,CAAC,CAAC;gBAEzD,OAAO;oBACL,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC;oBACjD,IAAI,EAAE,SAAS,WAAW,EAAE;iBAC7B,CAAC;aACH;YAED,IAAI,eAAe,CAAC,WAAW,CAAC,EAAE;gBAChC,OAAO;oBACL,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;oBAChE,IAAI,EAAE,cAAc,WAAW,EAAE;iBAClC,CAAC;aACH;YAED,OAAO,SAAS,CAAC,WAAW,CAAC,CAAC;SAC/B;QAAC,OAAO,GAAG,EAAE;YACZ,GAAG,CAAC,OAAO,EAAE,8BAA8B,WAAW,IAAI,CAAC,CAAC;YAC5D,GAAG,CAAC,aAAa,EAAG,GAAa,CAAC,KAAK,IAAI,gBAAgB,CAAC,CAAC;YAC7D,MAAM,GAAG,CAAC;SACX;IACH,CAAC,CAAC;AACJ,CAAC,CAAQ,CAAC;AAEV;;;;;;;;;;;;;GAaG;AACH,eAAe,UAAU,CACvB,CAAC,kBAAkB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,EACtD,eAAe,CAAC,kBAAyB,EAAE,YAAY,CAAC,CACzD,CAAC"}
|
package/dist/services/log.d.ts
CHANGED
package/dist/services/log.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _knifecycle = require("knifecycle");
|
|
9
|
-
|
|
1
|
+
import { service } from 'knifecycle';
|
|
10
2
|
// eslint-disable-next-line
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.default = _default;
|
|
3
|
+
export default service(async () => console.log.bind(console), 'log');
|
|
14
4
|
//# sourceMappingURL=log.js.map
|
package/dist/services/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/log.ts"],"names":[
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/services/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,2BAA2B;AAC3B,eAAe,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _log = _interopRequireDefault(require("./log"));
|
|
4
|
-
|
|
5
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6
|
-
|
|
1
|
+
import initLogService from './log.js';
|
|
7
2
|
describe('initLogService', () => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
it('should work', async () => {
|
|
4
|
+
await initLogService({});
|
|
5
|
+
});
|
|
11
6
|
});
|
|
12
7
|
//# sourceMappingURL=log.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/log.test.ts"],"names":[
|
|
1
|
+
{"version":3,"file":"log.test.js","sourceRoot":"","sources":["../../src/services/log.test.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,UAAU,CAAC;AAEtC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE;QAC3B,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|