@controleonline/ui-common 1.2.77 → 1.2.78
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/docs/wiki.md +1 -0
- package/package.json +1 -1
- package/scripts/validate-wiki-pointer.cjs +13 -0
- package/.gitmodules +0 -3
package/docs/wiki.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
https://github.com/ControleOnline/ui-common/wiki
|
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const root = path.resolve(__dirname, '..');
|
|
4
|
+
const repo = path.basename(root);
|
|
5
|
+
const pointer = fs.readFileSync(path.join(root, 'docs/wiki.md'), 'utf8');
|
|
6
|
+
const expected = `https://github.com/ControleOnline/${repo}/wiki\n`;
|
|
7
|
+
if (pointer !== expected) throw new Error(`docs/wiki.md must contain only ${expected.trim()}`);
|
|
8
|
+
const gitmodulesPath = path.join(root, '.gitmodules');
|
|
9
|
+
if (fs.existsSync(gitmodulesPath)) {
|
|
10
|
+
const gitmodules = fs.readFileSync(gitmodulesPath, 'utf8');
|
|
11
|
+
if (/path\s*=\s*docs\/wiki/.test(gitmodules) || new RegExp(`${repo}\\.wiki\\.git`).test(gitmodules)) throw new Error('docs/wiki must not be configured as a wiki submodule');
|
|
12
|
+
}
|
|
13
|
+
console.log(`Validated wiki pointer for ${repo}.`);
|
package/.gitmodules
DELETED