@sequenceholdings/orm 2.7.0 → 2.7.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 +31 -0
- package/dist/authoring.cjs +9 -0
- package/dist/authoring.cjs.map +1 -1
- package/dist/authoring.d.cts +6 -0
- package/dist/authoring.d.ts +6 -0
- package/dist/authoring.js +9 -0
- package/dist/authoring.js.map +1 -1
- package/dist/cli.cjs +8 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6286,6 +6286,11 @@ function serializeNamespace(input) {
|
|
|
6286
6286
|
enumsByName.set(ref.name, ref);
|
|
6287
6287
|
}
|
|
6288
6288
|
const canonicalTables = tables.map((table) => buildCanonicalTable({ table, relationsByName, enumsByName }));
|
|
6289
|
+
for (const table of tables) {
|
|
6290
|
+
if (table.source !== void 0 && table.config.internal === true && config.exports && Object.hasOwn(config.exports, table.tableName)) {
|
|
6291
|
+
throw new OrmDefinitionError(`internal synced source "${table.tableName}" cannot be exported; export a permitted managed view instead`, table.file);
|
|
6292
|
+
}
|
|
6293
|
+
}
|
|
6289
6294
|
const canonicalEnums = [...enumsByName.values()].map((ref) => ({
|
|
6290
6295
|
name: ref.name,
|
|
6291
6296
|
values: [...ref.values]
|
|
@@ -6619,6 +6624,9 @@ function buildCanonicalLink({
|
|
|
6619
6624
|
if (!relationsByName.has(targetName)) {
|
|
6620
6625
|
return fail4(`targets ${relationKind(target)} "${targetName}" which is not part of this namespace`);
|
|
6621
6626
|
}
|
|
6627
|
+
if (isSeqTable(target) && target.source !== void 0 && target.config.internal === true) {
|
|
6628
|
+
return fail4(`targets internal synced source "${targetName}"; expose a permitted managed view instead`);
|
|
6629
|
+
}
|
|
6622
6630
|
if (link.enforce && (!isSeqTable(relation) || !isSeqTable(target))) {
|
|
6623
6631
|
return fail4("cannot enforce a PostgreSQL foreign key involving a view");
|
|
6624
6632
|
}
|