@qodalis/cli-guid 1.0.9 → 2.0.0-beta.10

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/package.json CHANGED
@@ -1,44 +1,36 @@
1
1
  {
2
2
  "name": "@qodalis/cli-guid",
3
- "version": "1.0.9",
4
- "description": "An Angular CLI extension for generating and validating GUIDs.",
3
+ "version": "2.0.0-beta.10",
4
+ "description": "@qodalis/cli extension for generating and validating GUIDs.",
5
5
  "author": "Nicolae Lupei, Qodalis Solutions",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/qodalis-solutions/angular-web-cli"
9
+ "url": "https://github.com/qodalis-solutions/web-cli"
10
10
  },
11
11
  "homepage": "https://qodalis.com",
12
12
  "keywords": [
13
- "angular",
14
13
  "cli",
15
14
  "qodalis",
16
15
  "terminal",
17
- "guid"
16
+ "guid",
17
+ "uuid",
18
+ "generator"
18
19
  ],
19
- "umd": "./umd/index.js",
20
- "unpkg": "./umd/index.js",
21
- "peerDependencies": {
22
- "@angular/common": "^16.2.0",
23
- "@angular/core": "^16.2.0"
24
- },
20
+ "umd": "./umd/index.global.js",
21
+ "unpkg": "./umd/index.global.js",
25
22
  "dependencies": {
26
- "tslib": "^2.3.0",
27
- "@qodalis/cli-core": "^0.0.16",
28
- "@qodalis/angular-cli": "^1.0.37"
23
+ "@qodalis/cli-core": "2.0.0-beta.10"
29
24
  },
30
25
  "sideEffects": false,
31
- "module": "fesm2022/qodalis-cli-guid.mjs",
32
- "typings": "index.d.ts",
26
+ "main": "./public-api.js",
27
+ "module": "./public-api.mjs",
28
+ "types": "./public-api.d.ts",
33
29
  "exports": {
34
- "./package.json": {
35
- "default": "./package.json"
36
- },
37
30
  ".": {
38
- "types": "./index.d.ts",
39
- "esm2022": "./esm2022/qodalis-cli-guid.mjs",
40
- "esm": "./esm2022/qodalis-cli-guid.mjs",
41
- "default": "./fesm2022/qodalis-cli-guid.mjs"
31
+ "types": "./public-api.d.ts",
32
+ "import": "./public-api.mjs",
33
+ "require": "./public-api.js"
42
34
  }
43
35
  }
44
- }
36
+ }
@@ -0,0 +1,46 @@
1
+ import * as _qodalis_cli_core from '@qodalis/cli-core';
2
+ import { ICliCommandProcessor, CliProcessorMetadata, ICliConfigurationOption, CliProcessCommand, ICliExecutionContext, ICliModule } from '@qodalis/cli-core';
3
+
4
+ /**
5
+ * Generates a v4 UUID using crypto.getRandomValues when available,
6
+ * falling back to Math.random.
7
+ */
8
+ declare const generateGUID: () => string;
9
+ /**
10
+ * Validates a UUID v4 string.
11
+ */
12
+ declare const validateGUID: (guid: string) => boolean;
13
+ /**
14
+ * Validates any UUID version (v1-v5, nil).
15
+ */
16
+ declare const validateAnyGUID: (guid: string) => boolean;
17
+ /** The nil UUID (all zeros). */
18
+ declare const NIL_GUID = "00000000-0000-0000-0000-000000000000";
19
+ /**
20
+ * Detects the version of a UUID string.
21
+ * Returns the version number (1-5) or 0 for nil, or null if invalid.
22
+ */
23
+ declare const detectGUIDVersion: (guid: string) => number | null;
24
+ type GuidFormat = 'default' | 'uppercase' | 'braces' | 'parentheses' | 'digits' | 'urn';
25
+ /**
26
+ * Formats a UUID string into different representations.
27
+ */
28
+ declare const formatGUID: (guid: string, format: GuidFormat) => string;
29
+
30
+ declare class CliGuidCommandProcessor implements ICliCommandProcessor {
31
+ command: string;
32
+ aliases: string[];
33
+ description: string;
34
+ author: _qodalis_cli_core.ICliCommandAuthor;
35
+ version: string;
36
+ processors?: ICliCommandProcessor[];
37
+ metadata?: CliProcessorMetadata;
38
+ configurationOptions?: ICliConfigurationOption[];
39
+ constructor();
40
+ processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
41
+ writeDescription(context: ICliExecutionContext): void;
42
+ }
43
+
44
+ declare const guidModule: ICliModule;
45
+
46
+ export { CliGuidCommandProcessor, type GuidFormat, NIL_GUID, detectGUIDVersion, formatGUID, generateGUID, guidModule, validateAnyGUID, validateGUID };
package/public-api.d.ts CHANGED
@@ -1,3 +1,46 @@
1
- export * from './lib/cli-guid.module';
2
- export * from './lib/utilities';
3
- export * from './lib/processors/cli-guid-command-processor';
1
+ import * as _qodalis_cli_core from '@qodalis/cli-core';
2
+ import { ICliCommandProcessor, CliProcessorMetadata, ICliConfigurationOption, CliProcessCommand, ICliExecutionContext, ICliModule } from '@qodalis/cli-core';
3
+
4
+ /**
5
+ * Generates a v4 UUID using crypto.getRandomValues when available,
6
+ * falling back to Math.random.
7
+ */
8
+ declare const generateGUID: () => string;
9
+ /**
10
+ * Validates a UUID v4 string.
11
+ */
12
+ declare const validateGUID: (guid: string) => boolean;
13
+ /**
14
+ * Validates any UUID version (v1-v5, nil).
15
+ */
16
+ declare const validateAnyGUID: (guid: string) => boolean;
17
+ /** The nil UUID (all zeros). */
18
+ declare const NIL_GUID = "00000000-0000-0000-0000-000000000000";
19
+ /**
20
+ * Detects the version of a UUID string.
21
+ * Returns the version number (1-5) or 0 for nil, or null if invalid.
22
+ */
23
+ declare const detectGUIDVersion: (guid: string) => number | null;
24
+ type GuidFormat = 'default' | 'uppercase' | 'braces' | 'parentheses' | 'digits' | 'urn';
25
+ /**
26
+ * Formats a UUID string into different representations.
27
+ */
28
+ declare const formatGUID: (guid: string, format: GuidFormat) => string;
29
+
30
+ declare class CliGuidCommandProcessor implements ICliCommandProcessor {
31
+ command: string;
32
+ aliases: string[];
33
+ description: string;
34
+ author: _qodalis_cli_core.ICliCommandAuthor;
35
+ version: string;
36
+ processors?: ICliCommandProcessor[];
37
+ metadata?: CliProcessorMetadata;
38
+ configurationOptions?: ICliConfigurationOption[];
39
+ constructor();
40
+ processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
41
+ writeDescription(context: ICliExecutionContext): void;
42
+ }
43
+
44
+ declare const guidModule: ICliModule;
45
+
46
+ export { CliGuidCommandProcessor, type GuidFormat, NIL_GUID, detectGUIDVersion, formatGUID, generateGUID, guidModule, validateAnyGUID, validateGUID };