@stndrds/schema 1.0.0-alpha.265 → 1.0.0-alpha.267
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/all--B2_3ksI.d.ts +465 -0
- package/dist/all-D5zeUllO.d.mts +465 -0
- package/dist/chunk-63WWFZFY.js +1262 -0
- package/dist/{chunk-ZBQEMIAV.js → chunk-FDIAOFHS.js} +11 -8
- package/dist/chunk-ITGE3PBX.mjs +1215 -0
- package/dist/{chunk-UXCJ3NI4.mjs → chunk-KDHDC7E6.mjs} +150 -9
- package/dist/{chunk-U36ZIBEM.mjs → chunk-O73ROMWQ.mjs} +15 -6
- package/dist/{chunk-QIWADKYA.mjs → chunk-POULKEJM.mjs} +11 -9
- package/dist/{chunk-EBGRZUIH.js → chunk-Q4SZAMJT.js} +5 -0
- package/dist/{chunk-NGGU6BSN.mjs → chunk-QMLO7V5E.mjs} +6 -6
- package/dist/{chunk-L4U5QEQL.js → chunk-QN2N3IJZ.js} +158 -8
- package/dist/{chunk-JUKLL5RJ.mjs → chunk-R5LAJCBU.mjs} +5 -2
- package/dist/{chunk-NI3HCSYH.js → chunk-V6Q7HCA7.js} +11 -11
- package/dist/{chunk-QAF3HNKQ.js → chunk-ZPFOKBIN.js} +16 -5
- package/dist/exceptions.d.mts +21 -8
- package/dist/exceptions.d.ts +21 -8
- package/dist/exceptions.js +42 -38
- package/dist/exceptions.mjs +1 -1
- package/dist/helpers-C1VVEAOO.d.mts +76 -0
- package/dist/helpers-vQ6kp8ET.d.ts +76 -0
- package/dist/index-Bq1KrQkR.d.ts +2413 -0
- package/dist/index-DtxtOBYT.d.mts +2413 -0
- package/dist/index.d.mts +1516 -2212
- package/dist/index.d.ts +1516 -2212
- package/dist/index.js +1294 -1038
- package/dist/index.mjs +911 -905
- package/dist/{helpers-eyrnPJEF.d.ts → objects-A1ED9af-.d.ts} +32 -77
- package/dist/{helpers-uKLet0kF.d.mts → objects-BCaBw2ef.d.mts} +32 -77
- package/dist/validation/all.d.mts +4 -2
- package/dist/validation/all.d.ts +4 -2
- package/dist/validation/all.js +88 -16
- package/dist/validation/all.mjs +9 -9
- package/dist/validation/complex/phone.js +2 -2
- package/dist/validation/complex/phone.mjs +1 -1
- package/dist/validation/config/index.d.mts +5 -18
- package/dist/validation/config/index.d.ts +5 -18
- package/dist/validation/config/index.js +34 -4
- package/dist/validation/config/index.mjs +7 -1
- package/dist/validation/object/index.d.mts +2 -2
- package/dist/validation/object/index.d.ts +2 -2
- package/dist/validation/object/index.js +19 -19
- package/dist/validation/object/index.mjs +7 -7
- package/dist/validation/primitives/text.js +2 -2
- package/dist/validation/primitives/text.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-PGERPYDR.js +0 -2
- package/dist/chunk-SP3PNHYF.mjs +0 -1
|
@@ -10,6 +10,7 @@ var SchemaErrorCode = {
|
|
|
10
10
|
RECORD_NOT_FOUND: "SCHEMA_RECORD_NOT_FOUND",
|
|
11
11
|
ROLE_NOT_FOUND: "SCHEMA_ROLE_NOT_FOUND",
|
|
12
12
|
MEMORY_NOT_FOUND: "SCHEMA_MEMORY_NOT_FOUND",
|
|
13
|
+
SCHEMA_PLAN_NOT_FOUND: "SCHEMA_PLAN_NOT_FOUND",
|
|
13
14
|
// Validation
|
|
14
15
|
VALIDATION_FAILED: "SCHEMA_VALIDATION_FAILED",
|
|
15
16
|
INVALID_ATTRIBUTE_NAME: "SCHEMA_INVALID_ATTRIBUTE_NAME",
|
|
@@ -180,6 +181,12 @@ var RecordNotFoundError = class extends NotFoundError {
|
|
|
180
181
|
this.name = "RecordNotFoundError";
|
|
181
182
|
}
|
|
182
183
|
};
|
|
184
|
+
var SchemaPlanNotFoundError = class extends NotFoundError {
|
|
185
|
+
constructor(planId) {
|
|
186
|
+
super("Schema plan", planId, SchemaErrorCode.SCHEMA_PLAN_NOT_FOUND);
|
|
187
|
+
this.name = "SchemaPlanNotFoundError";
|
|
188
|
+
}
|
|
189
|
+
};
|
|
183
190
|
var ValidationError = class _ValidationError extends SchemaError {
|
|
184
191
|
constructor(message, errors) {
|
|
185
192
|
super(message, SchemaErrorCode.VALIDATION_FAILED, { errors });
|
|
@@ -280,19 +287,14 @@ var OrphanSystemAttributeError = class extends SchemaError {
|
|
|
280
287
|
var DestructiveSyncNotAllowedError = class extends SchemaError {
|
|
281
288
|
constructor(operations) {
|
|
282
289
|
const summary = operations.map((op) => {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
if (op.type === "remove_object") {
|
|
287
|
-
return "- remove_object";
|
|
288
|
-
}
|
|
289
|
-
return `- ${op.type}`;
|
|
290
|
+
const named = op;
|
|
291
|
+
return named.name ? `- ${op.type} "${named.name}"` : `- ${op.type}`;
|
|
290
292
|
}).join("\n");
|
|
291
293
|
super(
|
|
292
294
|
`Destructive schema operations detected (data will be lost):
|
|
293
295
|
${summary}
|
|
294
296
|
|
|
295
|
-
To
|
|
297
|
+
These are applied only under an explicit opt-in; without it boot demotes the object to runtime and keeps its rows. To let Standards apply them automatically, set the environment variable:
|
|
296
298
|
STANDARDS_ALLOW_DESTRUCTIVE_SYNC=1
|
|
297
299
|
|
|
298
300
|
Otherwise, revert your code changes or back up the data first.`,
|
|
@@ -531,6 +533,7 @@ exports.RepositoryError = RepositoryError;
|
|
|
531
533
|
exports.RoleNotFoundError = RoleNotFoundError;
|
|
532
534
|
exports.SchemaError = SchemaError;
|
|
533
535
|
exports.SchemaErrorCode = SchemaErrorCode;
|
|
536
|
+
exports.SchemaPlanNotFoundError = SchemaPlanNotFoundError;
|
|
534
537
|
exports.SearchBackendError = SearchBackendError;
|
|
535
538
|
exports.StorageError = StorageError;
|
|
536
539
|
exports.SyncCascadeError = SyncCascadeError;
|