@dereekb/firebase-server 9.9.4 → 9.10.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/mailgun/package.json +12 -11
  3. package/package.json +10 -9
  4. package/src/lib/env/env.service.d.ts +1 -0
  5. package/src/lib/env/env.service.js.map +1 -1
  6. package/src/lib/nest/development/development.app.function.d.ts +30 -0
  7. package/src/lib/nest/development/development.app.function.js +38 -0
  8. package/src/lib/nest/development/development.app.function.js.map +1 -0
  9. package/src/lib/nest/development/development.assert.function.d.ts +9 -0
  10. package/src/lib/nest/development/development.assert.function.js +3 -0
  11. package/src/lib/nest/development/development.assert.function.js.map +1 -0
  12. package/src/lib/nest/development/development.function.d.ts +20 -0
  13. package/src/lib/nest/development/development.function.js +38 -0
  14. package/src/lib/nest/development/development.function.js.map +1 -0
  15. package/src/lib/nest/development/development.schedule.function.d.ts +7 -0
  16. package/src/lib/nest/development/development.schedule.function.error.d.ts +6 -0
  17. package/src/lib/nest/development/development.schedule.function.error.js +35 -0
  18. package/src/lib/nest/development/development.schedule.function.error.js.map +1 -0
  19. package/src/lib/nest/development/development.schedule.function.js +56 -0
  20. package/src/lib/nest/development/development.schedule.function.js.map +1 -0
  21. package/src/lib/nest/development/index.d.ts +5 -0
  22. package/src/lib/nest/development/index.js +9 -0
  23. package/src/lib/nest/development/index.js.map +1 -0
  24. package/src/lib/nest/env/env.service.d.ts +4 -0
  25. package/src/lib/nest/env/env.service.js +6 -0
  26. package/src/lib/nest/env/env.service.js.map +1 -1
  27. package/src/lib/nest/env/env.util.d.ts +4 -0
  28. package/src/lib/nest/env/env.util.js +13 -0
  29. package/src/lib/nest/env/env.util.js.map +1 -0
  30. package/src/lib/nest/env/index.d.ts +1 -0
  31. package/src/lib/nest/env/index.js +1 -0
  32. package/src/lib/nest/env/index.js.map +1 -1
  33. package/src/lib/nest/function/index.d.ts +2 -0
  34. package/src/lib/nest/function/index.js +2 -0
  35. package/src/lib/nest/function/index.js.map +1 -1
  36. package/src/lib/nest/function/schedule.d.ts +61 -0
  37. package/src/lib/nest/function/schedule.js +9 -0
  38. package/src/lib/nest/function/schedule.js.map +1 -0
  39. package/src/lib/nest/function/schedule.util.d.ts +46 -0
  40. package/src/lib/nest/function/schedule.util.js +51 -0
  41. package/src/lib/nest/function/schedule.util.js.map +1 -0
  42. package/src/lib/nest/function/v1/index.d.ts +1 -0
  43. package/src/lib/nest/function/v1/index.js +1 -0
  44. package/src/lib/nest/function/v1/index.js.map +1 -1
  45. package/src/lib/nest/function/v1/schedule.d.ts +29 -0
  46. package/src/lib/nest/function/v1/schedule.js +55 -0
  47. package/src/lib/nest/function/v1/schedule.js.map +1 -0
  48. package/src/lib/nest/function/v2/index.d.ts +1 -0
  49. package/src/lib/nest/function/v2/index.js +1 -0
  50. package/src/lib/nest/function/v2/index.js.map +1 -1
  51. package/src/lib/nest/function/v2/schedule.d.ts +31 -0
  52. package/src/lib/nest/function/v2/schedule.js +54 -0
  53. package/src/lib/nest/function/v2/schedule.js.map +1 -0
  54. package/src/lib/nest/function/v2/taskqueue.js +1 -0
  55. package/src/lib/nest/function/v2/taskqueue.js.map +1 -1
  56. package/src/lib/nest/index.d.ts +1 -0
  57. package/src/lib/nest/index.js +1 -0
  58. package/src/lib/nest/index.js.map +1 -1
  59. package/test/package.json +13 -12
  60. package/test/src/lib/firebase/firebase.admin.auth.d.ts +5 -3
  61. package/test/src/lib/firebase/firebase.admin.auth.js.map +1 -1
  62. package/test/src/lib/firebase/firebase.admin.nest.function.context.d.ts +4 -5
  63. package/test/src/lib/firebase/firebase.admin.nest.function.context.js.map +1 -1
  64. package/test/src/lib/firebase/firebase.admin.nest.function.d.ts +8 -4
  65. package/test/src/lib/firebase/firebase.admin.nest.function.js +0 -1
  66. package/test/src/lib/firebase/firebase.admin.nest.function.js.map +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ # [9.10.0](https://github.com/dereekb/dbx-components/compare/v9.9.5-dev...v9.10.0) (2022-10-05)
6
+
7
+
8
+ ### Features
9
+
10
+ * added DbxFirebaseDevelopmentSchedulerService ([713bac5](https://github.com/dereekb/dbx-components/commit/713bac57dd1864c52394a16d990f04fc81e0c543))
11
+ * added firebase scheduled tasks ([2114446](https://github.com/dereekb/dbx-components/commit/2114446acb1704e93cabd2933d5876f8d9adb56a))
12
+ * added firebaseServerDevFunctions() ([375e3ac](https://github.com/dereekb/dbx-components/commit/375e3acf4e7539bdca37c68b50617ea455690d69))
13
+
14
+
15
+
16
+ ## [9.9.5](https://github.com/dereekb/dbx-components/compare/v9.9.4-dev...v9.9.5) (2022-09-19)
17
+
18
+
19
+
5
20
  ## [9.9.4](https://github.com/dereekb/dbx-components/compare/v9.9.3-dev...v9.9.4) (2022-09-19)
6
21
 
7
22
 
@@ -1,42 +1,43 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server/mailgun",
3
- "version": "9.9.4",
3
+ "version": "9.10.0",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
7
7
  "dependencies": {},
8
8
  "peerDependencies": {
9
- "@dereekb/nestjs/mailgun": "9.9.4",
9
+ "@dereekb/nestjs/mailgun": "9.10.0",
10
10
  "@nestjs/common": "^9.0.0",
11
11
  "mailgun.js": "^8.0.0",
12
12
  "form-data": "4.0.0",
13
- "@dereekb/util": "9.9.4",
13
+ "@dereekb/util": "9.10.0",
14
14
  "lodash.isequal": "^4.5.0",
15
15
  "make-error": "^1.3.0",
16
16
  "class-validator": "^0.13.2",
17
17
  "ts-essentials": "^9.1.2",
18
18
  "extra-set": "^2.2.11",
19
- "@dereekb/nestjs": "9.9.4",
19
+ "@dereekb/nestjs": "9.10.0",
20
20
  "@nestjs/config": "^2.0.1",
21
- "@dereekb/firebase-server": "9.9.4",
21
+ "@dereekb/firebase-server": "9.10.0",
22
22
  "jsonwebtoken": "^8.0.0",
23
- "@dereekb/firebase": "9.9.4",
23
+ "@dereekb/firebase": "9.10.0",
24
24
  "rxjs": "^7.5.0",
25
25
  "firebase": "^9.9.2",
26
- "@dereekb/rxjs": "9.9.4",
27
- "ms": "^3.0.0-canary.1",
28
- "@dereekb/model": "9.9.4",
29
26
  "class-transformer": "^0.5.1",
30
- "@dereekb/date": "9.9.4",
27
+ "@dereekb/rxjs": "9.10.0",
28
+ "ms": "^3.0.0-canary.1",
29
+ "@dereekb/model": "9.10.0",
30
+ "@dereekb/date": "9.10.0",
31
31
  "date-fns": "^2.29.0",
32
32
  "date-fns-tz": "^1.3.0",
33
33
  "rrule": "git+https://git@github.com/dereekb/rrule#2b13b1ea881059ba2ecfec380e12ef244ef54570",
34
34
  "@vvo/tzdb": "^6.56.0",
35
- "firebase-functions": "^3.22.0",
35
+ "firebase-functions": "^3.24.0",
36
36
  "firebase-admin": "^11.0.0",
37
37
  "@google-cloud/firestore": "^5.0.2",
38
38
  "@nestjs/core": "^9.0.0",
39
39
  "@nestjs/platform-express": "^9.0.0",
40
+ "node-schedule": "^2.1.0",
40
41
  "tslib": "^2.0.0"
41
42
  }
42
43
  }
package/package.json CHANGED
@@ -1,37 +1,38 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server",
3
- "version": "9.9.4",
3
+ "version": "9.10.0",
4
4
  "devDependencies": {
5
5
  "firebase-functions-test": "2.0.2"
6
6
  },
7
7
  "peerDependencies": {
8
8
  "jsonwebtoken": "^8.0.0",
9
- "@dereekb/firebase": "9.9.4",
9
+ "@dereekb/firebase": "9.10.0",
10
10
  "rxjs": "^7.5.0",
11
11
  "firebase": "^9.9.2",
12
- "@dereekb/util": "9.9.4",
12
+ "@dereekb/util": "9.10.0",
13
13
  "lodash.isequal": "^4.5.0",
14
14
  "make-error": "^1.3.0",
15
15
  "class-validator": "^0.13.2",
16
16
  "ts-essentials": "^9.1.2",
17
17
  "extra-set": "^2.2.11",
18
- "@dereekb/rxjs": "9.9.4",
19
- "ms": "^3.0.0-canary.1",
20
- "@dereekb/model": "9.9.4",
21
18
  "class-transformer": "^0.5.1",
22
- "@dereekb/date": "9.9.4",
19
+ "@dereekb/rxjs": "9.10.0",
20
+ "ms": "^3.0.0-canary.1",
21
+ "@dereekb/model": "9.10.0",
22
+ "@dereekb/date": "9.10.0",
23
23
  "date-fns": "^2.29.0",
24
24
  "date-fns-tz": "^1.3.0",
25
25
  "rrule": "git+https://git@github.com/dereekb/rrule#2b13b1ea881059ba2ecfec380e12ef244ef54570",
26
26
  "@vvo/tzdb": "^6.56.0",
27
- "firebase-functions": "^3.22.0",
27
+ "firebase-functions": "^3.24.0",
28
28
  "firebase-admin": "^11.0.0",
29
29
  "@google-cloud/firestore": "^5.0.2",
30
30
  "@nestjs/common": "^9.0.0",
31
31
  "@nestjs/core": "^9.0.0",
32
32
  "@nestjs/platform-express": "^9.0.0",
33
- "@dereekb/nestjs": "9.9.4",
33
+ "@dereekb/nestjs": "9.10.0",
34
34
  "@nestjs/config": "^2.0.1",
35
+ "node-schedule": "^2.1.0",
35
36
  "tslib": "^2.0.0"
36
37
  },
37
38
  "exports": {
@@ -8,6 +8,7 @@ export declare abstract class FirebaseServerEnvService {
8
8
  abstract readonly isTestingEnv: boolean;
9
9
  abstract readonly isProduction: boolean;
10
10
  abstract readonly developerToolsEnabled: boolean;
11
+ abstract readonly developmentSchedulerEnabled: boolean;
11
12
  /**
12
13
  * @deprecated use isDeveloperToolsEnabled instead.
13
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"env.service.js","sourceRoot":"","sources":["../../../../../../packages/firebase-server/src/lib/env/env.service.ts"],"names":[],"mappings":";;;AAOA,MAAsB,wBAAwB;CAS7C;AATD,4DASC"}
1
+ {"version":3,"file":"env.service.js","sourceRoot":"","sources":["../../../../../../packages/firebase-server/src/lib/env/env.service.ts"],"names":[],"mappings":";;;AAOA,MAAsB,wBAAwB;CAU7C;AAVD,4DAUC"}
@@ -0,0 +1,30 @@
1
+ import { OnCallDevelopmentParams, RUN_DEV_FUNCTION_APP_FUNCTION_KEY } from '@dereekb/firebase';
2
+ import { CallableHttpFunction, RunnableHttpFunction } from '../../function/type';
3
+ import { NestAppPromiseGetter } from '../app';
4
+ import { NestApplicationScheduleConfiguredFunctionMap } from '../function/schedule';
5
+ import { OnCallWithNestContextFactory } from '../function/v1/call';
6
+ import { OnCallHandlerWithNestContextFactory } from '../function/v2/call';
7
+ import { AbstractFirebaseNestContext } from '../nest.provider';
8
+ import { OnCallDevelopmentFunctionMap } from './development.function';
9
+ export interface FirebaseServerDevFunctionsConfig<N extends AbstractFirebaseNestContext<any, any>, S extends NestApplicationScheduleConfiguredFunctionMap> {
10
+ readonly enabled: boolean;
11
+ /**
12
+ * Whether or not to require an auth context when calling dev functions. True by default.
13
+ */
14
+ readonly secure?: boolean;
15
+ readonly nest: NestAppPromiseGetter;
16
+ readonly developerFunctionsMap: OnCallDevelopmentFunctionMap<N>;
17
+ readonly onCallFactory: OnCallWithNestContextFactory<N> | OnCallHandlerWithNestContextFactory<N>;
18
+ /**
19
+ * Whether or not to disable adding the dev schedule function. False by default.
20
+ */
21
+ readonly disableDevelopmentScheduleFunction?: boolean;
22
+ /**
23
+ * Map of all scheduled functions. Used by the dev schedule function. If not provided, the dev schedule function is not generated.
24
+ */
25
+ readonly allScheduledFunctions?: S;
26
+ }
27
+ export interface FirebaseServerDevFunctions {
28
+ readonly [RUN_DEV_FUNCTION_APP_FUNCTION_KEY]: RunnableHttpFunction<OnCallDevelopmentParams> | CallableHttpFunction<OnCallDevelopmentParams>;
29
+ }
30
+ export declare function firebaseServerDevFunctions<N extends AbstractFirebaseNestContext<any, any>, S extends NestApplicationScheduleConfiguredFunctionMap>(config: FirebaseServerDevFunctionsConfig<N, S>): FirebaseServerDevFunctions;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.firebaseServerDevFunctions = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const firebase_server_1 = require("@dereekb/firebase-server");
6
+ const firebase_1 = require("@dereekb/firebase");
7
+ const development_function_1 = require("./development.function");
8
+ const development_schedule_function_1 = require("./development.schedule.function");
9
+ const error_1 = require("../../function/error");
10
+ function firebaseServerDevFunctions(config) {
11
+ const { enabled, secure, nest, developerFunctionsMap, onCallFactory, allScheduledFunctions, disableDevelopmentScheduleFunction } = config;
12
+ let dev;
13
+ if (enabled) {
14
+ const fullFunctionsMap = Object.assign({}, developerFunctionsMap);
15
+ if (allScheduledFunctions && disableDevelopmentScheduleFunction !== false) {
16
+ fullFunctionsMap[firebase_1.SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER] = (0, development_schedule_function_1.makeScheduledFunctionDevelopmentFunction)({
17
+ allScheduledFunctions
18
+ });
19
+ }
20
+ let onCallFunction = (0, development_function_1.onCallDevelopmentFunction)(fullFunctionsMap);
21
+ if (secure != false) {
22
+ onCallFunction = (0, firebase_server_1.inAuthContext)(onCallFunction);
23
+ }
24
+ dev = onCallFactory(onCallFunction)(nest);
25
+ }
26
+ else {
27
+ dev = onCallFactory((x) => tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ throw (0, error_1.unavailableError)({
29
+ message: 'developer tools service is not enabled.'
30
+ });
31
+ }))(nest);
32
+ }
33
+ return {
34
+ dev
35
+ };
36
+ }
37
+ exports.firebaseServerDevFunctions = firebaseServerDevFunctions;
38
+ //# sourceMappingURL=development.app.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development.app.function.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/development/development.app.function.ts"],"names":[],"mappings":";;;;AAAA,8DAAyD;AACzD,gDAA0I;AAO1I,iEAAiG;AACjG,mFAA2F;AAC3F,gDAAwD;AAyBxD,SAAgB,0BAA0B,CAA0G,MAA8C;IAChM,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,aAAa,EAAE,qBAAqB,EAAE,kCAAkC,EAAE,GAAG,MAAM,CAAC;IAE1I,IAAI,GAAkG,CAAC;IAEvG,IAAI,OAAO,EAAE;QACX,MAAM,gBAAgB,qBACjB,qBAAqB,CACzB,CAAC;QAEF,IAAI,qBAAqB,IAAI,kCAAkC,KAAK,KAAK,EAAE;YACzE,gBAAgB,CAAC,oDAAyC,CAAC,GAAG,IAAA,wEAAwC,EAAC;gBACrG,qBAAqB;aACtB,CAAC,CAAC;SACJ;QAED,IAAI,cAAc,GAAG,IAAA,gDAAyB,EAAC,gBAAgB,CAAC,CAAC;QAEjE,IAAI,MAAM,IAAI,KAAK,EAAE;YACnB,cAAc,GAAG,IAAA,+BAAa,EAAC,cAAc,CAAC,CAAC;SAChD;QAED,GAAG,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC;KAC3C;SAAM;QACL,GAAG,GAAG,aAAa,CAAC,CAAO,CAAC,EAAE,EAAE;YAC9B,MAAM,IAAA,wBAAgB,EAAC;gBACrB,OAAO,EAAE,yCAAyC;aACnD,CAAC,CAAC;QACL,CAAC,CAAA,CAAC,CAAC,IAAI,CAAC,CAAC;KACV;IAED,OAAO;QACL,GAAG;KACJ,CAAC;AACJ,CAAC;AAlCD,gEAkCC"}
@@ -0,0 +1,9 @@
1
+ import { NestContextCallableRequest } from '../function/nest';
2
+ export interface AssertDevelopmentRequestFunctionContext<N, I = unknown> {
3
+ request: NestContextCallableRequest<N, I>;
4
+ specifier: string;
5
+ }
6
+ /**
7
+ * Function that asserts something given the input request.
8
+ */
9
+ export declare type AssertDevelopmentRequestFunction<N, I = unknown> = (context: AssertDevelopmentRequestFunctionContext<N, I>) => void;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=development.assert.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development.assert.function.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/development/development.assert.function.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { PromiseOrValue } from '@dereekb/util';
2
+ import { OnCallDevelopmentParams, DevelopmentFirebaseFunctionSpecifierRef, DevelopmentFirebaseFunctionSpecifier } from '@dereekb/firebase';
3
+ import { OnCallWithNestContext } from '../function/call';
4
+ import { NestContextCallableRequest } from '../function/nest';
5
+ import { AssertDevelopmentRequestFunction } from './development.assert.function';
6
+ export declare type OnCallDevelopmentFunction<N, I = unknown, O = unknown> = (request: NestContextCallableRequest<N, I> & DevelopmentFirebaseFunctionSpecifierRef) => PromiseOrValue<O>;
7
+ export declare type OnCallDevelopmentFunctionMap<N> = {
8
+ [key: string]: OnCallDevelopmentFunction<N, any, any>;
9
+ };
10
+ export interface OnCallDevelopmentConfig<N> {
11
+ preAssert?: AssertDevelopmentRequestFunction<N, OnCallDevelopmentParams>;
12
+ }
13
+ /**
14
+ * Creates a OnCallWithAuthorizedNestContext function for creating a model.
15
+ *
16
+ * @param map
17
+ * @returns
18
+ */
19
+ export declare function onCallDevelopmentFunction<N>(map: OnCallDevelopmentFunctionMap<N>, config?: OnCallDevelopmentConfig<N>): OnCallWithNestContext<N, OnCallDevelopmentParams, unknown>;
20
+ export declare function developmentUnknownSpecifierError(specifier: DevelopmentFirebaseFunctionSpecifier): import("firebase-functions/v1/auth").HttpsError;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.developmentUnknownSpecifierError = exports.onCallDevelopmentFunction = void 0;
4
+ const util_1 = require("@dereekb/util");
5
+ const function_1 = require("../../function");
6
+ /**
7
+ * Creates a OnCallWithAuthorizedNestContext function for creating a model.
8
+ *
9
+ * @param map
10
+ * @returns
11
+ */
12
+ function onCallDevelopmentFunction(map, config = {}) {
13
+ const { preAssert = () => undefined } = config;
14
+ return (request) => {
15
+ const specifier = request.data.specifier;
16
+ const devFn = map[specifier];
17
+ if (devFn) {
18
+ preAssert({ request, specifier });
19
+ return devFn(Object.assign(Object.assign({}, request), { specifier, data: request.data.data }));
20
+ }
21
+ else {
22
+ throw developmentUnknownSpecifierError(specifier);
23
+ }
24
+ };
25
+ }
26
+ exports.onCallDevelopmentFunction = onCallDevelopmentFunction;
27
+ function developmentUnknownSpecifierError(specifier) {
28
+ return (0, function_1.badRequestError)((0, util_1.serverError)({
29
+ status: 400,
30
+ code: 'UNKNOWN_SPECIFIER_ERROR',
31
+ message: `Invalid specifier "${specifier}" to run.`,
32
+ data: {
33
+ specifier
34
+ }
35
+ }));
36
+ }
37
+ exports.developmentUnknownSpecifierError = developmentUnknownSpecifierError;
38
+ //# sourceMappingURL=development.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development.function.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/development/development.function.ts"],"names":[],"mappings":";;;AAAA,wCAA4D;AAE5D,6CAAiD;AAgBjD;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAI,GAAoC,EAAE,SAAqC,EAAE;IACxH,MAAM,EAAE,SAAS,GAAG,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC;IAE/C,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC;QACzC,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;QAE7B,IAAI,KAAK,EAAE;YACT,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;YAClC,OAAO,KAAK,iCACP,OAAO,KACV,SAAS,EACT,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,IACvB,CAAC;SACJ;aAAM;YACL,MAAM,gCAAgC,CAAC,SAAS,CAAC,CAAC;SACnD;IACH,CAAC,CAAC;AACJ,CAAC;AAlBD,8DAkBC;AAED,SAAgB,gCAAgC,CAAC,SAA+C;IAC9F,OAAO,IAAA,0BAAe,EACpB,IAAA,kBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,sBAAsB,SAAS,WAAW;QACnD,IAAI,EAAE;YACJ,SAAS;SACV;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAXD,4EAWC"}
@@ -0,0 +1,7 @@
1
+ import { ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFirebaseFunctionResult } from '@dereekb/firebase';
2
+ import { NestApplicationScheduleConfiguredFunctionMap } from '../function/schedule';
3
+ import { OnCallDevelopmentFunction } from './development.function';
4
+ export interface MakeScheduledFunctionDevelopmentFunctionConfig {
5
+ readonly allScheduledFunctions: NestApplicationScheduleConfiguredFunctionMap;
6
+ }
7
+ export declare function makeScheduledFunctionDevelopmentFunction(config: MakeScheduledFunctionDevelopmentFunctionConfig): OnCallDevelopmentFunction<unknown, ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFirebaseFunctionResult>;
@@ -0,0 +1,6 @@
1
+ export declare const NO_RUN_NAME_SPECIFIED_FOR_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_CODE = "NO_RUN_NAME_SPECIFIED_FOR_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION";
2
+ export declare function noRunNameSpecifiedForScheduledFunctionDevelopmentFunction(): import("firebase-functions/v1/auth").HttpsError;
3
+ export declare const UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_NAME_CODE = "UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_NAME";
4
+ export declare function unknownScheduledFunctionDevelopmentFunctionName(name: unknown): import("firebase-functions/v1/auth").HttpsError;
5
+ export declare const UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_TYPE_CODE = "UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_TYPE";
6
+ export declare function unknownScheduledFunctionDevelopmentFunctionType(type: unknown): import("firebase-functions/v1/auth").HttpsError;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unknownScheduledFunctionDevelopmentFunctionType = exports.UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_TYPE_CODE = exports.unknownScheduledFunctionDevelopmentFunctionName = exports.UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_NAME_CODE = exports.noRunNameSpecifiedForScheduledFunctionDevelopmentFunction = exports.NO_RUN_NAME_SPECIFIED_FOR_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_CODE = void 0;
4
+ const error_1 = require("../../function/error");
5
+ exports.NO_RUN_NAME_SPECIFIED_FOR_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_CODE = 'NO_RUN_NAME_SPECIFIED_FOR_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION';
6
+ function noRunNameSpecifiedForScheduledFunctionDevelopmentFunction() {
7
+ return (0, error_1.badRequestError)({
8
+ code: exports.NO_RUN_NAME_SPECIFIED_FOR_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_CODE,
9
+ message: `Must specify run parameter.`
10
+ });
11
+ }
12
+ exports.noRunNameSpecifiedForScheduledFunctionDevelopmentFunction = noRunNameSpecifiedForScheduledFunctionDevelopmentFunction;
13
+ exports.UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_NAME_CODE = 'UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_NAME';
14
+ function unknownScheduledFunctionDevelopmentFunctionName(name) {
15
+ return (0, error_1.badRequestError)({
16
+ code: exports.UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_NAME_CODE,
17
+ message: `Unknown function with name "${name}"`,
18
+ data: {
19
+ name
20
+ }
21
+ });
22
+ }
23
+ exports.unknownScheduledFunctionDevelopmentFunctionName = unknownScheduledFunctionDevelopmentFunctionName;
24
+ exports.UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_TYPE_CODE = 'UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_TYPE';
25
+ function unknownScheduledFunctionDevelopmentFunctionType(type) {
26
+ return (0, error_1.badRequestError)({
27
+ code: exports.UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_TYPE_CODE,
28
+ message: `Unknown type "${type}"`,
29
+ data: {
30
+ type
31
+ }
32
+ });
33
+ }
34
+ exports.unknownScheduledFunctionDevelopmentFunctionType = unknownScheduledFunctionDevelopmentFunctionType;
35
+ //# sourceMappingURL=development.schedule.function.error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development.schedule.function.error.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/development/development.schedule.function.error.ts"],"names":[],"mappings":";;;AAAA,gDAAuD;AAE1C,QAAA,sEAAsE,GAAG,mEAAmE,CAAC;AAE1J,SAAgB,yDAAyD;IACvE,OAAO,IAAA,uBAAe,EAAC;QACrB,IAAI,EAAE,8EAAsE;QAC5E,OAAO,EAAE,6BAA6B;KACvC,CAAC,CAAC;AACL,CAAC;AALD,8HAKC;AAEY,QAAA,yDAAyD,GAAG,sDAAsD,CAAC;AAEhI,SAAgB,+CAA+C,CAAC,IAAa;IAC3E,OAAO,IAAA,uBAAe,EAAC;QACrB,IAAI,EAAE,iEAAyD;QAC/D,OAAO,EAAE,+BAA+B,IAAI,GAAG;QAC/C,IAAI,EAAE;YACJ,IAAI;SACL;KACF,CAAC,CAAC;AACL,CAAC;AARD,0GAQC;AAEY,QAAA,yDAAyD,GAAG,sDAAsD,CAAC;AAEhI,SAAgB,+CAA+C,CAAC,IAAa;IAC3E,OAAO,IAAA,uBAAe,EAAC;QACrB,IAAI,EAAE,iEAAyD;QAC/D,OAAO,EAAE,iBAAiB,IAAI,GAAG;QACjC,IAAI,EAAE;YACJ,IAAI;SACL;KACF,CAAC,CAAC;AACL,CAAC;AARD,0GAQC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeScheduledFunctionDevelopmentFunction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const util_1 = require("@dereekb/util");
6
+ const development_schedule_function_error_1 = require("./development.schedule.function.error");
7
+ function makeScheduledFunctionDevelopmentFunction(config) {
8
+ const { allScheduledFunctions } = config;
9
+ const getListValues = (0, util_1.cachedGetter)(() => {
10
+ const result = [];
11
+ (0, util_1.forEachKeyValue)(allScheduledFunctions, {
12
+ forEach: (x) => {
13
+ const [functionName, config] = x;
14
+ result.push({
15
+ name: functionName.toString()
16
+ });
17
+ }
18
+ });
19
+ return result;
20
+ });
21
+ return (request) => tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ const { data } = request;
23
+ const { type } = data;
24
+ switch (type) {
25
+ case 'run':
26
+ const targetRunName = data.run;
27
+ if (!targetRunName) {
28
+ throw (0, development_schedule_function_error_1.noRunNameSpecifiedForScheduledFunctionDevelopmentFunction)();
29
+ }
30
+ const targetFunction = allScheduledFunctions[targetRunName];
31
+ if (!targetFunction) {
32
+ throw (0, development_schedule_function_error_1.unknownScheduledFunctionDevelopmentFunctionName)(targetRunName);
33
+ }
34
+ try {
35
+ yield targetFunction._runNow();
36
+ }
37
+ catch (e) {
38
+ console.error(`Failed manually running task "${targetRunName}".`, e);
39
+ throw e;
40
+ }
41
+ return {
42
+ type: 'run',
43
+ success: true
44
+ };
45
+ case 'list':
46
+ return {
47
+ type: 'list',
48
+ list: getListValues()
49
+ };
50
+ default:
51
+ throw (0, development_schedule_function_error_1.unknownScheduledFunctionDevelopmentFunctionType)(type);
52
+ }
53
+ });
54
+ }
55
+ exports.makeScheduledFunctionDevelopmentFunction = makeScheduledFunctionDevelopmentFunction;
56
+ //# sourceMappingURL=development.schedule.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development.schedule.function.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/development/development.schedule.function.ts"],"names":[],"mappings":";;;;AACA,wCAA8D;AAG9D,+FAAoN;AAMpN,SAAgB,wCAAwC,CAAC,MAAsD;IAC7G,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;IACzC,MAAM,aAAa,GAAG,IAAA,mBAAY,EAAC,GAAG,EAAE;QACtC,MAAM,MAAM,GAA4D,EAAE,CAAC;QAE3E,IAAA,sBAAe,EAAC,qBAAqB,EAAE;YACrC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gBACb,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;gBAEjC,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,YAAY,CAAC,QAAQ,EAAE;iBAC9B,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,OAAO,CAAO,OAAO,EAAE,EAAE;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QACzB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAEtB,QAAQ,IAAI,EAAE;YACZ,KAAK,KAAK;gBACR,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC;gBAE/B,IAAI,CAAC,aAAa,EAAE;oBAClB,MAAM,IAAA,+FAAyD,GAAE,CAAC;iBACnE;gBAED,MAAM,cAAc,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;gBAE5D,IAAI,CAAC,cAAc,EAAE;oBACnB,MAAM,IAAA,qFAA+C,EAAC,aAAa,CAAC,CAAC;iBACtE;gBAED,IAAI;oBACF,MAAM,cAAc,CAAC,OAAO,EAAE,CAAC;iBAChC;gBAAC,OAAO,CAAC,EAAE;oBACV,OAAO,CAAC,KAAK,CAAC,iCAAiC,aAAa,IAAI,EAAE,CAAC,CAAC,CAAC;oBACrE,MAAM,CAAC,CAAC;iBACT;gBAED,OAAO;oBACL,IAAI,EAAE,KAAK;oBACX,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,KAAK,MAAM;gBACT,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,aAAa,EAAE;iBACtB,CAAC;YACJ;gBACE,MAAM,IAAA,qFAA+C,EAAC,IAAI,CAAC,CAAC;SAC/D;IACH,CAAC,CAAA,CAAC;AACJ,CAAC;AAxDD,4FAwDC"}
@@ -0,0 +1,5 @@
1
+ export * from './development.app.function';
2
+ export * from './development.assert.function';
3
+ export * from './development.function';
4
+ export * from './development.schedule.function';
5
+ export * from './development.schedule.function.error';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./development.app.function"), exports);
5
+ tslib_1.__exportStar(require("./development.assert.function"), exports);
6
+ tslib_1.__exportStar(require("./development.function"), exports);
7
+ tslib_1.__exportStar(require("./development.schedule.function"), exports);
8
+ tslib_1.__exportStar(require("./development.schedule.function.error"), exports);
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/development/index.ts"],"names":[],"mappings":";;;AAAA,qEAA2C;AAC3C,wEAA8C;AAC9C,iEAAuC;AACvC,0EAAgD;AAChD,gFAAsD"}
@@ -1,6 +1,10 @@
1
1
  import { ServerEnvironmentService } from '@dereekb/nestjs';
2
2
  import { FirebaseServerEnvService } from '../../env';
3
3
  export declare class DefaultFirebaseServerEnvService extends ServerEnvironmentService implements FirebaseServerEnvService {
4
+ /**
5
+ * Enabled when not in production and not in a testing environment.
6
+ */
7
+ get developmentSchedulerEnabled(): boolean;
4
8
  /**
5
9
  * @deprecated use isDeveloperToolsEnabled instead.z
6
10
  */
@@ -5,6 +5,12 @@ const tslib_1 = require("tslib");
5
5
  const nestjs_1 = require("@dereekb/nestjs");
6
6
  const common_1 = require("@nestjs/common");
7
7
  let DefaultFirebaseServerEnvService = class DefaultFirebaseServerEnvService extends nestjs_1.ServerEnvironmentService {
8
+ /**
9
+ * Enabled when not in production and not in a testing environment.
10
+ */
11
+ get developmentSchedulerEnabled() {
12
+ return !this.isProduction && !this.isTestingEnv;
13
+ }
8
14
  /**
9
15
  * @deprecated use isDeveloperToolsEnabled instead.z
10
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"env.service.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/env.service.ts"],"names":[],"mappings":";;;;AAAA,4CAA2D;AAC3D,2CAA4C;AAI5C,IAAa,+BAA+B,GAA5C,MAAa,+BAAgC,SAAQ,iCAAwB;IAC3E;;OAEG;IACH,IAAI,yBAAyB;QAC3B,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACpC,CAAC;CACF,CAAA;AAPY,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;GACA,+BAA+B,CAO3C;AAPY,0EAA+B"}
1
+ {"version":3,"file":"env.service.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/env.service.ts"],"names":[],"mappings":";;;;AAAA,4CAA2D;AAC3D,2CAA4C;AAI5C,IAAa,+BAA+B,GAA5C,MAAa,+BAAgC,SAAQ,iCAAwB;IAC3E;;OAEG;IACH,IAAI,2BAA2B;QAC7B,OAAO,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,IAAI,yBAAyB;QAC3B,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACpC,CAAC;CACF,CAAA;AAdY,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;GACA,+BAA+B,CAc3C;AAdY,0EAA+B"}
@@ -0,0 +1,4 @@
1
+ import { AsyncDecisionFunction } from '@dereekb/util';
2
+ import { NestAppPromiseGetter } from '../app';
3
+ export declare function nestAppIsProductionEnvironment(nest: NestAppPromiseGetter): AsyncDecisionFunction<void>;
4
+ export declare function nestAppHasDevelopmentSchedulerEnabled(nest: NestAppPromiseGetter): AsyncDecisionFunction<void>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nestAppHasDevelopmentSchedulerEnabled = exports.nestAppIsProductionEnvironment = void 0;
4
+ const env_service_1 = require("../../env/env.service");
5
+ function nestAppIsProductionEnvironment(nest) {
6
+ return () => nest().then((x) => x.get(env_service_1.FirebaseServerEnvService).isProduction);
7
+ }
8
+ exports.nestAppIsProductionEnvironment = nestAppIsProductionEnvironment;
9
+ function nestAppHasDevelopmentSchedulerEnabled(nest) {
10
+ return () => nest().then((x) => x.get(env_service_1.FirebaseServerEnvService).developmentSchedulerEnabled);
11
+ }
12
+ exports.nestAppHasDevelopmentSchedulerEnabled = nestAppHasDevelopmentSchedulerEnabled;
13
+ //# sourceMappingURL=env.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.util.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/env.util.ts"],"names":[],"mappings":";;;AACA,uDAAiE;AAGjE,SAAgB,8BAA8B,CAAC,IAA0B;IACvE,OAAO,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,sCAAwB,CAAC,CAAC,YAAY,CAAC,CAAC;AAChF,CAAC;AAFD,wEAEC;AAED,SAAgB,qCAAqC,CAAC,IAA0B;IAC9E,OAAO,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,sCAAwB,CAAC,CAAC,2BAA2B,CAAC,CAAC;AAC/F,CAAC;AAFD,sFAEC"}
@@ -1,3 +1,4 @@
1
1
  export * from './env.config';
2
2
  export * from './env.nest';
3
3
  export * from './env.service';
4
+ export * from './env.util';
@@ -4,4 +4,5 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./env.config"), exports);
5
5
  tslib_1.__exportStar(require("./env.nest"), exports);
6
6
  tslib_1.__exportStar(require("./env.service"), exports);
7
+ tslib_1.__exportStar(require("./env.util"), exports);
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B;AAC9B,qDAA2B"}
@@ -3,3 +3,5 @@ export * from './v2';
3
3
  export * from './context';
4
4
  export * from './call';
5
5
  export * from './nest';
6
+ export * from './schedule';
7
+ export * from './schedule.util';
@@ -6,4 +6,6 @@ tslib_1.__exportStar(require("./v2"), exports);
6
6
  tslib_1.__exportStar(require("./context"), exports);
7
7
  tslib_1.__exportStar(require("./call"), exports);
8
8
  tslib_1.__exportStar(require("./nest"), exports);
9
+ tslib_1.__exportStar(require("./schedule"), exports);
10
+ tslib_1.__exportStar(require("./schedule.util"), exports);
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/function/index.ts"],"names":[],"mappings":";;;AAAA,+CAAqB;AACrB,+CAAqB;AACrB,oDAA0B;AAC1B,iDAAuB;AACvB,iDAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/function/index.ts"],"names":[],"mappings":";;;AAAA,+CAAqB;AACrB,+CAAqB;AACrB,oDAA0B;AAC1B,iDAAuB;AACvB,iDAAuB;AACvB,qDAA2B;AAC3B,0DAAgC"}
@@ -0,0 +1,61 @@
1
+ import { Minutes, PromiseOrValue } from '@dereekb/util';
2
+ import { MakeNestContext, NestApplicationFunctionFactory } from '../nest.provider';
3
+ import { NestApplicationContextRequest, NestContextRequest } from './nest';
4
+ export interface OnScheduleConfig {
5
+ /**
6
+ * Scheduled time in a cron-tab format.
7
+ *
8
+ * Used by v1 and v2.
9
+ */
10
+ cron?: Minutes | string;
11
+ /**
12
+ * Scheduled time configuration in an english format.
13
+ *
14
+ * Used by v2.
15
+ */
16
+ schedule?: string;
17
+ /**
18
+ * Optional timezone to specify.
19
+ */
20
+ timezone?: string;
21
+ /**
22
+ * The number of retry attempts for a failed run.
23
+ */
24
+ retryCount?: number;
25
+ /**
26
+ * The time limit for retrying.
27
+ */
28
+ maxRetrySeconds?: number;
29
+ /**
30
+ * The minimum time to wait before retying.
31
+ */
32
+ minBackoffSeconds?: number;
33
+ /**
34
+ * The maximum time to wait before retrying.
35
+ */
36
+ maxBackoffSeconds?: number;
37
+ /**
38
+ * The time between will double max doublings times.
39
+ */
40
+ maxDoublings?: number;
41
+ }
42
+ export interface OnScheduleRequest<S> {
43
+ scheduleContext?: S;
44
+ }
45
+ export declare type OnScheduleWithNestApplicationRequest<S = unknown> = NestApplicationContextRequest<OnScheduleRequest<S>>;
46
+ /**
47
+ * Scheduled function that is passed an INestApplicationContext in addition to the OnScheduleRequest object.
48
+ */
49
+ export declare type OnScheduleWithNestApplication<S = unknown> = (request: OnScheduleWithNestApplicationRequest<S>) => PromiseOrValue<void>;
50
+ export declare type OnScheduleWithNestContextRequest<N, S = unknown> = NestContextRequest<N, OnScheduleRequest<S>>;
51
+ /**
52
+ * Scheduled function that is passed an arbitrary nest context object in addition to the OnScheduleRequest object.
53
+ */
54
+ export declare type OnScheduleWithNestContext<N, S = unknown> = (request: OnScheduleWithNestContextRequest<N, S>) => PromiseOrValue<void>;
55
+ export declare function setNestContextOnScheduleRequest<N, S>(makeNestContext: MakeNestContext<N>, request: OnScheduleWithNestApplicationRequest<S>): OnScheduleWithNestContextRequest<N, S>;
56
+ export declare type NestApplicationScheduleConfiguredFunction<F extends object = object> = F & {
57
+ _runNow(): PromiseOrValue<void>;
58
+ readonly _schedule: OnScheduleConfig;
59
+ };
60
+ export declare type NestApplicationScheduleConfiguredFunctionFactory<F extends object = object> = NestApplicationFunctionFactory<NestApplicationScheduleConfiguredFunction<F>>;
61
+ export declare type NestApplicationScheduleConfiguredFunctionMap = Record<string, NestApplicationScheduleConfiguredFunction>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setNestContextOnScheduleRequest = void 0;
4
+ function setNestContextOnScheduleRequest(makeNestContext, request) {
5
+ request.nest = makeNestContext(request.nestApplication);
6
+ return request;
7
+ }
8
+ exports.setNestContextOnScheduleRequest = setNestContextOnScheduleRequest;
9
+ //# sourceMappingURL=schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/function/schedule.ts"],"names":[],"mappings":";;;AA+DA,SAAgB,+BAA+B,CAAO,eAAmC,EAAE,OAAgD;IACxI,OAA2E,CAAC,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7H,OAAO,OAA4D,CAAC;AACtE,CAAC;AAHD,0EAGC"}