@fulmenhq/tsfulmen 0.2.2 → 0.2.4

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.
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Application Identity Types
3
+ *
4
+ * TypeScript interfaces matching the Crucible app-identity schema v1.0.0
5
+ */
6
+ /**
7
+ * Repository category taxonomy from Fulmen standards
8
+ */
9
+ type RepositoryCategory = "cli" | "workhorse" | "service" | "library" | "pipeline" | "codex" | "sdk";
10
+ /**
11
+ * Python-specific packaging metadata
12
+ * Field names use snake_case to match Crucible schema
13
+ */
14
+ interface PythonMetadata {
15
+ readonly distribution_name?: string;
16
+ readonly package_name?: string;
17
+ readonly console_scripts?: ReadonlyArray<{
18
+ readonly name: string;
19
+ readonly entry_point: string;
20
+ }>;
21
+ }
22
+ /**
23
+ * Required application identity fields
24
+ *
25
+ * All fields are readonly to enforce immutability
26
+ * Field names use snake_case to match Crucible schema
27
+ */
28
+ interface AppIdentity {
29
+ /**
30
+ * Lowercase kebab-case binary/executable name
31
+ * Pattern: ^[a-z][a-z0-9-]{0,62}[a-z0-9]$
32
+ */
33
+ readonly binary_name: string;
34
+ /**
35
+ * Lowercase alphanumeric vendor namespace (no hyphens)
36
+ * Pattern: ^[a-z][a-z0-9]{0,62}[a-z0-9]$
37
+ */
38
+ readonly vendor: string;
39
+ /**
40
+ * Uppercase environment variable prefix (must end with _)
41
+ * Pattern: ^[A-Z][A-Z0-9_]*_$
42
+ */
43
+ readonly env_prefix: string;
44
+ /**
45
+ * Filesystem-safe config directory name
46
+ * Pattern: ^[a-z][a-z0-9-]{0,62}[a-z0-9]$
47
+ */
48
+ readonly config_name: string;
49
+ /**
50
+ * One-line application description (10-200 chars)
51
+ */
52
+ readonly description: string;
53
+ }
54
+ /**
55
+ * Optional metadata fields
56
+ *
57
+ * Additional properties are allowed for extensibility
58
+ * Field names use snake_case to match Crucible schema
59
+ */
60
+ interface IdentityMetadata {
61
+ readonly project_url?: string;
62
+ readonly support_email?: string;
63
+ readonly license?: string;
64
+ readonly repository_category?: RepositoryCategory;
65
+ readonly telemetry_namespace?: string;
66
+ readonly registry_id?: string;
67
+ readonly python?: PythonMetadata;
68
+ readonly [key: string]: unknown;
69
+ }
70
+ /**
71
+ * Complete application identity document
72
+ */
73
+ interface Identity {
74
+ readonly app: AppIdentity;
75
+ readonly metadata?: IdentityMetadata;
76
+ }
77
+ /**
78
+ * Options for loading identity
79
+ */
80
+ interface LoadIdentityOptions {
81
+ /**
82
+ * Explicit path override
83
+ * Highest priority in discovery algorithm
84
+ */
85
+ readonly path?: string;
86
+ /**
87
+ * Test injection - bypass filesystem and discovery
88
+ * Never cached
89
+ */
90
+ readonly identity?: Identity;
91
+ /**
92
+ * Starting directory for ancestor search
93
+ * Defaults to process.cwd()
94
+ */
95
+ readonly startDir?: string;
96
+ /**
97
+ * Force reload, bypass cache
98
+ * Useful for testing cache behavior
99
+ */
100
+ readonly skipCache?: boolean;
101
+ /**
102
+ * Skip schema validation (dangerous)
103
+ * Only use for testing or when identity is pre-validated
104
+ */
105
+ readonly skipValidation?: boolean;
106
+ }
107
+
108
+ export type { AppIdentity as A, Identity as I, LoadIdentityOptions as L, PythonMetadata as P, RepositoryCategory as R, IdentityMetadata as a };
package/package.json CHANGED
@@ -24,15 +24,15 @@
24
24
  "@types/node": "^22.9.0",
25
25
  "@types/picomatch": "^4.0.2",
26
26
  "@types/unzipper": "^0.10.11",
27
- "@vitest/coverage-v8": "^2.1.5",
28
- "@vitest/ui": "^2.1.5",
27
+ "@vitest/coverage-v8": "^4.0.18",
28
+ "@vitest/ui": "^4.0.18",
29
29
  "fastify": "^5.2.0",
30
30
  "prettier": "^3.6.2",
31
31
  "prom-client": "^15.1.3",
32
32
  "tsup": "^8.3.5",
33
33
  "tsx": "^4.19.2",
34
34
  "typescript": "^5.7.2",
35
- "vitest": "^2.1.5"
35
+ "vitest": "^4.0.18"
36
36
  },
37
37
  "engines": {
38
38
  "bun": "\u003e=1.0.0",
@@ -165,7 +165,7 @@
165
165
  "dev": "tsx src/index.ts",
166
166
  "lint": "make lint",
167
167
  "lint:fix": "make fmt",
168
- "prepublishOnly": "bun run quality \u0026\u0026 bun run validate:all \u0026\u0026 bunx tsx scripts/prepare-wasm-package.ts",
168
+ "prepublishOnly": "bunx tsx scripts/release-guard-prepublish.ts \u0026\u0026 bun run quality \u0026\u0026 bun run validate:all \u0026\u0026 bunx tsx scripts/prepare-wasm-package.ts",
169
169
  "quality": "make quality",
170
170
  "test": "make test",
171
171
  "test:coverage": "make test-coverage",
@@ -184,5 +184,5 @@
184
184
  },
185
185
  "type": "module",
186
186
  "types": "./dist/index.d.ts",
187
- "version": "0.2.2"
187
+ "version": "0.2.4"
188
188
  }