@orchestr-sh/orchestr 1.8.0 → 1.9.2

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 (169) hide show
  1. package/README.md +809 -0
  2. package/dist/Cache/CacheManager.d.ts +109 -0
  3. package/dist/Cache/CacheManager.d.ts.map +1 -0
  4. package/dist/Cache/CacheManager.js +181 -0
  5. package/dist/Cache/CacheManager.js.map +1 -0
  6. package/dist/Cache/CacheServiceProvider.d.ts +19 -0
  7. package/dist/Cache/CacheServiceProvider.d.ts.map +1 -0
  8. package/dist/Cache/CacheServiceProvider.js +71 -0
  9. package/dist/Cache/CacheServiceProvider.js.map +1 -0
  10. package/dist/Cache/Contracts/Lock.d.ts +31 -0
  11. package/dist/Cache/Contracts/Lock.d.ts.map +1 -0
  12. package/dist/Cache/Contracts/Lock.js +3 -0
  13. package/dist/Cache/Contracts/Lock.js.map +1 -0
  14. package/dist/Cache/Contracts/Repository.d.ts +59 -0
  15. package/dist/Cache/Contracts/Repository.d.ts.map +1 -0
  16. package/dist/Cache/Contracts/Repository.js +9 -0
  17. package/dist/Cache/Contracts/Repository.js.map +1 -0
  18. package/dist/Cache/Contracts/Store.d.ts +51 -0
  19. package/dist/Cache/Contracts/Store.d.ts.map +1 -0
  20. package/dist/Cache/Contracts/Store.js +3 -0
  21. package/dist/Cache/Contracts/Store.js.map +1 -0
  22. package/dist/Cache/Events/CacheFlushed.d.ts +11 -0
  23. package/dist/Cache/Events/CacheFlushed.d.ts.map +1 -0
  24. package/dist/Cache/Events/CacheFlushed.js +18 -0
  25. package/dist/Cache/Events/CacheFlushed.js.map +1 -0
  26. package/dist/Cache/Events/CacheHit.d.ts +13 -0
  27. package/dist/Cache/Events/CacheHit.d.ts.map +1 -0
  28. package/dist/Cache/Events/CacheHit.js +22 -0
  29. package/dist/Cache/Events/CacheHit.js.map +1 -0
  30. package/dist/Cache/Events/CacheMissed.d.ts +12 -0
  31. package/dist/Cache/Events/CacheMissed.d.ts.map +1 -0
  32. package/dist/Cache/Events/CacheMissed.js +20 -0
  33. package/dist/Cache/Events/CacheMissed.js.map +1 -0
  34. package/dist/Cache/Events/KeyForgotten.d.ts +12 -0
  35. package/dist/Cache/Events/KeyForgotten.d.ts.map +1 -0
  36. package/dist/Cache/Events/KeyForgotten.js +20 -0
  37. package/dist/Cache/Events/KeyForgotten.js.map +1 -0
  38. package/dist/Cache/Events/KeyWritten.d.ts +14 -0
  39. package/dist/Cache/Events/KeyWritten.d.ts.map +1 -0
  40. package/dist/Cache/Events/KeyWritten.js +24 -0
  41. package/dist/Cache/Events/KeyWritten.js.map +1 -0
  42. package/dist/Cache/Events/index.d.ts +6 -0
  43. package/dist/Cache/Events/index.d.ts.map +1 -0
  44. package/dist/Cache/Events/index.js +14 -0
  45. package/dist/Cache/Events/index.js.map +1 -0
  46. package/dist/Cache/Locks/CacheLock.d.ts +19 -0
  47. package/dist/Cache/Locks/CacheLock.d.ts.map +1 -0
  48. package/dist/Cache/Locks/CacheLock.js +49 -0
  49. package/dist/Cache/Locks/CacheLock.js.map +1 -0
  50. package/dist/Cache/Locks/Lock.d.ts +51 -0
  51. package/dist/Cache/Locks/Lock.d.ts.map +1 -0
  52. package/dist/Cache/Locks/Lock.js +83 -0
  53. package/dist/Cache/Locks/Lock.js.map +1 -0
  54. package/dist/Cache/Locks/LockTimeoutException.d.ts +9 -0
  55. package/dist/Cache/Locks/LockTimeoutException.d.ts.map +1 -0
  56. package/dist/Cache/Locks/LockTimeoutException.js +16 -0
  57. package/dist/Cache/Locks/LockTimeoutException.js.map +1 -0
  58. package/dist/Cache/Locks/index.d.ts +4 -0
  59. package/dist/Cache/Locks/index.d.ts.map +1 -0
  60. package/dist/Cache/Locks/index.js +10 -0
  61. package/dist/Cache/Locks/index.js.map +1 -0
  62. package/dist/Cache/Repository.d.ts +61 -0
  63. package/dist/Cache/Repository.d.ts.map +1 -0
  64. package/dist/Cache/Repository.js +207 -0
  65. package/dist/Cache/Repository.js.map +1 -0
  66. package/dist/Cache/Stores/ArrayStore.d.ts +44 -0
  67. package/dist/Cache/Stores/ArrayStore.d.ts.map +1 -0
  68. package/dist/Cache/Stores/ArrayStore.js +118 -0
  69. package/dist/Cache/Stores/ArrayStore.js.map +1 -0
  70. package/dist/Cache/Stores/DatabaseStore.d.ts +44 -0
  71. package/dist/Cache/Stores/DatabaseStore.d.ts.map +1 -0
  72. package/dist/Cache/Stores/DatabaseStore.js +165 -0
  73. package/dist/Cache/Stores/DatabaseStore.js.map +1 -0
  74. package/dist/Cache/Stores/FileStore.d.ts +50 -0
  75. package/dist/Cache/Stores/FileStore.d.ts.map +1 -0
  76. package/dist/Cache/Stores/FileStore.js +194 -0
  77. package/dist/Cache/Stores/FileStore.js.map +1 -0
  78. package/dist/Cache/Stores/NullStore.d.ts +22 -0
  79. package/dist/Cache/Stores/NullStore.d.ts.map +1 -0
  80. package/dist/Cache/Stores/NullStore.js +49 -0
  81. package/dist/Cache/Stores/NullStore.js.map +1 -0
  82. package/dist/Cache/Stores/index.d.ts +5 -0
  83. package/dist/Cache/Stores/index.d.ts.map +1 -0
  84. package/dist/Cache/Stores/index.js +12 -0
  85. package/dist/Cache/Stores/index.js.map +1 -0
  86. package/dist/Cache/Tags/TagSet.d.ts +39 -0
  87. package/dist/Cache/Tags/TagSet.d.ts.map +1 -0
  88. package/dist/Cache/Tags/TagSet.js +72 -0
  89. package/dist/Cache/Tags/TagSet.js.map +1 -0
  90. package/dist/Cache/Tags/TaggedCache.d.ts +54 -0
  91. package/dist/Cache/Tags/TaggedCache.d.ts.map +1 -0
  92. package/dist/Cache/Tags/TaggedCache.js +125 -0
  93. package/dist/Cache/Tags/TaggedCache.js.map +1 -0
  94. package/dist/Cache/Tags/index.d.ts +3 -0
  95. package/dist/Cache/Tags/index.d.ts.map +1 -0
  96. package/dist/Cache/Tags/index.js +8 -0
  97. package/dist/Cache/Tags/index.js.map +1 -0
  98. package/dist/Cache/index.d.ts +27 -0
  99. package/dist/Cache/index.d.ts.map +1 -0
  100. package/dist/Cache/index.js +48 -0
  101. package/dist/Cache/index.js.map +1 -0
  102. package/dist/Console/Commands/CacheClearCommand.d.ts +16 -0
  103. package/dist/Console/Commands/CacheClearCommand.d.ts.map +1 -0
  104. package/dist/Console/Commands/CacheClearCommand.js +33 -0
  105. package/dist/Console/Commands/CacheClearCommand.js.map +1 -0
  106. package/dist/Console/Commands/CacheForgetCommand.d.ts +16 -0
  107. package/dist/Console/Commands/CacheForgetCommand.d.ts.map +1 -0
  108. package/dist/Console/Commands/CacheForgetCommand.js +39 -0
  109. package/dist/Console/Commands/CacheForgetCommand.js.map +1 -0
  110. package/dist/Console/Commands/CacheTableCommand.d.ts +17 -0
  111. package/dist/Console/Commands/CacheTableCommand.d.ts.map +1 -0
  112. package/dist/Console/Commands/CacheTableCommand.js +92 -0
  113. package/dist/Console/Commands/CacheTableCommand.js.map +1 -0
  114. package/dist/Console/Commands/MakeViewCommand.d.ts +19 -0
  115. package/dist/Console/Commands/MakeViewCommand.d.ts.map +1 -0
  116. package/dist/Console/Commands/MakeViewCommand.js +132 -0
  117. package/dist/Console/Commands/MakeViewCommand.js.map +1 -0
  118. package/dist/Facades/Cache.d.ts +41 -0
  119. package/dist/Facades/Cache.d.ts.map +1 -0
  120. package/dist/Facades/Cache.js +78 -0
  121. package/dist/Facades/Cache.js.map +1 -0
  122. package/dist/Facades/View.d.ts +28 -0
  123. package/dist/Facades/View.d.ts.map +1 -0
  124. package/dist/Facades/View.js +57 -0
  125. package/dist/Facades/View.js.map +1 -0
  126. package/dist/Facades/index.d.ts +1 -0
  127. package/dist/Facades/index.d.ts.map +1 -1
  128. package/dist/Facades/index.js +3 -1
  129. package/dist/Facades/index.js.map +1 -1
  130. package/dist/Routing/Response.d.ts +6 -3
  131. package/dist/Routing/Response.d.ts.map +1 -1
  132. package/dist/Routing/Response.js +32 -7
  133. package/dist/Routing/Response.js.map +1 -1
  134. package/dist/Routing/Router.d.ts.map +1 -1
  135. package/dist/Routing/Router.js +9 -1
  136. package/dist/Routing/Router.js.map +1 -1
  137. package/dist/Support/helpers.d.ts +19 -0
  138. package/dist/Support/helpers.d.ts.map +1 -1
  139. package/dist/Support/helpers.js +31 -0
  140. package/dist/Support/helpers.js.map +1 -1
  141. package/dist/View/Engines/FileEngine.d.ts +15 -0
  142. package/dist/View/Engines/FileEngine.d.ts.map +1 -0
  143. package/dist/View/Engines/FileEngine.js +21 -0
  144. package/dist/View/Engines/FileEngine.js.map +1 -0
  145. package/dist/View/Engines/TemplateEngine.d.ts +100 -0
  146. package/dist/View/Engines/TemplateEngine.d.ts.map +1 -0
  147. package/dist/View/Engines/TemplateEngine.js +350 -0
  148. package/dist/View/Engines/TemplateEngine.js.map +1 -0
  149. package/dist/View/Engines/ViewEngine.d.ts +12 -0
  150. package/dist/View/Engines/ViewEngine.d.ts.map +1 -0
  151. package/dist/View/Engines/ViewEngine.js +8 -0
  152. package/dist/View/Engines/ViewEngine.js.map +1 -0
  153. package/dist/View/View.d.ts +44 -0
  154. package/dist/View/View.d.ts.map +1 -0
  155. package/dist/View/View.js +72 -0
  156. package/dist/View/View.js.map +1 -0
  157. package/dist/View/ViewFactory.d.ts +55 -0
  158. package/dist/View/ViewFactory.d.ts.map +1 -0
  159. package/dist/View/ViewFactory.js +101 -0
  160. package/dist/View/ViewFactory.js.map +1 -0
  161. package/dist/View/ViewServiceProvider.d.ts +30 -0
  162. package/dist/View/ViewServiceProvider.d.ts.map +1 -0
  163. package/dist/View/ViewServiceProvider.js +53 -0
  164. package/dist/View/ViewServiceProvider.js.map +1 -0
  165. package/dist/index.d.ts +36 -1
  166. package/dist/index.d.ts.map +1 -1
  167. package/dist/index.js +70 -3
  168. package/dist/index.js.map +1 -1
  169. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Cache Module
3
+ *
4
+ * A complete Laravel-compatible cache system for TypeScript.
5
+ */
6
+ export { CacheManager } from './CacheManager';
7
+ export type { CacheConfig, StoreConfig, StoreFactory } from './CacheManager';
8
+ export { CacheServiceProvider } from './CacheServiceProvider';
9
+ export { Repository } from './Repository';
10
+ export type { Store } from './Contracts/Store';
11
+ export type { RepositoryContract } from './Contracts/Repository';
12
+ export type { LockContract } from './Contracts/Lock';
13
+ export { ArrayStore } from './Stores/ArrayStore';
14
+ export { FileStore } from './Stores/FileStore';
15
+ export { DatabaseStore } from './Stores/DatabaseStore';
16
+ export { NullStore } from './Stores/NullStore';
17
+ export { Lock } from './Locks/Lock';
18
+ export { CacheLock } from './Locks/CacheLock';
19
+ export { LockTimeoutException } from './Locks/LockTimeoutException';
20
+ export { TaggedCache } from './Tags/TaggedCache';
21
+ export { TagSet } from './Tags/TagSet';
22
+ export { CacheHit } from './Events/CacheHit';
23
+ export { CacheMissed } from './Events/CacheMissed';
24
+ export { KeyWritten } from './Events/KeyWritten';
25
+ export { KeyForgotten } from './Events/KeyForgotten';
26
+ export { CacheFlushed } from './Events/CacheFlushed';
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Cache/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /**
3
+ * Cache Module
4
+ *
5
+ * A complete Laravel-compatible cache system for TypeScript.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CacheFlushed = exports.KeyForgotten = exports.KeyWritten = exports.CacheMissed = exports.CacheHit = exports.TagSet = exports.TaggedCache = exports.LockTimeoutException = exports.CacheLock = exports.Lock = exports.NullStore = exports.DatabaseStore = exports.FileStore = exports.ArrayStore = exports.Repository = exports.CacheServiceProvider = exports.CacheManager = void 0;
9
+ // Core
10
+ var CacheManager_1 = require("./CacheManager");
11
+ Object.defineProperty(exports, "CacheManager", { enumerable: true, get: function () { return CacheManager_1.CacheManager; } });
12
+ var CacheServiceProvider_1 = require("./CacheServiceProvider");
13
+ Object.defineProperty(exports, "CacheServiceProvider", { enumerable: true, get: function () { return CacheServiceProvider_1.CacheServiceProvider; } });
14
+ var Repository_1 = require("./Repository");
15
+ Object.defineProperty(exports, "Repository", { enumerable: true, get: function () { return Repository_1.Repository; } });
16
+ // Stores
17
+ var ArrayStore_1 = require("./Stores/ArrayStore");
18
+ Object.defineProperty(exports, "ArrayStore", { enumerable: true, get: function () { return ArrayStore_1.ArrayStore; } });
19
+ var FileStore_1 = require("./Stores/FileStore");
20
+ Object.defineProperty(exports, "FileStore", { enumerable: true, get: function () { return FileStore_1.FileStore; } });
21
+ var DatabaseStore_1 = require("./Stores/DatabaseStore");
22
+ Object.defineProperty(exports, "DatabaseStore", { enumerable: true, get: function () { return DatabaseStore_1.DatabaseStore; } });
23
+ var NullStore_1 = require("./Stores/NullStore");
24
+ Object.defineProperty(exports, "NullStore", { enumerable: true, get: function () { return NullStore_1.NullStore; } });
25
+ // Locks
26
+ var Lock_1 = require("./Locks/Lock");
27
+ Object.defineProperty(exports, "Lock", { enumerable: true, get: function () { return Lock_1.Lock; } });
28
+ var CacheLock_1 = require("./Locks/CacheLock");
29
+ Object.defineProperty(exports, "CacheLock", { enumerable: true, get: function () { return CacheLock_1.CacheLock; } });
30
+ var LockTimeoutException_1 = require("./Locks/LockTimeoutException");
31
+ Object.defineProperty(exports, "LockTimeoutException", { enumerable: true, get: function () { return LockTimeoutException_1.LockTimeoutException; } });
32
+ // Tags
33
+ var TaggedCache_1 = require("./Tags/TaggedCache");
34
+ Object.defineProperty(exports, "TaggedCache", { enumerable: true, get: function () { return TaggedCache_1.TaggedCache; } });
35
+ var TagSet_1 = require("./Tags/TagSet");
36
+ Object.defineProperty(exports, "TagSet", { enumerable: true, get: function () { return TagSet_1.TagSet; } });
37
+ // Events
38
+ var CacheHit_1 = require("./Events/CacheHit");
39
+ Object.defineProperty(exports, "CacheHit", { enumerable: true, get: function () { return CacheHit_1.CacheHit; } });
40
+ var CacheMissed_1 = require("./Events/CacheMissed");
41
+ Object.defineProperty(exports, "CacheMissed", { enumerable: true, get: function () { return CacheMissed_1.CacheMissed; } });
42
+ var KeyWritten_1 = require("./Events/KeyWritten");
43
+ Object.defineProperty(exports, "KeyWritten", { enumerable: true, get: function () { return KeyWritten_1.KeyWritten; } });
44
+ var KeyForgotten_1 = require("./Events/KeyForgotten");
45
+ Object.defineProperty(exports, "KeyForgotten", { enumerable: true, get: function () { return KeyForgotten_1.KeyForgotten; } });
46
+ var CacheFlushed_1 = require("./Events/CacheFlushed");
47
+ Object.defineProperty(exports, "CacheFlushed", { enumerable: true, get: function () { return CacheFlushed_1.CacheFlushed; } });
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Cache/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,OAAO;AACP,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AAOnB,SAAS;AACT,kDAAiD;AAAxC,wGAAA,UAAU,OAAA;AACnB,gDAA+C;AAAtC,sGAAA,SAAS,OAAA;AAClB,wDAAuD;AAA9C,8GAAA,aAAa,OAAA;AACtB,gDAA+C;AAAtC,sGAAA,SAAS,OAAA;AAElB,QAAQ;AACR,qCAAoC;AAA3B,4FAAA,IAAI,OAAA;AACb,+CAA8C;AAArC,sGAAA,SAAS,OAAA;AAClB,qEAAoE;AAA3D,4HAAA,oBAAoB,OAAA;AAE7B,OAAO;AACP,kDAAiD;AAAxC,0GAAA,WAAW,OAAA;AACpB,wCAAuC;AAA9B,gGAAA,MAAM,OAAA;AAEf,SAAS;AACT,8CAA6C;AAApC,oGAAA,QAAQ,OAAA;AACjB,oDAAmD;AAA1C,0GAAA,WAAW,OAAA;AACpB,kDAAiD;AAAxC,wGAAA,UAAU,OAAA;AACnB,sDAAqD;AAA5C,4GAAA,YAAY,OAAA;AACrB,sDAAqD;AAA5C,4GAAA,YAAY,OAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * CacheClearCommand
3
+ *
4
+ * Flush the application cache.
5
+ * Mirrors Laravel's `php artisan cache:clear`.
6
+ */
7
+ import { Command, CommandOptions } from '../Command';
8
+ import { Application } from '../../Foundation/Application';
9
+ export declare class CacheClearCommand extends Command {
10
+ protected app: Application;
11
+ signature: string;
12
+ description: string;
13
+ constructor(app: Application);
14
+ handle(args: string[], _options: CommandOptions): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=CacheClearCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheClearCommand.d.ts","sourceRoot":"","sources":["../../../src/Console/Commands/CacheClearCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,qBAAa,iBAAkB,SAAQ,OAAO;IAIhC,SAAS,CAAC,GAAG,EAAE,WAAW;IAHtC,SAAS,SAAyB;IAClC,WAAW,SAAiC;gBAEtB,GAAG,EAAE,WAAW;IAIhC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAatE"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /**
3
+ * CacheClearCommand
4
+ *
5
+ * Flush the application cache.
6
+ * Mirrors Laravel's `php artisan cache:clear`.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CacheClearCommand = void 0;
10
+ const Command_1 = require("../Command");
11
+ class CacheClearCommand extends Command_1.Command {
12
+ app;
13
+ signature = 'cache:clear [store]';
14
+ description = 'Flush the application cache';
15
+ constructor(app) {
16
+ super();
17
+ this.app = app;
18
+ }
19
+ async handle(args, _options) {
20
+ const manager = this.app.make('cache');
21
+ const storeName = args[0] || undefined;
22
+ const store = manager.store(storeName);
23
+ const success = await store.flush();
24
+ if (success) {
25
+ this.info(`Application cache cleared successfully${storeName ? ` [${storeName}]` : ''}.`);
26
+ }
27
+ else {
28
+ this.error('Failed to clear the application cache.');
29
+ }
30
+ }
31
+ }
32
+ exports.CacheClearCommand = CacheClearCommand;
33
+ //# sourceMappingURL=CacheClearCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheClearCommand.js","sourceRoot":"","sources":["../../../src/Console/Commands/CacheClearCommand.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,wCAAqD;AAIrD,MAAa,iBAAkB,SAAQ,iBAAO;IAItB;IAHtB,SAAS,GAAG,qBAAqB,CAAC;IAClC,WAAW,GAAG,6BAA6B,CAAC;IAE5C,YAAsB,GAAgB;QACpC,KAAK,EAAE,CAAC;QADY,QAAG,GAAH,GAAG,CAAa;IAEtC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAc,EAAE,QAAwB;QACnD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAe,OAAO,CAAC,CAAC;QACrD,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;QAEvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACvC,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;QAEpC,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,IAAI,CAAC,yCAAyC,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAC5F,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;CACF;AArBD,8CAqBC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * CacheForgetCommand
3
+ *
4
+ * Remove an item from the cache.
5
+ * Mirrors Laravel's `php artisan cache:forget`.
6
+ */
7
+ import { Command, CommandOptions } from '../Command';
8
+ import { Application } from '../../Foundation/Application';
9
+ export declare class CacheForgetCommand extends Command {
10
+ protected app: Application;
11
+ signature: string;
12
+ description: string;
13
+ constructor(app: Application);
14
+ handle(args: string[], _options: CommandOptions): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=CacheForgetCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheForgetCommand.d.ts","sourceRoot":"","sources":["../../../src/Console/Commands/CacheForgetCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,qBAAa,kBAAmB,SAAQ,OAAO;IAIjC,SAAS,CAAC,GAAG,EAAE,WAAW;IAHtC,SAAS,SAAgC;IACzC,WAAW,SAAmC;gBAExB,GAAG,EAAE,WAAW;IAIhC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBtE"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /**
3
+ * CacheForgetCommand
4
+ *
5
+ * Remove an item from the cache.
6
+ * Mirrors Laravel's `php artisan cache:forget`.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CacheForgetCommand = void 0;
10
+ const Command_1 = require("../Command");
11
+ class CacheForgetCommand extends Command_1.Command {
12
+ app;
13
+ signature = 'cache:forget <key> [store]';
14
+ description = 'Remove an item from the cache';
15
+ constructor(app) {
16
+ super();
17
+ this.app = app;
18
+ }
19
+ async handle(args, _options) {
20
+ const key = args[0];
21
+ const storeName = args[1] || undefined;
22
+ if (!key) {
23
+ this.error('Cache key is required.');
24
+ this.line('Usage: cache:forget <key> [store]');
25
+ return;
26
+ }
27
+ const manager = this.app.make('cache');
28
+ const store = manager.store(storeName);
29
+ const forgotten = await store.forget(key);
30
+ if (forgotten) {
31
+ this.info(`The [${key}] key has been removed from the cache.`);
32
+ }
33
+ else {
34
+ this.comment(`The [${key}] key was not found in the cache.`);
35
+ }
36
+ }
37
+ }
38
+ exports.CacheForgetCommand = CacheForgetCommand;
39
+ //# sourceMappingURL=CacheForgetCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheForgetCommand.js","sourceRoot":"","sources":["../../../src/Console/Commands/CacheForgetCommand.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,wCAAqD;AAIrD,MAAa,kBAAmB,SAAQ,iBAAO;IAIvB;IAHtB,SAAS,GAAG,4BAA4B,CAAC;IACzC,WAAW,GAAG,+BAA+B,CAAC;IAE9C,YAAsB,GAAgB;QACpC,KAAK,EAAE,CAAC;QADY,QAAG,GAAH,GAAG,CAAa;IAEtC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAc,EAAE,QAAwB;QACnD,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;QAEvC,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;YACrC,IAAI,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;YAC/C,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAe,OAAO,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEvC,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAE1C,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,wCAAwC,CAAC,CAAC;QACjE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,mCAAmC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;CACF;AA7BD,gDA6BC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * CacheTableCommand
3
+ *
4
+ * Create a migration for the cache database table.
5
+ * Mirrors Laravel's `php artisan cache:table`.
6
+ */
7
+ import { Command, CommandOptions } from '../Command';
8
+ import { Application } from '../../Foundation/Application';
9
+ export declare class CacheTableCommand extends Command {
10
+ protected app: Application;
11
+ signature: string;
12
+ description: string;
13
+ constructor(app: Application);
14
+ handle(_args: string[], options: CommandOptions): Promise<void>;
15
+ protected getStub(): string;
16
+ }
17
+ //# sourceMappingURL=CacheTableCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheTableCommand.d.ts","sourceRoot":"","sources":["../../../src/Console/Commands/CacheTableCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAI3D,qBAAa,iBAAkB,SAAQ,OAAO;IAIhC,SAAS,CAAC,GAAG,EAAE,WAAW;IAHtC,SAAS,SAAiB;IAC1B,WAAW,SAAqD;gBAE1C,GAAG,EAAE,WAAW;IAIhC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAcrE,SAAS,CAAC,OAAO,IAAI,MAAM;CA0B5B"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ /**
3
+ * CacheTableCommand
4
+ *
5
+ * Create a migration for the cache database table.
6
+ * Mirrors Laravel's `php artisan cache:table`.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.CacheTableCommand = void 0;
43
+ const Command_1 = require("../Command");
44
+ const fs = __importStar(require("fs/promises"));
45
+ const path = __importStar(require("path"));
46
+ class CacheTableCommand extends Command_1.Command {
47
+ app;
48
+ signature = 'cache:table';
49
+ description = 'Create a migration for the cache database table';
50
+ constructor(app) {
51
+ super();
52
+ this.app = app;
53
+ }
54
+ async handle(_args, options) {
55
+ const migrationsPath = options.path || this.app.databasePath('migrations');
56
+ await fs.mkdir(migrationsPath, { recursive: true });
57
+ const timestamp = new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14);
58
+ const fileName = `${timestamp}_create_cache_table.ts`;
59
+ const filePath = path.join(migrationsPath, fileName);
60
+ await fs.writeFile(filePath, this.getStub());
61
+ this.info(`Migration created successfully: ${filePath}`);
62
+ this.comment('Run "npx orchestr migrate" to create the table.');
63
+ }
64
+ getStub() {
65
+ return `import { Migration } from '@orchestr-sh/orchestr';
66
+ import type { SchemaBuilder } from '@orchestr-sh/orchestr';
67
+
68
+ export default class CreateCacheTable extends Migration {
69
+ async up(schema: SchemaBuilder): Promise<void> {
70
+ await schema.create('cache', (table) => {
71
+ table.string('key').primary();
72
+ table.text('value');
73
+ table.integer('expiration');
74
+ });
75
+
76
+ await schema.create('cache_locks', (table) => {
77
+ table.string('key').primary();
78
+ table.string('owner');
79
+ table.integer('expiration');
80
+ });
81
+ }
82
+
83
+ async down(schema: SchemaBuilder): Promise<void> {
84
+ await schema.drop('cache_locks');
85
+ await schema.drop('cache');
86
+ }
87
+ }
88
+ `;
89
+ }
90
+ }
91
+ exports.CacheTableCommand = CacheTableCommand;
92
+ //# sourceMappingURL=CacheTableCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheTableCommand.js","sourceRoot":"","sources":["../../../src/Console/Commands/CacheTableCommand.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wCAAqD;AAErD,gDAAkC;AAClC,2CAA6B;AAE7B,MAAa,iBAAkB,SAAQ,iBAAO;IAItB;IAHtB,SAAS,GAAG,aAAa,CAAC;IAC1B,WAAW,GAAG,iDAAiD,CAAC;IAEhE,YAAsB,GAAgB;QACpC,KAAK,EAAE,CAAC;QADY,QAAG,GAAH,GAAG,CAAa;IAEtC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAe,EAAE,OAAuB;QACnD,MAAM,cAAc,GAAI,OAAO,CAAC,IAAe,IAAI,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QACvF,MAAM,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEpD,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9E,MAAM,QAAQ,GAAG,GAAG,SAAS,wBAAwB,CAAC;QACtD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAErD,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAE7C,IAAI,CAAC,IAAI,CAAC,mCAAmC,QAAQ,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,OAAO,CAAC,iDAAiD,CAAC,CAAC;IAClE,CAAC;IAES,OAAO;QACf,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAuBV,CAAC;IACA,CAAC;CACF;AAhDD,8CAgDC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * MakeViewCommand
3
+ *
4
+ * Create a new view file.
5
+ * Mirrors Laravel's `php artisan make:view`.
6
+ */
7
+ import { Command, CommandOptions } from '../Command';
8
+ import { Application } from '../../Foundation/Application';
9
+ export declare class MakeViewCommand extends Command {
10
+ protected app: Application;
11
+ signature: string;
12
+ description: string;
13
+ constructor(app: Application);
14
+ handle(args: string[], options: CommandOptions): Promise<void>;
15
+ protected getViewsPath(options: CommandOptions): string;
16
+ protected fileExists(filePath: string): Promise<boolean>;
17
+ protected getStub(title: string): string;
18
+ }
19
+ //# sourceMappingURL=MakeViewCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MakeViewCommand.d.ts","sourceRoot":"","sources":["../../../src/Console/Commands/MakeViewCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAI3D,qBAAa,eAAgB,SAAQ,OAAO;IAI9B,SAAS,CAAC,GAAG,EAAE,WAAW;IAHtC,SAAS,SAAsB;IAC/B,WAAW,SAA4B;gBAEjB,GAAG,EAAE,WAAW;IAIhC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA8CpE,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM;cAmBvC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS9D,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAczC"}
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ /**
3
+ * MakeViewCommand
4
+ *
5
+ * Create a new view file.
6
+ * Mirrors Laravel's `php artisan make:view`.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.MakeViewCommand = void 0;
43
+ const Command_1 = require("../Command");
44
+ const fs = __importStar(require("fs/promises"));
45
+ const path = __importStar(require("path"));
46
+ class MakeViewCommand extends Command_1.Command {
47
+ app;
48
+ signature = 'make:view <name>';
49
+ description = 'Create a new view file';
50
+ constructor(app) {
51
+ super();
52
+ this.app = app;
53
+ }
54
+ async handle(args, options) {
55
+ const name = args[0];
56
+ if (!name) {
57
+ this.error('View name is required.');
58
+ this.line('Usage: make:view <name>');
59
+ return;
60
+ }
61
+ const viewsPath = this.getViewsPath(options);
62
+ // Convert dot-notation to directory path: 'layouts.app' -> 'layouts/app'
63
+ const relativePath = name.replace(/\./g, '/');
64
+ const ext = options.ext || '.html';
65
+ const fileName = relativePath + ext;
66
+ const filePath = path.join(viewsPath, fileName);
67
+ const dirPath = path.dirname(filePath);
68
+ // Check if file already exists
69
+ if (await this.fileExists(filePath)) {
70
+ this.error(`View already exists: ${filePath}`);
71
+ return;
72
+ }
73
+ // Create directory if it doesn't exist
74
+ await fs.mkdir(dirPath, { recursive: true });
75
+ // Determine the view name for the title
76
+ const viewTitle = name
77
+ .split('.')
78
+ .pop()
79
+ .replace(/-/g, ' ')
80
+ .replace(/\b\w/g, (c) => c.toUpperCase());
81
+ // Generate file content
82
+ const content = this.getStub(viewTitle);
83
+ // Write file
84
+ await fs.writeFile(filePath, content);
85
+ this.info(`View created successfully: ${filePath}`);
86
+ this.newLine();
87
+ this.comment('Render it in a route:');
88
+ this.comment(` return view('${name}', { title: '${viewTitle}' });`);
89
+ }
90
+ getViewsPath(options) {
91
+ if (options.path) {
92
+ return options.path;
93
+ }
94
+ // Resolve from ViewFactory if available
95
+ try {
96
+ const factory = this.app.make('view');
97
+ const paths = factory.getPaths?.() ?? [];
98
+ if (paths.length > 0) {
99
+ return paths[0];
100
+ }
101
+ }
102
+ catch {
103
+ // ViewFactory not registered yet
104
+ }
105
+ return path.join(this.app.getBasePath(), 'resources', 'views');
106
+ }
107
+ async fileExists(filePath) {
108
+ try {
109
+ await fs.access(filePath);
110
+ return true;
111
+ }
112
+ catch {
113
+ return false;
114
+ }
115
+ }
116
+ getStub(title) {
117
+ return `<!DOCTYPE html>
118
+ <html lang="en">
119
+ <head>
120
+ <meta charset="UTF-8">
121
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
122
+ <title>{{ title }}</title>
123
+ </head>
124
+ <body>
125
+ <h1>{{ title }}</h1>
126
+ </body>
127
+ </html>
128
+ `;
129
+ }
130
+ }
131
+ exports.MakeViewCommand = MakeViewCommand;
132
+ //# sourceMappingURL=MakeViewCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MakeViewCommand.js","sourceRoot":"","sources":["../../../src/Console/Commands/MakeViewCommand.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Cache Facade
3
+ *
4
+ * Provides static access to the cache manager and default store.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { Cache } from '@orchestr-sh/orchestr';
9
+ *
10
+ * // Basic operations
11
+ * await Cache.put('key', 'value', 3600);
12
+ * const value = await Cache.get('key');
13
+ * await Cache.forget('key');
14
+ *
15
+ * // Remember pattern
16
+ * const user = await Cache.remember('user:1', 3600, async () => {
17
+ * return await fetchUser(1);
18
+ * });
19
+ *
20
+ * // Switch stores
21
+ * await Cache.store('redis').put('key', 'value', 3600);
22
+ *
23
+ * // Tags
24
+ * await Cache.tags(['people', 'artists']).put('John', data, 3600);
25
+ * await Cache.tags('people').flush();
26
+ *
27
+ * // Locks
28
+ * await Cache.lock('processing', 120).get(async () => {
29
+ * // critical section
30
+ * });
31
+ * ```
32
+ */
33
+ import { Facade } from '../Support/Facade';
34
+ import type { CacheManager } from '../Cache/CacheManager';
35
+ import type { Repository } from '../Cache/Repository';
36
+ declare class CacheFacadeClass extends Facade {
37
+ protected static getFacadeAccessor(): string;
38
+ }
39
+ export declare const Cache: typeof CacheFacadeClass & CacheManager & Repository;
40
+ export {};
41
+ //# sourceMappingURL=Cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../src/Facades/Cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,cAAM,gBAAiB,SAAQ,MAAM;IACnC,SAAS,CAAC,MAAM,CAAC,iBAAiB,IAAI,MAAM;CAG7C;AAED,eAAO,MAAM,KAAK,EAqCD,OAAO,gBAAgB,GAAG,YAAY,GAAG,UAAU,CAAC"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ /**
3
+ * Cache Facade
4
+ *
5
+ * Provides static access to the cache manager and default store.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { Cache } from '@orchestr-sh/orchestr';
10
+ *
11
+ * // Basic operations
12
+ * await Cache.put('key', 'value', 3600);
13
+ * const value = await Cache.get('key');
14
+ * await Cache.forget('key');
15
+ *
16
+ * // Remember pattern
17
+ * const user = await Cache.remember('user:1', 3600, async () => {
18
+ * return await fetchUser(1);
19
+ * });
20
+ *
21
+ * // Switch stores
22
+ * await Cache.store('redis').put('key', 'value', 3600);
23
+ *
24
+ * // Tags
25
+ * await Cache.tags(['people', 'artists']).put('John', data, 3600);
26
+ * await Cache.tags('people').flush();
27
+ *
28
+ * // Locks
29
+ * await Cache.lock('processing', 120).get(async () => {
30
+ * // critical section
31
+ * });
32
+ * ```
33
+ */
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.Cache = void 0;
36
+ const Facade_1 = require("../Support/Facade");
37
+ class CacheFacadeClass extends Facade_1.Facade {
38
+ static getFacadeAccessor() {
39
+ return 'cache';
40
+ }
41
+ }
42
+ exports.Cache = new Proxy(CacheFacadeClass, {
43
+ get(target, prop) {
44
+ // First check if it's a static method on the facade class itself
45
+ if (prop in target) {
46
+ const value = target[prop];
47
+ if (typeof value === 'function') {
48
+ return value.bind(target);
49
+ }
50
+ return value;
51
+ }
52
+ // Then try to get from the facade root (the CacheManager instance)
53
+ try {
54
+ const root = target.getFacadeRoot();
55
+ if (root && prop in root) {
56
+ const value = root[prop];
57
+ if (typeof value === 'function') {
58
+ return (...args) => value.apply(root, args);
59
+ }
60
+ return value;
61
+ }
62
+ // Also proxy to default store for convenience
63
+ const store = root.store();
64
+ if (store && prop in store) {
65
+ const value = store[prop];
66
+ if (typeof value === 'function') {
67
+ return (...args) => value.apply(store, args);
68
+ }
69
+ return value;
70
+ }
71
+ }
72
+ catch (error) {
73
+ // Facade root not available yet
74
+ }
75
+ return undefined;
76
+ },
77
+ });
78
+ //# sourceMappingURL=Cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/Facades/Cache.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;AAEH,8CAA2C;AAI3C,MAAM,gBAAiB,SAAQ,eAAM;IACzB,MAAM,CAAC,iBAAiB;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAEY,QAAA,KAAK,GAAG,IAAI,KAAK,CAAC,gBAAgB,EAAE;IAC/C,GAAG,CAAC,MAAM,EAAE,IAAI;QACd,iEAAiE;QACjE,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;YACnB,MAAM,KAAK,GAAI,MAAc,CAAC,IAAI,CAAC,CAAC;YACpC,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;gBAChC,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5B,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,mEAAmE;QACnE,IAAI,CAAC;YACH,MAAM,IAAI,GAAI,MAAc,CAAC,aAAa,EAAkB,CAAC;YAC7D,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;gBACzB,MAAM,KAAK,GAAI,IAAY,CAAC,IAAI,CAAC,CAAC;gBAClC,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;oBAChC,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;YAED,8CAA8C;YAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAgB,CAAC;YACzC,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;gBAC3B,MAAM,KAAK,GAAI,KAAa,CAAC,IAAI,CAAC,CAAC;gBACnC,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;oBAChC,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBACtD,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,gCAAgC;QAClC,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAmE,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * View Facade
3
+ *
4
+ * Provides static access to the ViewFactory.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { View } from '@orchestr-sh/orchestr';
9
+ *
10
+ * // Create a view
11
+ * const v = View.make('welcome', { name: 'John' });
12
+ * const html = await v.render();
13
+ *
14
+ * // Check if a view exists
15
+ * if (View.exists('layouts.app')) { ... }
16
+ *
17
+ * // Share data with all views
18
+ * View.share('appName', 'My App');
19
+ * ```
20
+ */
21
+ import { Facade } from '../Support/Facade';
22
+ import type { ViewFactory } from '../View/ViewFactory';
23
+ declare class ViewFacadeClass extends Facade {
24
+ protected static getFacadeAccessor(): string;
25
+ }
26
+ export declare const View: typeof ViewFacadeClass & ViewFactory;
27
+ export {};
28
+ //# sourceMappingURL=View.d.ts.map