blueprint-shared-templates 0.4.1 → 0.5.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/org/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @@repoName@@
2
+
3
+ `@@organization@@` 組織在組織層的 `@@repoName@@` 倉。它是導入方的組織層倉,放這個組織的組織值與組織層的倉清單,不是管理中樞的複本。共用套件、範本與組織層倉範本由管理中樞發布,這個倉只放導入方該有的東西。
4
+
5
+ ## 放什麼
6
+
7
+ - `facts/` 是 `@@aggregatePackageName@@`。它有兩筆 fact:組織值(`@@repoName@@.org-values`,欄位定義在共用 fact `blueprint-shared.org-values`,fact-kit 依那份 schema 驗證),以及組織層的倉清單(`@@repoName@@.org-layout.repos`)。
8
+ - `docs/` 是 `@@scope@@/@@repoName@@-docs`。它放組織層的文件,並引用上面的 fact 與共用 fact。`docs/@@repoName@@-docs/@@repoName@@/layer-names.doc.ts` 寫出各倉的 facts、docs 套件名怎麼從這一層推出。
9
+ - `scripts/ci/check-org-values.mjs` 逐欄位核對組織值,缺欄位、多欄位或型別不對時印出欄位名。
10
+
11
+ ## 依賴
12
+
13
+ 共用套件 `blueprint-shared-facts` 與 `blueprint-shared-docs` 從公開的 npm 安裝。`@@scope@@` scope 的套件發到 @@aggregateRegistry@@。
14
+
15
+ ## GitHub App 的權限
16
+
17
+ 組織的 bot App 要開這些 repository 權限,發版與合併的 workflow 才讀寫得動:Contents (write)、Pull requests (write)、Issues (write)、Workflows (write)、Actions (read)、Checks (read)、Statuses (read)、Variables (read)。有 workflow 要觸發另一個 workflow 的倉,另需 Actions (write)。依據是共用 fact `blueprint-shared.templates.github-app-placement` 的 `permissions`。
18
+
19
+ ## 建置
20
+
21
+ ```sh
22
+ pnpm install
23
+ pnpm build
24
+ pnpm check
25
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blueprint-shared-templates",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Templates shared by several products, published on its own",
5
5
  "license": "MIT",
6
6
  "author": "Carlos Space",
@@ -82,9 +82,10 @@ jobs:
82
82
  merge_back_ready: ${{ steps.ready.outputs.ready }}
83
83
  steps:
84
84
  # Only when the App is configured; otherwise the step is skipped and its empty output falls
85
- # through to GITHUB_TOKEN below. The App needs Contents, Pull requests, Issues and Workflows (write):
85
+ # through to GITHUB_TOKEN below. The App needs Contents, Pull requests, Issues and Workflows (write), and Actions (read):
86
86
  # release-please labels its PRs, and PR labels go through the Issues API. Workflows is for sync-release-tools.yml,
87
87
  # whose push to a release branch changes .github/workflows; a push of that path is refused without it.
88
+ # Actions (read) is for the release scripts, which list workflow runs with gh run list (scripts/lib/release-pr.sh).
88
89
  # It comes before the checkout so that the checkout keeps the App token for the push of the pin step.
89
90
  - id: app-token
90
91
  if: vars.@@clientIdVariable@@ != ''
package/transform.mjs CHANGED
@@ -8,7 +8,7 @@
8
8
  // not a text conversion and stays with the code that composes a repository.
9
9
 
10
10
  // The fields of the templates, the same list as the fact blueprint-shared.templates.fields (a test compares them).
11
- export const FIELDS = ["clientIdVariable", "licenseHolder", "mergeBotApp", "mergeBotUserId", "mergeLabel", "privateKeySecret", "scope"];
11
+ export const FIELDS = ["aggregatePackageName", "aggregateRegistry", "clientIdVariable", "licenseHolder", "mergeBotApp", "mergeBotUserId", "mergeLabel", "organization", "privateKeySecret", "repoName", "scope"];
12
12
 
13
13
  const FIELD = /@@(\w+)@@/g;
14
14