@decohere/workspace 0.0.1-dev.20261110.287 → 0.0.1-dev.20261110.313
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/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Per-project settings go under `projects`, keyed by package name: `docker` (image
|
|
|
51
51
|
|
|
52
52
|
### A project's own scripts
|
|
53
53
|
|
|
54
|
-
A project whose `package.json` declares a script for a step has a builder of its own (Astro, Vite, Angular), and Decohere's tools run that script in its folder instead of doing the step: `build` for `forge build`, `check` for `forge typecheck`, `dev` or `serve` for `flux serve`. `Project.
|
|
54
|
+
A project whose `package.json` declares a script for a step has a builder of its own (Astro, Vite, Angular), and Decohere's tools run that script in its folder instead of doing the step: `build` for `forge build`, `check` for `forge typecheck`, `dev` or `serve` for `flux serve`. `Project.getOwnScript(name)` (and `projectScripts.getOwn(scripts, name)`) is that rule, in one place. A script that calls `forge`, `flux` or `decohere` doesn't count: running it would only call the tool again. See [forge](../forge/README.md#projects-with-a-builder-of-their-own).
|
|
55
55
|
|
|
56
56
|
`--config-file` on `forge` / `flux` selects a different config path. The default is `.decohere.js` in the workspace root (`--root-dir`, else the current folder).
|
|
57
57
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* A project that declares one has a builder of its own (Astro, Vite, Angular), and Decohere's
|
|
5
5
|
* tools run that script in its folder instead of doing the step themselves. A script that calls
|
|
6
6
|
* `forge`, `flux` or `decohere` doesn't count: running it would only call the tool again.
|
|
7
|
-
*/ function
|
|
7
|
+
*/ function getOwn(scripts, name) {
|
|
8
8
|
const command = scripts?.[name];
|
|
9
9
|
if (command == null || command.trim() === "" || DECOHERE_TOOL.test(command)) return undefined;
|
|
10
10
|
return command;
|
|
11
11
|
}
|
|
12
12
|
export const projectScripts = {
|
|
13
|
-
|
|
13
|
+
getOwn
|
|
14
14
|
};
|
|
@@ -44,8 +44,8 @@ export class Project extends mixwith(HasPackageJson, HasTsConfig) {
|
|
|
44
44
|
/**
|
|
45
45
|
* The command of this project's own script for a step, when it has one that doesn't call a
|
|
46
46
|
* Decohere tool: forge and flux run it in the project's folder instead of doing the step.
|
|
47
|
-
*/
|
|
48
|
-
return projectScripts.
|
|
47
|
+
*/ getOwnScript(name) {
|
|
48
|
+
return projectScripts.getOwn(this.packageJson?.scripts, name);
|
|
49
49
|
}
|
|
50
50
|
get isPrivate() {
|
|
51
51
|
return this.packageJson?.private === true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decohere/workspace",
|
|
3
|
-
"version": "0.0.1-dev.20261110.
|
|
3
|
+
"version": "0.0.1-dev.20261110.313",
|
|
4
4
|
"description": "Workspace and project model primitives for monorepo tooling",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@decohere/core": "0.0.1-dev.20261110.
|
|
36
|
-
"@decohere/crucible": "0.0.1-dev.20261110.
|
|
37
|
-
"@decohere/devkit": "0.0.1-dev.20261110.
|
|
35
|
+
"@decohere/core": "0.0.1-dev.20261110.313",
|
|
36
|
+
"@decohere/crucible": "0.0.1-dev.20261110.313",
|
|
37
|
+
"@decohere/devkit": "0.0.1-dev.20261110.313",
|
|
38
38
|
"get-tsconfig": "^4.14.3",
|
|
39
39
|
"picomatch": "^4.0.4"
|
|
40
40
|
},
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* tools run that script in its folder instead of doing the step themselves. A script that calls
|
|
5
5
|
* `forge`, `flux` or `decohere` doesn't count: running it would only call the tool again.
|
|
6
6
|
*/
|
|
7
|
-
declare function
|
|
7
|
+
declare function getOwn(scripts: Readonly<Record<string, string>> | undefined, name: string): string | undefined;
|
|
8
8
|
export declare const projectScripts: {
|
|
9
|
-
|
|
9
|
+
getOwn: typeof getOwn;
|
|
10
10
|
};
|
|
11
11
|
export {};
|
|
@@ -22,7 +22,7 @@ export declare class Project extends Project_base {
|
|
|
22
22
|
* The command of this project's own script for a step, when it has one that doesn't call a
|
|
23
23
|
* Decohere tool: forge and flux run it in the project's folder instead of doing the step.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
getOwnScript(name: string): string | undefined;
|
|
26
26
|
get isPrivate(): boolean;
|
|
27
27
|
toString(): string;
|
|
28
28
|
get projectDirectory(): string;
|