declastruct-github 1.0.2 → 1.0.4
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.
- package/dist/access/daos/DeclaredGithubBranchDao.d.ts +1 -1
- package/dist/access/daos/DeclaredGithubBranchProtectionDao.d.ts +1 -1
- package/dist/access/daos/DeclaredGithubRepoConfigDao.d.ts +1 -1
- package/dist/access/daos/DeclaredGithubRepoDao.d.ts +1 -1
- package/dist/access/sdks/getGithubClient.d.ts +3 -4
- package/dist/access/sdks/getGithubClient.js.map +1 -1
- package/dist/contract/sdks/index.d.ts +4 -4
- package/dist/contract/sdks/index.js +8 -8
- package/dist/contract/sdks/index.js.map +1 -1
- package/dist/domain/constants.d.ts +3 -0
- package/dist/domain/constants.js +5 -0
- package/dist/domain/constants.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubBranch.d.ts +1 -1
- package/dist/domain.objects/DeclaredGithubBranchProtection.d.ts +1 -1
- package/dist/domain.objects/DeclaredGithubRepo.d.ts +1 -1
- package/dist/domain.objects/DeclaredGithubRepoConfig.d.ts +1 -1
- package/dist/domain.objects/DeclastructGithubProvider.d.ts +6 -6
- package/dist/domain.operations/branch/castToDeclaredGithubBranch.d.ts +3 -3
- package/dist/domain.operations/branch/castToDeclaredGithubBranch.js.map +1 -1
- package/dist/domain.operations/branch/getBranch.d.ts +5 -5
- package/dist/domain.operations/branch/getBranchCommitShaByRepoDefault.d.ts +4 -4
- package/dist/domain.operations/branch/getBranches.d.ts +6 -6
- package/dist/domain.operations/branch/setBranch.d.ts +4 -4
- package/dist/domain.operations/branchProtection/castToDeclaredGithubBranchProtection.d.ts +3 -3
- package/dist/domain.operations/branchProtection/castToDeclaredGithubBranchProtection.js.map +1 -1
- package/dist/domain.operations/branchProtection/getBranchProtection.d.ts +5 -5
- package/dist/domain.operations/branchProtection/setBranchProtection.d.ts +4 -4
- package/dist/domain.operations/provider/getDeclastructGithubProvider.d.ts +1 -1
- package/dist/domain.operations/repo/castToDeclaredGithubRepo.d.ts +2 -2
- package/dist/domain.operations/repo/castToDeclaredGithubRepo.js.map +1 -1
- package/dist/domain.operations/repo/getRepo.d.ts +5 -5
- package/dist/domain.operations/repo/getRepos.d.ts +4 -4
- package/dist/domain.operations/repo/setRepo.d.ts +4 -4
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.d.ts +3 -3
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.js.map +1 -1
- package/dist/domain.operations/repoConfig/getRepoConfig.d.ts +5 -5
- package/dist/domain.operations/repoConfig/setRepoConfig.d.ts +4 -4
- package/license.md +21 -0
- package/package.json +34 -39
- package/dist/.test/assets/getSampleGithubContext.d.ts +0 -6
- package/dist/.test/assets/getSampleGithubContext.js +0 -18
- package/dist/.test/assets/getSampleGithubContext.js.map +0 -1
- package/dist/.test/assets/getSampleRepo.d.ts +0 -9
- package/dist/.test/assets/getSampleRepo.js +0 -16
- package/dist/.test/assets/getSampleRepo.js.map +0 -1
- package/dist/contract/sdks/declastruct.acceptance.test.d.ts +0 -1
- package/dist/contract/sdks/declastruct.acceptance.test.js +0 -104
- package/dist/contract/sdks/declastruct.acceptance.test.js.map +0 -1
- package/dist/domain.operations/branch/getBranch.integration.test.d.ts +0 -1
- package/dist/domain.operations/branch/getBranch.integration.test.js +0 -59
- package/dist/domain.operations/branch/getBranch.integration.test.js.map +0 -1
- package/dist/domain.operations/branch/getBranches.integration.test.d.ts +0 -1
- package/dist/domain.operations/branch/getBranches.integration.test.js +0 -40
- package/dist/domain.operations/branch/getBranches.integration.test.js.map +0 -1
- package/dist/domain.operations/branch/setBranch.integration.test.d.ts +0 -1
- package/dist/domain.operations/branch/setBranch.integration.test.js +0 -65
- package/dist/domain.operations/branch/setBranch.integration.test.js.map +0 -1
- package/dist/domain.operations/branch/setBranch.test.d.ts +0 -1
- package/dist/domain.operations/branch/setBranch.test.js +0 -151
- package/dist/domain.operations/branch/setBranch.test.js.map +0 -1
- package/dist/domain.operations/branchProtection/getBranchProtection.integration.test.d.ts +0 -1
- package/dist/domain.operations/branchProtection/getBranchProtection.integration.test.js +0 -63
- package/dist/domain.operations/branchProtection/getBranchProtection.integration.test.js.map +0 -1
- package/dist/domain.operations/branchProtection/setBranchProtection.integration.test.d.ts +0 -1
- package/dist/domain.operations/branchProtection/setBranchProtection.integration.test.js +0 -96
- package/dist/domain.operations/branchProtection/setBranchProtection.integration.test.js.map +0 -1
- package/dist/domain.operations/branchProtection/setBranchProtection.test.d.ts +0 -1
- package/dist/domain.operations/branchProtection/setBranchProtection.test.js +0 -173
- package/dist/domain.operations/branchProtection/setBranchProtection.test.js.map +0 -1
- package/dist/domain.operations/provider/getDeclastructGithubProvider.integration.test.d.ts +0 -1
- package/dist/domain.operations/provider/getDeclastructGithubProvider.integration.test.js +0 -212
- package/dist/domain.operations/provider/getDeclastructGithubProvider.integration.test.js.map +0 -1
- package/dist/domain.operations/repo/getRepo.integration.test.d.ts +0 -1
- package/dist/domain.operations/repo/getRepo.integration.test.js +0 -45
- package/dist/domain.operations/repo/getRepo.integration.test.js.map +0 -1
- package/dist/domain.operations/repo/getRepos.integration.test.d.ts +0 -1
- package/dist/domain.operations/repo/getRepos.integration.test.js +0 -28
- package/dist/domain.operations/repo/getRepos.integration.test.js.map +0 -1
- package/dist/domain.operations/repo/setRepo.integration.test.d.ts +0 -1
- package/dist/domain.operations/repo/setRepo.integration.test.js +0 -29
- package/dist/domain.operations/repo/setRepo.integration.test.js.map +0 -1
- package/dist/domain.operations/repo/setRepo.test.d.ts +0 -1
- package/dist/domain.operations/repo/setRepo.test.js +0 -150
- package/dist/domain.operations/repo/setRepo.test.js.map +0 -1
- package/dist/domain.operations/repoConfig/getRepoConfig.integration.test.d.ts +0 -1
- package/dist/domain.operations/repoConfig/getRepoConfig.integration.test.js +0 -55
- package/dist/domain.operations/repoConfig/getRepoConfig.integration.test.js.map +0 -1
- package/dist/domain.operations/repoConfig/setRepoConfig.integration.test.d.ts +0 -1
- package/dist/domain.operations/repoConfig/setRepoConfig.integration.test.js +0 -87
- package/dist/domain.operations/repoConfig/setRepoConfig.integration.test.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeclastructDao } from 'declastruct';
|
|
2
2
|
import type { ContextLogTrail } from 'simple-log-methods';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
4
|
import { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
5
5
|
/**
|
|
6
6
|
* .what = declastruct DAO for github branch resources
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeclastructDao } from 'declastruct';
|
|
2
2
|
import type { ContextLogTrail } from 'simple-log-methods';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
4
|
import { DeclaredGithubBranchProtection } from '../../domain.objects/DeclaredGithubBranchProtection';
|
|
5
5
|
/**
|
|
6
6
|
* .what = declastruct DAO for github branch protection resources
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeclastructDao } from 'declastruct';
|
|
2
2
|
import type { ContextLogTrail } from 'simple-log-methods';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
4
|
import { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
5
5
|
/**
|
|
6
6
|
* .what = declastruct DAO for github repository configuration resources
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeclastructDao } from 'declastruct';
|
|
2
2
|
import type { ContextLogTrail } from 'simple-log-methods';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
4
|
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
5
5
|
/**
|
|
6
6
|
* .what = declastruct DAO for github repository resources
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Octokit } from '@octokit/rest';
|
|
2
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
2
3
|
/**
|
|
3
4
|
* .what = returns a cached GitHub API client instance
|
|
4
5
|
* .why = prevents redundant Octokit instantiation while maintaining proper auth context
|
|
5
6
|
*/
|
|
6
|
-
export declare const getGithubClient: (input: unknown, context: ContextGithubApi) =>
|
|
7
|
-
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
|
|
8
|
-
};
|
|
7
|
+
export declare const getGithubClient: (input: unknown, context: ContextGithubApi) => Octokit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGithubClient.js","sourceRoot":"","sources":["../../../src/access/sdks/getGithubClient.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,mDAAyD;AACzD,mEAAqD;AACrD,uCAAgC;AAChC,yDAAoD;AAIpD;;;GAGG;AACU,QAAA,eAAe,
|
|
1
|
+
{"version":3,"file":"getGithubClient.js","sourceRoot":"","sources":["../../../src/access/sdks/getGithubClient.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,mDAAyD;AACzD,mEAAqD;AACrD,uCAAgC;AAChC,yDAAoD;AAIpD;;;GAGG;AACU,QAAA,eAAe,GAGb,IAAA,mCAAe,EAC5B,CAAC,KAAc,EAAE,OAAyB,EAAE,EAAE,CAC5C,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAC7C;IACE,KAAK,EAAE,IAAA,oCAAW,GAAE;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAClB,OAAO,CAAC,MAAM,EAAE,KAAK;YACrB,wCAAuB,CAAC,KAAK,CAAC,uCAAuC,EAAE;gBACrE,QAAQ,EAAE,IAAA,eAAI,EAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;aACpC,CAAC;KACL;CACF,CACF,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* .what = public SDK exports for declastruct-github package
|
|
3
3
|
* .why = enables consumers to use the declastruct provider interface and domain objects
|
|
4
4
|
*/
|
|
5
|
-
export { getDeclastructGithubProvider } from '../../domain.operations/provider/getDeclastructGithubProvider';
|
|
6
|
-
export type { DeclastructGithubProvider } from '../../domain.objects/DeclastructGithubProvider';
|
|
7
|
-
export { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
8
5
|
export { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
9
|
-
export { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
10
6
|
export { DeclaredGithubBranchProtection } from '../../domain.objects/DeclaredGithubBranchProtection';
|
|
7
|
+
export { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
8
|
+
export { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
9
|
+
export type { DeclastructGithubProvider } from '../../domain.objects/DeclastructGithubProvider';
|
|
10
|
+
export { getDeclastructGithubProvider } from '../../domain.operations/provider/getDeclastructGithubProvider';
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
* .why = enables consumers to use the declastruct provider interface and domain objects
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
exports.getDeclastructGithubProvider = exports.DeclaredGithubRepoConfig = exports.DeclaredGithubRepo = exports.DeclaredGithubBranchProtection = exports.DeclaredGithubBranch = void 0;
|
|
8
|
+
var DeclaredGithubBranch_1 = require("../../domain.objects/DeclaredGithubBranch");
|
|
9
|
+
Object.defineProperty(exports, "DeclaredGithubBranch", { enumerable: true, get: function () { return DeclaredGithubBranch_1.DeclaredGithubBranch; } });
|
|
10
|
+
var DeclaredGithubBranchProtection_1 = require("../../domain.objects/DeclaredGithubBranchProtection");
|
|
11
|
+
Object.defineProperty(exports, "DeclaredGithubBranchProtection", { enumerable: true, get: function () { return DeclaredGithubBranchProtection_1.DeclaredGithubBranchProtection; } });
|
|
11
12
|
// domain objects
|
|
12
13
|
var DeclaredGithubRepo_1 = require("../../domain.objects/DeclaredGithubRepo");
|
|
13
14
|
Object.defineProperty(exports, "DeclaredGithubRepo", { enumerable: true, get: function () { return DeclaredGithubRepo_1.DeclaredGithubRepo; } });
|
|
14
|
-
var DeclaredGithubBranch_1 = require("../../domain.objects/DeclaredGithubBranch");
|
|
15
|
-
Object.defineProperty(exports, "DeclaredGithubBranch", { enumerable: true, get: function () { return DeclaredGithubBranch_1.DeclaredGithubBranch; } });
|
|
16
15
|
var DeclaredGithubRepoConfig_1 = require("../../domain.objects/DeclaredGithubRepoConfig");
|
|
17
16
|
Object.defineProperty(exports, "DeclaredGithubRepoConfig", { enumerable: true, get: function () { return DeclaredGithubRepoConfig_1.DeclaredGithubRepoConfig; } });
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
// provider
|
|
18
|
+
var getDeclastructGithubProvider_1 = require("../../domain.operations/provider/getDeclastructGithubProvider");
|
|
19
|
+
Object.defineProperty(exports, "getDeclastructGithubProvider", { enumerable: true, get: function () { return getDeclastructGithubProvider_1.getDeclastructGithubProvider; } });
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/sdks/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/sdks/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kFAAiF;AAAxE,4HAAA,oBAAoB,OAAA;AAC7B,sGAAqG;AAA5F,gJAAA,8BAA8B,OAAA;AAEvC,iBAAiB;AACjB,8EAA6E;AAApE,wHAAA,kBAAkB,OAAA;AAC3B,0FAAyF;AAAhF,oIAAA,wBAAwB,OAAA;AAEjC,WAAW;AACX,8GAA6G;AAApG,4IAAA,4BAA4B,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/domain/constants.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DomainEntity, RefByUnique } from 'domain-objects';
|
|
2
|
-
import { DeclaredGithubRepo } from './DeclaredGithubRepo';
|
|
2
|
+
import type { DeclaredGithubRepo } from './DeclaredGithubRepo';
|
|
3
3
|
/**
|
|
4
4
|
* .what = a declarative structure which represents a GitHub branch
|
|
5
5
|
* .why = enables declarative management of GitHub branches following declastruct patterns
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DomainEntity, DomainLiteral, RefByUnique } from 'domain-objects';
|
|
2
|
-
import { DeclaredGithubBranch } from './DeclaredGithubBranch';
|
|
2
|
+
import type { DeclaredGithubBranch } from './DeclaredGithubBranch';
|
|
3
3
|
/**
|
|
4
4
|
* .what = a declarative structure which represents GitHub branch protection rules
|
|
5
5
|
* .why = enables declarative management of branch protection settings following declastruct patterns
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DomainEntity, RefByUnique } from 'domain-objects';
|
|
2
|
-
import { DeclaredGithubRepo } from './DeclaredGithubRepo';
|
|
2
|
+
import type { DeclaredGithubRepo } from './DeclaredGithubRepo';
|
|
3
3
|
/**
|
|
4
4
|
* .what = a declarative structure which represents a GitHub repository's configuration
|
|
5
5
|
* .why = enables declarative management of GitHub repo config settings following declastruct patterns
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DeclastructDao, DeclastructProvider } from 'declastruct';
|
|
1
|
+
import type { DeclastructDao, DeclastructProvider } from 'declastruct';
|
|
2
2
|
import type { ContextLogTrail } from 'simple-log-methods';
|
|
3
|
-
import { ContextGithubApi } from './ContextGithubApi';
|
|
4
|
-
import { DeclaredGithubBranch } from './DeclaredGithubBranch';
|
|
5
|
-
import { DeclaredGithubBranchProtection } from './DeclaredGithubBranchProtection';
|
|
6
|
-
import { DeclaredGithubRepo } from './DeclaredGithubRepo';
|
|
7
|
-
import { DeclaredGithubRepoConfig } from './DeclaredGithubRepoConfig';
|
|
3
|
+
import type { ContextGithubApi } from './ContextGithubApi';
|
|
4
|
+
import type { DeclaredGithubBranch } from './DeclaredGithubBranch';
|
|
5
|
+
import type { DeclaredGithubBranchProtection } from './DeclaredGithubBranchProtection';
|
|
6
|
+
import type { DeclaredGithubRepo } from './DeclaredGithubRepo';
|
|
7
|
+
import type { DeclaredGithubRepoConfig } from './DeclaredGithubRepoConfig';
|
|
8
8
|
/**
|
|
9
9
|
* .what = the declastruct provider for github resources
|
|
10
10
|
* .why = provides type safety and reusability for the github provider
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Endpoints } from '@octokit/types';
|
|
2
|
-
import { RefByUnique } from 'domain-objects';
|
|
3
|
-
import { HasMetadata } from 'type-fns';
|
|
1
|
+
import type { Endpoints } from '@octokit/types';
|
|
2
|
+
import { type RefByUnique } from 'domain-objects';
|
|
3
|
+
import { type HasMetadata } from 'type-fns';
|
|
4
4
|
import { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
5
5
|
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
6
6
|
type GithubBranchResponse = Endpoints['GET /repos/{owner}/{repo}/branches/{branch}']['response']['data'] | Endpoints['GET /repos/{owner}/{repo}/branches']['response']['data'][number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castToDeclaredGithubBranch.js","sourceRoot":"","sources":["../../../src/domain.operations/branch/castToDeclaredGithubBranch.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"castToDeclaredGithubBranch.js","sourceRoot":"","sources":["../../../src/domain.operations/branch/castToDeclaredGithubBranch.ts"],"names":[],"mappings":";;;AACA,mDAA+D;AAC/D,mDAAyD;AACzD,uCAA+E;AAE/E,oFAAiF;AACjF,gFAA6E;AAE7E;;;GAGG;AACH,MAAM,UAAU,GAAG,CACjB,GAAM,EACN,GAAM,EACc,EAAE;IACtB,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IAEvB,kCAAkC;IAClC,IAAI,IAAA,yBAAc,EAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAExC,uBAAuB;IACvB,wCAAuB,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,wBAAwB,EAAE;QACpE,KAAK,EAAE,GAAG;QACV,GAAG;KACJ,CAAC,CAAC;AACL,CAAC,CAAC;AAMF;;;GAGG;AACI,MAAM,0BAA0B,GAAG,CAAC,KAG1C,EAAqC,EAAE;IACtC,OAAO,2CAAoB,CAAC,EAAE,CAAC;QAC7B,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC;QACtC,IAAI,EACF,KAAK,CAAC,IAAI,YAAY,uCAAkB;YACtC,CAAC,CAAC,IAAA,4BAAW,EAA4B,KAAK,CAAC,IAAI,CAAC;YACpD,CAAC,CAAC,KAAK,CAAC,IAAI;QAChB,MAAM,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,EAAE;QACtE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS;KAClC,CAAsC,CAAC;AAC1C,CAAC,CAAC;AAbW,QAAA,0BAA0B,8BAarC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RefByUnique } from 'domain-objects';
|
|
2
|
-
import { HasMetadata, PickOne } from 'type-fns';
|
|
3
|
-
import { VisualogicContext } from 'visualogic';
|
|
4
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
-
import { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
1
|
+
import type { RefByUnique } from 'domain-objects';
|
|
2
|
+
import type { HasMetadata, PickOne } from 'type-fns';
|
|
3
|
+
import type { VisualogicContext } from 'visualogic';
|
|
4
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
+
import type { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
6
6
|
/**
|
|
7
7
|
* .what = gets a GitHub branch
|
|
8
8
|
* .why = retrieves current state of a branch from GitHub API for declarative management
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RefByUnique } from 'domain-objects';
|
|
2
|
-
import { VisualogicContext } from 'visualogic';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
-
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
1
|
+
import type { RefByUnique } from 'domain-objects';
|
|
2
|
+
import type { VisualogicContext } from 'visualogic';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
+
import type { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
5
5
|
/**
|
|
6
6
|
* .what = gets the commit SHA of a repository's default branch
|
|
7
7
|
* .why = enables creating branches from the default branch when no commit SHA is specified
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { RefByUnique } from 'domain-objects';
|
|
2
|
-
import { HasMetadata } from 'type-fns';
|
|
3
|
-
import { VisualogicContext } from 'visualogic';
|
|
4
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
-
import { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
6
|
-
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
1
|
+
import type { RefByUnique } from 'domain-objects';
|
|
2
|
+
import type { HasMetadata } from 'type-fns';
|
|
3
|
+
import type { VisualogicContext } from 'visualogic';
|
|
4
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
+
import type { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
6
|
+
import type { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
7
7
|
/**
|
|
8
8
|
* .what = lists GitHub branches for a repository
|
|
9
9
|
* .why = retrieves multiple branches from GitHub API for declarative management
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HasMetadata, PickOne } from 'type-fns';
|
|
2
|
-
import { VisualogicContext } from 'visualogic';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
-
import { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
1
|
+
import type { HasMetadata, PickOne } from 'type-fns';
|
|
2
|
+
import type { VisualogicContext } from 'visualogic';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
+
import type { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
5
5
|
/**
|
|
6
6
|
* .what = sets a GitHub branch: upsert or finsert
|
|
7
7
|
* .why = enables declarative creation and updates of branches following declastruct patterns
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Endpoints } from '@octokit/types';
|
|
2
|
-
import { RefByUnique } from 'domain-objects';
|
|
3
|
-
import { HasMetadata } from 'type-fns';
|
|
1
|
+
import type { Endpoints } from '@octokit/types';
|
|
2
|
+
import { type RefByUnique } from 'domain-objects';
|
|
3
|
+
import type { HasMetadata } from 'type-fns';
|
|
4
4
|
import { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
5
5
|
import { DeclaredGithubBranchProtection } from '../../domain.objects/DeclaredGithubBranchProtection';
|
|
6
6
|
export type GithubBranchProtectionResponse = Endpoints['GET /repos/{owner}/{repo}/branches/{branch}/protection']['response']['data'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castToDeclaredGithubBranchProtection.js","sourceRoot":"","sources":["../../../src/domain.operations/branchProtection/castToDeclaredGithubBranchProtection.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"castToDeclaredGithubBranchProtection.js","sourceRoot":"","sources":["../../../src/domain.operations/branchProtection/castToDeclaredGithubBranchProtection.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RefByUnique } from 'domain-objects';
|
|
2
|
-
import { HasMetadata, PickOne } from 'type-fns';
|
|
3
|
-
import { VisualogicContext } from 'visualogic';
|
|
4
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
-
import { DeclaredGithubBranchProtection } from '../../domain.objects/DeclaredGithubBranchProtection';
|
|
1
|
+
import type { RefByUnique } from 'domain-objects';
|
|
2
|
+
import type { HasMetadata, PickOne } from 'type-fns';
|
|
3
|
+
import type { VisualogicContext } from 'visualogic';
|
|
4
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
+
import type { DeclaredGithubBranchProtection } from '../../domain.objects/DeclaredGithubBranchProtection';
|
|
6
6
|
/**
|
|
7
7
|
* .what = gets a GitHub branch's protection rules
|
|
8
8
|
* .why = retrieves current protection state from GitHub API for declarative management
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HasMetadata, PickOne } from 'type-fns';
|
|
2
|
-
import { VisualogicContext } from 'visualogic';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
-
import { DeclaredGithubBranchProtection } from '../../domain.objects/DeclaredGithubBranchProtection';
|
|
1
|
+
import type { HasMetadata, PickOne } from 'type-fns';
|
|
2
|
+
import type { VisualogicContext } from 'visualogic';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
+
import type { DeclaredGithubBranchProtection } from '../../domain.objects/DeclaredGithubBranchProtection';
|
|
5
5
|
/**
|
|
6
6
|
* .what = sets a GitHub branch's protection rules: upsert or finsert
|
|
7
7
|
* .why = enables declarative updates of branch protection following declastruct patterns
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContextLogTrail } from 'simple-log-methods';
|
|
2
|
-
import { DeclastructGithubProvider } from '../../domain.objects/DeclastructGithubProvider';
|
|
2
|
+
import type { DeclastructGithubProvider } from '../../domain.objects/DeclastructGithubProvider';
|
|
3
3
|
/**
|
|
4
4
|
* .what = creates a declastruct provider for github resources
|
|
5
5
|
* .why = enables github resource management via declastruct framework
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Endpoints } from '@octokit/types';
|
|
2
|
-
import { HasMetadata } from 'type-fns';
|
|
1
|
+
import type { Endpoints } from '@octokit/types';
|
|
2
|
+
import { type HasMetadata } from 'type-fns';
|
|
3
3
|
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
4
4
|
type GithubRepoResponse = Endpoints['GET /repos/{owner}/{repo}']['response']['data'] | Endpoints['GET /user/repos']['response']['data'][number] | Endpoints['GET /orgs/{org}/repos']['response']['data'][number];
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castToDeclaredGithubRepo.js","sourceRoot":"","sources":["../../../src/domain.operations/repo/castToDeclaredGithubRepo.ts"],"names":[],"mappings":";;;AAAA,iDAAmD;AAEnD,mDAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"castToDeclaredGithubRepo.js","sourceRoot":"","sources":["../../../src/domain.operations/repo/castToDeclaredGithubRepo.ts"],"names":[],"mappings":";;;AAAA,iDAAmD;AAEnD,mDAAyD;AACzD,uCAA+E;AAE/E,gFAA6E;AAE7E;;;GAGG;AACH,MAAM,UAAU,GAAG,CACjB,GAAM,EACN,GAAM,EACc,EAAE;IACtB,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IAEvB,kCAAkC;IAClC,IAAI,IAAA,yBAAc,EAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAExC,uBAAuB;IACvB,wCAAuB,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,wBAAwB,EAAE;QACpE,KAAK,EAAE,GAAG;QACV,GAAG;KACJ,CAAC,CAAC;AACL,CAAC,CAAC;AAOF;;;GAGG;AACI,MAAM,wBAAwB,GAAG,CACtC,KAAyB,EACQ,EAAE;IACnC,MAAM,UAAU,GACb,KAAK,CAAC,UAAgD,IAAI,QAAQ,CAAC;IAEtE,OAAO,uCAAkB,CAAC,EAAE,CAAC;QAC3B,EAAE,EAAE,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC;QAC3B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QACtD,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,IAAI;QACtC,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,IAAI;QAChC,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,UAAU,KAAK,QAAQ;QACjD,UAAU;QACV,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;QACjC,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,wBAAa,EAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;QACzE,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,wBAAa,EAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;KAC1E,CAAoC,CAAC;AACxC,CAAC,CAAC;AAlBW,QAAA,wBAAwB,4BAkBnC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RefByUnique } from 'domain-objects';
|
|
2
|
-
import { HasMetadata, PickOne } from 'type-fns';
|
|
3
|
-
import { VisualogicContext } from 'visualogic';
|
|
4
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
-
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
1
|
+
import type { RefByUnique } from 'domain-objects';
|
|
2
|
+
import type { HasMetadata, PickOne } from 'type-fns';
|
|
3
|
+
import type { VisualogicContext } from 'visualogic';
|
|
4
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
+
import type { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
6
6
|
/**
|
|
7
7
|
* .what = gets a GitHub repository
|
|
8
8
|
* .why = retrieves current state of a repo from GitHub API for declarative management
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HasMetadata } from 'type-fns';
|
|
2
|
-
import { VisualogicContext } from 'visualogic';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
-
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
1
|
+
import type { HasMetadata } from 'type-fns';
|
|
2
|
+
import type { VisualogicContext } from 'visualogic';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
+
import type { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
5
5
|
/**
|
|
6
6
|
* .what = lists GitHub repositories
|
|
7
7
|
* .why = retrieves multiple repos from GitHub API for declarative management
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HasMetadata, PickOne } from 'type-fns';
|
|
2
|
-
import { VisualogicContext } from 'visualogic';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
-
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
1
|
+
import type { HasMetadata, PickOne } from 'type-fns';
|
|
2
|
+
import type { VisualogicContext } from 'visualogic';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
+
import type { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
5
5
|
/**
|
|
6
6
|
* .what = sets a GitHub repository: upsert or finsert
|
|
7
7
|
* .why = enables declarative creation and updates of repos following declastruct patterns
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Endpoints } from '@octokit/types';
|
|
2
|
-
import { RefByUnique } from 'domain-objects';
|
|
3
|
-
import { HasMetadata } from 'type-fns';
|
|
1
|
+
import type { Endpoints } from '@octokit/types';
|
|
2
|
+
import { type RefByUnique } from 'domain-objects';
|
|
3
|
+
import type { HasMetadata } from 'type-fns';
|
|
4
4
|
import { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
5
5
|
import { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
6
6
|
type GithubRepoResponse = Endpoints['GET /repos/{owner}/{repo}']['response']['data'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castToDeclaredGithubRepoConfig.js","sourceRoot":"","sources":["../../../src/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"castToDeclaredGithubRepoConfig.js","sourceRoot":"","sources":["../../../src/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.ts"],"names":[],"mappings":";;;AACA,mDAA+D;AAG/D,gFAA6E;AAC7E,4FAAyF;AAKzF;;;GAGG;AACI,MAAM,8BAA8B,GAAG,CAAC,KAG9C,EAAyC,EAAE;IAC1C,OAAO,mDAAwB,CAAC,EAAE,CAAC;QACjC,IAAI,EACF,KAAK,CAAC,IAAI,YAAY,uCAAkB;YACtC,CAAC,CAAC,IAAA,4BAAW,EAA4B,KAAK,CAAC,IAAI,CAAC;YACpD,CAAC,CAAC,KAAK,CAAC,IAAI;QAChB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU;QACpC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,YAAY;QACxC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ;QAChC,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa;QAC1C,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,WAAW;QACtC,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,cAAc;QAC5C,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB;QACnD,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB;QACnD,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB;QACnD,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,gBAAgB;QAC/C,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,sBAAsB;QAC1D,iBAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,mBAAmB;QACrD,sBAAsB,EAAE,KAAK,CAAC,QAAQ,CAAC,yBAG1B;QACb,wBAAwB,EAAE,KAAK,CAAC,QAAQ,CAAC,2BAI5B;QACb,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAGpB;QACb,kBAAkB,EAAE,KAAK,CAAC,QAAQ,CAAC,oBAItB;QACb,wBAAwB,EAAE,KAAK,CAAC,QAAQ,CAAC,2BAA2B;KACrE,CAA0C,CAAC;AAC9C,CAAC,CAAC;AAzCW,QAAA,8BAA8B,kCAyCzC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RefByUnique } from 'domain-objects';
|
|
2
|
-
import { HasMetadata, PickOne } from 'type-fns';
|
|
3
|
-
import { VisualogicContext } from 'visualogic';
|
|
4
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
-
import { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
1
|
+
import type { RefByUnique } from 'domain-objects';
|
|
2
|
+
import type { HasMetadata, PickOne } from 'type-fns';
|
|
3
|
+
import type { VisualogicContext } from 'visualogic';
|
|
4
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
5
|
+
import type { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
6
6
|
/**
|
|
7
7
|
* .what = gets a GitHub repository's configuration
|
|
8
8
|
* .why = retrieves current config state of a repo from GitHub API for declarative management
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HasMetadata, PickOne } from 'type-fns';
|
|
2
|
-
import { VisualogicContext } from 'visualogic';
|
|
3
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
-
import { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
1
|
+
import type { HasMetadata, PickOne } from 'type-fns';
|
|
2
|
+
import type { VisualogicContext } from 'visualogic';
|
|
3
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
4
|
+
import type { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
5
5
|
/**
|
|
6
6
|
* .what = sets a GitHub repository's configuration: upsert or finsert
|
|
7
7
|
* .why = enables declarative updates of repo config following declastruct patterns
|
package/license.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 ehmpathy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "declastruct-github",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "declarative control of GitHub constructs via declastruct - manage repos, branches, and protection rules",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.4",
|
|
6
6
|
"repository": "ehmpathy/declastruct-github",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/declastruct-github",
|
|
8
8
|
"keywords": [
|
|
@@ -26,21 +26,22 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build:ts": "tsc -p ./tsconfig.build.json",
|
|
28
28
|
"commit:with-cli": "npx cz",
|
|
29
|
-
"fix:format:
|
|
30
|
-
"fix:format": "npm run fix:format:
|
|
31
|
-
"fix:lint": "
|
|
29
|
+
"fix:format:biome": "biome check --write src",
|
|
30
|
+
"fix:format": "npm run fix:format:biome",
|
|
31
|
+
"fix:lint": "biome check --write src",
|
|
32
32
|
"build:clean": "rm dist/ -rf",
|
|
33
33
|
"build:compile": "tsc -p ./tsconfig.build.json",
|
|
34
34
|
"build": "npm run build:clean && npm run build:compile",
|
|
35
35
|
"test:commits": "LAST_TAG=$(git describe --tags --abbrev=0 @^ 2> /dev/null || git rev-list --max-parents=0 HEAD) && npx commitlint --from $LAST_TAG --to HEAD --verbose",
|
|
36
|
-
"test:types": "tsc -p ./tsconfig.
|
|
37
|
-
"test:format
|
|
38
|
-
"test:
|
|
39
|
-
"test:
|
|
40
|
-
"test:lint:
|
|
41
|
-
"test:lint": "
|
|
36
|
+
"test:types": "tsc -p ./tsconfig.json --noEmit",
|
|
37
|
+
"test:format": "npm run test:format:biome",
|
|
38
|
+
"test:lint:deps": "npx depcheck -c ./.depcheckrc.yml",
|
|
39
|
+
"test:format:biome": "biome format src",
|
|
40
|
+
"test:lint:biome": "biome check src --diagnostic-level=error",
|
|
41
|
+
"test:lint:biome:all": "biome check src",
|
|
42
|
+
"test:lint": "npm run test:lint:biome && npm run test:lint:deps",
|
|
42
43
|
"test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
43
|
-
"test:integration": "
|
|
44
|
+
"test:integration": "jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
44
45
|
"test:acceptance:locally": "npm run build && LOCALLY=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
45
46
|
"test": "npm run test:commits && npm run test:types && npm run test:format && npm run test:lint && npm run test:unit && npm run test:integration && npm run test:acceptance:locally",
|
|
46
47
|
"test:acceptance": "npm run build && jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
@@ -48,57 +49,51 @@
|
|
|
48
49
|
"prepublish": "npm run build",
|
|
49
50
|
"preversion": "npm run prepush",
|
|
50
51
|
"postversion": "git push origin HEAD --tags --no-verify",
|
|
51
|
-
"
|
|
52
|
-
"prepare
|
|
52
|
+
"prepare:husky": "npx husky install && chmod ug+x .husky/*",
|
|
53
|
+
"prepare": "[ -d .git ] && npm run prepare:husky || exit 0"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
56
|
"@ehmpathy/uni-time": "1.7.4",
|
|
56
57
|
"@octokit/rest": "^21.0.0",
|
|
57
58
|
"as-procedure": "1.1.1",
|
|
58
|
-
"domain-objects": "0.
|
|
59
|
+
"domain-objects": "0.31.3",
|
|
59
60
|
"helpful-errors": "1.5.3",
|
|
60
61
|
"simple-in-memory-cache": "0.4.0",
|
|
61
|
-
"type-fns": "1.
|
|
62
|
+
"type-fns": "1.21.0",
|
|
62
63
|
"visualogic": "1.3.2",
|
|
63
64
|
"with-simple-cache": "0.15.1"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@commitlint/
|
|
69
|
-
"@commitlint/config-conventional": "13.1.0",
|
|
67
|
+
"@biomejs/biome": "2.3.8",
|
|
68
|
+
"@commitlint/cli": "19.5.0",
|
|
69
|
+
"@commitlint/config-conventional": "19.5.0",
|
|
70
70
|
"@octokit/types": "13.10.0",
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"
|
|
77
|
-
"core-js": "3.26.1",
|
|
71
|
+
"@swc/core": "1.15.3",
|
|
72
|
+
"@swc/jest": "0.2.39",
|
|
73
|
+
"@tsconfig/node20": "20.1.5",
|
|
74
|
+
"@tsconfig/strictest": "2.0.5",
|
|
75
|
+
"@types/jest": "30.0.0",
|
|
76
|
+
"@types/node": "22.15.21",
|
|
78
77
|
"cz-conventional-changelog": "3.3.0",
|
|
79
|
-
"declapract": "0.12.
|
|
80
|
-
"declapract-typescript-ehmpathy": "0.
|
|
81
|
-
"declastruct": "1.
|
|
78
|
+
"declapract": "0.12.3",
|
|
79
|
+
"declapract-typescript-ehmpathy": "0.43.7",
|
|
80
|
+
"declastruct": "^1.4.0",
|
|
81
|
+
"declastruct-github": "^1.0.3",
|
|
82
82
|
"depcheck": "1.4.3",
|
|
83
|
-
"
|
|
84
|
-
"eslint-config-airbnb-typescript": "18.0.0",
|
|
85
|
-
"eslint-config-prettier": "8.5.0",
|
|
86
|
-
"eslint-plugin-import": "2.26.0",
|
|
87
|
-
"eslint-plugin-prettier": "4.2.1",
|
|
83
|
+
"esbuild-register": "3.6.0",
|
|
88
84
|
"husky": "8.0.3",
|
|
89
|
-
"jest": "
|
|
90
|
-
"prettier": "2.8.1",
|
|
85
|
+
"jest": "30.2.0",
|
|
91
86
|
"rhachet": "1.12.1",
|
|
92
87
|
"rhachet-roles-ehmpathy": "1.8.0",
|
|
93
88
|
"simple-log-methods": "0.6.2",
|
|
94
89
|
"test-fns": "1.5.0",
|
|
95
|
-
"
|
|
96
|
-
"ts-node": "10.9.2",
|
|
90
|
+
"tsx": "4.20.6",
|
|
97
91
|
"typescript": "5.4.5"
|
|
98
92
|
},
|
|
99
93
|
"config": {
|
|
100
94
|
"commitizen": {
|
|
101
95
|
"path": "./node_modules/cz-conventional-changelog"
|
|
102
96
|
}
|
|
103
|
-
}
|
|
97
|
+
},
|
|
98
|
+
"packageManager": "pnpm@10.24.0"
|
|
104
99
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
2
|
-
/**
|
|
3
|
-
* .what = provides sample GitHub context for testing
|
|
4
|
-
* .why = allows integration tests to access GitHub API with credentials from environment
|
|
5
|
-
*/
|
|
6
|
-
export declare const getSampleGithubContext: () => ContextGithubApi;
|