@theholocron/astromech 5.0.0-alpha.239 → 5.0.0-alpha.240
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/index.d.mts +69 -13
- package/dist/index.mjs +157 -29
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { r as TasksConfig } from "./schema.type-BJmfOafW.mjs";
|
|
2
|
+
import { ListWorkspacePackagesOptions, WorkspacePackageEntry } from "@theholocron/pkg-utils";
|
|
2
3
|
//#region src/generators/codecov/codecov.type.d.ts
|
|
3
4
|
interface WorkspacePackage$1 {
|
|
4
5
|
slug: string;
|
|
5
6
|
name: string;
|
|
6
|
-
/**
|
|
7
|
-
dir?:
|
|
7
|
+
/** The workspace root the package was discovered under (`packages`, `apps`, `clients`, ...). Defaults to `"packages"`. */
|
|
8
|
+
dir?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Repo-relative directory, set when it is not `<dir>/<slug>` -- a package that
|
|
11
|
+
* is itself a workspace folder (`observability`) or sits deeper (`docs/theme`).
|
|
12
|
+
*/
|
|
13
|
+
path?: string;
|
|
8
14
|
}
|
|
9
15
|
//#endregion
|
|
10
16
|
//#region src/generators/codecov/codecov.d.ts
|
|
@@ -22,12 +28,13 @@ declare function codecovComponentBlock(packages: WorkspacePackage$1[]): string;
|
|
|
22
28
|
declare function ensureIfNotFound(yaml: string): string;
|
|
23
29
|
declare function mergeCodecovComponents(existing: string, packages: WorkspacePackage$1[]): string;
|
|
24
30
|
/**
|
|
25
|
-
* Every
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
+
* Every package the repo's `pnpm-workspace.yaml` declares (the default roots
|
|
32
|
+
* when it declares none), sorted by slug -- the folder name. Every one needs a
|
|
33
|
+
* codecov component so `codecov/patch/<slug>` actually posts for each. A
|
|
34
|
+
* package at `<root>/<slug>` carries `dir: <root>`; one that is itself a
|
|
35
|
+
* workspace folder (`observability`) or sits deeper (`docs/theme`) carries its
|
|
36
|
+
* `path`. Two packages with the same folder name are told apart by their full
|
|
37
|
+
* path (`docs-theme`). `[]` when there are none.
|
|
31
38
|
*/
|
|
32
39
|
declare function readWorkspacePackages(repoRoot: string): WorkspacePackage$1[];
|
|
33
40
|
/** A brand-new `codecov.yml` — the scaffold header + the base template + this repo's component list. */
|
|
@@ -400,10 +407,9 @@ interface Tree {
|
|
|
400
407
|
//#endregion
|
|
401
408
|
//#region src/tasks/deploy-on-release/workspace-packages/workspace-packages.d.ts
|
|
402
409
|
/**
|
|
403
|
-
* Every package
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
* apps into `apps/*`, siblings to `packages/*`.
|
|
410
|
+
* Every package the repo's `pnpm-workspace.yaml` declares (`packages/*`,
|
|
411
|
+
* `apps/*` and `plugins/*` when it declares none) with a readable, named
|
|
412
|
+
* `package.json`.
|
|
407
413
|
*/
|
|
408
414
|
declare function workspacePackages(repoRoot: string, { readJson, listDirs }: Tree): WorkspacePackage[];
|
|
409
415
|
//#endregion
|
|
@@ -814,4 +820,54 @@ declare function createConfig$8(): string;
|
|
|
814
820
|
declare function createConfig$9(): string;
|
|
815
821
|
declare function createIgnoreConfig$1(): string;
|
|
816
822
|
//#endregion
|
|
817
|
-
|
|
823
|
+
//#region src/workspace/workspace-globs.d.ts
|
|
824
|
+
/** The `packages:` entries of a `pnpm-workspace.yaml`, split by whether they include or exclude (`!pattern`) packages. */
|
|
825
|
+
interface WorkspaceGlobs {
|
|
826
|
+
include: string[];
|
|
827
|
+
exclude: string[];
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* The `packages:` list of a `pnpm-workspace.yaml`. A line-based read of the
|
|
831
|
+
* plain block-list form, not a YAML parse -- the same approach (and for the
|
|
832
|
+
* same reason) as `ensureRootWorkspaceMember()`: the file routinely carries a
|
|
833
|
+
* `catalog:`/`catalogs:`/`overrides:` block after `packages:` that nothing
|
|
834
|
+
* here should have to round-trip. Quotes and trailing comments are stripped;
|
|
835
|
+
* a missing `packages:` key, or the inline `packages: [a, b]` form, reads as no
|
|
836
|
+
* globs (callers fall back to the default roots).
|
|
837
|
+
*/
|
|
838
|
+
declare function readWorkspaceGlobs(workspaceYaml: string): WorkspaceGlobs;
|
|
839
|
+
//#endregion
|
|
840
|
+
//#region src/workspace/discover-workspace-packages.d.ts
|
|
841
|
+
/** Where packages live when there is no `pnpm-workspace.yaml` (or it lists none): the layout before globs were read. */
|
|
842
|
+
declare const DEFAULT_WORKSPACE_ROOTS: readonly string[];
|
|
843
|
+
interface DiscoverWorkspacePackagesOptions extends Pick<ListWorkspacePackagesOptions, "listDirs" | "readFile"> {
|
|
844
|
+
/** Replaces the read of `pnpm-workspace.yaml`. Throw (`ENOENT`) when it is absent -- or leave it out to read the real file. */
|
|
845
|
+
readText?: (path: string) => string;
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* Every package the repo's `pnpm-workspace.yaml` declares, as
|
|
849
|
+
* `listWorkspacePackagesSync()` entries -- in glob order, packages within a
|
|
850
|
+
* `<dir>/*` glob sorted by name. Two forms of glob are understood:
|
|
851
|
+
*
|
|
852
|
+
* - `<dir>/*`: each child of `<dir>` that has a `package.json` (`clients/*`).
|
|
853
|
+
* - a literal directory: that directory is the package (`observability`,
|
|
854
|
+
* `docs/theme`).
|
|
855
|
+
*
|
|
856
|
+
* `!pattern` entries drop matching packages. The repo root (`.`) is not a
|
|
857
|
+
* workspace child and is skipped; callers that treat a root-only repo as a
|
|
858
|
+
* single package read the root manifest themselves. Any other glob throws
|
|
859
|
+
* rather than being silently skipped. Without a `pnpm-workspace.yaml`, or one
|
|
860
|
+
* with no `packages:`, the default roots are scanned.
|
|
861
|
+
*
|
|
862
|
+
* Nothing is filtered by `name`, `version` or `private`; that is the caller's
|
|
863
|
+
* call, as for `listWorkspacePackagesSync()`.
|
|
864
|
+
*/
|
|
865
|
+
declare function discoverWorkspacePackages(repoRoot: string, options?: DiscoverWorkspacePackagesOptions): WorkspacePackageEntry[];
|
|
866
|
+
/**
|
|
867
|
+
* The globs {@link discoverWorkspacePackages} scans: the repo's
|
|
868
|
+
* `pnpm-workspace.yaml` `packages:` list, or the {@link DEFAULT_WORKSPACE_ROOTS}
|
|
869
|
+
* as `<root>/*` when there is no such file or it lists none.
|
|
870
|
+
*/
|
|
871
|
+
declare function resolveWorkspaceGlobs(repoRoot: string, options?: Pick<DiscoverWorkspacePackagesOptions, "readText">): WorkspaceGlobs;
|
|
872
|
+
//#endregion
|
|
873
|
+
export { type Astromech, type AstromechOptions, CI_ORDER, type CiJobReport, type CiOptions, type CiReport, type CreateHeaderOptions, DEFAULT_WORKSPACE_ROOTS, type DeployOnReleaseOptions, type DeployOnReleaseReport, type DeployOnReleaseResult, type WorkspacePackage as DeployWorkspacePackage, type DiscoverWorkspacePackagesOptions, type ExecFn, type GroupJobReport, type GroupOptions, type GroupReport, type HeaderFunctions, type JobDef, KNOWN_TASKS, KNOWN_WORKFLOWS, type LocalRunner, type OrgContext, type PreviewConfig, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, type RunLogger, type RunOptions, type RunTaskInput, type RunTaskReport, TASKS, type TaskDef, type TsconfigOptions, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, type WorkflowHeaderFormat, type WorkspaceGlobs, type WorkspacePackage$1 as WorkspacePackage, codecovComponentBlock, codecovConfig, createIgnoreConfig as createAlexignore, createRcConfig as createAlexrc, createAstromech, createCodecovConfig, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createHeader, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig$1 as createYamlignore, createConfig$9 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, discoverWorkspacePackages, ensureIfNotFound, extractPreviewConfig, generateCombinedDeployContent, generateThinCallerContent, matchNamespace, mergeCodecovComponents, normalizeWorkflowWith, readWorkspaceGlobs, readWorkspacePackages, requiredChecks, resolveWorkspaceGlobs, reusableTemplates, runCi, runGroup, runTask, workspacePackages };
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,136 @@
|
|
|
1
1
|
import { r as normalizeTaskEntry, t as loadTasksConfig } from "./load-DdHEVFlG.mjs";
|
|
2
2
|
import { n as alexrc_default, t as editorconfig_checker_default } from "./editorconfig-checker-DPejtR5z.mjs";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
|
-
import {
|
|
4
|
+
import { isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
5
|
+
import { dependencyNames, detectPackageManager, listWorkspacePackagesSync, parsePackageJson, readPackageJsonSync } from "@theholocron/pkg-utils";
|
|
5
6
|
import { stringifyJson } from "@theholocron/json-utils";
|
|
6
|
-
import { join, relative } from "node:path";
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
8
8
|
import { findExecutableSync } from "@theholocron/fs-utils";
|
|
9
9
|
//#region src/templates/codecov/codecov.yml
|
|
10
10
|
var codecov_default = "codecov:\n require_ci_to_pass: true\n\ncoverage:\n precision: 2\n round: down\n status:\n project:\n default:\n target: auto\n threshold: 2%\n # Infra-only PRs (dep bumps, config, lockfile) touch no coverable code,\n # so codecov produces no report to compare. Pass instead of blocking\n # forever on a required check that will never post.\n if_not_found: success\n patch:\n default:\n target: 80%\n if_not_found: success\n\ncomment:\n layout: \"reach,diff,flags,components\"\n behavior: default\n require_changes: true\n\ncomponent_management:\n default_rules:\n statuses:\n - type: patch\n target: 80%\n if_not_found: success\n individual_components:\n";
|
|
11
11
|
//#endregion
|
|
12
|
+
//#region src/workspace/workspace-globs.ts
|
|
13
|
+
/**
|
|
14
|
+
* The `packages:` list of a `pnpm-workspace.yaml`. A line-based read of the
|
|
15
|
+
* plain block-list form, not a YAML parse -- the same approach (and for the
|
|
16
|
+
* same reason) as `ensureRootWorkspaceMember()`: the file routinely carries a
|
|
17
|
+
* `catalog:`/`catalogs:`/`overrides:` block after `packages:` that nothing
|
|
18
|
+
* here should have to round-trip. Quotes and trailing comments are stripped;
|
|
19
|
+
* a missing `packages:` key, or the inline `packages: [a, b]` form, reads as no
|
|
20
|
+
* globs (callers fall back to the default roots).
|
|
21
|
+
*/
|
|
22
|
+
function readWorkspaceGlobs(workspaceYaml) {
|
|
23
|
+
const lines = workspaceYaml.split("\n");
|
|
24
|
+
const start = lines.findIndex((line) => /^packages:\s*(#.*)?$/.test(line));
|
|
25
|
+
const globs = {
|
|
26
|
+
include: [],
|
|
27
|
+
exclude: []
|
|
28
|
+
};
|
|
29
|
+
if (start === -1) return globs;
|
|
30
|
+
for (const line of lines.slice(start + 1)) {
|
|
31
|
+
if (line.trim() === "" || /^\s*#/.test(line)) continue;
|
|
32
|
+
const item = /^\s*-\s*(.*)$/.exec(line);
|
|
33
|
+
if (!item) break;
|
|
34
|
+
const value = item[1].replace(/(^|\s)#.*$/, "").trim().replace(/^["']|["']$/g, "").trim();
|
|
35
|
+
if (value === "") continue;
|
|
36
|
+
if (value.startsWith("!")) globs.exclude.push(normalizeGlob(value.slice(1)));
|
|
37
|
+
else globs.include.push(normalizeGlob(value));
|
|
38
|
+
}
|
|
39
|
+
return globs;
|
|
40
|
+
}
|
|
41
|
+
/** `./a/b/` -> `a/b`: the form {@link discoverWorkspacePackages} matches against `relativeDir`. */
|
|
42
|
+
function normalizeGlob(glob) {
|
|
43
|
+
return glob.replace(/^\.\//, "").replace(/\/+$/, "");
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/workspace/discover-workspace-packages.ts
|
|
47
|
+
/** Where packages live when there is no `pnpm-workspace.yaml` (or it lists none): the layout before globs were read. */
|
|
48
|
+
const DEFAULT_WORKSPACE_ROOTS = [
|
|
49
|
+
"packages",
|
|
50
|
+
"apps",
|
|
51
|
+
"plugins"
|
|
52
|
+
];
|
|
53
|
+
/** Characters pnpm globs treat specially. A literal directory has none of them. */
|
|
54
|
+
const GLOB_CHARS = /[*?[\]{}!]/;
|
|
55
|
+
/**
|
|
56
|
+
* Every package the repo's `pnpm-workspace.yaml` declares, as
|
|
57
|
+
* `listWorkspacePackagesSync()` entries -- in glob order, packages within a
|
|
58
|
+
* `<dir>/*` glob sorted by name. Two forms of glob are understood:
|
|
59
|
+
*
|
|
60
|
+
* - `<dir>/*`: each child of `<dir>` that has a `package.json` (`clients/*`).
|
|
61
|
+
* - a literal directory: that directory is the package (`observability`,
|
|
62
|
+
* `docs/theme`).
|
|
63
|
+
*
|
|
64
|
+
* `!pattern` entries drop matching packages. The repo root (`.`) is not a
|
|
65
|
+
* workspace child and is skipped; callers that treat a root-only repo as a
|
|
66
|
+
* single package read the root manifest themselves. Any other glob throws
|
|
67
|
+
* rather than being silently skipped. Without a `pnpm-workspace.yaml`, or one
|
|
68
|
+
* with no `packages:`, the default roots are scanned.
|
|
69
|
+
*
|
|
70
|
+
* Nothing is filtered by `name`, `version` or `private`; that is the caller's
|
|
71
|
+
* call, as for `listWorkspacePackagesSync()`.
|
|
72
|
+
*/
|
|
73
|
+
function discoverWorkspacePackages(repoRoot, options = {}) {
|
|
74
|
+
const base = resolve(repoRoot);
|
|
75
|
+
const readFile = options.readFile ?? ((path) => readFileSync(path, "utf8"));
|
|
76
|
+
const { include, exclude } = resolveWorkspaceGlobs(base, options);
|
|
77
|
+
const entries = /* @__PURE__ */ new Map();
|
|
78
|
+
for (const glob of include) {
|
|
79
|
+
if (glob === "." || glob === "") continue;
|
|
80
|
+
for (const entry of expandGlob(base, glob, {
|
|
81
|
+
readFile,
|
|
82
|
+
listDirs: options.listDirs
|
|
83
|
+
})) if (!exclude.some((pattern) => matches(entry.relativeDir, pattern))) entries.set(entry.relativeDir, entry);
|
|
84
|
+
}
|
|
85
|
+
return [...entries.values()];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The globs {@link discoverWorkspacePackages} scans: the repo's
|
|
89
|
+
* `pnpm-workspace.yaml` `packages:` list, or the {@link DEFAULT_WORKSPACE_ROOTS}
|
|
90
|
+
* as `<root>/*` when there is no such file or it lists none.
|
|
91
|
+
*/
|
|
92
|
+
function resolveWorkspaceGlobs(repoRoot, options = {}) {
|
|
93
|
+
const readText = options.readText ?? ((path) => readFileSync(path, "utf8"));
|
|
94
|
+
let workspaceYaml = "";
|
|
95
|
+
try {
|
|
96
|
+
workspaceYaml = readText(join(resolve(repoRoot), "pnpm-workspace.yaml"));
|
|
97
|
+
} catch {}
|
|
98
|
+
const { include, exclude } = readWorkspaceGlobs(workspaceYaml);
|
|
99
|
+
return {
|
|
100
|
+
include: include.length > 0 ? include : DEFAULT_WORKSPACE_ROOTS.map((root) => `${root}/*`),
|
|
101
|
+
exclude
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function expandGlob(base, glob, options) {
|
|
105
|
+
if (glob.endsWith("/*") && !GLOB_CHARS.test(glob.slice(0, -2))) return listWorkspacePackagesSync(base, {
|
|
106
|
+
...options,
|
|
107
|
+
roots: [glob.slice(0, -2)]
|
|
108
|
+
});
|
|
109
|
+
if (GLOB_CHARS.test(glob)) throw new TypeError(`unsupported workspace pattern ${JSON.stringify(glob)}: only "<dir>/*" and literal directories are supported`);
|
|
110
|
+
const rel = relative(base, resolve(base, glob));
|
|
111
|
+
if (isAbsolute(glob) || rel === ".." || rel.startsWith(`..${sep}`)) throw new TypeError(`workspace directory must be inside the repo, got ${JSON.stringify(glob)}`);
|
|
112
|
+
const dir = join(base, glob);
|
|
113
|
+
try {
|
|
114
|
+
const manifest = parsePackageJson(options.readFile(join(dir, "package.json")));
|
|
115
|
+
return manifest ? [{
|
|
116
|
+
name: manifest.name,
|
|
117
|
+
dir,
|
|
118
|
+
relativeDir: glob,
|
|
119
|
+
manifest
|
|
120
|
+
}] : [];
|
|
121
|
+
} catch {
|
|
122
|
+
return [];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** `relativeDir` against an exclusion: the same directory, or a child of `<dir>/*`. */
|
|
126
|
+
function matches(relativeDir, pattern) {
|
|
127
|
+
if (pattern.endsWith("/*")) {
|
|
128
|
+
const parent = pattern.slice(0, -2);
|
|
129
|
+
return relativeDir.startsWith(`${parent}/`) && !relativeDir.slice(parent.length + 1).includes("/");
|
|
130
|
+
}
|
|
131
|
+
return relativeDir === pattern;
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
12
134
|
//#region src/generators/codecov/codecov.ts
|
|
13
135
|
/**
|
|
14
136
|
* `codecov.yml` generation — a manifest-derived artifact (component `paths`
|
|
@@ -28,11 +150,11 @@ function scaffoldHeader() {
|
|
|
28
150
|
}
|
|
29
151
|
function codecovComponentBlock(packages) {
|
|
30
152
|
if (packages.length === 0) return "\n []\n";
|
|
31
|
-
return "\n" + packages.flatMap(({ slug, dir }) => [
|
|
153
|
+
return "\n" + packages.flatMap(({ slug, dir, path }) => [
|
|
32
154
|
` - component_id: ${slug}`,
|
|
33
155
|
` name: "${slug}"`,
|
|
34
156
|
` paths:`,
|
|
35
|
-
` - ${dir ?? "packages"}/${slug}/**`,
|
|
157
|
+
` - ${path ?? `${dir ?? "packages"}/${slug}`}/**`,
|
|
36
158
|
``
|
|
37
159
|
]).join("\n");
|
|
38
160
|
}
|
|
@@ -77,25 +199,37 @@ function mergeCodecovComponents(existing, packages) {
|
|
|
77
199
|
return ensureIfNotFound(existing.slice(0, idx + 24)) + codecovComponentBlock(packages);
|
|
78
200
|
}
|
|
79
201
|
/**
|
|
80
|
-
* Every
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
202
|
+
* Every package the repo's `pnpm-workspace.yaml` declares (the default roots
|
|
203
|
+
* when it declares none), sorted by slug -- the folder name. Every one needs a
|
|
204
|
+
* codecov component so `codecov/patch/<slug>` actually posts for each. A
|
|
205
|
+
* package at `<root>/<slug>` carries `dir: <root>`; one that is itself a
|
|
206
|
+
* workspace folder (`observability`) or sits deeper (`docs/theme`) carries its
|
|
207
|
+
* `path`. Two packages with the same folder name are told apart by their full
|
|
208
|
+
* path (`docs-theme`). `[]` when there are none.
|
|
86
209
|
*/
|
|
87
210
|
function readWorkspacePackages(repoRoot) {
|
|
88
|
-
|
|
89
|
-
"packages",
|
|
90
|
-
"apps",
|
|
91
|
-
"plugins"
|
|
92
|
-
] }).flatMap(({ name, relativeDir }) => {
|
|
93
|
-
const [dir, slug] = relativeDir.split("/");
|
|
211
|
+
const found = discoverWorkspacePackages(repoRoot).flatMap(({ name, relativeDir }) => {
|
|
94
212
|
return name ? [{
|
|
95
|
-
slug,
|
|
96
213
|
name,
|
|
97
|
-
|
|
214
|
+
relativeDir,
|
|
215
|
+
folder: relativeDir.split("/").at(-1)
|
|
98
216
|
}] : [];
|
|
217
|
+
});
|
|
218
|
+
const taken = /* @__PURE__ */ new Map();
|
|
219
|
+
for (const { folder } of found) taken.set(folder, (taken.get(folder) ?? 0) + 1);
|
|
220
|
+
return found.map(({ name, relativeDir, folder }) => {
|
|
221
|
+
const slug = taken.get(folder) > 1 ? relativeDir.replaceAll("/", "-") : folder;
|
|
222
|
+
const segments = relativeDir.split("/");
|
|
223
|
+
if (segments.length === 2 && slug === folder) return {
|
|
224
|
+
slug,
|
|
225
|
+
name,
|
|
226
|
+
dir: segments[0]
|
|
227
|
+
};
|
|
228
|
+
return {
|
|
229
|
+
slug,
|
|
230
|
+
name,
|
|
231
|
+
path: relativeDir
|
|
232
|
+
};
|
|
99
233
|
}).sort((a, b) => a.slug.localeCompare(b.slug));
|
|
100
234
|
}
|
|
101
235
|
/** A brand-new `codecov.yml` — the scaffold header + the base template + this repo's component list. */
|
|
@@ -2160,18 +2294,12 @@ async function waitForPublished({ packages, run, sleep, now, cwd, timeoutMs = WA
|
|
|
2160
2294
|
//#endregion
|
|
2161
2295
|
//#region src/tasks/deploy-on-release/workspace-packages/workspace-packages.ts
|
|
2162
2296
|
/**
|
|
2163
|
-
* Every package
|
|
2164
|
-
*
|
|
2165
|
-
*
|
|
2166
|
-
* apps into `apps/*`, siblings to `packages/*`.
|
|
2297
|
+
* Every package the repo's `pnpm-workspace.yaml` declares (`packages/*`,
|
|
2298
|
+
* `apps/*` and `plugins/*` when it declares none) with a readable, named
|
|
2299
|
+
* `package.json`.
|
|
2167
2300
|
*/
|
|
2168
2301
|
function workspacePackages(repoRoot, { readJson, listDirs }) {
|
|
2169
|
-
return
|
|
2170
|
-
roots: [
|
|
2171
|
-
"packages",
|
|
2172
|
-
"apps",
|
|
2173
|
-
"plugins"
|
|
2174
|
-
],
|
|
2302
|
+
return discoverWorkspacePackages(repoRoot, {
|
|
2175
2303
|
readFile: (path) => JSON.stringify(readJson(path)),
|
|
2176
2304
|
listDirs: (path) => {
|
|
2177
2305
|
try {
|
|
@@ -2656,4 +2784,4 @@ function createIgnoreConfig$1() {
|
|
|
2656
2784
|
return `${workflowHeader()}${_yamlignore_default}`;
|
|
2657
2785
|
}
|
|
2658
2786
|
//#endregion
|
|
2659
|
-
export { CI_ORDER, KNOWN_TASKS, KNOWN_WORKFLOWS, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, TASKS, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, codecovComponentBlock, codecovConfig, createIgnoreConfig as createAlexignore, createRcConfig as createAlexrc, createAstromech, createCodecovConfig, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createHeader, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig$1 as createYamlignore, createConfig$9 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, ensureIfNotFound, extractPreviewConfig, generateCombinedDeployContent, generateThinCallerContent, matchNamespace, mergeCodecovComponents, normalizeWorkflowWith, readWorkspacePackages, requiredChecks, reusableTemplates, runCi, runGroup, runTask, workspacePackages };
|
|
2787
|
+
export { CI_ORDER, DEFAULT_WORKSPACE_ROOTS, KNOWN_TASKS, KNOWN_WORKFLOWS, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, TASKS, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, codecovComponentBlock, codecovConfig, createIgnoreConfig as createAlexignore, createRcConfig as createAlexrc, createAstromech, createCodecovConfig, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createHeader, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig$1 as createYamlignore, createConfig$9 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, discoverWorkspacePackages, ensureIfNotFound, extractPreviewConfig, generateCombinedDeployContent, generateThinCallerContent, matchNamespace, mergeCodecovComponents, normalizeWorkflowWith, readWorkspaceGlobs, readWorkspacePackages, requiredChecks, resolveWorkspaceGlobs, reusableTemplates, runCi, runGroup, runTask, workspacePackages };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.240",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@theholocron/fs-utils": "^1.16.0",
|
|
49
49
|
"@theholocron/json-utils": "^1.16.0",
|
|
50
50
|
"@theholocron/pkg-utils": "^1.16.0",
|
|
51
|
-
"@theholocron/datapad": "5.0.0-alpha.
|
|
51
|
+
"@theholocron/datapad": "5.0.0-alpha.240"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@commitlint/config-conventional": "^21.2.3",
|