@friggframework/admin-scripts 2.0.0--canary.517.7d448e0.0 → 2.0.0--canary.517.8d90337.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/index.js CHANGED
@@ -9,7 +9,6 @@
9
9
  const {
10
10
  ScriptFactory,
11
11
  getScriptFactory,
12
- createScriptFactory,
13
12
  } = require('./src/application/script-factory');
14
13
  const { AdminScriptBase } = require('./src/application/admin-script-base');
15
14
  const {
@@ -49,7 +48,6 @@ module.exports = {
49
48
  AdminScriptBase,
50
49
  ScriptFactory,
51
50
  getScriptFactory,
52
- createScriptFactory,
53
51
  AdminScriptContext,
54
52
  createAdminScriptContext,
55
53
  ScriptRunner,
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.7d448e0.0",
4
+ "version": "2.0.0--canary.517.8d90337.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.7d448e0.0",
8
+ "@friggframework/core": "2.0.0--canary.517.8d90337.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.7d448e0.0",
15
- "@friggframework/prettier-config": "2.0.0--canary.517.7d448e0.0",
16
- "@friggframework/test": "2.0.0--canary.517.7d448e0.0",
14
+ "@friggframework/eslint-config": "2.0.0--canary.517.8d90337.0",
15
+ "@friggframework/prettier-config": "2.0.0--canary.517.8d90337.0",
16
+ "@friggframework/test": "2.0.0--canary.517.8d90337.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": "7d448e09858f5a215e43b3a210fe15efe4d76732"
47
+ "gitHead": "8d903378eed651256cbda1a3e1a6aab54fa46475"
48
48
  }
@@ -1,8 +1,4 @@
1
- const {
2
- ScriptFactory,
3
- createScriptFactory,
4
- getScriptFactory,
5
- } = require('../script-factory');
1
+ const { ScriptFactory, getScriptFactory } = require('../script-factory');
6
2
  const { AdminScriptBase } = require('../admin-script-base');
7
3
 
8
4
  describe('ScriptFactory', () => {
@@ -346,9 +342,9 @@ describe('ScriptFactory', () => {
346
342
  expect(factory1).toBeInstanceOf(ScriptFactory);
347
343
  });
348
344
 
349
- it('createScriptFactory() should create new instance', () => {
350
- const factory1 = createScriptFactory();
351
- const factory2 = createScriptFactory();
345
+ it('new ScriptFactory() creates independent instances', () => {
346
+ const factory1 = new ScriptFactory();
347
+ const factory2 = new ScriptFactory();
352
348
 
353
349
  expect(factory1).not.toBe(factory2);
354
350
  expect(factory1).toBeInstanceOf(ScriptFactory);
@@ -364,7 +360,7 @@ describe('ScriptFactory', () => {
364
360
  };
365
361
  }
366
362
 
367
- const customFactory = createScriptFactory();
363
+ const customFactory = new ScriptFactory();
368
364
  customFactory.register(TestScript);
369
365
 
370
366
  const globalFactory = getScriptFactory();
@@ -151,13 +151,4 @@ function getScriptFactory() {
151
151
  return globalFactory;
152
152
  }
153
153
 
154
- /**
155
- * Create a new script factory instance
156
- * @param {Array} scripts - Initial scripts to register
157
- * @returns {ScriptFactory} New factory
158
- */
159
- function createScriptFactory(scripts = []) {
160
- return new ScriptFactory(scripts);
161
- }
162
-
163
- module.exports = { ScriptFactory, getScriptFactory, createScriptFactory };
154
+ module.exports = { ScriptFactory, getScriptFactory };