git-slot-machine 1.1.0 → 1.1.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 (50) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +8 -0
  3. package/dist/animation/slotMachine.d.ts +1 -1
  4. package/dist/animation/slotMachine.d.ts.map +1 -1
  5. package/dist/animation/slotMachine.js +15 -22
  6. package/dist/animation/slotMachine.js.map +1 -1
  7. package/dist/api.js +11 -19
  8. package/dist/api.js.map +1 -1
  9. package/dist/balance.js +7 -46
  10. package/dist/balance.js.map +1 -1
  11. package/dist/commands/auth.js +40 -48
  12. package/dist/commands/auth.js.map +1 -1
  13. package/dist/commands/balance.js +14 -20
  14. package/dist/commands/balance.js.map +1 -1
  15. package/dist/commands/config.js +19 -26
  16. package/dist/commands/config.js.map +1 -1
  17. package/dist/commands/init.js +60 -99
  18. package/dist/commands/init.js.map +1 -1
  19. package/dist/commands/play.js +31 -37
  20. package/dist/commands/play.js.map +1 -1
  21. package/dist/commands/spin.js +6 -9
  22. package/dist/commands/spin.js.map +1 -1
  23. package/dist/commands/sync.js +23 -29
  24. package/dist/commands/sync.js.map +1 -1
  25. package/dist/commands/test.js +3 -6
  26. package/dist/commands/test.js.map +1 -1
  27. package/dist/config.js +34 -56
  28. package/dist/config.js.map +1 -1
  29. package/dist/index.js +21 -23
  30. package/dist/index.js.map +1 -1
  31. package/dist/patterns.js +3 -7
  32. package/dist/patterns.js.map +1 -1
  33. package/dist/templates/post-commit.js +1 -4
  34. package/dist/templates/post-commit.js.map +1 -1
  35. package/dist/utils/git.js +7 -12
  36. package/dist/utils/git.js.map +1 -1
  37. package/package.json +2 -1
  38. package/src/animation/slotMachine.ts +1 -1
  39. package/src/api.ts +1 -1
  40. package/src/commands/auth.ts +2 -2
  41. package/src/commands/balance.ts +1 -1
  42. package/src/commands/config.ts +1 -1
  43. package/src/commands/init.ts +3 -3
  44. package/src/commands/play.ts +5 -5
  45. package/src/commands/spin.ts +2 -2
  46. package/src/commands/sync.ts +2 -2
  47. package/src/commands/test.ts +1 -1
  48. package/src/index.ts +8 -8
  49. package/src/patterns.test.ts +1 -1
  50. package/tsconfig.json +2 -1
@@ -5,7 +5,7 @@ import {
5
5
  isSyncEnabled,
6
6
  setSyncEnabled,
7
7
  getConfig
8
- } from '../config';
8
+ } from '../config.js';
9
9
 
10
10
  export async function configGetCommand(key: string): Promise<void> {
11
11
  try {
@@ -2,9 +2,9 @@ import * as fs from 'fs';
2
2
  import * as path from 'path';
3
3
  import * as readline from 'readline';
4
4
  import chalk from 'chalk';
5
- import { isGitRepo } from '../utils/git';
6
- import { POST_COMMIT_HOOK } from '../templates/post-commit';
7
- import { getRepoInfo, setGitHubUsername, getGitHubUsername, setPrivateRepo } from '../config';
5
+ import { isGitRepo } from '../utils/git.js';
6
+ import { POST_COMMIT_HOOK } from '../templates/post-commit.js';
7
+ import { getRepoInfo, setGitHubUsername, getGitHubUsername, setPrivateRepo } from '../config.js';
8
8
 
9
9
  async function isRepoPublic(owner: string, repo: string): Promise<boolean | null> {
10
10
  try {
@@ -1,8 +1,8 @@
1
- import { detectPattern } from '../patterns';
2
- import { animateSlotMachine, animateSmallMode } from '../animation/slotMachine';
3
- import { getBalance, updateBalance, setBalance } from '../balance';
4
- import { sendPlayToAPI } from '../api';
5
- import { getRepoInfo, getGitHubUsername } from '../config';
1
+ import { detectPattern } from '../patterns.js';
2
+ import { animateSlotMachine, animateSmallMode } from '../animation/slotMachine.js';
3
+ import { getBalance, updateBalance, setBalance } from '../balance.js';
4
+ import { sendPlayToAPI } from '../api.js';
5
+ import { getRepoInfo, getGitHubUsername } from '../config.js';
6
6
  import chalk from 'chalk';
7
7
 
8
8
  interface PlayOptions {
@@ -1,5 +1,5 @@
1
- import { getCurrentCommitHash, getCurrentCommitFullHash } from '../utils/git';
2
- import { playCommand } from './play';
1
+ import { getCurrentCommitHash, getCurrentCommitFullHash } from '../utils/git.js';
2
+ import { playCommand } from './play.js';
3
3
 
4
4
  interface SpinOptions {
5
5
  small?: boolean;
@@ -1,6 +1,6 @@
1
1
  import chalk from 'chalk';
2
- import { getBalance as getApiBalance } from '../api';
3
- import { getBalance as getLocalBalance } from '../balance';
2
+ import { getBalance as getApiBalance } from '../api.js';
3
+ import { getBalance as getLocalBalance } from '../balance.js';
4
4
 
5
5
  export async function syncCommand(): Promise<void> {
6
6
  try {
@@ -1,4 +1,4 @@
1
- import { playCommand } from './play';
1
+ import { playCommand } from './play.js';
2
2
 
3
3
  interface TestOptions {
4
4
  small?: boolean;
package/src/index.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { Command } from 'commander';
4
- import { playCommand } from './commands/play';
5
- import { spinCommand } from './commands/spin';
6
- import { initCommand } from './commands/init';
7
- import { balanceCommand } from './commands/balance';
8
- import { testCommand } from './commands/test';
9
- import { authLoginCommand, authLogoutCommand, authStatusCommand } from './commands/auth';
10
- import { syncCommand } from './commands/sync';
11
- import { configGetCommand, configSetCommand } from './commands/config';
4
+ import { playCommand } from './commands/play.js';
5
+ import { spinCommand } from './commands/spin.js';
6
+ import { initCommand } from './commands/init.js';
7
+ import { balanceCommand } from './commands/balance.js';
8
+ import { testCommand } from './commands/test.js';
9
+ import { authLoginCommand, authLogoutCommand, authStatusCommand } from './commands/auth.js';
10
+ import { syncCommand } from './commands/sync.js';
11
+ import { configGetCommand, configSetCommand } from './commands/config.js';
12
12
 
13
13
  const program = new Command();
14
14
 
@@ -1,4 +1,4 @@
1
- import { detectPattern, PatternType } from './patterns';
1
+ import { detectPattern, PatternType } from './patterns.js';
2
2
 
3
3
  describe('Pattern Detection', () => {
4
4
  it('detects all same character', () => {
package/tsconfig.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2022",
4
- "module": "commonjs",
4
+ "module": "ES2022",
5
+ "moduleResolution": "node",
5
6
  "lib": ["ES2022"],
6
7
  "outDir": "./dist",
7
8
  "rootDir": "./src",