@atscript/core 0.1.6 → 0.1.8
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/index.cjs +28 -8
- package/dist/index.mjs +28 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3221,38 +3221,58 @@ const expectAnnotations = {
|
|
|
3221
3221
|
minLength: new AnnotationSpec({
|
|
3222
3222
|
description: "Validates that a string or array has a minimum length.\n\n**Example:**```atscript@expect.minLength 5name: string```",
|
|
3223
3223
|
defType: ["array", "string"],
|
|
3224
|
-
argument: {
|
|
3224
|
+
argument: [{
|
|
3225
3225
|
name: "length",
|
|
3226
3226
|
type: "number",
|
|
3227
3227
|
description: "The minimum length of the string or array."
|
|
3228
|
-
}
|
|
3228
|
+
}, {
|
|
3229
|
+
name: "message",
|
|
3230
|
+
optional: true,
|
|
3231
|
+
type: "string",
|
|
3232
|
+
description: "Optional error message to display if the validation fails."
|
|
3233
|
+
}]
|
|
3229
3234
|
}),
|
|
3230
3235
|
maxLength: new AnnotationSpec({
|
|
3231
3236
|
description: "Validates that a string or array has a maximum length.\n\n**Example:**```atscript@expect.maxLength 5name: string```",
|
|
3232
3237
|
defType: ["array", "string"],
|
|
3233
|
-
argument: {
|
|
3238
|
+
argument: [{
|
|
3234
3239
|
name: "length",
|
|
3235
3240
|
type: "number",
|
|
3236
3241
|
description: "The maximum length of the string or array."
|
|
3237
|
-
}
|
|
3242
|
+
}, {
|
|
3243
|
+
name: "message",
|
|
3244
|
+
optional: true,
|
|
3245
|
+
type: "string",
|
|
3246
|
+
description: "Optional error message to display if the validation fails."
|
|
3247
|
+
}]
|
|
3238
3248
|
}),
|
|
3239
3249
|
min: new AnnotationSpec({
|
|
3240
3250
|
description: "Validates that a number is greater than or equal to a minimum value.\n\n**Example:**```atscript@expect.min 18age: number```",
|
|
3241
3251
|
defType: ["number"],
|
|
3242
|
-
argument: {
|
|
3252
|
+
argument: [{
|
|
3243
3253
|
name: "minValue",
|
|
3244
3254
|
type: "number",
|
|
3245
3255
|
description: "The minimum value."
|
|
3246
|
-
}
|
|
3256
|
+
}, {
|
|
3257
|
+
name: "message",
|
|
3258
|
+
optional: true,
|
|
3259
|
+
type: "string",
|
|
3260
|
+
description: "Optional error message to display if the validation fails."
|
|
3261
|
+
}]
|
|
3247
3262
|
}),
|
|
3248
3263
|
max: new AnnotationSpec({
|
|
3249
3264
|
description: "Validates that a number is less than or equal to a maximum value.\n\n**Example:**```atscript@expect.max 10count: number```",
|
|
3250
3265
|
defType: ["number"],
|
|
3251
|
-
argument: {
|
|
3266
|
+
argument: [{
|
|
3252
3267
|
name: "maxValue",
|
|
3253
3268
|
type: "number",
|
|
3254
3269
|
description: "The maximum value."
|
|
3255
|
-
}
|
|
3270
|
+
}, {
|
|
3271
|
+
name: "message",
|
|
3272
|
+
optional: true,
|
|
3273
|
+
type: "string",
|
|
3274
|
+
description: "Optional error message to display if the validation fails."
|
|
3275
|
+
}]
|
|
3256
3276
|
}),
|
|
3257
3277
|
int: new AnnotationSpec({
|
|
3258
3278
|
description: "Validates that a number is an integer (no decimal places).\n\n**Example:**```atscript@expect.intage: number```",
|
package/dist/index.mjs
CHANGED
|
@@ -3197,38 +3197,58 @@ const expectAnnotations = {
|
|
|
3197
3197
|
minLength: new AnnotationSpec({
|
|
3198
3198
|
description: "Validates that a string or array has a minimum length.\n\n**Example:**```atscript@expect.minLength 5name: string```",
|
|
3199
3199
|
defType: ["array", "string"],
|
|
3200
|
-
argument: {
|
|
3200
|
+
argument: [{
|
|
3201
3201
|
name: "length",
|
|
3202
3202
|
type: "number",
|
|
3203
3203
|
description: "The minimum length of the string or array."
|
|
3204
|
-
}
|
|
3204
|
+
}, {
|
|
3205
|
+
name: "message",
|
|
3206
|
+
optional: true,
|
|
3207
|
+
type: "string",
|
|
3208
|
+
description: "Optional error message to display if the validation fails."
|
|
3209
|
+
}]
|
|
3205
3210
|
}),
|
|
3206
3211
|
maxLength: new AnnotationSpec({
|
|
3207
3212
|
description: "Validates that a string or array has a maximum length.\n\n**Example:**```atscript@expect.maxLength 5name: string```",
|
|
3208
3213
|
defType: ["array", "string"],
|
|
3209
|
-
argument: {
|
|
3214
|
+
argument: [{
|
|
3210
3215
|
name: "length",
|
|
3211
3216
|
type: "number",
|
|
3212
3217
|
description: "The maximum length of the string or array."
|
|
3213
|
-
}
|
|
3218
|
+
}, {
|
|
3219
|
+
name: "message",
|
|
3220
|
+
optional: true,
|
|
3221
|
+
type: "string",
|
|
3222
|
+
description: "Optional error message to display if the validation fails."
|
|
3223
|
+
}]
|
|
3214
3224
|
}),
|
|
3215
3225
|
min: new AnnotationSpec({
|
|
3216
3226
|
description: "Validates that a number is greater than or equal to a minimum value.\n\n**Example:**```atscript@expect.min 18age: number```",
|
|
3217
3227
|
defType: ["number"],
|
|
3218
|
-
argument: {
|
|
3228
|
+
argument: [{
|
|
3219
3229
|
name: "minValue",
|
|
3220
3230
|
type: "number",
|
|
3221
3231
|
description: "The minimum value."
|
|
3222
|
-
}
|
|
3232
|
+
}, {
|
|
3233
|
+
name: "message",
|
|
3234
|
+
optional: true,
|
|
3235
|
+
type: "string",
|
|
3236
|
+
description: "Optional error message to display if the validation fails."
|
|
3237
|
+
}]
|
|
3223
3238
|
}),
|
|
3224
3239
|
max: new AnnotationSpec({
|
|
3225
3240
|
description: "Validates that a number is less than or equal to a maximum value.\n\n**Example:**```atscript@expect.max 10count: number```",
|
|
3226
3241
|
defType: ["number"],
|
|
3227
|
-
argument: {
|
|
3242
|
+
argument: [{
|
|
3228
3243
|
name: "maxValue",
|
|
3229
3244
|
type: "number",
|
|
3230
3245
|
description: "The maximum value."
|
|
3231
|
-
}
|
|
3246
|
+
}, {
|
|
3247
|
+
name: "message",
|
|
3248
|
+
optional: true,
|
|
3249
|
+
type: "string",
|
|
3250
|
+
description: "Optional error message to display if the validation fails."
|
|
3251
|
+
}]
|
|
3232
3252
|
}),
|
|
3233
3253
|
int: new AnnotationSpec({
|
|
3234
3254
|
description: "Validates that a number is an integer (no decimal places).\n\n**Example:**```atscript@expect.intage: number```",
|