github-settings-as-code 1.0.5 → 1.0.7
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":"constants.d.mts","sourceRoot":"","sources":["../../src/github/constants.mts"],"names":[],"mappings":"AACA,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/github/constants.mts"],"names":[],"mappings":"AACA,OAAO,eAAe,CAAC;AAQvB,eAAO,MAAM,KAAK,QAAgB,CAAC;AAoBnC,eAAO,MAAM,IAAI,EAAE,MAA+B,CAAC;AAInD,eAAO,MAAM,qBAAqB,QAGjC,CAAC;AAEF,eAAO,MAAM,0BAA0B,kBAAkB,CAAC;AAE1D,eAAO,MAAM,WAAW,QAAwC,CAAC;AAEjE,eAAO,MAAM,cAAc;;CAEjB,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { hasKey, isRecord, isString, Json, Result } from 'ts-data-forge';
|
|
2
2
|
import 'ts-repo-utils';
|
|
3
|
-
|
|
3
|
+
const ownerNullable = process.env['OWNER'];
|
|
4
|
+
if (ownerNullable === undefined) {
|
|
5
|
+
throw new Error('OWNER env var is not set');
|
|
6
|
+
}
|
|
7
|
+
export const OWNER = ownerNullable;
|
|
4
8
|
const packageJsonPath = path.resolve(process.cwd(), './package.json');
|
|
5
9
|
const packageJsonStr = await fs.readFile(packageJsonPath, { encoding: 'utf8' });
|
|
6
10
|
const packageJson = Json.parse(packageJsonStr);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/github/constants.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,KAAK,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AE,EAAE,UAAU,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAC/C,SAAS,EACT,uBAAuB,CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,eAAe,CAAC;AAE1D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAEjE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,sBAAsB,EAAE,YAAY;CAC5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-settings-as-code",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github",
|
|
@@ -24,16 +24,18 @@
|
|
|
24
24
|
"gh-backup-rulesets": "./dist/github/ruleset/backup.mjs"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
-
"dist",
|
|
28
27
|
"src",
|
|
28
|
+
"dist",
|
|
29
29
|
"README.md",
|
|
30
30
|
"LICENSE"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsx ./scripts/cmd/build.mts",
|
|
34
|
+
"build:min": "tsx ./scripts/cmd/build.mts --skip-check",
|
|
34
35
|
"check-all": "tsx ./scripts/cmd/check-all.mts",
|
|
35
36
|
"check:ext": "tsx ./scripts/cmd/check-ext.mts",
|
|
36
37
|
"cspell": "cspell \"**\" --gitignore --gitignore-root ./ --no-progress",
|
|
38
|
+
"doc": "tsx ./scripts/cmd/gen-docs.mts",
|
|
37
39
|
"fmt": "format-uncommitted",
|
|
38
40
|
"fmt:diff": "format-diff-from origin/main",
|
|
39
41
|
"fmt:full": "prettier --write .",
|
|
@@ -49,59 +51,64 @@
|
|
|
49
51
|
"lint": "eslint .",
|
|
50
52
|
"lint:fix": "eslint . --fix",
|
|
51
53
|
"md": "markdownlint-cli2",
|
|
52
|
-
"test": "pnpm run z:vitest run",
|
|
53
|
-
"test:cov": "pnpm run z:vitest run --coverage",
|
|
54
|
+
"test": "pnpm run z:vitest:node run",
|
|
55
|
+
"test:cov": "pnpm run z:vitest:node run --coverage",
|
|
54
56
|
"test:cov:ui": "vite preview --outDir ./coverage",
|
|
55
|
-
"test:ui": "pnpm run z:vitest --ui",
|
|
56
|
-
"testw": "pnpm run z:vitest watch",
|
|
57
|
+
"test:ui": "pnpm run z:vitest:node --ui",
|
|
58
|
+
"testw": "pnpm run z:vitest:node watch",
|
|
57
59
|
"tsc": "tsc --noEmit",
|
|
58
60
|
"tscw": "tsc --noEmit --watch -p ./tsconfig.json",
|
|
59
61
|
"type-check": "tsc --noEmit",
|
|
60
62
|
"update-packages": "pnpm update --latest",
|
|
61
|
-
"z:vitest": "vitest --config ./configs/vitest.config.
|
|
63
|
+
"z:vitest": "vitest --config ./configs/vitest.config.mts",
|
|
64
|
+
"z:vitest:node": "vitest --config ./configs/vitest.config.mts --project='Node.js'"
|
|
62
65
|
},
|
|
63
66
|
"dependencies": {
|
|
64
67
|
"@octokit/core": "7.0.6",
|
|
65
68
|
"dotenv": "^17.2.3",
|
|
66
|
-
"octokit-safe-types": "^1.2.
|
|
67
|
-
"ts-data-forge": "^
|
|
68
|
-
"ts-fortress": "^6.
|
|
69
|
-
"ts-repo-utils": "^7.
|
|
69
|
+
"octokit-safe-types": "^1.2.2",
|
|
70
|
+
"ts-data-forge": "^6.1.1",
|
|
71
|
+
"ts-fortress": "^6.2.0",
|
|
72
|
+
"ts-repo-utils": "^7.9.5"
|
|
70
73
|
},
|
|
71
74
|
"devDependencies": {
|
|
72
|
-
"@semantic-release/changelog": "
|
|
73
|
-
"@semantic-release/commit-analyzer": "
|
|
74
|
-
"@semantic-release/exec": "
|
|
75
|
-
"@semantic-release/git": "
|
|
76
|
-
"@semantic-release/github": "
|
|
77
|
-
"@semantic-release/npm": "
|
|
78
|
-
"@semantic-release/release-notes-generator": "
|
|
79
|
-
"@types/node": "
|
|
80
|
-
"@vitest/coverage-v8": "
|
|
81
|
-
"@vitest/ui": "
|
|
82
|
-
"conventional-changelog-conventionalcommits": "
|
|
83
|
-
"cspell": "
|
|
84
|
-
"eslint": "9.39.
|
|
85
|
-
"eslint-config-typed": "
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"markdownlint": "
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"prettier": "
|
|
92
|
-
"prettier-plugin-organize-imports": "
|
|
93
|
-
"prettier-plugin-packagejson": "
|
|
94
|
-
"semantic-release": "
|
|
95
|
-
"ts-type-forge": "
|
|
96
|
-
"tslib": "
|
|
97
|
-
"tsx": "
|
|
98
|
-
"typedoc": "
|
|
99
|
-
"typedoc-
|
|
100
|
-
"typescript": "
|
|
101
|
-
"vitest": "
|
|
75
|
+
"@semantic-release/changelog": "6.0.3",
|
|
76
|
+
"@semantic-release/commit-analyzer": "13.0.1",
|
|
77
|
+
"@semantic-release/exec": "7.1.0",
|
|
78
|
+
"@semantic-release/git": "10.0.1",
|
|
79
|
+
"@semantic-release/github": "12.0.2",
|
|
80
|
+
"@semantic-release/npm": "13.1.3",
|
|
81
|
+
"@semantic-release/release-notes-generator": "14.1.0",
|
|
82
|
+
"@types/node": "25.0.3",
|
|
83
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
84
|
+
"@vitest/ui": "4.0.16",
|
|
85
|
+
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
86
|
+
"cspell": "9.4.0",
|
|
87
|
+
"eslint": "9.39.2",
|
|
88
|
+
"eslint-config-typed": "4.3.0",
|
|
89
|
+
"jiti": "2.6.1",
|
|
90
|
+
"markdownlint": "0.40.0",
|
|
91
|
+
"markdownlint-cli2": "0.20.0",
|
|
92
|
+
"npm-run-all2": "8.0.4",
|
|
93
|
+
"playwright": "1.57.0",
|
|
94
|
+
"prettier": "3.7.4",
|
|
95
|
+
"prettier-plugin-organize-imports": "4.3.0",
|
|
96
|
+
"prettier-plugin-packagejson": "2.5.20",
|
|
97
|
+
"semantic-release": "25.0.2",
|
|
98
|
+
"ts-type-forge": "2.3.0",
|
|
99
|
+
"tslib": "2.8.1",
|
|
100
|
+
"tsx": "4.21.0",
|
|
101
|
+
"typedoc": "0.28.15",
|
|
102
|
+
"typedoc-github-theme": "0.3.1",
|
|
103
|
+
"typescript": "5.9.3",
|
|
104
|
+
"vitest": "4.0.16"
|
|
105
|
+
},
|
|
106
|
+
"packageManager": "pnpm@10.24.0",
|
|
107
|
+
"engines": {
|
|
108
|
+
"node": ">=22",
|
|
109
|
+
"pnpm": ">=8.0.0"
|
|
102
110
|
},
|
|
103
111
|
"volta": {
|
|
104
|
-
"node": "25.
|
|
105
|
-
"npm": "11.6.2"
|
|
112
|
+
"node": "25.2.1"
|
|
106
113
|
}
|
|
107
114
|
}
|
package/src/github/constants.mts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { hasKey, isRecord, isString, Json, Result } from 'ts-data-forge';
|
|
2
2
|
import 'ts-repo-utils';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const ownerNullable = process.env['OWNER'];
|
|
5
|
+
|
|
6
|
+
if (ownerNullable === undefined) {
|
|
7
|
+
throw new Error('OWNER env var is not set');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const OWNER = ownerNullable;
|
|
5
11
|
|
|
6
12
|
const packageJsonPath = path.resolve(process.cwd(), './package.json');
|
|
7
13
|
|