@robinpath/uuid 0.1.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/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # @robinpath/uuid
2
+
3
+ > UUID generation, parsing, and validation utilities (v4, v5, nil)
4
+
5
+ ![Category](https://img.shields.io/badge/category-Utility-blue) ![Functions](https://img.shields.io/badge/functions-7-green) ![Auth](https://img.shields.io/badge/auth-none-lightgrey) ![License](https://img.shields.io/badge/license-MIT-brightgreen)
6
+
7
+ ## Why use this module?
8
+
9
+ The `uuid` module lets you:
10
+
11
+ - Generate a random UUID v4
12
+ - Generate a deterministic UUID v5 from a name and namespace UUID using SHA-1
13
+ - Check whether a string is a valid UUID format
14
+ - Extract the version number from a UUID string
15
+ - Parse a UUID into its component parts (version, variant, time, bytes)
16
+
17
+ All functions are callable directly from RobinPath scripts with a simple, consistent API.
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ npm install @robinpath/uuid
23
+ ```
24
+
25
+ ## Quick Start
26
+
27
+ No credentials needed — start using it right away:
28
+
29
+ ```robinpath
30
+ uuid.v5 "hello" "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
31
+ ```
32
+
33
+ ## Available Functions
34
+
35
+ | Function | Description |
36
+ |----------|-------------|
37
+ | `uuid.v4` | Generate a random UUID v4 |
38
+ | `uuid.v5` | Generate a deterministic UUID v5 from a name and namespace UUID using SHA-1 |
39
+ | `uuid.isValid` | Check whether a string is a valid UUID format |
40
+ | `uuid.version` | Extract the version number from a UUID string |
41
+ | `uuid.parse` | Parse a UUID into its component parts (version, variant, time, bytes) |
42
+ | `uuid.generate` | Generate one or more random UUID v4 strings |
43
+ | `uuid.nil` | Return the nil UUID (all zeros) |
44
+
45
+ ## Examples
46
+
47
+ ### Generate a deterministic UUID v5 from a name and namespace UUID using SHA-1
48
+
49
+ ```robinpath
50
+ uuid.v5 "hello" "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
51
+ ```
52
+
53
+ ### Check whether a string is a valid UUID format
54
+
55
+ ```robinpath
56
+ uuid.isValid "550e8400-e29b-41d4-a716-446655440000"
57
+ ```
58
+
59
+ ### Extract the version number from a UUID string
60
+
61
+ ```robinpath
62
+ uuid.version "550e8400-e29b-41d4-a716-446655440000"
63
+ ```
64
+
65
+ ## Integration with RobinPath
66
+
67
+ ```typescript
68
+ import { RobinPath } from "@wiredwp/robinpath";
69
+ import Module from "@robinpath/uuid";
70
+
71
+ const rp = new RobinPath();
72
+ rp.registerModule(Module.name, Module.functions);
73
+ rp.registerModuleMeta(Module.name, Module.functionMetadata);
74
+
75
+ const result = await rp.executeScript(`
76
+ uuid.v5 "hello" "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
77
+ `);
78
+ ```
79
+
80
+ ## Full API Reference
81
+
82
+ See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
83
+
84
+ ## Related Modules
85
+
86
+ - [`@robinpath/json`](../json) — JSON module for complementary functionality
87
+
88
+ ## License
89
+
90
+ MIT
@@ -0,0 +1,6 @@
1
+ import type { ModuleAdapter } from "@wiredwp/robinpath";
2
+ declare const UuidModule: ModuleAdapter;
3
+ export default UuidModule;
4
+ export { UuidModule };
5
+ export { UuidFunctions, UuidFunctionMetadata, UuidModuleMetadata } from "./uuid.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,QAAA,MAAM,UAAU,EAAE,aAMjB,CAAC;AAEF,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ import { UuidFunctions, UuidFunctionMetadata, UuidModuleMetadata } from "./uuid.js";
2
+ const UuidModule = {
3
+ name: "uuid",
4
+ functions: UuidFunctions,
5
+ functionMetadata: UuidFunctionMetadata,
6
+ moduleMetadata: UuidModuleMetadata,
7
+ global: false,
8
+ }; // as ModuleAdapter
9
+ export default UuidModule;
10
+ export { UuidModule };
11
+ export { UuidFunctions, UuidFunctionMetadata, UuidModuleMetadata } from "./uuid.js";
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpF,MAAM,UAAU,GAAkB;IAChC,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,aAAa;IACxB,gBAAgB,EAAE,oBAA2B;IAC7C,cAAc,EAAE,kBAAyB;IACzC,MAAM,EAAE,KAAK;CACd,CAAC,CAAC,mBAAmB;AAEtB,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
package/dist/uuid.d.ts ADDED
@@ -0,0 +1,88 @@
1
+ import type { BuiltinHandler } from "@wiredwp/robinpath";
2
+ export declare const UuidFunctions: Record<string, BuiltinHandler>;
3
+ export declare const UuidFunctionMetadata: {
4
+ v4: {
5
+ description: string;
6
+ parameters: never[];
7
+ returnType: string;
8
+ returnDescription: string;
9
+ example: string;
10
+ };
11
+ v5: {
12
+ description: string;
13
+ parameters: {
14
+ name: string;
15
+ dataType: string;
16
+ description: string;
17
+ formInputType: string;
18
+ required: boolean;
19
+ }[];
20
+ returnType: string;
21
+ returnDescription: string;
22
+ example: string;
23
+ };
24
+ isValid: {
25
+ description: string;
26
+ parameters: {
27
+ name: string;
28
+ dataType: string;
29
+ description: string;
30
+ formInputType: string;
31
+ required: boolean;
32
+ }[];
33
+ returnType: string;
34
+ returnDescription: string;
35
+ example: string;
36
+ };
37
+ version: {
38
+ description: string;
39
+ parameters: {
40
+ name: string;
41
+ dataType: string;
42
+ description: string;
43
+ formInputType: string;
44
+ required: boolean;
45
+ }[];
46
+ returnType: string;
47
+ returnDescription: string;
48
+ example: string;
49
+ };
50
+ parse: {
51
+ description: string;
52
+ parameters: {
53
+ name: string;
54
+ dataType: string;
55
+ description: string;
56
+ formInputType: string;
57
+ required: boolean;
58
+ }[];
59
+ returnType: string;
60
+ returnDescription: string;
61
+ example: string;
62
+ };
63
+ generate: {
64
+ description: string;
65
+ parameters: {
66
+ name: string;
67
+ dataType: string;
68
+ description: string;
69
+ formInputType: string;
70
+ required: boolean;
71
+ }[];
72
+ returnType: string;
73
+ returnDescription: string;
74
+ example: string;
75
+ };
76
+ nil: {
77
+ description: string;
78
+ parameters: never[];
79
+ returnType: string;
80
+ returnDescription: string;
81
+ example: string;
82
+ };
83
+ };
84
+ export declare const UuidModuleMetadata: {
85
+ description: string;
86
+ methods: string[];
87
+ };
88
+ //# sourceMappingURL=uuid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../src/uuid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA2C,MAAM,oBAAoB,CAAC;AAoHlG,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAQxD,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;CAW9B,CAAC"}
package/dist/uuid.js ADDED
@@ -0,0 +1,216 @@
1
+ import { randomUUID, createHash } from "node:crypto";
2
+ // -- Helpers ----------------------------------------------------------------
3
+ const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
4
+ /**
5
+ * Convert a UUID string (with hyphens) to a 16-byte Buffer.
6
+ */
7
+ function uuidToBytes(uuid) {
8
+ return Buffer.from(uuid.replace(/-/g, ""), "hex");
9
+ }
10
+ /**
11
+ * Convert a 16-byte Buffer to a UUID string (with hyphens).
12
+ */
13
+ function bytesToUuid(buf) {
14
+ const hex = buf.toString("hex");
15
+ return [
16
+ hex.slice(0, 8),
17
+ hex.slice(8, 12),
18
+ hex.slice(12, 16),
19
+ hex.slice(16, 20),
20
+ hex.slice(20, 32),
21
+ ].join("-");
22
+ }
23
+ // -- RobinPath Function Handlers --------------------------------------------
24
+ const v4 = async (_args) => {
25
+ return randomUUID();
26
+ };
27
+ const v5 = async (args) => {
28
+ const name = String(args[0] ?? "");
29
+ const namespace = String(args[1] ?? "");
30
+ if (!UUID_REGEX.test(namespace)) {
31
+ throw new Error(`Invalid namespace UUID: ${namespace}`);
32
+ }
33
+ const nsBytes = uuidToBytes(namespace);
34
+ const nameBytes = Buffer.from(name, "utf-8");
35
+ const hash = createHash("sha1").update(nsBytes).update(nameBytes).digest();
36
+ // Set version 5 — high nibble of byte 6
37
+ hash[6] = (hash[6] & 0x0f) | 0x50;
38
+ // Set variant 10xx — high bits of byte 8
39
+ hash[8] = (hash[8] & 0x3f) | 0x80;
40
+ // UUID v5 uses only the first 16 bytes of the SHA-1 digest
41
+ return bytesToUuid(hash.subarray(0, 16));
42
+ };
43
+ const isValid = (args) => {
44
+ const value = String(args[0] ?? "");
45
+ return UUID_REGEX.test(value);
46
+ };
47
+ const version = (args) => {
48
+ const value = String(args[0] ?? "");
49
+ if (!UUID_REGEX.test(value)) {
50
+ throw new Error(`Invalid UUID: ${value}`);
51
+ }
52
+ // The version nibble is the first hex digit of the third group (index 14 in the no-hyphen hex string)
53
+ const versionNibble = parseInt(value.replace(/-/g, "")[12], 16);
54
+ return versionNibble;
55
+ };
56
+ const parse = (args) => {
57
+ const value = String(args[0] ?? "");
58
+ if (!UUID_REGEX.test(value)) {
59
+ throw new Error(`Invalid UUID: ${value}`);
60
+ }
61
+ const hex = value.replace(/-/g, "");
62
+ const versionNibble = parseInt(hex[12], 16);
63
+ // Variant is determined by the high bits of byte 8 (hex chars at index 16-17)
64
+ const variantByte = parseInt(hex.slice(16, 18), 16);
65
+ let variant;
66
+ if ((variantByte & 0x80) === 0) {
67
+ variant = "NCS";
68
+ }
69
+ else if ((variantByte & 0xc0) === 0x80) {
70
+ variant = "RFC4122";
71
+ }
72
+ else if ((variantByte & 0xe0) === 0xc0) {
73
+ variant = "Microsoft";
74
+ }
75
+ else {
76
+ variant = "Future";
77
+ }
78
+ return {
79
+ version: versionNibble,
80
+ variant,
81
+ time: null,
82
+ bytes: hex.toLowerCase(),
83
+ };
84
+ };
85
+ const generate = async (args) => {
86
+ const count = Math.max(1, Math.floor(Number(args[0] ?? 1)));
87
+ const result = [];
88
+ for (let i = 0; i < count; i++) {
89
+ result.push(randomUUID());
90
+ }
91
+ return result;
92
+ };
93
+ const nil = (_args) => {
94
+ return "00000000-0000-0000-0000-000000000000";
95
+ };
96
+ // -- Exports ----------------------------------------------------------------
97
+ export const UuidFunctions = {
98
+ v4,
99
+ v5,
100
+ isValid,
101
+ version,
102
+ parse,
103
+ generate,
104
+ nil,
105
+ };
106
+ export const UuidFunctionMetadata = {
107
+ v4: {
108
+ description: "Generate a random UUID v4",
109
+ parameters: [],
110
+ returnType: "string",
111
+ returnDescription: "A random UUID v4 string",
112
+ example: "uuid.v4",
113
+ },
114
+ v5: {
115
+ description: "Generate a deterministic UUID v5 from a name and namespace UUID using SHA-1",
116
+ parameters: [
117
+ {
118
+ name: "name",
119
+ dataType: "string",
120
+ description: "The name to hash into the UUID",
121
+ formInputType: "text",
122
+ required: true,
123
+ },
124
+ {
125
+ name: "namespace",
126
+ dataType: "string",
127
+ description: "The namespace UUID (e.g. a well-known DNS or URL namespace)",
128
+ formInputType: "text",
129
+ required: true,
130
+ },
131
+ ],
132
+ returnType: "string",
133
+ returnDescription: "A deterministic UUID v5 string",
134
+ example: 'uuid.v5 "hello" "6ba7b810-9dad-11d1-80b4-00c04fd430c8"',
135
+ },
136
+ isValid: {
137
+ description: "Check whether a string is a valid UUID format",
138
+ parameters: [
139
+ {
140
+ name: "value",
141
+ dataType: "string",
142
+ description: "The string to validate",
143
+ formInputType: "text",
144
+ required: true,
145
+ },
146
+ ],
147
+ returnType: "boolean",
148
+ returnDescription: "True if the string matches the UUID pattern",
149
+ example: 'uuid.isValid "550e8400-e29b-41d4-a716-446655440000"',
150
+ },
151
+ version: {
152
+ description: "Extract the version number from a UUID string",
153
+ parameters: [
154
+ {
155
+ name: "uuid",
156
+ dataType: "string",
157
+ description: "A valid UUID string",
158
+ formInputType: "text",
159
+ required: true,
160
+ },
161
+ ],
162
+ returnType: "number",
163
+ returnDescription: "The UUID version number (1-5)",
164
+ example: 'uuid.version "550e8400-e29b-41d4-a716-446655440000"',
165
+ },
166
+ parse: {
167
+ description: "Parse a UUID into its component parts (version, variant, time, bytes)",
168
+ parameters: [
169
+ {
170
+ name: "uuid",
171
+ dataType: "string",
172
+ description: "A valid UUID string",
173
+ formInputType: "text",
174
+ required: true,
175
+ },
176
+ ],
177
+ returnType: "object",
178
+ returnDescription: "An object with version, variant, time (null for non-v1), and bytes (hex string of 16 bytes)",
179
+ example: 'uuid.parse "550e8400-e29b-41d4-a716-446655440000"',
180
+ },
181
+ generate: {
182
+ description: "Generate one or more random UUID v4 strings",
183
+ parameters: [
184
+ {
185
+ name: "count",
186
+ dataType: "number",
187
+ description: "The number of UUIDs to generate (default 1)",
188
+ formInputType: "text",
189
+ required: false,
190
+ },
191
+ ],
192
+ returnType: "array",
193
+ returnDescription: "An array of random UUID v4 strings",
194
+ example: "uuid.generate 5",
195
+ },
196
+ nil: {
197
+ description: "Return the nil UUID (all zeros)",
198
+ parameters: [],
199
+ returnType: "string",
200
+ returnDescription: 'The nil UUID "00000000-0000-0000-0000-000000000000"',
201
+ example: "uuid.nil",
202
+ },
203
+ };
204
+ export const UuidModuleMetadata = {
205
+ description: "UUID generation, parsing, and validation utilities (v4, v5, nil)",
206
+ methods: [
207
+ "v4",
208
+ "v5",
209
+ "isValid",
210
+ "version",
211
+ "parse",
212
+ "generate",
213
+ "nil",
214
+ ],
215
+ };
216
+ //# sourceMappingURL=uuid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid.js","sourceRoot":"","sources":["../src/uuid.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAErD,8EAA8E;AAE9E,MAAM,UAAU,GAAG,iEAAiE,CAAC;AAErF;;GAEG;AACH,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,GAAW;IAC9B,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO;QACL,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QACf,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;QAChB,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;QACjB,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;QACjB,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;KAClB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAED,8EAA8E;AAE9E,MAAM,EAAE,GAAmB,KAAK,EAAE,KAAK,EAAE,EAAE;IACzC,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,EAAE,GAAmB,KAAK,EAAE,IAAI,EAAE,EAAE;IACxC,MA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A6C;QAC1D,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,QAAQ;gBAClB,WAAW,EAAE,6CAA6C;gBAC1D,aAAa,EAAE,MAAM;gBACrB,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,UAAU,EAAE,OAAO;QACnB,iBAAiB,EAAE,oCAAoC;QACvD,OAAO,EAAE,iBAAiB;KAC3B;IACD,GAAG,EAAE;QACH,WAAW,EAAE,iCAAiC;QAC9C,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,qDAAqD;QACxE,OAAO,EAAE,UAAU;KACpB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,WAAW,EAAE,kEAAkE;IAC/E,OAAO,EAAE;QACP,IAAI;QACJ,IAAI;QACJ,SAAS;QACT,SAAS;QACT,OAAO;QACP,UAAU;QACV,KAAK;KACN;CACF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@robinpath/uuid",
3
+ "version": "0.1.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "type": "module",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "test": "node --import tsx --test tests/*.test.ts"
22
+ },
23
+ "peerDependencies": {
24
+ "@wiredwp/robinpath": ">=0.20.0"
25
+ },
26
+ "devDependencies": {
27
+ "@wiredwp/robinpath": "^0.30.1",
28
+ "tsx": "^4.19.0",
29
+ "typescript": "^5.6.0"
30
+ }
31
+ }