@friggframework/admin-scripts 2.0.0--canary.517.2d5f115.0 → 2.0.0--canary.517.85f6598.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@friggframework/admin-scripts",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.517.2d5f115.0",
4
+ "version": "2.0.0--canary.517.85f6598.0",
5
5
  "description": "Admin Script Runner for Frigg - Execute maintenance and operational scripts in hosted environments",
6
6
  "dependencies": {
7
7
  "@aws-sdk/client-scheduler": "^3.588.0",
8
- "@friggframework/core": "2.0.0--canary.517.2d5f115.0",
8
+ "@friggframework/core": "2.0.0--canary.517.85f6598.0",
9
9
  "@hapi/boom": "^10.0.1",
10
10
  "express": "^4.18.2",
11
11
  "serverless-http": "^3.2.0"
12
12
  },
13
13
  "devDependencies": {
14
- "@friggframework/eslint-config": "2.0.0--canary.517.2d5f115.0",
15
- "@friggframework/prettier-config": "2.0.0--canary.517.2d5f115.0",
16
- "@friggframework/test": "2.0.0--canary.517.2d5f115.0",
14
+ "@friggframework/eslint-config": "2.0.0--canary.517.85f6598.0",
15
+ "@friggframework/prettier-config": "2.0.0--canary.517.85f6598.0",
16
+ "@friggframework/test": "2.0.0--canary.517.85f6598.0",
17
17
  "eslint": "^8.22.0",
18
18
  "jest": "^29.7.0",
19
19
  "prettier": "^2.7.1",
@@ -44,5 +44,5 @@
44
44
  "maintenance",
45
45
  "operations"
46
46
  ],
47
- "gitHead": "2d5f1156389ca3b013b151bd6a8468d9d2f8e0cf"
47
+ "gitHead": "85f65985a27a23524cfb382a44b5a044240e8cea"
48
48
  }
@@ -16,14 +16,19 @@ const { QueuerUtil } = require('@friggframework/core/queues');
16
16
  * so scripts can query any data they need without wrapper indirection
17
17
  */
18
18
  class AdminScriptContext {
19
+ /**
20
+ * @param {Object} [params={}] - Context configuration
21
+ * @param {string|number|null} [params.executionId] - ID of the AdminProcess record this context is scoped to (used for log persistence and script chaining)
22
+ * @param {Object|null} [params.integrationFactory] - Factory used to hydrate integration instances; required for scripts that call instantiate()
23
+ */
19
24
  constructor(params = {}) {
20
25
  this.executionId = params.executionId || null;
21
26
  this.logs = [];
22
27
 
23
- // OPTIONAL: Integration factory for scripts that need external API access
24
28
  this.integrationFactory = params.integrationFactory || null;
25
29
 
26
- // Lazy-load repositories to avoid circular deps
30
+ // Repositories are created on first use so the Prisma client is only
31
+ // initialized (and only for the repos a script actually touches) when needed.
27
32
  this._integrationRepository = null;
28
33
  this._userRepository = null;
29
34
  this._moduleRepository = null;