@atscript/core 0.1.36 → 0.1.38
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 +124 -1018
- package/dist/index.d.ts +4 -25
- package/dist/index.mjs +124 -1016
- package/package.json +1 -1
- package/skills/atscript-core/annotations.md +5 -1
- package/skills/atscript-core/primitives.md +16 -1
package/package.json
CHANGED
|
@@ -60,7 +60,11 @@
|
|
|
60
60
|
| `@db.index.fulltext`| `name?: string` | **yes** (append) | prop | Fulltext search index |
|
|
61
61
|
| `@db.column` | `name: string` | no | prop | Override database column name |
|
|
62
62
|
| `@db.default` | `value: string` | no | prop | Static default value |
|
|
63
|
-
| `@db.default.
|
|
63
|
+
| `@db.default.increment` | `start?: number` | no | prop | Auto-incrementing integer default |
|
|
64
|
+
| `@db.default.uuid` | _(none)_ | no | prop | UUID generation default |
|
|
65
|
+
| `@db.default.now` | _(none)_ | no | prop | Current timestamp default |
|
|
66
|
+
| `@db.column.collate`| `collation: string` | no | prop | Portable collation (binary/nocase/unicode)|
|
|
67
|
+
| `@db.column.precision`| `precision: number`, `scale: number` | no | prop | Decimal precision/scale for DB storage |
|
|
64
68
|
| `@db.ignore` | _(none)_ | no | prop | Exclude field from database |
|
|
65
69
|
|
|
66
70
|
### `@emit.*` — Build-time Directives
|
|
@@ -16,6 +16,11 @@ Base type for textual data. Extensions accessed via dot notation in `.as` files.
|
|
|
16
16
|
| `string.date` | Date string (multiple formats) | YYYY-MM-DD, MM/DD/YYYY, etc. |
|
|
17
17
|
| `string.isoDate` | ISO 8601 date | UTC and timezone variants |
|
|
18
18
|
| `string.uuid` | UUID | Standard UUID format (case-insensitive) |
|
|
19
|
+
| `string.url` | URL | Pattern: `^https?://[^\s]+$` |
|
|
20
|
+
| `string.ipv4` | IPv4 address | Pattern: standard IPv4 validation |
|
|
21
|
+
| `string.ipv6` | IPv6 address | Pattern: standard IPv6 validation (case-insensitive) |
|
|
22
|
+
| `string.ip` | IP address (IPv4 or IPv6) | Accepts either IPv4 or IPv6 format |
|
|
23
|
+
| `string.char` | Single character | `@expect.minLength 1`, `@expect.maxLength 1` |
|
|
19
24
|
| `string.required` | Non-empty string | `@meta.required` applied |
|
|
20
25
|
|
|
21
26
|
### `number`
|
|
@@ -30,10 +35,20 @@ Base type for numeric data.
|
|
|
30
35
|
| `number.int` | Integer | `@expect.int` |
|
|
31
36
|
| `number.int.positive` | Positive integer | `@expect.int` + `@expect.min 0` |
|
|
32
37
|
| `number.int.negative` | Negative integer | `@expect.int` + `@expect.max 0` |
|
|
38
|
+
| `number.int.int8` | Signed 8-bit (-128 to 127) | `@expect.min -128`, `@expect.max 127`, tag: `int8` |
|
|
39
|
+
| `number.int.int16` | Signed 16-bit (-32768 to 32767) | `@expect.min -32768`, `@expect.max 32767`, tag: `int16` |
|
|
40
|
+
| `number.int.int32` | Signed 32-bit integer | `@expect.min -2147483648`, `@expect.max 2147483647`, tag: `int32` |
|
|
41
|
+
| `number.int.int64` | Signed 64-bit (JS safe range) | `@expect.min MIN_SAFE_INTEGER`, `@expect.max MAX_SAFE_INTEGER`, tag: `int64` |
|
|
42
|
+
| `number.int.uint8` | Unsigned 8-bit (0 to 255) | `@expect.min 0`, `@expect.max 255`, tag: `uint8` |
|
|
43
|
+
| `number.int.uint8.byte` | Byte value (alias for uint8) | tag: `byte` |
|
|
44
|
+
| `number.int.uint16` | Unsigned 16-bit (0 to 65535) | `@expect.min 0`, `@expect.max 65535`, tag: `uint16` |
|
|
45
|
+
| `number.int.uint16.port` | Network port (0 to 65535) | tag: `port` |
|
|
46
|
+
| `number.int.uint32` | Unsigned 32-bit (0 to 4294967295) | `@expect.min 0`, `@expect.max 4294967295`, tag: `uint32` |
|
|
47
|
+
| `number.int.uint64` | Unsigned 64-bit (JS safe range) | `@expect.min 0`, `@expect.max MAX_SAFE_INTEGER`, tag: `uint64` |
|
|
33
48
|
| `number.single` | Single-precision float | — |
|
|
34
49
|
| `number.double` | Double-precision float | — |
|
|
35
50
|
| `number.timestamp` | Timestamp (integer) | `@expect.int` |
|
|
36
|
-
| `number.timestamp.created` | Auto-set on creation | `@db.default.
|
|
51
|
+
| `number.timestamp.created` | Auto-set on creation | `@db.default.now`, tag: `created` |
|
|
37
52
|
| `number.timestamp.updated` | Auto-updated on write | tag: `updated` |
|
|
38
53
|
|
|
39
54
|
### `boolean`
|