@symbiosis-lab/moss-plugin-github 1.5.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 (38) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +18 -0
  3. package/assets/icon.svg +3 -0
  4. package/assets/manifest.json +19 -0
  5. package/e2e/deploy-api.test.ts +1129 -0
  6. package/e2e/moss-cli.test.ts +478 -0
  7. package/features/auth/device-flow.feature +41 -0
  8. package/features/deploy/validation.feature +50 -0
  9. package/features/steps/auth.steps.ts +285 -0
  10. package/features/steps/deploy.steps.ts +354 -0
  11. package/package.json +51 -0
  12. package/src/__tests__/auth-flow.integration.test.ts +738 -0
  13. package/src/__tests__/auth.test.ts +147 -0
  14. package/src/__tests__/configure-domain.test.ts +263 -0
  15. package/src/__tests__/deploy.integration.test.ts +798 -0
  16. package/src/__tests__/git.test.ts +190 -0
  17. package/src/__tests__/github-api.test.ts +761 -0
  18. package/src/__tests__/github-deploy.test.ts +2411 -0
  19. package/src/__tests__/progress-timeout.test.ts +209 -0
  20. package/src/__tests__/repo-setup-progress.test.ts +367 -0
  21. package/src/__tests__/repo-setup.test.ts +370 -0
  22. package/src/__tests__/token.test.ts +152 -0
  23. package/src/__tests__/utils.test.ts +129 -0
  24. package/src/__tests__/workflow.test.ts +146 -0
  25. package/src/auth.ts +588 -0
  26. package/src/constants.ts +7 -0
  27. package/src/git.ts +60 -0
  28. package/src/github-api.ts +601 -0
  29. package/src/github-deploy.ts +593 -0
  30. package/src/main.ts +646 -0
  31. package/src/repo-setup.ts +685 -0
  32. package/src/token.ts +202 -0
  33. package/src/types.ts +91 -0
  34. package/src/utils.ts +108 -0
  35. package/src/workflow.ts +79 -0
  36. package/test-helpers/mock-github-api.ts +217 -0
  37. package/tsconfig.json +20 -0
  38. package/vitest.config.ts +50 -0
package/tsconfig.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2021",
4
+ "module": "ESNext",
5
+ "moduleResolution": "node",
6
+ "outDir": "./dist",
7
+ "rootDir": "./src",
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "removeComments": false,
13
+ "noUnusedLocals": true,
14
+ "noUnusedParameters": true,
15
+ "noImplicitReturns": true,
16
+ "noFallthroughCasesInSwitch": true
17
+ },
18
+ "include": ["src/**/*"],
19
+ "exclude": ["node_modules", "dist", "src/**/*.test.ts"]
20
+ }
@@ -0,0 +1,50 @@
1
+ import { createSocialPluginConfig } from "../vitest.shared.ts";
2
+
3
+ export default createSocialPluginConfig(import.meta.dirname, {
4
+ coverageExclude: ["src/**/*.test.ts", "src/__tests__/**", "src/types.ts"],
5
+ unitInclude: ["src/__tests__/*.test.ts"],
6
+ unitExclude: ["src/__tests__/*.integration.test.ts"],
7
+ unitEnvironment: "node",
8
+ unitGlobals: true,
9
+ extraProjects: [
10
+ {
11
+ extends: true,
12
+ test: {
13
+ name: "integration",
14
+ include: ["src/__tests__/*.integration.test.ts"],
15
+ environment: "happy-dom",
16
+ globals: true,
17
+ testTimeout: 30000,
18
+ },
19
+ },
20
+ {
21
+ extends: true,
22
+ test: {
23
+ name: "features",
24
+ include: ["features/steps/**/*.steps.ts"],
25
+ environment: "happy-dom",
26
+ testTimeout: 60000,
27
+ hookTimeout: 30000,
28
+ globals: true,
29
+ },
30
+ },
31
+ // E2E tests require a built moss binary and run in the dedicated E2E workflow.
32
+ // They are excluded from `test:coverage` to avoid failing in the plugin CI job.
33
+ // Run them explicitly via: vitest run --project e2e
34
+ ...(process.env.INCLUDE_E2E
35
+ ? [
36
+ {
37
+ extends: true,
38
+ test: {
39
+ name: "e2e",
40
+ include: ["e2e/**/*.test.ts"],
41
+ environment: "node",
42
+ testTimeout: 60000,
43
+ hookTimeout: 30000,
44
+ globals: true,
45
+ },
46
+ },
47
+ ]
48
+ : []),
49
+ ],
50
+ });