@fraym/crud 0.8.0 → 0.9.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.
- package/dist/cmd/crud.js +5 -2
- package/package.json +1 -1
package/dist/cmd/crud.js
CHANGED
|
@@ -33,7 +33,7 @@ const run = async () => {
|
|
|
33
33
|
namespace = process.env.CRUD_NAMESPACE;
|
|
34
34
|
}
|
|
35
35
|
if (namespace === "Fraym") {
|
|
36
|
-
throw new Error("Cannot use Fraym as namespace
|
|
36
|
+
throw new Error("Cannot use Fraym as namespace as it is reserved for fraym apps");
|
|
37
37
|
}
|
|
38
38
|
const schema = await (0, load_1.loadSchema)(`${schemaGlob}`, {
|
|
39
39
|
loaders: [new graphql_file_loader_1.GraphQLFileLoader()],
|
|
@@ -201,6 +201,9 @@ const getValueString = (v) => {
|
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
203
|
const migrateSchemas = async (definitions, serverAddress, namespace) => {
|
|
204
|
+
console.log(`Considering ${Object.keys(definitions).length} type definitions for migration.`);
|
|
205
|
+
console.log(`Using server address ${serverAddress}`);
|
|
206
|
+
console.log(`Using namespace ${namespace}`);
|
|
204
207
|
const managementClient = await (0, client_1.newManagementClient)({ serverAddress });
|
|
205
208
|
const existingTypeNames = (await managementClient.getAllTypes()).filter(name => name.startsWith(namespace));
|
|
206
209
|
let createSchema = "";
|
|
@@ -260,6 +263,6 @@ const migrateSchemas = async (definitions, serverAddress, namespace) => {
|
|
|
260
263
|
};
|
|
261
264
|
const ensureValidName = (name) => {
|
|
262
265
|
if (name.startsWith("Fraym")) {
|
|
263
|
-
throw new Error(
|
|
266
|
+
throw new Error(`Cannot use Fraym as type name prefix as it is reserved for fraym apps, got ${name}`);
|
|
264
267
|
}
|
|
265
268
|
};
|