declapract-typescript-ehmpathy 0.47.38 → 0.47.40
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/practices/cicd-common/best-practice/.agent/repo=.this/role=any/skills/use.apikeys.sh
CHANGED
|
@@ -12,14 +12,12 @@
|
|
|
12
12
|
# - falls back to .env.local (gitignored) in repo root
|
|
13
13
|
######################################################################
|
|
14
14
|
|
|
15
|
-
# fail if not sourced (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
;;
|
|
22
|
-
esac
|
|
15
|
+
# fail if not sourced (return only succeeds when sourced)
|
|
16
|
+
(return 0 2>/dev/null) || {
|
|
17
|
+
echo "error: this file must be sourced, not executed"
|
|
18
|
+
echo "usage: . $0"
|
|
19
|
+
exit 1
|
|
20
|
+
}
|
|
23
21
|
|
|
24
22
|
# alias source to `.` for posix compat
|
|
25
23
|
source() { . "$@"; }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FileCheckType, type FileFixFunction } from 'declapract';
|
|
2
|
+
|
|
3
|
+
export const check = FileCheckType.EXISTS; // if files exist in accept.blackbox/, flag as bad practice
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* .what = moves acceptance test files from accept.blackbox/ to blackbox/
|
|
7
|
+
* .why = blackbox/ naming is simpler and makes the testing philosophy explicit
|
|
8
|
+
*/
|
|
9
|
+
export const fix: FileFixFunction = (contents, context) => {
|
|
10
|
+
// move from accept.blackbox/ to blackbox/
|
|
11
|
+
const newPath = context.relativeFilePath.replace(
|
|
12
|
+
/^accept\.blackbox\//,
|
|
13
|
+
'blackbox/',
|
|
14
|
+
);
|
|
15
|
+
return {
|
|
16
|
+
contents: contents ?? null,
|
|
17
|
+
relativeFilePath: newPath,
|
|
18
|
+
};
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "declapract-typescript-ehmpathy",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "declapract best practices declarations for typescript",
|
|
5
|
-
"version": "0.47.
|
|
5
|
+
"version": "0.47.40",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"repository": "ehmpathy/declapract-typescript-ehmpathy",
|