jcc-express-mvc 1.8.25 → 1.8.28

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 (55) hide show
  1. package/Core/Cache.d.ts +1 -1
  2. package/Core/Cache.d.ts.map +1 -1
  3. package/Core/Cache.js +3 -15
  4. package/Core/index.d.ts +2 -0
  5. package/Core/index.d.ts.map +1 -1
  6. package/Core/index.js +5 -1
  7. package/__tests__/ApplicationBuilder.test.js +3 -4
  8. package/__tests__/Job.test.js +5 -20
  9. package/__tests__/Schedule.test.d.ts +2 -0
  10. package/__tests__/Schedule.test.d.ts.map +1 -0
  11. package/__tests__/Schedule.test.js +580 -0
  12. package/__tests__/ValidationException.test.js +4 -3
  13. package/lib/Application/ApplicationBuilder.d.ts.map +1 -1
  14. package/lib/Application/ApplicationBuilder.js +0 -7
  15. package/lib/Auth/index.d.ts.map +1 -1
  16. package/lib/Auth/index.js +2 -1
  17. package/lib/Cache/FileCacheDriver.d.ts.map +1 -1
  18. package/lib/Cache/FileCacheDriver.js +8 -1
  19. package/lib/Cache/index.d.ts.map +1 -1
  20. package/lib/Cache/index.js +23 -24
  21. package/lib/Command-Line/CacheCommand.d.ts +7 -0
  22. package/lib/Command-Line/CacheCommand.d.ts.map +1 -0
  23. package/lib/Command-Line/CacheCommand.js +21 -0
  24. package/lib/Command-Line/MakeCommand.js +4 -1
  25. package/lib/Command-Line/NodeArtisanCommand.d.ts +2 -0
  26. package/lib/Command-Line/NodeArtisanCommand.d.ts.map +1 -1
  27. package/lib/Command-Line/NodeArtisanCommand.js +11 -0
  28. package/lib/Command-Line/ScheduleCommand.d.ts.map +1 -1
  29. package/lib/Command-Line/ScheduleCommand.js +8 -7
  30. package/lib/Command-Line/WatchCommand.d.ts.map +1 -1
  31. package/lib/Command-Line/WatchCommand.js +6 -1
  32. package/lib/Command-Line/files/Request.d.ts.map +1 -1
  33. package/lib/Command-Line/files/Request.js +3 -5
  34. package/lib/Command-Line/files/jobs.d.ts +1 -2
  35. package/lib/Command-Line/files/jobs.d.ts.map +1 -1
  36. package/lib/Command-Line/files/jobs.js +29 -21
  37. package/lib/Error/AppError.d.ts.map +1 -1
  38. package/lib/Error/AppErrorHandler.js +3 -4
  39. package/lib/Error/ValidationException-v2/index.d.ts.map +1 -1
  40. package/lib/Error/ValidationException-v2/index.js +6 -4
  41. package/lib/Inertia/index.d.ts.map +1 -1
  42. package/lib/Inertia/index.js +3 -1
  43. package/lib/Queue/Drivers/MemoryDriver.d.ts.map +1 -1
  44. package/lib/Queue/Drivers/MemoryDriver.js +1 -1
  45. package/lib/Schedule/Schedule.d.ts +81 -89
  46. package/lib/Schedule/Schedule.d.ts.map +1 -1
  47. package/lib/Schedule/Schedule.js +167 -141
  48. package/lib/Schedule/Scheduler.d.ts +7 -34
  49. package/lib/Schedule/Scheduler.d.ts.map +1 -1
  50. package/lib/Schedule/Scheduler.js +156 -150
  51. package/lib/Validation/Validator/index.d.ts.map +1 -1
  52. package/lib/Validation/Validator/index.js +1 -4
  53. package/lib/util/index.d.ts.map +1 -1
  54. package/lib/util/index.js +20 -5
  55. package/package.json +1 -1
package/Core/Cache.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "../lib/Cache";
1
+ export { CacheFacade as Cache } from "../lib/Cache/CacheFacade";
2
2
  //# sourceMappingURL=Cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../jcc-express-mvc/Core/Cache.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../jcc-express-mvc/Core/Cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAC"}
package/Core/Cache.js CHANGED
@@ -1,17 +1,5 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../lib/Cache"), exports);
3
+ exports.Cache = void 0;
4
+ var CacheFacade_1 = require("../lib/Cache/CacheFacade");
5
+ Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return CacheFacade_1.CacheFacade; } });
package/Core/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from "../lib/Application/Application";
2
+ export { SessionServiceProvider } from "../lib/Providers/SessionServiceProvider";
3
+ export { SessionManager } from "../lib/Session/SessionManager";
2
4
  export * from "../lib/Routes/Route";
3
5
  export { csrf } from "../lib/Security/CsrfMiddleware";
4
6
  export type { CsrfOptions } from "../lib/Security/CsrfMiddleware";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../jcc-express-mvc/Core/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../jcc-express-mvc/Core/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC"}
package/Core/index.js CHANGED
@@ -14,8 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.methodSpoofing = exports.csrf = void 0;
17
+ exports.methodSpoofing = exports.csrf = exports.SessionManager = exports.SessionServiceProvider = void 0;
18
18
  __exportStar(require("../lib/Application/Application"), exports);
19
+ var SessionServiceProvider_1 = require("../lib/Providers/SessionServiceProvider");
20
+ Object.defineProperty(exports, "SessionServiceProvider", { enumerable: true, get: function () { return SessionServiceProvider_1.SessionServiceProvider; } });
21
+ var SessionManager_1 = require("../lib/Session/SessionManager");
22
+ Object.defineProperty(exports, "SessionManager", { enumerable: true, get: function () { return SessionManager_1.SessionManager; } });
19
23
  __exportStar(require("../lib/Routes/Route"), exports);
20
24
  var CsrfMiddleware_1 = require("../lib/Security/CsrfMiddleware");
21
25
  Object.defineProperty(exports, "csrf", { enumerable: true, get: function () { return CsrfMiddleware_1.csrf; } });
@@ -15,7 +15,7 @@ const ApplicationBuilder_1 = require("../lib/Application/ApplicationBuilder");
15
15
  (0, vitest_1.expect)(app.config).toMatchObject({ custom: "value" });
16
16
  (0, vitest_1.expect)(app.has("Queue")).toBe(false);
17
17
  });
18
- (0, vitest_1.it)("withConfig registers Queue when queue config is present", () => {
18
+ (0, vitest_1.it)("withConfig stores queue config without registering Queue (QueueServiceProvider handles that)", () => {
19
19
  const config = {
20
20
  queue: {
21
21
  default: "memory",
@@ -26,9 +26,8 @@ const ApplicationBuilder_1 = require("../lib/Application/ApplicationBuilder");
26
26
  };
27
27
  const builder = new ApplicationBuilder_1.ApplicationBuilder(app);
28
28
  builder.withConfig(config);
29
- (0, vitest_1.expect)(app.has("Queue")).toBe(true);
30
- const queue = app.resolve("Queue");
31
- (0, vitest_1.expect)(queue).toBeDefined();
29
+ (0, vitest_1.expect)(app.config.queue).toMatchObject(config.queue);
30
+ (0, vitest_1.expect)(app.has("Queue")).toBe(false);
32
31
  });
33
32
  (0, vitest_1.it)("withRouting maps route config with rootPath", () => {
34
33
  const builder = new ApplicationBuilder_1.ApplicationBuilder(app);
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const vitest_1 = require("vitest");
4
4
  const Job_1 = require("../lib/Queue/Job");
5
+ const Queue_1 = require("../lib/Queue/Queue");
5
6
  const Application_1 = require("../lib/Application/Application");
6
- const ApplicationBuilder_1 = require("../lib/Application/ApplicationBuilder");
7
7
  const util_1 = require("../lib/util");
8
8
  class TestJob extends Job_1.Job {
9
9
  async handle() {
@@ -112,15 +112,8 @@ class NestedFolderJob extends Job_1.Job {
112
112
  app = Application_1.Application.getInstance();
113
113
  originalApp = globalThis.app;
114
114
  globalThis.app = app;
115
- const config = {
116
- queue: {
117
- default: "memory",
118
- connections: {
119
- memory: { driver: "memory", queue: "default" },
120
- },
121
- },
122
- };
123
- new ApplicationBuilder_1.ApplicationBuilder(app).withConfig(config);
115
+ const q = new Queue_1.Queue({ driver: "memory", queue: "default" });
116
+ app.instance("Queue", q);
124
117
  });
125
118
  (0, vitest_1.afterEach)(() => {
126
119
  globalThis.app = originalApp;
@@ -145,16 +138,8 @@ class NestedFolderJob extends Job_1.Job {
145
138
  app = Application_1.Application.getInstance();
146
139
  originalApp = globalThis.app;
147
140
  globalThis.app = app;
148
- const config = {
149
- queue: {
150
- default: "memory",
151
- connections: {
152
- memory: { driver: "memory", queue: "default" },
153
- },
154
- },
155
- };
156
- new ApplicationBuilder_1.ApplicationBuilder(app).withConfig(config);
157
- queue = app.resolve("Queue");
141
+ queue = new Queue_1.Queue({ driver: "memory", queue: "default" });
142
+ app.instance("Queue", queue);
158
143
  });
159
144
  (0, vitest_1.afterEach)(() => {
160
145
  globalThis.app = originalApp;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Schedule.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Schedule.test.d.ts","sourceRoot":"","sources":["../../jcc-express-mvc/__tests__/Schedule.test.ts"],"names":[],"mappings":""}