@reelout/context 0.4.1 → 0.4.3
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 +41 -0
- package/dist/index.js +1 -2
- package/package.json +5 -5
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @reelout/context
|
|
2
|
+
|
|
3
|
+
Release execution context for
|
|
4
|
+
[ReelOut](https://github.com/reelout/reelout). This package creates the
|
|
5
|
+
`ReleaseContext` used by the workflow and its plugins, including repository and
|
|
6
|
+
commit details, branch rules, a logger, and release plans.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install @reelout/context
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This ESM-only package requires Node.js `>=24.15`.
|
|
15
|
+
|
|
16
|
+
## API
|
|
17
|
+
|
|
18
|
+
- `createContext(options)` — resolve the repository, current commit, and branch; apply release rules; and create a context for `executeReleaseWorkflow`. `options` combines resolved configuration (from `resolveConfig`) with runtime options such as `cwd`, `env`, `stdout`, `stderr`, and `dryRun`.
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { resolveConfig } from '@reelout/config'
|
|
22
|
+
import { createContext } from '@reelout/context'
|
|
23
|
+
|
|
24
|
+
const cwd = process.cwd()
|
|
25
|
+
|
|
26
|
+
const config = await resolveConfig(cwd)
|
|
27
|
+
|
|
28
|
+
const context = await createContext({
|
|
29
|
+
...config,
|
|
30
|
+
cwd,
|
|
31
|
+
env: process.env,
|
|
32
|
+
stdout: process.stdout,
|
|
33
|
+
stderr: process.stderr,
|
|
34
|
+
dryRun: true,
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Documentation
|
|
39
|
+
|
|
40
|
+
- [Programmatic API guide](https://github.com/reelout/reelout/blob/main/docs/05-api.md)
|
|
41
|
+
- [API reference](https://reelout.overview.vercel.app/)
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GIT_TRAILER_RELEASE_AGENT, findReleaseRule, getCurrentGitBranch, getCurrentGitCommit, resolveGitRepository, resolveReleaseChannel, resolveVersionQualifier } from "@reelout/core";
|
|
2
2
|
import { LogLevels, createConsola } from "consola/basic";
|
|
3
|
-
|
|
3
|
+
// src/createContext.ts
|
|
4
4
|
/**
|
|
5
5
|
* Initialize a release context for the current execution run.
|
|
6
6
|
*
|
|
@@ -82,7 +82,6 @@ async function createContext(options) {
|
|
|
82
82
|
error: null
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
//#endregion
|
|
86
85
|
export { createContext };
|
|
87
86
|
|
|
88
87
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reelout/context",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.3",
|
|
4
|
+
"description": "Creates the release execution context from Git state, resolved configuration, and runtime options.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/reelout/reelout.git",
|
|
8
8
|
"directory": "packages/context"
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"./src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@reelout/config": "^0.4.
|
|
36
|
-
"@reelout/core": "^0.5.
|
|
35
|
+
"@reelout/config": "^0.4.3",
|
|
36
|
+
"@reelout/core": "^0.5.1",
|
|
37
37
|
"consola": "^3.4.2"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|