directus 9.12.0 → 9.12.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/dist/extensions.js +3 -3
- package/dist/services/graphql.js +6 -1
- package/dist/services/import-export.js +7 -3
- package/package.json +13 -13
package/dist/extensions.js
CHANGED
|
@@ -255,7 +255,7 @@ class ExtensionManager {
|
|
|
255
255
|
const endpointPath = path_1.default.resolve(endpoint.path, endpoint.entrypoint);
|
|
256
256
|
const endpointInstance = require(endpointPath);
|
|
257
257
|
const config = (0, get_module_default_1.default)(endpointInstance);
|
|
258
|
-
this.registerEndpoint(config, endpointPath, this.endpointRouter);
|
|
258
|
+
this.registerEndpoint(config, endpointPath, endpoint.name, this.endpointRouter);
|
|
259
259
|
}
|
|
260
260
|
catch (error) {
|
|
261
261
|
logger_1.default.warn(`Couldn't register endpoint "${endpoint.name}"`);
|
|
@@ -350,9 +350,9 @@ class ExtensionManager {
|
|
|
350
350
|
});
|
|
351
351
|
this.apiExtensions.hooks.push(hookHandler);
|
|
352
352
|
}
|
|
353
|
-
registerEndpoint(config, path, router) {
|
|
353
|
+
registerEndpoint(config, path, name, router) {
|
|
354
354
|
const register = typeof config === 'function' ? config : config.handler;
|
|
355
|
-
const routeName = typeof config === 'function' ?
|
|
355
|
+
const routeName = typeof config === 'function' ? name : config.id;
|
|
356
356
|
const scopedRouter = express_1.default.Router();
|
|
357
357
|
router.use(`/${routeName}`, scopedRouter);
|
|
358
358
|
register(scopedRouter, {
|
package/dist/services/graphql.js
CHANGED
|
@@ -1167,7 +1167,12 @@ class GraphQLService {
|
|
|
1167
1167
|
values.push(this.parseArgs(valueNode.fields, variableValues));
|
|
1168
1168
|
}
|
|
1169
1169
|
else {
|
|
1170
|
-
|
|
1170
|
+
if (valueNode.kind === 'Variable') {
|
|
1171
|
+
values.push(variableValues[valueNode.name.value]);
|
|
1172
|
+
}
|
|
1173
|
+
else {
|
|
1174
|
+
values.push(valueNode.value);
|
|
1175
|
+
}
|
|
1171
1176
|
}
|
|
1172
1177
|
}
|
|
1173
1178
|
argsObject[argument.name.value] = values;
|
|
@@ -169,7 +169,7 @@ class ExportService {
|
|
|
169
169
|
const requestedLimit = (_a = query.limit) !== null && _a !== void 0 ? _a : -1;
|
|
170
170
|
const batchesRequired = Math.ceil(count / env_1.default.EXPORT_BATCH_SIZE);
|
|
171
171
|
let readCount = 0;
|
|
172
|
-
for (let batch = 0; batch
|
|
172
|
+
for (let batch = 0; batch < batchesRequired; batch++) {
|
|
173
173
|
let limit = env_1.default.EXPORT_BATCH_SIZE;
|
|
174
174
|
if (requestedLimit > 0 && env_1.default.EXPORT_BATCH_SIZE > requestedLimit - readCount) {
|
|
175
175
|
limit = requestedLimit - readCount;
|
|
@@ -177,7 +177,7 @@ class ExportService {
|
|
|
177
177
|
const result = await service.readByQuery({
|
|
178
178
|
...query,
|
|
179
179
|
limit,
|
|
180
|
-
|
|
180
|
+
offset: batch * env_1.default.EXPORT_BATCH_SIZE,
|
|
181
181
|
});
|
|
182
182
|
readCount += result.length;
|
|
183
183
|
if (result.length) {
|
|
@@ -265,7 +265,11 @@ class ExportService {
|
|
|
265
265
|
transforms: [json2csv_1.transforms.flatten({ separator: '.' })],
|
|
266
266
|
header: (options === null || options === void 0 ? void 0 : options.includeHeader) !== false,
|
|
267
267
|
});
|
|
268
|
-
|
|
268
|
+
let string = parser.parse(input);
|
|
269
|
+
if ((options === null || options === void 0 ? void 0 : options.includeHeader) === false) {
|
|
270
|
+
string = '\n' + string;
|
|
271
|
+
}
|
|
272
|
+
return string;
|
|
269
273
|
}
|
|
270
274
|
throw new exceptions_1.ServiceUnavailableException(`Illegal export type used: "${format}"`, { service: 'export' });
|
|
271
275
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "directus",
|
|
3
|
-
"version": "9.12.
|
|
3
|
+
"version": "9.12.1",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"homepage": "https://github.com/directus/directus#readme",
|
|
6
6
|
"description": "Directus is a real-time API and App dashboard for managing SQL database content.",
|
|
@@ -77,16 +77,16 @@
|
|
|
77
77
|
],
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@aws-sdk/client-ses": "^3.40.0",
|
|
80
|
-
"@directus/app": "9.12.
|
|
81
|
-
"@directus/drive": "9.12.
|
|
82
|
-
"@directus/drive-azure": "9.12.
|
|
83
|
-
"@directus/drive-gcs": "9.12.
|
|
84
|
-
"@directus/drive-s3": "9.12.
|
|
85
|
-
"@directus/extensions-sdk": "9.12.
|
|
86
|
-
"@directus/format-title": "9.12.
|
|
87
|
-
"@directus/schema": "9.12.
|
|
88
|
-
"@directus/shared": "9.12.
|
|
89
|
-
"@directus/specs": "9.12.
|
|
80
|
+
"@directus/app": "9.12.1",
|
|
81
|
+
"@directus/drive": "9.12.1",
|
|
82
|
+
"@directus/drive-azure": "9.12.1",
|
|
83
|
+
"@directus/drive-gcs": "9.12.1",
|
|
84
|
+
"@directus/drive-s3": "9.12.1",
|
|
85
|
+
"@directus/extensions-sdk": "9.12.1",
|
|
86
|
+
"@directus/format-title": "9.12.1",
|
|
87
|
+
"@directus/schema": "9.12.1",
|
|
88
|
+
"@directus/shared": "9.12.1",
|
|
89
|
+
"@directus/specs": "9.12.1",
|
|
90
90
|
"@godaddy/terminus": "^4.9.0",
|
|
91
91
|
"@rollup/plugin-alias": "^3.1.9",
|
|
92
92
|
"@rollup/plugin-virtual": "^2.0.3",
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
"graphql-compose": "^9.0.1",
|
|
120
120
|
"helmet": "^4.6.0",
|
|
121
121
|
"inquirer": "^8.1.1",
|
|
122
|
+
"ioredis": "^4.27.6",
|
|
122
123
|
"joi": "^17.3.0",
|
|
123
124
|
"js-yaml": "^4.1.0",
|
|
124
125
|
"js2xmlparser": "^4.0.1",
|
|
@@ -164,7 +165,6 @@
|
|
|
164
165
|
},
|
|
165
166
|
"optionalDependencies": {
|
|
166
167
|
"@keyv/redis": "^2.1.2",
|
|
167
|
-
"ioredis": "^4.27.6",
|
|
168
168
|
"keyv-memcache": "^1.2.5",
|
|
169
169
|
"memcached": "^2.2.2",
|
|
170
170
|
"mysql": "^2.18.1",
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"sqlite3": "^5.0.6",
|
|
174
174
|
"tedious": "^13.0.0"
|
|
175
175
|
},
|
|
176
|
-
"gitHead": "
|
|
176
|
+
"gitHead": "cd58611aa7114dd7ef13f0819f77f9858f34ad1e",
|
|
177
177
|
"devDependencies": {
|
|
178
178
|
"@types/async": "3.2.10",
|
|
179
179
|
"@types/body-parser": "1.19.2",
|