@eldrforge/kodrdriv 0.0.1

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.
Files changed (43) hide show
  1. package/.gitcarve/config.yaml +11 -0
  2. package/.gitcarve/context/people/context.md +5 -0
  3. package/.gitcarve/context/projects/context.md +3 -0
  4. package/.gitcarve/instructions/INACTIVE-release-pre.md +1 -0
  5. package/LICENSE +190 -0
  6. package/README.md +337 -0
  7. package/dist/arguments.js +252 -0
  8. package/dist/arguments.js.map +1 -0
  9. package/dist/commands/commit.js +54 -0
  10. package/dist/commands/commit.js.map +1 -0
  11. package/dist/commands/release.js +27 -0
  12. package/dist/commands/release.js.map +1 -0
  13. package/dist/constants.js +95 -0
  14. package/dist/constants.js.map +1 -0
  15. package/dist/content/diff.js +53 -0
  16. package/dist/content/diff.js.map +1 -0
  17. package/dist/content/log.js +34 -0
  18. package/dist/content/log.js.map +1 -0
  19. package/dist/error/ExitError.js +9 -0
  20. package/dist/error/ExitError.js.map +1 -0
  21. package/dist/logging.js +46 -0
  22. package/dist/logging.js.map +1 -0
  23. package/dist/main.js +53 -0
  24. package/dist/main.js.map +1 -0
  25. package/dist/prompt/instructions/commit.md +48 -0
  26. package/dist/prompt/instructions/release.md +31 -0
  27. package/dist/prompt/personas/you.md +11 -0
  28. package/dist/prompt/prompts.js +55 -0
  29. package/dist/prompt/prompts.js.map +1 -0
  30. package/dist/types.js +29 -0
  31. package/dist/types.js.map +1 -0
  32. package/dist/util/child.js +11 -0
  33. package/dist/util/child.js.map +1 -0
  34. package/dist/util/openai.js +55 -0
  35. package/dist/util/openai.js.map +1 -0
  36. package/dist/util/storage.js +126 -0
  37. package/dist/util/storage.js.map +1 -0
  38. package/eslint.config.mjs +82 -0
  39. package/nodemon.json +14 -0
  40. package/package.json +74 -0
  41. package/tsconfig.tsbuildinfo +1 -0
  42. package/vite.config.ts +90 -0
  43. package/vitest.config.ts +21 -0
package/vite.config.ts ADDED
@@ -0,0 +1,90 @@
1
+ import { defineConfig } from 'vite';
2
+ import { VitePluginNode } from 'vite-plugin-node';
3
+ import replace from '@rollup/plugin-replace';
4
+ // import { visualizer } from 'rollup-plugin-visualizer';
5
+ import { execSync } from 'child_process';
6
+ import shebang from 'rollup-plugin-preserve-shebang';
7
+
8
+ let gitInfo = {
9
+ branch: '',
10
+ commit: '',
11
+ tags: '',
12
+ commitDate: '',
13
+ };
14
+
15
+ try {
16
+ gitInfo = {
17
+ branch: execSync('git rev-parse --abbrev-ref HEAD').toString().trim(),
18
+ commit: execSync('git rev-parse --short HEAD').toString().trim(),
19
+ tags: '',
20
+ commitDate: execSync('git log -1 --format=%cd --date=iso').toString().trim(),
21
+ };
22
+
23
+ try {
24
+ gitInfo.tags = execSync('git tag --points-at HEAD | paste -sd "," -').toString().trim();
25
+ } catch {
26
+ gitInfo.tags = '';
27
+ }
28
+ } catch {
29
+ // eslint-disable-next-line no-console
30
+ console.log('Directory does not have a Git repository, skipping git info');
31
+ }
32
+
33
+
34
+ export default defineConfig({
35
+ server: {
36
+ port: 3000
37
+ },
38
+ plugins: [
39
+ ...VitePluginNode({
40
+ adapter: 'express',
41
+ appPath: './src/main.ts',
42
+ exportName: 'viteNodeApp',
43
+ tsCompiler: 'swc',
44
+ swcOptions: {
45
+ sourceMaps: true,
46
+ },
47
+ }),
48
+ // visualizer({
49
+ // template: 'network',
50
+ // filename: 'network.html',
51
+ // projectRoot: process.cwd(),
52
+ // }),
53
+ replace({
54
+ '__VERSION__': process.env.npm_package_version,
55
+ '__GIT_BRANCH__': gitInfo.branch,
56
+ '__GIT_COMMIT__': gitInfo.commit,
57
+ '__GIT_TAGS__': gitInfo.tags === '' ? '' : `T:${gitInfo.tags}`,
58
+ '__GIT_COMMIT_DATE__': gitInfo.commitDate,
59
+ '__SYSTEM_INFO__': `${process.platform} ${process.arch} ${process.version}`,
60
+ preventAssignment: true,
61
+ }),
62
+ ],
63
+ build: {
64
+ target: 'esnext',
65
+ outDir: 'dist',
66
+ lib: {
67
+ entry: './src/main.ts',
68
+ formats: ['es'],
69
+ },
70
+ rollupOptions: {
71
+ external: ['@theunwalked/dreadcabinet', '@theunwalked/cardigantime', '@riotprompt/riotprompt', '@riotprompt/riotprompt/formatter', '@riotprompt/riotprompt/chat'],
72
+ input: 'src/main.ts',
73
+ output: {
74
+ format: 'esm',
75
+ entryFileNames: '[name].js',
76
+ preserveModules: true,
77
+ exports: 'named',
78
+ },
79
+ plugins: [
80
+ shebang({
81
+ shebang: '#!/usr/bin/env node',
82
+ }),
83
+ ],
84
+ },
85
+ // Make sure Vite generates ESM-compatible code
86
+ modulePreload: false,
87
+ minify: false,
88
+ sourcemap: true
89
+ },
90
+ });
@@ -0,0 +1,21 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: false,
6
+ environment: 'node',
7
+ include: ['tests/**/*.test.ts'],
8
+ coverage: {
9
+ provider: 'v8',
10
+ reporter: ['text', 'lcov', 'html'],
11
+ all: true,
12
+ include: ['src/**/*.ts'],
13
+ thresholds: {
14
+ lines: 63,
15
+ functions: 71,
16
+ branches: 51,
17
+ statements: 63,
18
+ }
19
+ },
20
+ },
21
+ });