@devinnn/docdrift 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.
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sortKeysDeep = sortKeysDeep;
4
+ exports.stableStringify = stableStringify;
5
+ function sortKeysDeep(value) {
6
+ if (Array.isArray(value)) {
7
+ return value.map(sortKeysDeep);
8
+ }
9
+ if (value && typeof value === "object") {
10
+ const entries = Object.entries(value)
11
+ .sort(([a], [b]) => a.localeCompare(b))
12
+ .map(([k, v]) => [k, sortKeysDeep(v)]);
13
+ return Object.fromEntries(entries);
14
+ }
15
+ return value;
16
+ }
17
+ function stableStringify(value) {
18
+ return JSON.stringify(sortKeysDeep(value), null, 2);
19
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logInfo = logInfo;
4
+ exports.logWarn = logWarn;
5
+ exports.logError = logError;
6
+ function logInfo(message, meta) {
7
+ if (meta) {
8
+ console.log(`[docdrift] ${message}`, meta);
9
+ return;
10
+ }
11
+ console.log(`[docdrift] ${message}`);
12
+ }
13
+ function logWarn(message, meta) {
14
+ if (meta) {
15
+ console.warn(`[docdrift] ${message}`, meta);
16
+ return;
17
+ }
18
+ console.warn(`[docdrift] ${message}`);
19
+ }
20
+ function logError(message, meta) {
21
+ if (meta) {
22
+ console.error(`[docdrift] ${message}`, meta);
23
+ return;
24
+ }
25
+ console.error(`[docdrift] ${message}`);
26
+ }
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@devinnn/docdrift",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "description": "Detect and remediate documentation drift with Devin sessions",
6
+ "main": "dist/src/index.js",
7
+ "bin": {
8
+ "docdrift": "dist/src/cli.js"
9
+ },
10
+ "type": "commonjs",
11
+ "engines": {
12
+ "node": ">=20"
13
+ },
14
+ "files": ["dist/src"],
15
+ "repository": { "type": "git", "url": "" },
16
+ "keywords": ["docs", "drift", "openapi", "devin", "github-actions"],
17
+ "license": "MIT",
18
+ "scripts": {
19
+ "build": "tsc -p tsconfig.json",
20
+ "test": "vitest run",
21
+ "lint": "eslint .",
22
+ "format": "prettier -w .",
23
+ "openapi:export": "tsx apps/api/scripts/export-openapi.ts",
24
+ "docs:check": "node scripts/docs-check.js",
25
+ "docdrift": "tsx src/cli.ts"
26
+ },
27
+ "dependencies": {
28
+ "@octokit/rest": "^21.1.1",
29
+ "fastify": "^5.2.1",
30
+ "js-yaml": "^4.1.0",
31
+ "zod": "^3.24.1"
32
+ },
33
+ "devDependencies": {
34
+ "@types/js-yaml": "^4.0.9",
35
+ "@types/node": "^22.13.4",
36
+ "eslint": "^9.20.1",
37
+ "prettier": "^3.5.0",
38
+ "tsx": "^4.19.2",
39
+ "typescript": "^5.7.3",
40
+ "vitest": "^3.0.5"
41
+ }
42
+ }