graphile-presigned-url-plugin 0.20.0 → 0.20.1
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/README.md +15 -0
- package/download-url-field.js +1 -1
- package/esm/download-url-field.js +1 -1
- package/esm/storage-module-cache.js +5 -3
- package/package.json +2 -2
- package/storage-module-cache.js +5 -3
package/README.md
CHANGED
|
@@ -92,6 +92,21 @@ Common issues and solutions for pgpm, PostgreSQL, and testing.
|
|
|
92
92
|
* [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): **📝 Type definitions** for PostgreSQL AST nodes in TypeScript.
|
|
93
93
|
* [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): **🛠️ AST utilities** for constructing and transforming PostgreSQL syntax trees.
|
|
94
94
|
|
|
95
|
+
### 📚 Documentation & Skills
|
|
96
|
+
|
|
97
|
+
* [constructive-skills](https://github.com/constructive-io/constructive-skills): **📖 Platform documentation and AI agent skills** — feature catalog, blueprint reference, SDK guides (i18n, billing, limits, events, uploads, security, entities, search, AI), and deployment guides.
|
|
98
|
+
|
|
99
|
+
Install skills for AI coding agents:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# All platform skills (security, blueprints, codegen, billing, etc.)
|
|
103
|
+
npx skills add constructive-io/constructive-skills
|
|
104
|
+
|
|
105
|
+
# Individual repo skills (pgpm, testing, CLI, search, etc.)
|
|
106
|
+
npx skills add https://github.com/constructive-io/constructive --skill pgpm
|
|
107
|
+
npx skills add https://github.com/constructive-io/constructive --skill constructive-testing
|
|
108
|
+
```
|
|
109
|
+
|
|
95
110
|
## Credits
|
|
96
111
|
|
|
97
112
|
**🛠 Built by the [Constructive](https://constructive.io) team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on [GitHub](https://github.com/constructive-io).**
|
package/download-url-field.js
CHANGED
|
@@ -115,7 +115,7 @@ function createDownloadUrlPlugin(options) {
|
|
|
115
115
|
let downloadUrlExpirySeconds = 3600;
|
|
116
116
|
try {
|
|
117
117
|
if (withPgClient && pgSettings) {
|
|
118
|
-
const resolved = await withPgClient(
|
|
118
|
+
const resolved = await withPgClient(pgSettings, async (pgClient) => {
|
|
119
119
|
const dbResult = await pgClient.query({
|
|
120
120
|
text: `SELECT jwt_private.current_database_id() AS id`,
|
|
121
121
|
});
|
|
@@ -112,7 +112,7 @@ export function createDownloadUrlPlugin(options) {
|
|
|
112
112
|
let downloadUrlExpirySeconds = 3600;
|
|
113
113
|
try {
|
|
114
114
|
if (withPgClient && pgSettings) {
|
|
115
|
-
const resolved = await withPgClient(
|
|
115
|
+
const resolved = await withPgClient(pgSettings, async (pgClient) => {
|
|
116
116
|
const dbResult = await pgClient.query({
|
|
117
117
|
text: `SELECT jwt_private.current_database_id() AS id`,
|
|
118
118
|
});
|
|
@@ -275,9 +275,11 @@ export async function loadAllStorageModules(pgClient, databaseId) {
|
|
|
275
275
|
const key = `storage:${databaseId}:scope:${config.scope}`;
|
|
276
276
|
storageModuleCache.set(key, config);
|
|
277
277
|
}
|
|
278
|
-
// Store the full list under a sentinel key
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
// Store the full list under a sentinel key (only if non-empty to avoid caching failed lookups)
|
|
279
|
+
if (configs.length > 0) {
|
|
280
|
+
const sentinel = { ...configs[0], _allConfigs: configs };
|
|
281
|
+
storageModuleCache.set(cacheKey, sentinel);
|
|
282
|
+
}
|
|
281
283
|
return configs;
|
|
282
284
|
}
|
|
283
285
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-presigned-url-plugin",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "Presigned URL upload plugin for PostGraphile v5 — requestUploadUrl mutation and downloadUrl computed field",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"homepage": "https://github.com/constructive-io/constructive",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"@types/node": "^22.19.11",
|
|
61
61
|
"makage": "^0.3.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "d398ac2288f57fa02713353ce36024a63dd6b9f1"
|
|
64
64
|
}
|
package/storage-module-cache.js
CHANGED
|
@@ -287,9 +287,11 @@ async function loadAllStorageModules(pgClient, databaseId) {
|
|
|
287
287
|
const key = `storage:${databaseId}:scope:${config.scope}`;
|
|
288
288
|
storageModuleCache.set(key, config);
|
|
289
289
|
}
|
|
290
|
-
// Store the full list under a sentinel key
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
// Store the full list under a sentinel key (only if non-empty to avoid caching failed lookups)
|
|
291
|
+
if (configs.length > 0) {
|
|
292
|
+
const sentinel = { ...configs[0], _allConfigs: configs };
|
|
293
|
+
storageModuleCache.set(cacheKey, sentinel);
|
|
294
|
+
}
|
|
293
295
|
return configs;
|
|
294
296
|
}
|
|
295
297
|
/**
|