declastruct-github 1.0.7 → 1.2.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.
- package/dist/access/daos/DeclaredGithubAppDao.d.ts +8 -0
- package/dist/access/daos/DeclaredGithubAppDao.js +32 -0
- package/dist/access/daos/DeclaredGithubAppDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubAppInstallationDao.d.ts +9 -0
- package/dist/access/daos/DeclaredGithubAppInstallationDao.js +33 -0
- package/dist/access/daos/DeclaredGithubAppInstallationDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubBranchDao.js +4 -4
- package/dist/access/daos/DeclaredGithubBranchDao.js.map +1 -1
- package/dist/access/daos/DeclaredGithubBranchProtectionDao.js +4 -4
- package/dist/access/daos/DeclaredGithubBranchProtectionDao.js.map +1 -1
- package/dist/access/daos/DeclaredGithubOrgDao.d.ts +10 -0
- package/dist/access/daos/DeclaredGithubOrgDao.js +44 -0
- package/dist/access/daos/DeclaredGithubOrgDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubOrgMemberPrivilegesDao.d.ts +10 -0
- package/dist/access/daos/DeclaredGithubOrgMemberPrivilegesDao.js +44 -0
- package/dist/access/daos/DeclaredGithubOrgMemberPrivilegesDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubOrgSecretDao.d.ts +10 -0
- package/dist/access/daos/DeclaredGithubOrgSecretDao.js +47 -0
- package/dist/access/daos/DeclaredGithubOrgSecretDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubOrgVariableDao.d.ts +9 -0
- package/dist/access/daos/DeclaredGithubOrgVariableDao.js +46 -0
- package/dist/access/daos/DeclaredGithubOrgVariableDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubRepoConfigDao.js +4 -4
- package/dist/access/daos/DeclaredGithubRepoConfigDao.js.map +1 -1
- package/dist/access/daos/DeclaredGithubRepoDao.js +4 -4
- package/dist/access/daos/DeclaredGithubRepoDao.js.map +1 -1
- package/dist/contract/sdks/index.d.ts +8 -0
- package/dist/contract/sdks/index.js +18 -3
- package/dist/contract/sdks/index.js.map +1 -1
- package/dist/domain.objects/DeclaredGithubApp.d.ts +75 -0
- package/dist/domain.objects/DeclaredGithubApp.js +16 -0
- package/dist/domain.objects/DeclaredGithubApp.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubAppInstallation.d.ts +61 -0
- package/dist/domain.objects/DeclaredGithubAppInstallation.js +16 -0
- package/dist/domain.objects/DeclaredGithubAppInstallation.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubAppPermissions.d.ts +130 -0
- package/dist/domain.objects/DeclaredGithubAppPermissions.js +12 -0
- package/dist/domain.objects/DeclaredGithubAppPermissions.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOrg.d.ts +59 -0
- package/dist/domain.objects/DeclaredGithubOrg.js +15 -0
- package/dist/domain.objects/DeclaredGithubOrg.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOrgMemberPrivileges.d.ts +85 -0
- package/dist/domain.objects/DeclaredGithubOrgMemberPrivileges.js +13 -0
- package/dist/domain.objects/DeclaredGithubOrgMemberPrivileges.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOrgSecret.d.ts +63 -0
- package/dist/domain.objects/DeclaredGithubOrgSecret.js +14 -0
- package/dist/domain.objects/DeclaredGithubOrgSecret.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOrgVariable.d.ts +54 -0
- package/dist/domain.objects/DeclaredGithubOrgVariable.js +13 -0
- package/dist/domain.objects/DeclaredGithubOrgVariable.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOwner.d.ts +17 -0
- package/dist/domain.objects/DeclaredGithubOwner.js +8 -0
- package/dist/domain.objects/DeclaredGithubOwner.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubRepo.d.ts +1 -0
- package/dist/domain.objects/DeclaredGithubRepo.js +1 -0
- package/dist/domain.objects/DeclaredGithubRepo.js.map +1 -1
- package/dist/domain.objects/DeclaredGithubRepoConfig.d.ts +0 -4
- package/dist/domain.objects/DeclaredGithubRepoConfig.js.map +1 -1
- package/dist/domain.objects/DeclastructGithubProvider.d.ts +12 -0
- package/dist/domain.operations/app/castToDeclaredGithubApp.d.ts +12 -0
- package/dist/domain.operations/app/castToDeclaredGithubApp.js +134 -0
- package/dist/domain.operations/app/castToDeclaredGithubApp.js.map +1 -0
- package/dist/domain.operations/app/getOneApp.d.ts +15 -0
- package/dist/domain.operations/app/getOneApp.js +67 -0
- package/dist/domain.operations/app/getOneApp.js.map +1 -0
- package/dist/domain.operations/app/setApp.d.ts +13 -0
- package/dist/domain.operations/app/setApp.js +77 -0
- package/dist/domain.operations/app/setApp.js.map +1 -0
- package/dist/domain.operations/appInstallation/castToDeclaredGithubAppInstallation.d.ts +19 -0
- package/dist/domain.operations/appInstallation/castToDeclaredGithubAppInstallation.js +61 -0
- package/dist/domain.operations/appInstallation/castToDeclaredGithubAppInstallation.js.map +1 -0
- package/dist/domain.operations/appInstallation/deleteAppInstallation.d.ts +11 -0
- package/dist/domain.operations/appInstallation/deleteAppInstallation.js +30 -0
- package/dist/domain.operations/appInstallation/deleteAppInstallation.js.map +1 -0
- package/dist/domain.operations/appInstallation/getOneAppInstallation.d.ts +15 -0
- package/dist/domain.operations/appInstallation/getOneAppInstallation.js +92 -0
- package/dist/domain.operations/appInstallation/getOneAppInstallation.js.map +1 -0
- package/dist/domain.operations/appInstallation/setAppInstallation.d.ts +13 -0
- package/dist/domain.operations/appInstallation/setAppInstallation.js +131 -0
- package/dist/domain.operations/appInstallation/setAppInstallation.js.map +1 -0
- package/dist/domain.operations/branch/setBranch.js +19 -10
- package/dist/domain.operations/branch/setBranch.js.map +1 -1
- package/dist/domain.operations/context/hasContextWithAppToken.d.ts +6 -0
- package/dist/domain.operations/context/hasContextWithAppToken.js +15 -0
- package/dist/domain.operations/context/hasContextWithAppToken.js.map +1 -0
- package/dist/domain.operations/context/hasContextWithPatToken.d.ts +6 -0
- package/dist/domain.operations/context/hasContextWithPatToken.js +17 -0
- package/dist/domain.operations/context/hasContextWithPatToken.js.map +1 -0
- package/dist/domain.operations/org/castToDeclaredGithubOrg.d.ts +12 -0
- package/dist/domain.operations/org/castToDeclaredGithubOrg.js +29 -0
- package/dist/domain.operations/org/castToDeclaredGithubOrg.js.map +1 -0
- package/dist/domain.operations/org/getOneOrg.d.ts +14 -0
- package/dist/domain.operations/org/getOneOrg.js +31 -0
- package/dist/domain.operations/org/getOneOrg.js.map +1 -0
- package/dist/domain.operations/org/setOrg.d.ts +17 -0
- package/dist/domain.operations/org/setOrg.js +50 -0
- package/dist/domain.operations/org/setOrg.js.map +1 -0
- package/dist/domain.operations/orgMemberPrivileges/castToDeclaredGithubOrgMemberPrivileges.d.ts +15 -0
- package/dist/domain.operations/orgMemberPrivileges/castToDeclaredGithubOrgMemberPrivileges.js +47 -0
- package/dist/domain.operations/orgMemberPrivileges/castToDeclaredGithubOrgMemberPrivileges.js.map +1 -0
- package/dist/domain.operations/orgMemberPrivileges/getOneOrgMemberPrivileges.d.ts +14 -0
- package/dist/domain.operations/orgMemberPrivileges/getOneOrgMemberPrivileges.js +36 -0
- package/dist/domain.operations/orgMemberPrivileges/getOneOrgMemberPrivileges.js.map +1 -0
- package/dist/domain.operations/orgMemberPrivileges/setOrgMemberPrivileges.d.ts +16 -0
- package/dist/domain.operations/orgMemberPrivileges/setOrgMemberPrivileges.js +64 -0
- package/dist/domain.operations/orgMemberPrivileges/setOrgMemberPrivileges.js.map +1 -0
- package/dist/domain.operations/orgSecret/castToDeclaredGithubOrgSecret.d.ts +17 -0
- package/dist/domain.operations/orgSecret/castToDeclaredGithubOrgSecret.js +28 -0
- package/dist/domain.operations/orgSecret/castToDeclaredGithubOrgSecret.js.map +1 -0
- package/dist/domain.operations/orgSecret/delOrgSecret.d.ts +11 -0
- package/dist/domain.operations/orgSecret/delOrgSecret.js +27 -0
- package/dist/domain.operations/orgSecret/delOrgSecret.js.map +1 -0
- package/dist/domain.operations/orgSecret/getAllOrgSecrets.d.ts +14 -0
- package/dist/domain.operations/orgSecret/getAllOrgSecrets.js +27 -0
- package/dist/domain.operations/orgSecret/getAllOrgSecrets.js.map +1 -0
- package/dist/domain.operations/orgSecret/getOneOrgSecret.d.ts +15 -0
- package/dist/domain.operations/orgSecret/getOneOrgSecret.js +35 -0
- package/dist/domain.operations/orgSecret/getOneOrgSecret.js.map +1 -0
- package/dist/domain.operations/orgSecret/setOrgSecret.d.ts +17 -0
- package/dist/domain.operations/orgSecret/setOrgSecret.js +123 -0
- package/dist/domain.operations/orgSecret/setOrgSecret.js.map +1 -0
- package/dist/domain.operations/orgVariable/castToDeclaredGithubOrgVariable.d.ts +16 -0
- package/dist/domain.operations/orgVariable/castToDeclaredGithubOrgVariable.js +26 -0
- package/dist/domain.operations/orgVariable/castToDeclaredGithubOrgVariable.js.map +1 -0
- package/dist/domain.operations/orgVariable/delOrgVariable.d.ts +11 -0
- package/dist/domain.operations/orgVariable/delOrgVariable.js +27 -0
- package/dist/domain.operations/orgVariable/delOrgVariable.js.map +1 -0
- package/dist/domain.operations/orgVariable/getAllOrgVariables.d.ts +13 -0
- package/dist/domain.operations/orgVariable/getAllOrgVariables.js +28 -0
- package/dist/domain.operations/orgVariable/getAllOrgVariables.js.map +1 -0
- package/dist/domain.operations/orgVariable/getOneOrgVariable.d.ts +14 -0
- package/dist/domain.operations/orgVariable/getOneOrgVariable.js +34 -0
- package/dist/domain.operations/orgVariable/getOneOrgVariable.js.map +1 -0
- package/dist/domain.operations/orgVariable/setOrgVariable.d.ts +12 -0
- package/dist/domain.operations/orgVariable/setOrgVariable.js +69 -0
- package/dist/domain.operations/orgVariable/setOrgVariable.js.map +1 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.js +13 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.js.map +1 -1
- package/dist/domain.operations/repo/getRepos.js +22 -5
- package/dist/domain.operations/repo/getRepos.js.map +1 -1
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.js +0 -1
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.js.map +1 -1
- package/dist/domain.operations/repoConfig/setRepoConfig.js +0 -1
- package/dist/domain.operations/repoConfig/setRepoConfig.js.map +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAllOrgVariables = void 0;
|
|
4
|
+
const as_procedure_1 = require("as-procedure");
|
|
5
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
6
|
+
const getGithubClient_1 = require("../../access/sdks/getGithubClient");
|
|
7
|
+
const castToDeclaredGithubOrgVariable_1 = require("./castToDeclaredGithubOrgVariable");
|
|
8
|
+
/**
|
|
9
|
+
* .what = gets all GitHub Organization variables
|
|
10
|
+
* .why = retrieves current state for declarative management
|
|
11
|
+
*/
|
|
12
|
+
exports.getAllOrgVariables = (0, as_procedure_1.asProcedure)(async (input, context) => {
|
|
13
|
+
const github = (0, getGithubClient_1.getGithubClient)({}, context);
|
|
14
|
+
try {
|
|
15
|
+
const response = await github.actions.listOrgVariables({
|
|
16
|
+
org: input.org.login,
|
|
17
|
+
});
|
|
18
|
+
return response.data.variables.map((v) => (0, castToDeclaredGithubOrgVariable_1.castToDeclaredGithubOrgVariable)({ data: v, org: input.org }));
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (!(error instanceof Error))
|
|
22
|
+
throw error;
|
|
23
|
+
throw new helpful_errors_1.HelpfulError('github.getAllOrgVariables error', {
|
|
24
|
+
cause: error,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=getAllOrgVariables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAllOrgVariables.js","sourceRoot":"","sources":["../../../src/domain.operations/orgVariable/getAllOrgVariables.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAE3C,mDAA8C;AAI9C,uEAAoE;AAIpE,uFAAoF;AAEpF;;;GAGG;AACU,QAAA,kBAAkB,GAAG,IAAA,0BAAW,EAC3C,KAAK,EACH,KAAqD,EACrD,OAA6C,EACM,EAAE;IACrD,MAAM,MAAM,GAAG,IAAA,iCAAe,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;YACrD,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK;SACrB,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACvC,IAAA,iEAA+B,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAC7D,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;YAAE,MAAM,KAAK,CAAC;QAC3C,MAAM,IAAI,6BAAY,CAAC,iCAAiC,EAAE;YACxD,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 { DeclaredGithubOrgVariable } from '../../domain.objects/DeclaredGithubOrgVariable';
|
|
6
|
+
/**
|
|
7
|
+
* .what = gets a GitHub Organization variable
|
|
8
|
+
* .why = retrieves current state for declarative management
|
|
9
|
+
*/
|
|
10
|
+
export declare const getOneOrgVariable: (input: {
|
|
11
|
+
by: PickOne<{
|
|
12
|
+
unique: RefByUnique<typeof DeclaredGithubOrgVariable>;
|
|
13
|
+
}>;
|
|
14
|
+
}, context: ContextGithubApi & VisualogicContext) => Promise<HasMetadata<DeclaredGithubOrgVariable> | null>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOneOrgVariable = void 0;
|
|
4
|
+
const as_procedure_1 = require("as-procedure");
|
|
5
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
6
|
+
const getGithubClient_1 = require("../../access/sdks/getGithubClient");
|
|
7
|
+
const castToDeclaredGithubOrgVariable_1 = require("./castToDeclaredGithubOrgVariable");
|
|
8
|
+
/**
|
|
9
|
+
* .what = gets a GitHub Organization variable
|
|
10
|
+
* .why = retrieves current state for declarative management
|
|
11
|
+
*/
|
|
12
|
+
exports.getOneOrgVariable = (0, as_procedure_1.asProcedure)(async (input, context) => {
|
|
13
|
+
const github = (0, getGithubClient_1.getGithubClient)({}, context);
|
|
14
|
+
const { org, name } = (() => {
|
|
15
|
+
if (input.by.unique)
|
|
16
|
+
return { org: input.by.unique.org, name: input.by.unique.name };
|
|
17
|
+
helpful_errors_1.UnexpectedCodePathError.throw('not referenced by unique', { input });
|
|
18
|
+
})();
|
|
19
|
+
try {
|
|
20
|
+
const response = await github.actions.getOrgVariable({
|
|
21
|
+
org: org.login,
|
|
22
|
+
name,
|
|
23
|
+
});
|
|
24
|
+
return (0, castToDeclaredGithubOrgVariable_1.castToDeclaredGithubOrgVariable)({ data: response.data, org });
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (!(error instanceof Error))
|
|
28
|
+
throw error;
|
|
29
|
+
if (error.message.includes('Not Found'))
|
|
30
|
+
return null;
|
|
31
|
+
throw new helpful_errors_1.HelpfulError('github.getOrgVariable error', { cause: error });
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=getOneOrgVariable.js.map
|
|
@@ -0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AK,EAAE,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { DeclaredGithubOrgVariable } from '../../domain.objects/DeclaredGithubOrgVariable';
|
|
5
|
+
/**
|
|
6
|
+
* .what = sets a GitHub Organization variable
|
|
7
|
+
* .why = enables declarative management of org-level variables
|
|
8
|
+
*/
|
|
9
|
+
export declare const setOrgVariable: (input: PickOne<{
|
|
10
|
+
finsert: DeclaredGithubOrgVariable;
|
|
11
|
+
upsert: DeclaredGithubOrgVariable;
|
|
12
|
+
}>, context: ContextGithubApi & VisualogicContext) => Promise<HasMetadata<DeclaredGithubOrgVariable>>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setOrgVariable = void 0;
|
|
4
|
+
const as_procedure_1 = require("as-procedure");
|
|
5
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
6
|
+
const getGithubClient_1 = require("../../access/sdks/getGithubClient");
|
|
7
|
+
const getRepo_1 = require("../repo/getRepo");
|
|
8
|
+
const getOneOrgVariable_1 = require("./getOneOrgVariable");
|
|
9
|
+
/**
|
|
10
|
+
* .what = sets a GitHub Organization variable
|
|
11
|
+
* .why = enables declarative management of org-level variables
|
|
12
|
+
*/
|
|
13
|
+
exports.setOrgVariable = (0, as_procedure_1.asProcedure)(async (input, context) => {
|
|
14
|
+
const desired = input.finsert ?? input.upsert;
|
|
15
|
+
const github = (0, getGithubClient_1.getGithubClient)({}, context);
|
|
16
|
+
// Check if variable exists
|
|
17
|
+
const before = await (0, getOneOrgVariable_1.getOneOrgVariable)({ by: { unique: { org: desired.org, name: desired.name } } }, context);
|
|
18
|
+
// Resolve repo IDs if visibility is 'selected'
|
|
19
|
+
const selectedRepositoryIds = desired.visibility === 'selected' && desired.selectedRepositoryNames
|
|
20
|
+
? await Promise.all(desired.selectedRepositoryNames.map(async (name) => {
|
|
21
|
+
const repo = await (0, getRepo_1.getRepo)({ by: { unique: { owner: desired.org.login, name } } }, context);
|
|
22
|
+
if (!repo)
|
|
23
|
+
throw new helpful_errors_1.HelpfulError(`Repository not found: ${desired.org.login}/${name}`);
|
|
24
|
+
return repo.id;
|
|
25
|
+
}))
|
|
26
|
+
: undefined;
|
|
27
|
+
// If finsert and found, return as-is
|
|
28
|
+
if (before && input.finsert)
|
|
29
|
+
return before;
|
|
30
|
+
// If exists, update
|
|
31
|
+
if (before && input.upsert) {
|
|
32
|
+
try {
|
|
33
|
+
await github.actions.updateOrgVariable({
|
|
34
|
+
org: desired.org.login,
|
|
35
|
+
name: desired.name,
|
|
36
|
+
value: desired.value,
|
|
37
|
+
visibility: desired.visibility,
|
|
38
|
+
selected_repository_ids: selectedRepositoryIds,
|
|
39
|
+
});
|
|
40
|
+
return (await (0, getOneOrgVariable_1.getOneOrgVariable)({ by: { unique: { org: desired.org, name: desired.name } } }, context));
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (!(error instanceof Error))
|
|
44
|
+
throw error;
|
|
45
|
+
throw new helpful_errors_1.HelpfulError('github.setOrgVariable.update error', {
|
|
46
|
+
cause: error,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// Create new variable
|
|
51
|
+
try {
|
|
52
|
+
await github.actions.createOrgVariable({
|
|
53
|
+
org: desired.org.login,
|
|
54
|
+
name: desired.name,
|
|
55
|
+
value: desired.value,
|
|
56
|
+
visibility: desired.visibility,
|
|
57
|
+
selected_repository_ids: selectedRepositoryIds,
|
|
58
|
+
});
|
|
59
|
+
return (await (0, getOneOrgVariable_1.getOneOrgVariable)({ by: { unique: { org: desired.org, name: desired.name } } }, context));
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (!(error instanceof Error))
|
|
63
|
+
throw error;
|
|
64
|
+
throw new helpful_errors_1.HelpfulError('github.setOrgVariable.create error', {
|
|
65
|
+
cause: error,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=setOrgVariable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setOrgVariable.js","sourceRoot":"","sources":["../../../src/domain.operations/orgVariable/setOrgVariable.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,mDAA8C;AAI9C,uEAAoE;AAGpE,6CAA0C;AAC1C,2DAAwD;AAExD;;;GAGG;AACU,QAAA,cAAc,GAAG,IAAA,0BAAW,EACvC,KAAK,EACH,KAGE,EACF,OAA6C,EACI,EAAE;IACnD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAA,iCAAe,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAE5C,2BAA2B;IAC3B,MAAM,MAAM,GAAG,MAAM,IAAA,qCAAiB,EACpC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,EAC5D,OAAO,CACR,CAAC;IAEF,+CAA+C;IAC/C,MAAM,qBAAqB,GACzB,OAAO,CAAC,UAAU,KAAK,UAAU,IAAI,OAAO,CAAC,uBAAuB;QAClE,CAAC,CAAC,MAAM,OAAO,CAAC,GAAG,CACf,OAAO,CAAC,uBAAuB,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACjD,MAAM,IAAI,GAAG,MAAM,IAAA,iBAAO,EACxB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK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C,GAAG,CAAC,KAAK;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,uBAAuB,EAAE,qBAAqB;SAC/C,CAAC,CAAC;QAEH,OAAO,CAAC,MAAM,IAAA,qCAAiB,EAC7B,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,EAC5D,OAAO,CACR,CAAE,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;YAAE,MAAM,KAAK,CAAC;QAC3C,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE;YAC3D,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CACF,CAAC"}
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getDeclastructGithubProvider = void 0;
|
|
4
4
|
const declastruct_1 = require("declastruct");
|
|
5
|
+
const DeclaredGithubAppDao_1 = require("../../access/daos/DeclaredGithubAppDao");
|
|
6
|
+
const DeclaredGithubAppInstallationDao_1 = require("../../access/daos/DeclaredGithubAppInstallationDao");
|
|
5
7
|
const DeclaredGithubBranchDao_1 = require("../../access/daos/DeclaredGithubBranchDao");
|
|
6
8
|
const DeclaredGithubBranchProtectionDao_1 = require("../../access/daos/DeclaredGithubBranchProtectionDao");
|
|
9
|
+
const DeclaredGithubOrgDao_1 = require("../../access/daos/DeclaredGithubOrgDao");
|
|
10
|
+
const DeclaredGithubOrgMemberPrivilegesDao_1 = require("../../access/daos/DeclaredGithubOrgMemberPrivilegesDao");
|
|
11
|
+
const DeclaredGithubOrgSecretDao_1 = require("../../access/daos/DeclaredGithubOrgSecretDao");
|
|
12
|
+
const DeclaredGithubOrgVariableDao_1 = require("../../access/daos/DeclaredGithubOrgVariableDao");
|
|
7
13
|
const DeclaredGithubRepoConfigDao_1 = require("../../access/daos/DeclaredGithubRepoConfigDao");
|
|
8
14
|
const DeclaredGithubRepoDao_1 = require("../../access/daos/DeclaredGithubRepoDao");
|
|
9
15
|
/**
|
|
@@ -24,6 +30,13 @@ const getDeclastructGithubProvider = (input, context) => {
|
|
|
24
30
|
DeclaredGithubBranch: DeclaredGithubBranchDao_1.DeclaredGithubBranchDao,
|
|
25
31
|
DeclaredGithubRepoConfig: DeclaredGithubRepoConfigDao_1.DeclaredGithubRepoConfigDao,
|
|
26
32
|
DeclaredGithubBranchProtection: DeclaredGithubBranchProtectionDao_1.DeclaredGithubBranchProtectionDao,
|
|
33
|
+
DeclaredGithubApp: DeclaredGithubAppDao_1.DeclaredGithubAppDao,
|
|
34
|
+
DeclaredGithubAppInstallation: DeclaredGithubAppInstallationDao_1.DeclaredGithubAppInstallationDao,
|
|
35
|
+
// Organization resources
|
|
36
|
+
DeclaredGithubOrg: DeclaredGithubOrgDao_1.DeclaredGithubOrgDao,
|
|
37
|
+
DeclaredGithubOrgMemberPrivileges: DeclaredGithubOrgMemberPrivilegesDao_1.DeclaredGithubOrgMemberPrivilegesDao,
|
|
38
|
+
DeclaredGithubOrgVariable: DeclaredGithubOrgVariableDao_1.DeclaredGithubOrgVariableDao,
|
|
39
|
+
DeclaredGithubOrgSecret: DeclaredGithubOrgSecretDao_1.DeclaredGithubOrgSecretDao,
|
|
27
40
|
};
|
|
28
41
|
// return provider with all required properties
|
|
29
42
|
return new declastruct_1.DeclastructProvider({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDeclastructGithubProvider.js","sourceRoot":"","sources":["../../../src/domain.operations/provider/getDeclastructGithubProvider.ts"],"names":[],"mappings":";;;AAAA,6CAAkD;AAGlD,uFAAoF;AACpF,2GAAwG;AACxG,+FAA4F;AAC5F,mFAAgF;AAIhF;;;GAGG;AACI,MAAM,4BAA4B,GAAG,CAC1C,KAIC,EACD,OAAwB,EACG,EAAE;IAC7B,+CAA+C;IAC/C,MAAM,eAAe,GAAuC;QAC1D,GAAG,OAAO;QACV,MAAM,EAAE;YACN,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK;SAC/B;KACF,CAAC;IAEF,8CAA8C;IAC9C,MAAM,IAAI,GAAG;QACX,kBAAkB,EAAE,6CAAqB;QACzC,oBAAoB,EAAE,iDAAuB;QAC7C,wBAAwB,EAAE,yDAA2B;QACrD,8BAA8B,EAAE,qEAAiC;
|
|
1
|
+
{"version":3,"file":"getDeclastructGithubProvider.js","sourceRoot":"","sources":["../../../src/domain.operations/provider/getDeclastructGithubProvider.ts"],"names":[],"mappings":";;;AAAA,6CAAkD;AAGlD,iFAA8E;AAC9E,yGAAsG;AACtG,uFAAoF;AACpF,2GAAwG;AACxG,iFAA8E;AAC9E,iHAA8G;AAC9G,6FAA0F;AAC1F,iGAA8F;AAC9F,+FAA4F;AAC5F,mFAAgF;AAIhF;;;GAGG;AACI,MAAM,4BAA4B,GAAG,CAC1C,KAIC,EACD,OAAwB,EACG,EAAE;IAC7B,+CAA+C;IAC/C,MAAM,eAAe,GAAuC;QAC1D,GAAG,OAAO;QACV,MAAM,EAAE;YACN,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK;SAC/B;KACF,CAAC;IAEF,8CAA8C;IAC9C,MAAM,IAAI,GAAG;QACX,kBAAkB,EAAE,6CAAqB;QACzC,oBAAoB,EAAE,iDAAuB;QAC7C,wBAAwB,EAAE,yDAA2B;QACrD,8BAA8B,EAAE,qEAAiC;QACjE,iBAAiB,EAAE,2CAAoB;QACvC,6BAA6B,EAAE,mEAAgC;QAC/D,yBAAyB;QACzB,iBAAiB,EAAE,2CAAoB;QACvC,iCAAiC,EAAE,2EAAoC;QACvE,yBAAyB,EAAE,2DAA4B;QACvD,uBAAuB,EAAE,uDAA0B;KACpD,CAAC;IAEF,+CAA+C;IAC/C,OAAO,IAAI,iCAAmB,CAAC;QAC7B,IAAI,EAAE,QAAQ;QACd,IAAI;QACJ,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE;YACL,SAAS,EAAE,KAAK,IAAI,EAAE;gBACpB,sCAAsC;YACxC,CAAC;YACD,QAAQ,EAAE,KAAK,IAAI,EAAE;gBACnB,yCAAyC;YAC3C,CAAC;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AA7CW,QAAA,4BAA4B,gCA6CvC"}
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getRepos = void 0;
|
|
4
4
|
const helpful_errors_1 = require("helpful-errors");
|
|
5
5
|
const getGithubClient_1 = require("../../access/sdks/getGithubClient");
|
|
6
|
+
const hasContextWithAppToken_1 = require("../context/hasContextWithAppToken");
|
|
7
|
+
const hasContextWithPatToken_1 = require("../context/hasContextWithPatToken");
|
|
6
8
|
const castToDeclaredGithubRepo_1 = require("./castToDeclaredGithubRepo");
|
|
7
9
|
/**
|
|
8
10
|
* .what = lists GitHub repositories
|
|
@@ -11,6 +13,9 @@ const castToDeclaredGithubRepo_1 = require("./castToDeclaredGithubRepo");
|
|
|
11
13
|
const getRepos = async (input, context) => {
|
|
12
14
|
// get cached GitHub client
|
|
13
15
|
const github = (0, getGithubClient_1.getGithubClient)({}, context);
|
|
16
|
+
// detect token type for choosing appropriate endpoint
|
|
17
|
+
const isAppToken = (0, hasContextWithAppToken_1.hasContextWithAppToken)(null, context);
|
|
18
|
+
const isPat = (0, hasContextWithPatToken_1.hasContextWithPatToken)(null, context);
|
|
14
19
|
// execute the GitHub API call
|
|
15
20
|
try {
|
|
16
21
|
const response = await (async () => {
|
|
@@ -22,11 +27,23 @@ const getRepos = async (input, context) => {
|
|
|
22
27
|
per_page: input.page?.limit,
|
|
23
28
|
});
|
|
24
29
|
}
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
// list repos accessible to the authenticated context
|
|
31
|
+
// - app token: use installation endpoint (listForAuthenticatedUser not available)
|
|
32
|
+
// - PAT: use user endpoint
|
|
33
|
+
if (isAppToken) {
|
|
34
|
+
const result = await github.apps.listReposAccessibleToInstallation({
|
|
35
|
+
page: input.page?.range?.until.page,
|
|
36
|
+
per_page: input.page?.limit,
|
|
37
|
+
});
|
|
38
|
+
return { data: result.data.repositories };
|
|
39
|
+
}
|
|
40
|
+
if (isPat) {
|
|
41
|
+
return github.repos.listForAuthenticatedUser({
|
|
42
|
+
page: input.page?.range?.until.page,
|
|
43
|
+
per_page: input.page?.limit,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
throw new helpful_errors_1.UnexpectedCodePathError('unsupported token type for listing repos', { tokenPrefix: context.github.token.slice(0, 10) + '...' });
|
|
30
47
|
})();
|
|
31
48
|
const repos = response.data ?? [];
|
|
32
49
|
return repos.map(castToDeclaredGithubRepo_1.castToDeclaredGithubRepo);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRepos.js","sourceRoot":"","sources":["../../../src/domain.operations/repo/getRepos.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"getRepos.js","sourceRoot":"","sources":["../../../src/domain.operations/repo/getRepos.ts"],"names":[],"mappings":";;;AAAA,mDAAuE;AAIvE,uEAAoE;AAGpE,8EAA2E;AAC3E,8EAA2E;AAC3E,yEAAsE;AAEtE;;;GAGG;AACI,MAAM,QAAQ,GAAG,KAAK,EAC3B,KAQC,EACD,OAA6C,EACD,EAAE;IAC9C,2BAA2B;IAC3B,MAAM,MAAM,GAAG,IAAA,iCAAe,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAE5C,sDAAsD;IACtD,MAAM,UAAU,GAAG,IAAA,+CAAsB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,IAAA,+CAAsB,EAAC,IAAI,EA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AE,CAAC;QAEL,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC,GAAG,CAAC,mDAAwB,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;YAAE,MAAM,KAAK,CAAC;QAC3C,MAAM,IAAI,6BAAY,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACpE,CAAC;AACH,CAAC,CAAC;AA3DW,QAAA,QAAQ,YA2DnB"}
|
|
@@ -16,7 +16,6 @@ const castToDeclaredGithubRepoConfig = (input) => {
|
|
|
16
16
|
hasIssues: input.response.has_issues,
|
|
17
17
|
hasProjects: input.response.has_projects,
|
|
18
18
|
hasWiki: input.response.has_wiki,
|
|
19
|
-
hasDownloads: input.response.has_downloads,
|
|
20
19
|
isTemplate: input.response.is_template,
|
|
21
20
|
defaultBranch: input.response.default_branch,
|
|
22
21
|
allowSquashMerge: input.response.allow_squash_merge,
|
|
@@ -1 +1 @@
|
|
|
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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AC,QAAQ,CAAC,oBAItB;QACb,wBAAwB,EAAE,KAAK,CAAC,QAAQ,CAAC,2BAA2B;KACrE,CAA0C,CAAC;AAC9C,CAAC,CAAC;AAxCW,QAAA,8BAA8B,kCAwCzC"}
|
|
@@ -34,7 +34,6 @@ exports.setRepoConfig = (0, as_procedure_1.asProcedure)(async (input, context) =
|
|
|
34
34
|
has_issues: desired.hasIssues,
|
|
35
35
|
has_projects: desired.hasProjects,
|
|
36
36
|
has_wiki: desired.hasWiki,
|
|
37
|
-
has_downloads: desired.hasDownloads,
|
|
38
37
|
is_template: desired.isTemplate,
|
|
39
38
|
default_branch: desired.defaultBranch,
|
|
40
39
|
allow_squash_merge: desired.allowSquashMerge,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setRepoConfig.js","sourceRoot":"","sources":["../../../src/domain.operations/repoConfig/setRepoConfig.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,mDAA8C;AAI9C,uEAAoE;AAGpE,qFAAkF;AAClF,mDAAgD;AAEhD;;;GAGG;AACU,QAAA,aAAa,GAAG,IAAA,0BAAW,EACtC,KAAK,EACH,KAGE,EACF,OAA6C,EACG,EAAE;IAClD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;IAE9C,2BAA2B;IAC3B,MAAM,MAAM,GAAG,IAAA,iCAAe,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAE5C,kCAAkC;IAClC,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAa,EAChC;QACE,EAAE,EAAE;YACF,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB;SACF;KACF,EACD,OAAO,CACR,CAAC;IAEF,uDAAuD;IACvD,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC;IAE3C,mGAAmG;IACnG,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,OAAO,CAAC,IAAuC,CAAC;QAChE,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YACxC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,UAAU,EAAE,OAAO,CAAC,SAAS;YAC7B,YAAY,EAAE,OAAO,CAAC,WAAW;YACjC,QAAQ,EAAE,OAAO,CAAC,OAAO;YACzB,
|
|
1
|
+
{"version":3,"file":"setRepoConfig.js","sourceRoot":"","sources":["../../../src/domain.operations/repoConfig/setRepoConfig.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,mDAA8C;AAI9C,uEAAoE;AAGpE,qFAAkF;AAClF,mDAAgD;AAEhD;;;GAGG;AACU,QAAA,aAAa,GAAG,IAAA,0BAAW,EACtC,KAAK,EACH,KAGE,EACF,OAA6C,EACG,EAAE;IAClD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;IAE9C,2BAA2B;IAC3B,MAAM,MAAM,GAAG,IAAA,iCAAe,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAE5C,kCAAkC;IAClC,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAa,EAChC;QACE,EAAE,EAAE;YACF,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB;SACF;KACF,EACD,OAAO,CACR,CAAC;IAEF,uDAAuD;IACvD,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC;IAE3C,mGAAmG;IACnG,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,OAAO,CAAC,IAAuC,CAAC;QAChE,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YACxC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,UAAU,EAAE,OAAO,CAAC,SAAS;YAC7B,YAAY,EAAE,OAAO,CAAC,WAAW;YACjC,QAAQ,EAAE,OAAO,CAAC,OAAO;YACzB,WAAW,EAAE,OAAO,CAAC,UAAU;YAC/B,cAAc,EAAE,OAAO,CAAC,aAAa;YACrC,kBAAkB,EAAE,OAAO,CAAC,gBAAgB;YAC5C,kBAAkB,EAAE,OAAO,CAAC,gBAAgB;YAC5C,kBAAkB,EAAE,OAAO,CAAC,gBAAgB;YAC5C,gBAAgB,EAAE,OAAO,CAAC,cAAc;YACxC,sBAAsB,EAAE,OAAO,CAAC,mBAAmB;YACnD,mBAAmB,EAAE,OAAO,CAAC,iBAAiB;YAC9C,yBAAyB,EAAE,OAAO,CAAC,sBAAsB;YACzD,2BAA2B,EAAE,OAAO,CAAC,wBAAwB;YAC7D,kBAAkB,EAAE,OAAO,CAAC,gBAAgB;YAC5C,oBAAoB,EAAE,OAAO,CAAC,kBAAkB;YAChD,2BAA2B,EAAE,OAAO,CAAC,wBAAwB;SAC9D,CAAC,CAAC;QAEH,OAAO,IAAA,+DAA8B,EAAC;YACpC,QAAQ,EAAE,OAAO,CAAC,IAAI;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;YAAE,MAAM,KAAK,CAAC;QAC3C,MAAM,IAAI,6BAAY,CAAC,mCAAmC,EAAE;YAC1D,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CACF,CAAC"}
|
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.2.0",
|
|
6
6
|
"repository": "ehmpathy/declastruct-github",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/declastruct-github",
|
|
8
8
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"build:compile": "tsc -p ./tsconfig.build.json",
|
|
35
35
|
"build": "npm run build:clean && npm run build:compile",
|
|
36
36
|
"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",
|
|
37
|
-
"test:types": "tsc -p ./tsconfig.json --noEmit",
|
|
37
|
+
"test:types": "rm -f dist/tsconfig.tsbuildinfo && tsc -p ./tsconfig.json --noEmit",
|
|
38
38
|
"test:format": "npm run test:format:biome",
|
|
39
39
|
"test:lint:deps": "npx depcheck -c ./.depcheckrc.yml",
|
|
40
40
|
"test:format:biome": "biome format src",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"as-procedure": "1.1.1",
|
|
60
60
|
"domain-objects": "0.31.3",
|
|
61
61
|
"helpful-errors": "1.5.3",
|
|
62
|
+
"libsodium-wrappers": "^0.7.15",
|
|
62
63
|
"simple-in-memory-cache": "0.4.0",
|
|
63
64
|
"type-fns": "1.21.0",
|
|
64
65
|
"visualogic": "1.3.2",
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
"@commitlint/cli": "19.5.0",
|
|
70
71
|
"@commitlint/config-conventional": "19.5.0",
|
|
71
72
|
"@octokit/types": "13.10.0",
|
|
73
|
+
"@types/libsodium-wrappers": "^0.7.14",
|
|
72
74
|
"@swc/core": "1.15.3",
|
|
73
75
|
"@swc/jest": "0.2.39",
|
|
74
76
|
"@tsconfig/node20": "20.1.5",
|
|
@@ -78,14 +80,14 @@
|
|
|
78
80
|
"cz-conventional-changelog": "3.3.0",
|
|
79
81
|
"declapract": "0.13.0",
|
|
80
82
|
"declapract-typescript-ehmpathy": "0.43.11",
|
|
81
|
-
"declastruct": "1.
|
|
83
|
+
"declastruct": "1.7.0",
|
|
82
84
|
"declastruct-github": "1.0.6",
|
|
83
85
|
"depcheck": "1.4.3",
|
|
84
86
|
"esbuild-register": "3.6.0",
|
|
85
87
|
"husky": "8.0.3",
|
|
86
88
|
"jest": "30.2.0",
|
|
87
|
-
"rhachet": "1.
|
|
88
|
-
"rhachet-roles-ehmpathy": "1.
|
|
89
|
+
"rhachet": "1.13.1",
|
|
90
|
+
"rhachet-roles-ehmpathy": "1.13.3",
|
|
89
91
|
"simple-log-methods": "0.6.2",
|
|
90
92
|
"test-fns": "1.5.0",
|
|
91
93
|
"tsx": "4.20.6",
|