@blazetrails/solid-cache 0.0.0-stage → 0.1.0-alpha0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/LICENSE +21 -0
  2. package/dist/active-support/cache/solid-cache-store.d.ts +2 -0
  3. package/dist/active-support/cache/solid-cache-store.js +4 -0
  4. package/dist/active-support/cache/solid-cache-store.js.map +1 -0
  5. package/dist/configuration.d.ts +31 -0
  6. package/dist/configuration.js +60 -0
  7. package/dist/configuration.js.map +1 -0
  8. package/dist/connections/sharded.d.ts +16 -0
  9. package/dist/connections/sharded.js +45 -0
  10. package/dist/connections/sharded.js.map +1 -0
  11. package/dist/connections/single.d.ts +12 -0
  12. package/dist/connections/single.js +29 -0
  13. package/dist/connections/single.js.map +1 -0
  14. package/dist/connections/unmanaged.d.ts +10 -0
  15. package/dist/connections/unmanaged.js +24 -0
  16. package/dist/connections/unmanaged.js.map +1 -0
  17. package/dist/connections.d.ts +10 -0
  18. package/dist/connections.js +37 -0
  19. package/dist/connections.js.map +1 -0
  20. package/dist/constants.generated.d.ts +2 -0
  21. package/dist/constants.generated.js +53 -0
  22. package/dist/constants.generated.js.map +1 -0
  23. package/dist/engine.d.ts +19 -0
  24. package/dist/engine.js +59 -0
  25. package/dist/engine.js.map +1 -0
  26. package/dist/entry/encryption.d.ts +10 -0
  27. package/dist/entry/encryption.js +12 -0
  28. package/dist/entry/encryption.js.map +1 -0
  29. package/dist/entry/expiration.d.ts +23 -0
  30. package/dist/entry/expiration.js +53 -0
  31. package/dist/entry/expiration.js.map +1 -0
  32. package/dist/entry/size/estimate.d.ts +38 -0
  33. package/dist/entry/size/estimate.js +91 -0
  34. package/dist/entry/size/estimate.js.map +1 -0
  35. package/dist/entry/size/moving-average-estimate.d.ts +29 -0
  36. package/dist/entry/size/moving-average-estimate.js +55 -0
  37. package/dist/entry/size/moving-average-estimate.js.map +1 -0
  38. package/dist/entry/size.d.ts +16 -0
  39. package/dist/entry/size.js +31 -0
  40. package/dist/entry/size.js.map +1 -0
  41. package/dist/entry.d.ts +55 -0
  42. package/dist/entry.js +137 -0
  43. package/dist/entry.js.map +1 -0
  44. package/dist/expiry-job.d.ts +10 -0
  45. package/dist/expiry-job.js +14 -0
  46. package/dist/expiry-job.js.map +1 -0
  47. package/dist/generators/solid-cache/install/install-generator.d.ts +14 -0
  48. package/dist/generators/solid-cache/install/install-generator.js +60 -0
  49. package/dist/generators/solid-cache/install/install-generator.js.map +1 -0
  50. package/dist/generators/solid-cache/install/templates/config/cache.ts.tt +25 -0
  51. package/dist/generators/solid-cache/install/templates/config/cache.ts.tt.js +23 -0
  52. package/dist/generators/solid-cache/install/templates/db/cache_schema.ts.tt +16 -0
  53. package/dist/generators/solid-cache/install/templates/db/cache_schema.ts.tt.js +12 -0
  54. package/dist/generators/solid-cache/install/templates/db/cache_structure.mysql.sql +56 -0
  55. package/dist/generators/solid-cache/install/templates/db/cache_structure.postgresql.sql +128 -0
  56. package/dist/generators/solid-cache/install/templates/db/cache_structure.sqlite3.sql +6 -0
  57. package/dist/index.d.ts +12 -0
  58. package/dist/index.js +12 -0
  59. package/dist/index.js.map +1 -0
  60. package/dist/maglev-hash.d.ts +38 -0
  61. package/dist/maglev-hash.js +80 -0
  62. package/dist/maglev-hash.js.map +1 -0
  63. package/dist/record.d.ts +12 -0
  64. package/dist/record.js +55 -0
  65. package/dist/record.js.map +1 -0
  66. package/dist/solid-cache.d.ts +27 -0
  67. package/dist/solid-cache.js +11 -0
  68. package/dist/solid-cache.js.map +1 -0
  69. package/dist/store/api.d.ts +52 -0
  70. package/dist/store/api.js +178 -0
  71. package/dist/store/api.js.map +1 -0
  72. package/dist/store/connections.d.ts +38 -0
  73. package/dist/store/connections.js +65 -0
  74. package/dist/store/connections.js.map +1 -0
  75. package/dist/store/entries.d.ts +26 -0
  76. package/dist/store/entries.js +57 -0
  77. package/dist/store/entries.js.map +1 -0
  78. package/dist/store/execution.d.ts +15 -0
  79. package/dist/store/execution.js +53 -0
  80. package/dist/store/execution.js.map +1 -0
  81. package/dist/store/expiry.d.ts +10 -0
  82. package/dist/store/expiry.js +38 -0
  83. package/dist/store/expiry.js.map +1 -0
  84. package/dist/store/failsafe.d.ts +16 -0
  85. package/dist/store/failsafe.js +35 -0
  86. package/dist/store/failsafe.js.map +1 -0
  87. package/dist/store/stats.d.ts +19 -0
  88. package/dist/store/stats.js +29 -0
  89. package/dist/store/stats.js.map +1 -0
  90. package/dist/store.d.ts +69 -0
  91. package/dist/store.js +130 -0
  92. package/dist/store.js.map +1 -0
  93. package/package.json +60 -3
  94. package/README.md +0 -3
@@ -0,0 +1,69 @@
1
+ import { Store as CacheStore, type Entry as CacheEntry, type StoreOptions } from "@blazetrails/activesupport/cache";
2
+ import { LocalCache } from "@blazetrails/activesupport/cache/strategy/local-cache";
3
+ import type { EventPayload } from "@blazetrails/activesupport/notifications/instrumenter";
4
+ import { FixedThreadPool, type Included } from "@blazetrails/ruby-compat";
5
+ import type { Connections as SolidCacheConnections } from "./connections.js";
6
+ import { Api } from "./store/api.js";
7
+ import { Connections } from "./store/connections.js";
8
+ import { Entries } from "./store/entries.js";
9
+ import { Execution } from "./store/execution.js";
10
+ import { Expiry } from "./store/expiry.js";
11
+ import { Failsafe, type ErrorHandler } from "./store/failsafe.js";
12
+ import { Stats } from "./store/stats.js";
13
+ type Overridden = "increment" | "decrement" | "cleanup" | "clear" | "readEntry" | "writeEntry" | "readMultiEntries" | "writeMultiEntries" | "deleteEntry" | "deleteMultiEntries" | "serializeEntry" | "deserializeEntry" | "normalizeKey";
14
+ /** @internal */
15
+ export interface StoreInternals {
16
+ readEntry(key: Uint8Array, options: StoreOptions): Promise<CacheEntry | null>;
17
+ writeEntry(key: Uint8Array, entry: CacheEntry, options: StoreOptions): Promise<boolean>;
18
+ readMultiEntries(names: unknown[], options: StoreOptions): Promise<Map<unknown, unknown>>;
19
+ deleteEntry(key: Uint8Array, options: StoreOptions): Promise<boolean>;
20
+ serializeEntry(entry: CacheEntry, options?: StoreOptions): unknown;
21
+ deserializeEntry(payload: unknown, options?: StoreOptions): CacheEntry | null;
22
+ normalizeKey(key: unknown, options?: StoreOptions): Promise<Uint8Array>;
23
+ mergedOptions(callOptions?: StoreOptions): StoreOptions;
24
+ normalizeVersion(key: unknown, options?: StoreOptions): Promise<string | undefined>;
25
+ instrument<T>(operation: string, key: unknown, options?: StoreOptions, block?: (payload: EventPayload) => T): T;
26
+ }
27
+ /** @internal */
28
+ export type StoreHost = Store & StoreInternals;
29
+ export interface Store extends Omit<Included<typeof Api>, Overridden>, Included<typeof Connections>, Included<typeof Entries>, Included<typeof Execution>, Included<typeof Expiry>, Included<typeof Failsafe>, Included<typeof Stats>, Pick<Included<typeof LocalCache>, "withLocalCache"> {
30
+ }
31
+ export declare class Store extends CacheStore {
32
+ protected normalizeKey: (key: unknown, options?: StoreOptions) => Promise<Uint8Array>;
33
+ protected readEntry: (key: Uint8Array, options: StoreOptions) => Promise<CacheEntry | null>;
34
+ protected writeEntry: (key: Uint8Array, entry: CacheEntry, options: StoreOptions) => Promise<boolean>;
35
+ protected deleteEntry: (key: Uint8Array, options: StoreOptions) => Promise<boolean>;
36
+ readonly maxKeyBytesize: number;
37
+ readonly shardOptions: string[] | null;
38
+ readonly clearWith: string | null;
39
+ /** @internal */
40
+ readonly errorHandler: ErrorHandler | null;
41
+ /** @internal */
42
+ readonly _background: FixedThreadPool;
43
+ /** @internal */
44
+ readonly activeRecordInstrumentation: boolean;
45
+ readonly expiryBatchSize: number;
46
+ readonly expiryMethod: string;
47
+ readonly expiryQueue: string;
48
+ readonly expiresPerWrite: number;
49
+ readonly maxAge: number | null;
50
+ readonly maxEntries: number | null;
51
+ readonly maxSize: number | null;
52
+ /** @internal */
53
+ _connections?: ReturnType<typeof SolidCacheConnections.fromConfig>;
54
+ /**
55
+ * @inlinedFrom SolidCache::Store::Api#initialize solid_cache/v1.0.9/lib/solid_cache/store/api.rb:11-15
56
+ * @inlinedFrom SolidCache::Store::Connections#initialize solid_cache/v1.0.9/lib/solid_cache/store/connections.rb:8-27
57
+ * @inlinedFrom SolidCache::Store::Entries#initialize solid_cache/v1.0.9/lib/solid_cache/store/entries.rb:8-17
58
+ * @inlinedFrom SolidCache::Store::Execution#initialize solid_cache/v1.0.9/lib/solid_cache/store/execution.rb:6-10
59
+ * @inlinedFrom SolidCache::Store::Expiry#initialize solid_cache/v1.0.9/lib/solid_cache/store/expiry.rb:12-23
60
+ * @inlinedFrom SolidCache::Store::Failsafe#initialize solid_cache/v1.0.9/lib/solid_cache/store/failsafe.rb:21-25
61
+ * @inlinedFrom SolidCache::Store::Stats#initialize solid_cache/v1.0.9/lib/solid_cache/store/stats.rb:6-8
62
+ */
63
+ constructor(options?: StoreOptions);
64
+ static isSupportsCacheVersioning(): boolean;
65
+ /** @inlinedFrom SolidCache::Store::Connections#setup! solid_cache/v1.0.9/lib/solid_cache/store/connections.rb:42-44 */
66
+ setupBang(): void;
67
+ }
68
+ export {};
69
+ //# sourceMappingURL=store.d.ts.map
package/dist/store.js ADDED
@@ -0,0 +1,130 @@
1
+ import { isPresent, deprecator, weeks } from "@blazetrails/activesupport";
2
+ import { Store as CacheStore, } from "@blazetrails/activesupport/cache";
3
+ import { LocalCache } from "@blazetrails/activesupport/cache/strategy/local-cache";
4
+ import { ArgumentError, constSet, fetch, FixedThreadPool, include, prepend, rbModName, TopLevel, } from "@blazetrails/ruby-compat";
5
+ import { SolidCache } from "./solid-cache.js";
6
+ import { Api } from "./store/api.js";
7
+ import { Connections } from "./store/connections.js";
8
+ import { Entries } from "./store/entries.js";
9
+ import { Execution } from "./store/execution.js";
10
+ import { Expiry } from "./store/expiry.js";
11
+ import { Failsafe } from "./store/failsafe.js";
12
+ import { Stats } from "./store/stats.js";
13
+ /* eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -- see the interface above. */
14
+ export class Store extends CacheStore {
15
+ static {
16
+ include(this, Api);
17
+ include(this, Connections);
18
+ include(this, Entries);
19
+ include(this, Execution);
20
+ include(this, Expiry);
21
+ include(this, Failsafe);
22
+ include(this, Stats);
23
+ prepend(this, LocalCache);
24
+ constSet(SolidCache, "Store", this);
25
+ constSet(this, "Api", Api);
26
+ constSet(this, "Connections", Connections);
27
+ constSet(this, "Entries", Entries);
28
+ constSet(this, "Execution", Execution);
29
+ constSet(this, "Expiry", Expiry);
30
+ constSet(this, "Failsafe", Failsafe);
31
+ constSet(this, "Stats", Stats);
32
+ }
33
+ maxKeyBytesize;
34
+ shardOptions;
35
+ clearWith;
36
+ /** @internal */
37
+ errorHandler;
38
+ /** @internal */
39
+ _background;
40
+ /** @internal */
41
+ activeRecordInstrumentation;
42
+ expiryBatchSize;
43
+ expiryMethod;
44
+ expiryQueue;
45
+ expiresPerWrite;
46
+ maxAge;
47
+ maxEntries;
48
+ maxSize;
49
+ /** @internal */
50
+ _connections;
51
+ /**
52
+ * @inlinedFrom SolidCache::Store::Api#initialize solid_cache/v1.0.9/lib/solid_cache/store/api.rb:11-15
53
+ * @inlinedFrom SolidCache::Store::Connections#initialize solid_cache/v1.0.9/lib/solid_cache/store/connections.rb:8-27
54
+ * @inlinedFrom SolidCache::Store::Entries#initialize solid_cache/v1.0.9/lib/solid_cache/store/entries.rb:8-17
55
+ * @inlinedFrom SolidCache::Store::Execution#initialize solid_cache/v1.0.9/lib/solid_cache/store/execution.rb:6-10
56
+ * @inlinedFrom SolidCache::Store::Expiry#initialize solid_cache/v1.0.9/lib/solid_cache/store/expiry.rb:12-23
57
+ * @inlinedFrom SolidCache::Store::Failsafe#initialize solid_cache/v1.0.9/lib/solid_cache/store/failsafe.rb:21-25
58
+ * @inlinedFrom SolidCache::Store::Stats#initialize solid_cache/v1.0.9/lib/solid_cache/store/stats.rb:6-8
59
+ */
60
+ constructor(options = {}) {
61
+ options = { ...SolidCache.configuration.storeOptions, ...options };
62
+ super(options);
63
+ this.maxKeyBytesize = Object.hasOwn(options, "maxKeyBytesize")
64
+ ? options.maxKeyBytesize
65
+ : Api.DEFAULT_MAX_KEY_BYTESIZE;
66
+ if (isPresent(options.clusters)) {
67
+ const clusters = options.clusters;
68
+ if (clusters.length > 1) {
69
+ throw new ArgumentError("Multiple clusters are no longer supported");
70
+ }
71
+ else {
72
+ deprecator().warn(":clusters is deprecated, use :shards instead.");
73
+ }
74
+ this.shardOptions = fetch(options, "clusters")[0].shards ?? null;
75
+ }
76
+ else if (isPresent(options.cluster)) {
77
+ deprecator().warn(":cluster is deprecated, use :shards instead.");
78
+ this.shardOptions =
79
+ (Object.hasOwn(options, "cluster") ? options.cluster : {})
80
+ .shards ?? null;
81
+ }
82
+ else {
83
+ this.shardOptions = Object.hasOwn(options, "shards") ? options.shards : null;
84
+ }
85
+ if (!(Array.isArray(this.shardOptions) || this.shardOptions == null)) {
86
+ throw new ArgumentError(`\`shards\` is a \`${rbModName(this.shardOptions.constructor)}\`, it should be Array or nil`);
87
+ }
88
+ const clearWith = Object.hasOwn(options, "clearWith")
89
+ ? options.clearWith
90
+ : TopLevel.Trails.env.isTest()
91
+ ? "delete"
92
+ : "truncate";
93
+ this.clearWith = clearWith == null ? null : String(clearWith);
94
+ const clearWiths = ["truncate", "delete"];
95
+ if (!clearWiths.includes(this.clearWith)) {
96
+ throw new ArgumentError("`clear_with` must be either ``:truncate`` or ``:delete`");
97
+ }
98
+ this._background = new FixedThreadPool(1, { maxQueue: 100, fallbackPolicy: "discard" });
99
+ this.activeRecordInstrumentation = Object.hasOwn(options, "activeRecordInstrumentation")
100
+ ? options.activeRecordInstrumentation
101
+ : true;
102
+ this.expiryBatchSize = Object.hasOwn(options, "expiryBatchSize")
103
+ ? options.expiryBatchSize
104
+ : 100;
105
+ this.expiryMethod = String(Object.hasOwn(options, "expiryMethod") ? options.expiryMethod : "thread");
106
+ this.expiryQueue = String(Object.hasOwn(options, "expiryQueue") ? options.expiryQueue : "default");
107
+ this.expiresPerWrite = (1 / this.expiryBatchSize) * Expiry.EXPIRY_MULTIPLIER;
108
+ this.maxAge = Object.hasOwn(options, "maxAge")
109
+ ? options.maxAge
110
+ : weeks(2).toI();
111
+ this.maxEntries = Object.hasOwn(options, "maxEntries")
112
+ ? options.maxEntries
113
+ : null;
114
+ this.maxSize = Object.hasOwn(options, "maxSize") ? options.maxSize : null;
115
+ if (!["thread", "job"].includes(this.expiryMethod)) {
116
+ throw new ArgumentError("Expiry method must be one of `:thread` or `:job`");
117
+ }
118
+ this.errorHandler = Object.hasOwn(options, "errorHandler")
119
+ ? options.errorHandler
120
+ : Failsafe.DEFAULT_ERROR_HANDLER;
121
+ }
122
+ static isSupportsCacheVersioning() {
123
+ return true;
124
+ }
125
+ /** @inlinedFrom SolidCache::Store::Connections#setup! solid_cache/v1.0.9/lib/solid_cache/store/connections.rb:42-44 */
126
+ setupBang() {
127
+ this.connections();
128
+ }
129
+ }
130
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../lib/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EACL,KAAK,IAAI,UAAU,GAGpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAEnF,OAAO,EACL,aAAa,EACb,QAAQ,EACR,KAAK,EACL,eAAe,EACf,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,GAET,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3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C,CAAC;QAC9E,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC;YACxD,CAAC,CAAE,OAAO,CAAC,YAAoC;YAC/C,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,yBAAyB;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uHAAuH;IACvH,SAAS;QACP,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,63 @@
1
1
  {
2
2
  "name": "@blazetrails/solid-cache",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0-alpha0.1",
4
+ "description": "Database-backed Active Support cache store for Trails, mirroring the solid_cache gem",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "url": "git+https://github.com/blazetrailsdev/trails.git",
8
+ "directory": "packages/solid-cache"
9
+ },
10
+ "homepage": "https://github.com/blazetrailsdev/trails/tree/main/packages/solid-cache#readme",
11
+ "type": "module",
12
+ "main": "dist/index.js",
13
+ "types": "dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./*.js": {
20
+ "types": "./dist/*.d.ts",
21
+ "default": "./dist/*.js"
22
+ },
23
+ "./*": {
24
+ "types": "./dist/*.d.ts",
25
+ "default": "./dist/*.js"
26
+ }
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "!dist/**/*.d.ts.map"
31
+ ],
32
+ "dependencies": {
33
+ "@blazetrails/activejob": "0.1.0-alpha0.1",
34
+ "@blazetrails/activerecord": "0.1.0-alpha0.1",
35
+ "@blazetrails/activesupport": "0.1.0-alpha0.1",
36
+ "@blazetrails/arel": "0.1.0-alpha0.1",
37
+ "@blazetrails/date": "0.1.0-alpha0.1",
38
+ "@blazetrails/msgpack": "0.1.0-alpha0.1",
39
+ "@blazetrails/ruby-compat": "0.1.0-alpha0.1",
40
+ "@blazetrails/thor": "0.1.0-alpha0.1",
41
+ "@blazetrails/trailties": "0.1.0-alpha0.1"
42
+ },
43
+ "engines": {
44
+ "node": ">=26"
45
+ },
46
+ "mirrors": [
47
+ {
48
+ "source": "solid_cache",
49
+ "ref": "v1.0.9",
50
+ "sha": "7e4bc0cbe2a5bc8f30546f27a8fc074ce8b484aa"
51
+ }
52
+ ],
53
+ "devDependencies": {
54
+ "@blazetrails/trails-tsc": "0.1.0-alpha0.1"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public"
58
+ },
59
+ "scripts": {
60
+ "build": "tsc && pnpm build:templates",
61
+ "build:templates": "node -e \"require('fs').cpSync('lib/generators/solid-cache/install/templates', 'dist/generators/solid-cache/install/templates', { recursive: true })\" && trails-tsc-views build-templates dist/generators"
62
+ }
6
63
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.