@friggframework/devtools 2.0.0--canary.545.69acce5.0 → 2.0.0--canary.545.ccb5010.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.
|
@@ -51,6 +51,23 @@ class AppDefinitionValidator {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
// Sanitize extensions — strip functions (bootstrap, routes.handler)
|
|
55
|
+
// that JSON Schema cannot validate
|
|
56
|
+
if (Array.isArray(definition.extensions)) {
|
|
57
|
+
sanitized.extensions = definition.extensions.map(ext => {
|
|
58
|
+
const sanitizedExt = { ...ext };
|
|
59
|
+
// Remove function properties
|
|
60
|
+
if (typeof sanitizedExt.bootstrap === 'function') {
|
|
61
|
+
delete sanitizedExt.bootstrap;
|
|
62
|
+
}
|
|
63
|
+
if (sanitizedExt.routes && typeof sanitizedExt.routes.handler === 'function') {
|
|
64
|
+
sanitizedExt.routes = { ...sanitizedExt.routes };
|
|
65
|
+
delete sanitizedExt.routes.handler;
|
|
66
|
+
}
|
|
67
|
+
return sanitizedExt;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
54
71
|
return sanitized;
|
|
55
72
|
}
|
|
56
73
|
|
|
@@ -145,6 +145,20 @@
|
|
|
145
145
|
* @property {AdminConfig} [admin] - Admin configuration
|
|
146
146
|
*
|
|
147
147
|
* @property {Object} [environment] - Environment variables
|
|
148
|
+
*
|
|
149
|
+
* @property {ExtensionDefinition[]} [extensions] - Extensions that add custom Prisma models, encrypted fields, admin routes, and bootstrap lifecycle hooks
|
|
150
|
+
*/
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Extension definition for extending Frigg Core with custom models, encryption, routes, and bootstrap
|
|
154
|
+
* @typedef {Object} ExtensionDefinition
|
|
155
|
+
* @property {string} name - Unique identifier for this extension
|
|
156
|
+
* @property {string} [schema] - Absolute path to a .prisma schema fragment
|
|
157
|
+
* @property {Object<string, {fields: string[]}>} [encryption] - Model name → encrypted fields mapping
|
|
158
|
+
* @property {Object} [routes] - Express router configuration
|
|
159
|
+
* @property {string} routes.path - Base URL path for the extension routes
|
|
160
|
+
* @property {Function|Object} routes.handler - Router factory (prisma, appDefinition) → Router, or { router } object
|
|
161
|
+
* @property {Function} [bootstrap] - Async function (prisma, appDefinition) → void, runs post-DB pre-router
|
|
148
162
|
*/
|
|
149
163
|
|
|
150
164
|
/**
|
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.545.
|
|
4
|
+
"version": "2.0.0--canary.545.ccb5010.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frigg": "./frigg-cli/index.js"
|
|
7
7
|
},
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@babel/eslint-parser": "^7.18.9",
|
|
26
26
|
"@babel/parser": "^7.25.3",
|
|
27
27
|
"@babel/traverse": "^7.25.3",
|
|
28
|
-
"@friggframework/core": "2.0.0--canary.545.
|
|
29
|
-
"@friggframework/schemas": "2.0.0--canary.545.
|
|
30
|
-
"@friggframework/test": "2.0.0--canary.545.
|
|
28
|
+
"@friggframework/core": "2.0.0--canary.545.ccb5010.0",
|
|
29
|
+
"@friggframework/schemas": "2.0.0--canary.545.ccb5010.0",
|
|
30
|
+
"@friggframework/test": "2.0.0--canary.545.ccb5010.0",
|
|
31
31
|
"@hapi/boom": "^10.0.1",
|
|
32
32
|
"@inquirer/prompts": "^5.3.8",
|
|
33
33
|
"axios": "^1.7.2",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"validate-npm-package-name": "^5.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@friggframework/eslint-config": "2.0.0--canary.545.
|
|
59
|
-
"@friggframework/prettier-config": "2.0.0--canary.545.
|
|
58
|
+
"@friggframework/eslint-config": "2.0.0--canary.545.ccb5010.0",
|
|
59
|
+
"@friggframework/prettier-config": "2.0.0--canary.545.ccb5010.0",
|
|
60
60
|
"aws-sdk-client-mock": "^4.1.0",
|
|
61
61
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
62
62
|
"exit-x": "^0.2.2",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"publishConfig": {
|
|
90
90
|
"access": "public"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "ccb5010339d2f13595db45f65ab501af02c0a360"
|
|
93
93
|
}
|