@friggframework/devtools 2.0.0--canary.744.7e3ee98.0 → 2.0.0--canary.744.e18e27f.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.
|
@@ -106,7 +106,12 @@ class AdminScriptBuilder extends InfrastructureBuilder {
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
if (hasScripts) {
|
|
109
|
-
|
|
109
|
+
const builtinNote = adminConfig.includeBuiltinScripts
|
|
110
|
+
? ' and the built-in scripts'
|
|
111
|
+
: '';
|
|
112
|
+
console.log(
|
|
113
|
+
` Processing ${adminScripts.length} app scripts${builtinNote}...`
|
|
114
|
+
);
|
|
110
115
|
this.createAdminScriptQueue(result, appDefinition);
|
|
111
116
|
this.createScriptExecutorFunction(appDefinition, result, usePrismaLayer);
|
|
112
117
|
this.createAdminScriptRoutes(appDefinition, result, usePrismaLayer);
|
|
@@ -115,9 +120,6 @@ class AdminScriptBuilder extends InfrastructureBuilder {
|
|
|
115
120
|
const name = script.Definition?.name || 'unknown';
|
|
116
121
|
console.log(` ✓ Registered script: ${name}`);
|
|
117
122
|
});
|
|
118
|
-
if (adminConfig.includeBuiltinScripts) {
|
|
119
|
-
console.log(' ✓ Built-in scripts enabled');
|
|
120
|
-
}
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
if (hasReports) {
|
|
@@ -74,17 +74,21 @@ function getIntegrationFunctionNames(integration) {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* Admin-script functions, when
|
|
78
|
-
*
|
|
79
|
-
* integrations, so they belong in every
|
|
80
|
-
* set.
|
|
77
|
+
* Admin-script functions, when AdminScriptBuilder creates them: the app
|
|
78
|
+
* declares admin scripts, or turns on the built-in scripts. Both can
|
|
79
|
+
* instantiate arbitrary integrations, so they belong in every
|
|
80
|
+
* integration's queue-URL consumer set.
|
|
81
81
|
*
|
|
82
82
|
* @param {Object} appDefinition
|
|
83
83
|
* @returns {string[]}
|
|
84
84
|
*/
|
|
85
85
|
function getAdminFunctionNames(appDefinition = {}) {
|
|
86
|
-
|
|
87
|
-
appDefinition.adminScripts
|
|
86
|
+
const hasAppScripts =
|
|
87
|
+
Array.isArray(appDefinition.adminScripts) &&
|
|
88
|
+
appDefinition.adminScripts.length > 0;
|
|
89
|
+
const hasBuiltinScripts =
|
|
90
|
+
appDefinition.admin?.includeBuiltinScripts === true;
|
|
91
|
+
return hasAppScripts || hasBuiltinScripts
|
|
88
92
|
? ['adminScriptRouter', 'adminScriptExecutor']
|
|
89
93
|
: [];
|
|
90
94
|
}
|
|
@@ -92,6 +92,15 @@ describe('function-environments', () => {
|
|
|
92
92
|
expect(getAdminFunctionNames({})).toEqual([]);
|
|
93
93
|
expect(getAdminFunctionNames({ adminScripts: [] })).toEqual([]);
|
|
94
94
|
});
|
|
95
|
+
|
|
96
|
+
it('returns the admin functions when only the built-in scripts are on', () => {
|
|
97
|
+
expect(
|
|
98
|
+
getAdminFunctionNames({ admin: { includeBuiltinScripts: true } })
|
|
99
|
+
).toEqual(['adminScriptRouter', 'adminScriptExecutor']);
|
|
100
|
+
expect(
|
|
101
|
+
getAdminFunctionNames({ admin: { includeBuiltinScripts: false } })
|
|
102
|
+
).toEqual([]);
|
|
103
|
+
});
|
|
95
104
|
});
|
|
96
105
|
|
|
97
106
|
describe('applyFunctionEnvironments', () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.744.
|
|
4
|
+
"version": "2.0.0--canary.744.e18e27f.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frigg": "./frigg-cli/index.js"
|
|
7
7
|
},
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@babel/eslint-parser": "^7.18.9",
|
|
29
29
|
"@babel/parser": "^7.25.3",
|
|
30
30
|
"@babel/traverse": "^7.25.3",
|
|
31
|
-
"@friggframework/core": "2.0.0--canary.744.
|
|
32
|
-
"@friggframework/schemas": "2.0.0--canary.744.
|
|
33
|
-
"@friggframework/test": "2.0.0--canary.744.
|
|
31
|
+
"@friggframework/core": "2.0.0--canary.744.e18e27f.0",
|
|
32
|
+
"@friggframework/schemas": "2.0.0--canary.744.e18e27f.0",
|
|
33
|
+
"@friggframework/test": "2.0.0--canary.744.e18e27f.0",
|
|
34
34
|
"@hapi/boom": "^10.0.1",
|
|
35
35
|
"@inquirer/prompts": "^5.3.8",
|
|
36
36
|
"axios": "^1.18.0",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"validate-npm-package-name": "^5.0.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@friggframework/eslint-config": "2.0.0--canary.744.
|
|
62
|
-
"@friggframework/prettier-config": "2.0.0--canary.744.
|
|
61
|
+
"@friggframework/eslint-config": "2.0.0--canary.744.e18e27f.0",
|
|
62
|
+
"@friggframework/prettier-config": "2.0.0--canary.744.e18e27f.0",
|
|
63
63
|
"aws-sdk-client-mock": "^4.1.0",
|
|
64
64
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
65
65
|
"jest": "^30.1.3",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "e18e27f133f0afa7723d361b61ef8e7e80a830ef"
|
|
95
95
|
}
|