@fabrika/check 0.9.0-dev.33 → 0.9.0-dev.34
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 +6 -6
- package/src/rules/modules.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/check",
|
|
3
|
-
"version": "0.9.0-dev.
|
|
3
|
+
"version": "0.9.0-dev.34",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@babel/parser": "8.0.7",
|
|
55
|
-
"@fabrika/app": "0.9.0-dev.
|
|
56
|
-
"@fabrika/auth-core": "0.9.0-dev.
|
|
57
|
-
"@fabrika/db": "0.9.0-dev.
|
|
58
|
-
"@fabrika/operations-contract": "0.9.0-dev.
|
|
59
|
-
"@fabrika/platform-node": "0.9.0-dev.
|
|
55
|
+
"@fabrika/app": "0.9.0-dev.34",
|
|
56
|
+
"@fabrika/auth-core": "0.9.0-dev.34",
|
|
57
|
+
"@fabrika/db": "0.9.0-dev.34",
|
|
58
|
+
"@fabrika/operations-contract": "0.9.0-dev.34",
|
|
59
|
+
"@fabrika/platform-node": "0.9.0-dev.34",
|
|
60
60
|
"zod": "^3.25.76"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/src/rules/modules.ts
CHANGED
|
@@ -154,6 +154,11 @@ const checkPackage = (reference: ModuleReference, specifier: string, report: Rep
|
|
|
154
154
|
}
|
|
155
155
|
const takesEnvironment = reference.names.some((imported) => imported === 'env' || imported === '*' || imported === 'default')
|
|
156
156
|
if (name === 'process' && takesEnvironment && !isGeneratedEntry) report(node, 'env-read', `'${specifier}' loaded for its environment`, ALLOWED_ENV)
|
|
157
|
+
// On Cloudflare `env` of `cloudflare:workers` is every binding and secret of the Worker, the framework's included.
|
|
158
|
+
// The platform sets `disallow_importable_env`, which leaves it empty; an import of it is a read nonetheless.
|
|
159
|
+
if (specifier === 'cloudflare:workers' && takesEnvironment && !isGeneratedEntry) {
|
|
160
|
+
report(node, 'env-read', `'${specifier}' loaded for its environment, every binding of the Worker`, ALLOWED_ENV)
|
|
161
|
+
}
|
|
157
162
|
}
|
|
158
163
|
|
|
159
164
|
export const checkModuleReferences = (
|