versimo 0.2.0 → 0.3.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/CHANGELOG.md +11 -0
- package/README.md +3 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +59 -0
- package/dist/client.d.ts +7 -0
- package/dist/client.js +17 -0
- package/dist/deploy.d.ts +29 -0
- package/dist/deploy.js +29 -0
- package/dist/github/app-auth.d.ts +14 -0
- package/dist/github/app-auth.js +63 -0
- package/dist/github/client.d.ts +64 -0
- package/dist/github/client.js +127 -0
- package/dist/github/index.d.ts +4 -0
- package/dist/github/index.js +4 -0
- package/dist/github/tags.d.ts +20 -0
- package/dist/github/tags.js +56 -0
- package/dist/github/webhook.d.ts +5 -0
- package/dist/github/webhook.js +23 -0
- package/dist/health.d.ts +50 -0
- package/dist/health.js +68 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/monitor.d.ts +67 -0
- package/dist/monitor.js +148 -0
- package/dist/posthog.d.ts +42 -0
- package/dist/posthog.js +96 -0
- package/dist/transitions.js +2 -0
- package/dist/types.d.ts +4 -0
- package/dist/validate.js +3 -1
- package/docs/api.md +68 -1
- package/docs/concepts.md +3 -1
- package/docs/github-app.md +90 -0
- package/docs/health.md +76 -0
- package/docs/porting.md +19 -0
- package/docs/record-format.md +1 -0
- package/docs/usage.md +61 -3
- package/github-app/manifest.json +19 -0
- package/package.json +16 -2
- package/schema/module-record.schema.json +2 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# GitHub app
|
|
2
|
+
|
|
3
|
+
The Versimo GitHub app connects a repository to a Versimo project. It does two things and no more:
|
|
4
|
+
|
|
5
|
+
1. It reads the repository's tags to find your modules and their versions.
|
|
6
|
+
2. It opens pull requests for drafts and patches, with auto merge turned on, so they merge once your checks are green.
|
|
7
|
+
|
|
8
|
+
It never pushes to `main`. Every change arrives as a normal pull request that your branch rules and reviews apply to.
|
|
9
|
+
|
|
10
|
+
## Modules and versions come from tags
|
|
11
|
+
|
|
12
|
+
Tag each release of a module as `module/vX.Y.Z`:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
git tag -s billing/v2.4.0 -m "billing 2.4.0"
|
|
16
|
+
git push origin billing/v2.4.0
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The module is a lower-case slug, the same rule as the record's `module` field. Other tags, such as `v1.0.0` or `packages/go/v0.2.0`, are ignored.
|
|
20
|
+
|
|
21
|
+
For a module with no record yet, Versimo starts one from its tags: current is the newest stable version, last is the one before it, next is empty and rollout is 0. Pre-release tags such as `billing/v2.5.0-rc.1` are listed but never become current on their own. You choose when to draft next.
|
|
22
|
+
|
|
23
|
+
## Permissions
|
|
24
|
+
|
|
25
|
+
| Permission | Level | Why |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| Metadata | Read | Required by GitHub for every app |
|
|
28
|
+
| Contents | Write | Read code and tags, and create the branch a pull request comes from |
|
|
29
|
+
| Pull requests | Write | Open pull requests and turn on auto merge |
|
|
30
|
+
|
|
31
|
+
Events: `create` (a new tag adds its module) and `pull_request` (a draft or patch merged or closed). GitHub also sends `installation` events, so uninstalling the app disconnects its projects.
|
|
32
|
+
|
|
33
|
+
GitHub has no permission for "create branches but not push to main". Contents write is the narrowest level that lets an app open a pull request from its own branch. Versimo keeps the promise in two ways:
|
|
34
|
+
|
|
35
|
+
- **In the code.** The client in `versimo/github` has exactly one write: it creates a new branch from the base, commits to it and opens a pull request. It creates refs and never updates or deletes one, and it refuses a head branch named `main`, `master`, the default branch or the base. There is no code path that moves an existing branch.
|
|
36
|
+
- **In your repository.** Add a branch ruleset on your default branch that requires a pull request before merging. Then no app, Versimo included, can push to it directly.
|
|
37
|
+
|
|
38
|
+
Auto merge needs "Allow auto-merge" on in the repository's settings. When it is off, the pull request still opens and Versimo tells you auto merge could not be turned on.
|
|
39
|
+
|
|
40
|
+
## Using it from code
|
|
41
|
+
|
|
42
|
+
The pieces the Versimo app uses are in the library, under `versimo/github`. They use `fetch` and WebCrypto only, so they run on Node 20, Cloudflare Workers and Deno.
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { createAppJwt, getInstallationToken, createGitHub, recordFromTags } from 'versimo/github';
|
|
46
|
+
|
|
47
|
+
const jwt = await createAppJwt({ appId: env.GITHUB_APP_ID, privateKey: env.GITHUB_APP_PRIVATE_KEY });
|
|
48
|
+
const { token } = await getInstallationToken({ jwt, installationId });
|
|
49
|
+
const github = createGitHub({ token });
|
|
50
|
+
|
|
51
|
+
const modules = await github.moduleVersions('acme', 'shop');
|
|
52
|
+
// { billing: ['2.4.0', '2.3.1'], search: ['1.0.0'] }
|
|
53
|
+
const record = recordFromTags('billing', modules.billing!);
|
|
54
|
+
|
|
55
|
+
const pr = await github.openPullRequest({
|
|
56
|
+
owner: 'acme',
|
|
57
|
+
repo: 'shop',
|
|
58
|
+
head: 'versimo/billing-v2.4.1',
|
|
59
|
+
title: 'billing 2.4.1',
|
|
60
|
+
files: [{ path: 'src/billing/fix.ts', content: '...' }],
|
|
61
|
+
});
|
|
62
|
+
// { number: 7, url: '...', autoMerge: true }
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Check webhooks before you trust them:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
import { verifyWebhookSignature } from 'versimo/github';
|
|
69
|
+
|
|
70
|
+
const body = await request.text();
|
|
71
|
+
if (!(await verifyWebhookSignature(env.GITHUB_WEBHOOK_SECRET, body, request.headers.get('x-hub-signature-256')))) {
|
|
72
|
+
return new Response('bad signature', { status: 401 });
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Registering the app
|
|
77
|
+
|
|
78
|
+
This is done once, by the owner of the `luca-sia` organisation. The manifest is in [`github-app/manifest.json`](../github-app/manifest.json).
|
|
79
|
+
|
|
80
|
+
1. Open `https://github.com/organizations/luca-sia/settings/apps/new` and register the app from the manifest (GitHub's [manifest flow](https://docs.github.com/en/apps/sharing-github-apps/registering-a-github-app-from-a-manifest)), or fill in the same values by hand.
|
|
81
|
+
2. Generate a private key and a webhook secret.
|
|
82
|
+
Keep "Request user authorization (OAuth) during installation" on, as the manifest sets it. The API checks with the installer's own token that they can see the installation before it connects a repo.
|
|
83
|
+
3. Generate a client secret too. Save the app id, client id, client secret, private key and webhook secret in 1Password, never in the repository.
|
|
84
|
+
4. Give them to the API Worker (`api/`): `GITHUB_APP_ID` and `GITHUB_CLIENT_ID` as vars, `GITHUB_CLIENT_SECRET`, `GITHUB_APP_PRIVATE_KEY` and `GITHUB_WEBHOOK_SECRET` as secrets. See [api/README.md](../api/README.md).
|
|
85
|
+
|
|
86
|
+
The webhook and callback URLs in the manifest point at the API Worker on `versimo.dev`: `/api/github/webhook` and `/app/github/callback`.
|
|
87
|
+
|
|
88
|
+
## Connecting a repo in the app
|
|
89
|
+
|
|
90
|
+
On a project, Connect GitHub sends you to `GET /api/projects/:id/github/install`, which goes on to GitHub. Pick the repos the app may see. Back in the app, a single repo connects at once. With several, you pick one. Every module with a stable tag is added to the project, and later a new module's first stable tag adds it. Tags never change a module that exists.
|
package/docs/health.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Health checks
|
|
2
|
+
|
|
3
|
+
If current fails, traffic goes back to last on its own and the fix ships as a semver patch. This page is how Versimo does the first half.
|
|
4
|
+
|
|
5
|
+
## Checks
|
|
6
|
+
|
|
7
|
+
Each module gets its own limits. Leave one out to turn it off.
|
|
8
|
+
|
|
9
|
+
| Check | Field | Fails when |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Error rate | `maxErrorRate` (0 to 1) | `errors / requests` is above it, once there are at least `minRequests` requests (default 1) |
|
|
12
|
+
| Latency | `maxLatencyMs` | the measured latency (usually p95) is above it |
|
|
13
|
+
| Custom URL | `url` | the URL does not answer with a 2xx status, or cannot be reached |
|
|
14
|
+
|
|
15
|
+
A value equal to the limit passes.
|
|
16
|
+
|
|
17
|
+
## What happens on a failure
|
|
18
|
+
|
|
19
|
+
1. Current steps back to last. This is `rollback`: last becomes current, next and the rollout are cleared.
|
|
20
|
+
2. The history entry says why, for example `{ "action": "rollback", "by": "versimo-health", "reason": "health: errorRate" }`.
|
|
21
|
+
3. An alert is sent.
|
|
22
|
+
|
|
23
|
+
If there is no last, nothing changes and only the alert goes out, once per failing version.
|
|
24
|
+
|
|
25
|
+
Then draft the fix as a patch, `draftNext(record, '2.4.1', { patch: true })`, and roll it out as usual.
|
|
26
|
+
|
|
27
|
+
## Running it
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { createHealthMonitor } from 'versimo';
|
|
31
|
+
|
|
32
|
+
const monitor = createHealthMonitor({
|
|
33
|
+
store: {
|
|
34
|
+
read: (module) => loadRecord(module), // your record store
|
|
35
|
+
write: (record) => saveRecord(record),
|
|
36
|
+
},
|
|
37
|
+
checks: {
|
|
38
|
+
billing: { maxErrorRate: 0.02, maxLatencyMs: 800, url: 'https://billing.example.com/health', minRequests: 100 },
|
|
39
|
+
},
|
|
40
|
+
posthog: {
|
|
41
|
+
host: 'https://eu.posthog.com',
|
|
42
|
+
projectId: process.env.POSTHOG_PROJECT_ID!,
|
|
43
|
+
apiKey: process.env.POSTHOG_PERSONAL_API_KEY!,
|
|
44
|
+
},
|
|
45
|
+
observe: async (module) => ({ latencyMs: await p95(module) }), // optional, your own numbers
|
|
46
|
+
alert: process.env.SLACK_WEBHOOK_URL, // or a function
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const stop = monitor.start(['billing', 'sign-in'], 60_000);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`monitor.check('billing')` runs once, which suits a cron job or a scheduled Worker.
|
|
53
|
+
|
|
54
|
+
The numbers come from three places, and later ones win: PostHog, the URL check, then your `observe` function.
|
|
55
|
+
|
|
56
|
+
## PostHog error tracking
|
|
57
|
+
|
|
58
|
+
When `posthog` is set and a module has `maxErrorRate`, the monitor asks PostHog how many events and how many `$exception` events there were for that module and version in the last `windowMinutes` (default 5).
|
|
59
|
+
|
|
60
|
+
For this to work, tag your events with the module and the version the user got:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
posthog.register({ versimo_module: 'billing', versimo_version: version });
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The property names can be changed with `moduleProperty` and `versionProperty`. The API key needs query read access. Keep it in your secret store, never in the repo.
|
|
67
|
+
|
|
68
|
+
## Alerts
|
|
69
|
+
|
|
70
|
+
A webhook URL gets a JSON POST with `module`, `at`, `version`, `rolledBack`, `current`, `failures` and `text`. The `text` field makes it work with a Slack incoming webhook as it is:
|
|
71
|
+
|
|
72
|
+
> Versimo: billing 2.4.0 failed its health checks (errorRate). Rolled back to 2.3.1.
|
|
73
|
+
|
|
74
|
+
## Other languages
|
|
75
|
+
|
|
76
|
+
`evaluateHealth` and `checkHealth` are in every port and give the same result, checked by the `health` cases in [spec/vectors.json](../spec/vectors.json). The monitor is TypeScript only for now. In another language, measure, call `checkHealth`, and save the record when `rolledBack` is true.
|
package/docs/porting.md
CHANGED
|
@@ -11,8 +11,11 @@ The reference is the TypeScript source in `src/`. The shared test data is [spec/
|
|
|
11
11
|
- `draftNext`, `promote`, `rollback` and `setRollout`
|
|
12
12
|
- `validateRecord`
|
|
13
13
|
- Semver check and compare
|
|
14
|
+
- `evaluateHealth` and `checkHealth`
|
|
14
15
|
- A client with a source (a function, or a URL), a TTL cache and stale-on-error
|
|
15
16
|
|
|
17
|
+
A PostHog rollout source is optional. If a port has one, `rolloutFromFlag` must pass the `posthog` vectors, and the client applies the share to the record before resolving. PostHog only sets the share. The bucket always decides who is on next.
|
|
18
|
+
|
|
16
19
|
An OpenFeature provider is optional. Add it only when the language has a way to do it without a dependency.
|
|
17
20
|
|
|
18
21
|
## The bucket
|
|
@@ -55,6 +58,8 @@ Each transition returns a new record, sets `updatedAt` to the time of the change
|
|
|
55
58
|
| `rollback` | `last = null`, `current = last`, `next = null`, `rollout = 0`, `healthy = true` | `rollback`, current, last |
|
|
56
59
|
| `setRollout(n)` | `rollout = n` | `rollout`, old rollout as text, new rollout as text |
|
|
57
60
|
|
|
61
|
+
Every transition also takes an optional `reason`. When given, the history entry gets a `reason` key after `by`.
|
|
62
|
+
|
|
58
63
|
Rules that raise an error:
|
|
59
64
|
|
|
60
65
|
- `draftNext`: the version is not semver, or is not greater than `current`.
|
|
@@ -62,6 +67,19 @@ Rules that raise an error:
|
|
|
62
67
|
- `rollback`: `last` is null.
|
|
63
68
|
- `setRollout`: `n` is not an integer from 0 to 100, or `n > 0` while `next` is null.
|
|
64
69
|
|
|
70
|
+
## Health
|
|
71
|
+
|
|
72
|
+
Checks: `maxErrorRate` (0 to 1), `maxLatencyMs` (0 or more), `url` (non-empty), `minRequests` (integer, default 1). Observation: `requests`, `errors` (integers), `latencyMs` (0 or more), `urlStatus` (integer, 0 for unreachable). A missing key turns the check off or skips it.
|
|
73
|
+
|
|
74
|
+
1. Reject bad input with `INVALID_INPUT`: a limit out of range, a negative or fractional count, `errors` above `requests`, NaN or infinity.
|
|
75
|
+
2. Error rate: when `maxErrorRate`, `requests` and `errors` are all set and `requests >= max(1, minRequests)`, compute `errors / requests` as a double. It fails when the rate is above the limit.
|
|
76
|
+
3. Latency: fails when `latencyMs` is above `maxLatencyMs`.
|
|
77
|
+
4. URL: fails when `url` is set and `urlStatus` is set and outside 200 to 299. The limit is null.
|
|
78
|
+
5. Failures come in that order, as `{ check, value, limit }`.
|
|
79
|
+
6. `checkHealth`: when the verdict fails and `last` is set, call `rollback` with `by` defaulting to `versimo-health` and `reason` set to `health: ` and the failed check names joined by `, `. Otherwise return the record unchanged with `rolledBack` false.
|
|
80
|
+
|
|
81
|
+
Limits are inclusive: a value equal to the limit passes. The runner that measures and alerts (`createHealthMonitor`) is TypeScript only for now. Ports need the pure part.
|
|
82
|
+
|
|
65
83
|
## Validation
|
|
66
84
|
|
|
67
85
|
`validateRecord` takes any JSON value and never fails. It returns `ok` and a list of error messages. Each message starts with the name of the field, such as `rollout must be an integer from 0 to 100` or `history[1].at must be an ISO 8601 date-time`. Copy the messages from `src/validate.ts`. The vectors compare only the field name at the start of each message, and their order.
|
|
@@ -105,6 +123,7 @@ The pattern is the one in `schema/module-record.schema.json`. Compare as the sem
|
|
|
105
123
|
| `validation` | `name`, `record`, `ok`, `errors` | Agree on `ok` and on the field names, in order |
|
|
106
124
|
| `semver.compare` | `a`, `b`, `expected` | Return -1, 0 or 1 |
|
|
107
125
|
| `semver.valid` | `value`, `valid` | Agree on validity |
|
|
126
|
+
| `health` | `name`, `record`, `checks`, `observation`, `now`, `by`, then `expected` or `error` | Return the same record, verdict and `rolledBack`, or fail with that error code |
|
|
108
127
|
|
|
109
128
|
For transitions, `op` is `promote`, `rollback`, `setRollout` (with `args.n`) or `draftNext` (with `args.version` and an optional `args.patch`). `now` is a fixed time in UTC with milliseconds. A typed port can skip a case that its types rule out, such as a fractional rollout, as long as the type system rejects it.
|
|
110
129
|
|
package/docs/record-format.md
CHANGED
|
@@ -43,6 +43,7 @@ No other fields are allowed.
|
|
|
43
43
|
| `from` | string or null | yes | Value before the change |
|
|
44
44
|
| `to` | string or null | yes | Value after the change |
|
|
45
45
|
| `by` | string | no | Who made the change |
|
|
46
|
+
| `reason` | string | no | Why. An automatic rollback writes the failed checks, for example `health: errorRate` |
|
|
46
47
|
|
|
47
48
|
For `draft`, `promote`, `rollback` and `patch`, `from` and `to` are versions. For `rollout` they are the old and new percentages as strings, for example `"10"` and `"25"`.
|
|
48
49
|
|
package/docs/usage.md
CHANGED
|
@@ -131,15 +131,52 @@ The default value you pass is returned on errors. Boolean, number and object eva
|
|
|
131
131
|
|
|
132
132
|
If your installed OpenFeature version types the provider differently, the provider still works at runtime. A small cast is enough.
|
|
133
133
|
|
|
134
|
-
## PostHog flags
|
|
134
|
+
## PostHog flags drive next
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
PostHog can hold the share of users on next for each module, so a rollout change needs no deploy and no record write. Versimo still does the bucketing: PostHog says how many users get next, `bucketFor` says which ones. A user lands on the same version in every language, with or without PostHog.
|
|
137
|
+
|
|
138
|
+
Set up one PostHog flag per module:
|
|
139
|
+
|
|
140
|
+
- Key `versimo-<module>`, for example `versimo-billing`.
|
|
141
|
+
- Release condition 100% of users. Do not use PostHog's own percentage.
|
|
142
|
+
- Payload `{"rollout": 25}`, a whole number from 0 to 100.
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
import { createClient, postHogRollout } from 'versimo';
|
|
146
|
+
|
|
147
|
+
const versimo = createClient({
|
|
148
|
+
source: 'https://example.com/versimo/',
|
|
149
|
+
rollout: postHogRollout({
|
|
150
|
+
apiKey: process.env.POSTHOG_PROJECT_KEY!, // phc_..., the public project key
|
|
151
|
+
host: 'https://eu.i.posthog.com', // the default, or https://us.i.posthog.com for US projects
|
|
152
|
+
}),
|
|
153
|
+
});
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
How the flag is read:
|
|
157
|
+
|
|
158
|
+
| PostHog | Share on next |
|
|
159
|
+
| --- | --- |
|
|
160
|
+
| Payload `{"rollout": n}` | n |
|
|
161
|
+
| Flag on, no usable payload | the record's `rollout` |
|
|
162
|
+
| Flag on but not served (off for the `versimo` id) | 0, everyone leaves next |
|
|
163
|
+
| Flag missing, disabled in PostHog, or PostHog down | the record's `rollout` |
|
|
164
|
+
|
|
165
|
+
Health always wins. When `healthy` is false users get last, whatever PostHog says.
|
|
166
|
+
|
|
167
|
+
One request to `/flags?v=2` serves every module, once per TTL (30 seconds by default). When PostHog cannot be reached the last good answer is kept, and with none the record's own rollout is used.
|
|
168
|
+
|
|
169
|
+
No user data goes to PostHog. The request carries only the project key and the fixed distinct id `versimo`. User ids stay in the app.
|
|
170
|
+
|
|
171
|
+
The same works in Python (`Client(source, rollout=PostHogRollout(api_key))`) and Go (`ClientOptions{Rollout: rollout}` with `NewPostHogRollout`).
|
|
172
|
+
|
|
173
|
+
You can also keep the whole record in the flag payload and use PostHog as the source. The `rollout` field of that record is read the same way.
|
|
137
174
|
|
|
138
175
|
```ts
|
|
139
176
|
import { PostHog } from 'posthog-node';
|
|
140
177
|
import { createClient, type ModuleRecord } from 'versimo';
|
|
141
178
|
|
|
142
|
-
const posthog = new PostHog(process.env.
|
|
179
|
+
const posthog = new PostHog(process.env.POSTHOG_PROJECT_KEY!);
|
|
143
180
|
|
|
144
181
|
const versimo = createClient({
|
|
145
182
|
source: async (module) => {
|
|
@@ -165,6 +202,27 @@ versimo.clear('billing'); // make this process see it at once
|
|
|
165
202
|
|
|
166
203
|
Other processes see the change after their cache expires.
|
|
167
204
|
|
|
205
|
+
## versimo.dev
|
|
206
|
+
|
|
207
|
+
A project on [versimo.dev/app](https://versimo.dev/app) keeps your records for you. It gives you two keys.
|
|
208
|
+
|
|
209
|
+
The read key only reads records. It is safe in a browser bundle:
|
|
210
|
+
|
|
211
|
+
```ts
|
|
212
|
+
const versimo = createClient({ source: `https://versimo.dev/api/records/${VERSIMO_READ_KEY}` });
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The deploy key changes modules. Keep it in CI secrets. If your pipeline already ships next, promote and rollback, tell Versimo after each step:
|
|
216
|
+
|
|
217
|
+
```sh
|
|
218
|
+
npx versimo draft app 1.4.0 # next uploaded at 0%
|
|
219
|
+
npx versimo rollout app 10
|
|
220
|
+
npx versimo promote app
|
|
221
|
+
npx versimo rollback app # after an automatic return to last
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The command reads `VERSIMO_DEPLOY_KEY`. From code, use `createDeployClient({ key })`, which has the same calls.
|
|
225
|
+
|
|
168
226
|
## Health checks
|
|
169
227
|
|
|
170
228
|
Your monitoring decides when current is unhealthy. When it does, write the record with `healthy: false`. Users get last at once. Then call `rollback` to make it permanent, and ship the fix as a patch.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Versimo",
|
|
3
|
+
"url": "https://versimo.dev",
|
|
4
|
+
"description": "Reads module tags and opens pull requests for drafts and patches. Never pushes to main.",
|
|
5
|
+
"hook_attributes": {
|
|
6
|
+
"url": "https://versimo.dev/api/github/webhook",
|
|
7
|
+
"active": true
|
|
8
|
+
},
|
|
9
|
+
"redirect_url": "https://versimo.dev/app",
|
|
10
|
+
"callback_urls": ["https://versimo.dev/app/github/callback"],
|
|
11
|
+
"request_oauth_on_install": true,
|
|
12
|
+
"public": true,
|
|
13
|
+
"default_permissions": {
|
|
14
|
+
"metadata": "read",
|
|
15
|
+
"contents": "write",
|
|
16
|
+
"pull_requests": "write"
|
|
17
|
+
},
|
|
18
|
+
"default_events": ["create", "pull_request"]
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "versimo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Release model with no staging. Resolve last, current and next versions of a module for each user.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/luca-sia/versimo/issues"
|
|
15
15
|
},
|
|
16
|
-
"keywords": [
|
|
16
|
+
"keywords": [
|
|
17
|
+
"release",
|
|
18
|
+
"rollout",
|
|
19
|
+
"feature-flags",
|
|
20
|
+
"openfeature",
|
|
21
|
+
"versioning"
|
|
22
|
+
],
|
|
17
23
|
"engines": {
|
|
18
24
|
"node": ">=20"
|
|
19
25
|
},
|
|
@@ -25,12 +31,17 @@
|
|
|
25
31
|
"types": "./dist/index.d.ts",
|
|
26
32
|
"default": "./dist/index.js"
|
|
27
33
|
},
|
|
34
|
+
"./github": {
|
|
35
|
+
"types": "./dist/github/index.d.ts",
|
|
36
|
+
"default": "./dist/github/index.js"
|
|
37
|
+
},
|
|
28
38
|
"./schema": "./schema/module-record.schema.json",
|
|
29
39
|
"./package.json": "./package.json"
|
|
30
40
|
},
|
|
31
41
|
"files": [
|
|
32
42
|
"dist",
|
|
33
43
|
"schema",
|
|
44
|
+
"github-app",
|
|
34
45
|
"docs",
|
|
35
46
|
"README.md",
|
|
36
47
|
"CHANGELOG.md",
|
|
@@ -47,5 +58,8 @@
|
|
|
47
58
|
"@types/node": "^20.14.0",
|
|
48
59
|
"tsx": "^4.19.0",
|
|
49
60
|
"typescript": "^5.6.0"
|
|
61
|
+
},
|
|
62
|
+
"bin": {
|
|
63
|
+
"versimo": "./dist/cli.js"
|
|
50
64
|
}
|
|
51
65
|
}
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"action": { "enum": ["draft", "promote", "rollback", "rollout", "patch"] },
|
|
36
36
|
"from": { "type": ["string", "null"] },
|
|
37
37
|
"to": { "type": ["string", "null"] },
|
|
38
|
-
"by": { "type": "string" }
|
|
38
|
+
"by": { "type": "string" },
|
|
39
|
+
"reason": { "description": "Why the change was made, for example health: errorRate.", "type": "string" }
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
}
|