@loopstack/github-oauth-example 0.2.7 → 0.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"github-example.module.d.ts","sourceRoot":"","sources":["../src/github-example.module.ts"],"names":[],"mappings":"AAOA,qBAKa,mBAAmB;CAAG"}
1
+ {"version":3,"file":"github-example.module.d.ts","sourceRoot":"","sources":["../src/github-example.module.ts"],"names":[],"mappings":"AAMA,qBAKa,mBAAmB;CAAG"}
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.GitHubExampleModule = void 0;
10
10
  const common_1 = require("@nestjs/common");
11
11
  const claude_module_1 = require("@loopstack/claude-module");
12
- const core_1 = require("@loopstack/core");
13
12
  const github_module_1 = require("@loopstack/github-module");
14
13
  const tools_1 = require("./tools");
15
14
  const workflows_1 = require("./workflows");
@@ -18,7 +17,7 @@ let GitHubExampleModule = class GitHubExampleModule {
18
17
  exports.GitHubExampleModule = GitHubExampleModule;
19
18
  exports.GitHubExampleModule = GitHubExampleModule = __decorate([
20
19
  (0, common_1.Module)({
21
- imports: [core_1.LoopCoreModule, claude_module_1.ClaudeModule, github_module_1.GitHubModule],
20
+ imports: [claude_module_1.ClaudeModule, github_module_1.GitHubModule],
22
21
  providers: [tools_1.AuthenticateGitHubTask, workflows_1.GitHubReposOverviewWorkflow, workflows_1.GitHubAgentWorkflow],
23
22
  exports: [tools_1.AuthenticateGitHubTask, workflows_1.GitHubReposOverviewWorkflow, workflows_1.GitHubAgentWorkflow],
24
23
  })
@@ -1 +1 @@
1
- {"version":3,"file":"github-example.module.js","sourceRoot":"","sources":["../src/github-example.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,4DAAwD;AACxD,0CAAiD;AACjD,4DAAwD;AACxD,mCAAiD;AACjD,2CAA+E;AAOxE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAL/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,qBAAc,EAAE,4BAAY,EAAE,4BAAY,CAAC;QACrD,SAAS,EAAE,CAAC,8BAAsB,EAAE,uCAA2B,EAAE,+BAAmB,CAAC;QACrF,OAAO,EAAE,CAAC,8BAAsB,EAAE,uCAA2B,EAAE,+BAAmB,CAAC;KACpF,CAAC;GACW,mBAAmB,CAAG"}
1
+ {"version":3,"file":"github-example.module.js","sourceRoot":"","sources":["../src/github-example.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,4DAAwD;AACxD,4DAAwD;AACxD,mCAAiD;AACjD,2CAA+E;AAOxE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAL/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,4BAAY,EAAE,4BAAY,CAAC;QACrC,SAAS,EAAE,CAAC,8BAAsB,EAAE,uCAA2B,EAAE,+BAAmB,CAAC;QACrF,OAAO,EAAE,CAAC,8BAAsB,EAAE,uCAA2B,EAAE,+BAAmB,CAAC;KACpF,CAAC;GACW,mBAAmB,CAAG"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "loopstack",
9
9
  "oauth"
10
10
  ],
11
- "version": "0.2.7",
11
+ "version": "0.3.0",
12
12
  "license": "MIT",
13
13
  "author": {
14
14
  "name": "Jakob Klippel",
@@ -25,16 +25,16 @@
25
25
  "compile": "tsc --noEmit",
26
26
  "format": "prettier --write .",
27
27
  "lint": "eslint .",
28
- "test": "jest --passWithNoTests",
28
+ "test": "vitest run",
29
29
  "watch": "nest build --watch"
30
30
  },
31
31
  "dependencies": {
32
- "@loopstack/claude-module": "^0.23.0",
33
- "@loopstack/llm-provider-module": "^0.2.0",
34
- "@loopstack/common": "^0.29.0",
35
- "@loopstack/core": "^0.29.0",
36
- "@loopstack/github-module": "^0.2.5",
37
- "@loopstack/oauth-module": "^0.2.7",
32
+ "@loopstack/claude-module": "^0.24.0",
33
+ "@loopstack/llm-provider-module": "^0.3.0",
34
+ "@loopstack/common": "^0.30.0",
35
+ "@loopstack/core": "^0.30.0",
36
+ "@loopstack/github-module": "^0.3.0",
37
+ "@loopstack/oauth-module": "^0.3.0",
38
38
  "@nestjs/common": "^11.1.19",
39
39
  "zod": "^4.3.6"
40
40
  },
@@ -42,39 +42,9 @@
42
42
  "dist",
43
43
  "src"
44
44
  ],
45
- "jest": {
46
- "testEnvironment": "node",
47
- "rootDir": "src",
48
- "testRegex": ".*\\.spec\\.ts$",
49
- "transform": {
50
- "^.+\\.ts$": "ts-jest"
51
- },
52
- "testTimeout": 10000,
53
- "forceExit": true,
54
- "maxWorkers": 1
55
- },
56
- "loopstack": {
57
- "modules": [
58
- {
59
- "path": "src/github-example.module.ts",
60
- "className": "GitHubExampleModule"
61
- }
62
- ],
63
- "workflows": [
64
- {
65
- "path": "src/workflows/github-repos-overview.workflow.ts",
66
- "className": "GitHubReposOverviewWorkflow",
67
- "propertyName": "gitHubReposOverview"
68
- },
69
- {
70
- "path": "src/workflows/github-agent.workflow.ts",
71
- "className": "GitHubAgentWorkflow",
72
- "propertyName": "gitHubAgent"
73
- }
74
- ],
75
- "installModes": [
76
- "add",
77
- "install"
78
- ]
45
+ "devDependencies": {
46
+ "vitest": "^4.1.6",
47
+ "@swc/core": "^1.15.33",
48
+ "unplugin-swc": "^1.5.9"
79
49
  }
80
50
  }
@@ -1,12 +1,11 @@
1
1
  import { Module } from '@nestjs/common';
2
2
  import { ClaudeModule } from '@loopstack/claude-module';
3
- import { LoopCoreModule } from '@loopstack/core';
4
3
  import { GitHubModule } from '@loopstack/github-module';
5
4
  import { AuthenticateGitHubTask } from './tools';
6
5
  import { GitHubAgentWorkflow, GitHubReposOverviewWorkflow } from './workflows';
7
6
 
8
7
  @Module({
9
- imports: [LoopCoreModule, ClaudeModule, GitHubModule],
8
+ imports: [ClaudeModule, GitHubModule],
10
9
  providers: [AuthenticateGitHubTask, GitHubReposOverviewWorkflow, GitHubAgentWorkflow],
11
10
  exports: [AuthenticateGitHubTask, GitHubReposOverviewWorkflow, GitHubAgentWorkflow],
12
11
  })
@@ -1,7 +1,8 @@
1
1
  import { TestingModule } from '@nestjs/testing';
2
+ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2
3
  import { z } from 'zod';
3
4
  import { RunContext, WorkflowEntity, getBlockArgsSchema, getBlockConfig, getBlockTools } from '@loopstack/common';
4
- import { LoopCoreModule, WorkflowProcessorService } from '@loopstack/core';
5
+ import { WorkflowProcessorService } from '@loopstack/core';
5
6
  import {
6
7
  GitHubCreateIssueCommentTool,
7
8
  GitHubCreateIssueTool,
@@ -34,7 +35,7 @@ import { ToolMock, createStatelessContext, createWorkflowTest } from '@loopstack
34
35
  import { GitHubReposOverviewWorkflow } from '../github-repos-overview.workflow';
35
36
 
36
37
  const mockOAuthWorkflow = {
37
- run: jest.fn(),
38
+ run: vi.fn(),
38
39
  };
39
40
 
40
41
  function applyAllGitHubToolMocks(builder: ReturnType<typeof createWorkflowTest>) {
@@ -70,7 +71,7 @@ function buildWorkflowTest() {
70
71
  return applyAllGitHubToolMocks(
71
72
  createWorkflowTest()
72
73
  .forWorkflow(GitHubReposOverviewWorkflow)
73
- .withImports(LoopCoreModule, OAuthModule)
74
+ .withImports(OAuthModule)
74
75
  .withMock(OAuthWorkflow, mockOAuthWorkflow),
75
76
  );
76
77
  }
@@ -91,7 +92,7 @@ describe('GitHubReposOverviewWorkflow', () => {
91
92
  let mockSearchCode: ToolMock;
92
93
 
93
94
  beforeEach(async () => {
94
- jest.clearAllMocks();
95
+ vi.clearAllMocks();
95
96
 
96
97
  module = await buildWorkflowTest().compile();
97
98
 
@@ -482,7 +483,7 @@ describe('GitHubReposOverviewWorkflow with existing entity', () => {
482
483
  const workflowId = '00000000-0000-0000-0000-000000000001';
483
484
  const args = { owner: 'octocat', repo: 'Hello-World' };
484
485
 
485
- jest.clearAllMocks();
486
+ vi.clearAllMocks();
486
487
 
487
488
  module = await buildWorkflowTest().compile();
488
489