@elumixor/devkit 0.12.7 → 0.12.9

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
@@ -307,11 +307,12 @@ of `@vercel/blob`: public blobs are served at `https://<host>/_blob/<path>`.
307
307
 
308
308
  CI assumes the `dk-deploy` role through GitHub's OIDC provider, so no AWS keys are stored anywhere.
309
309
  `bootstrap` also writes a scoped `devkit` AWS profile for deploying from a laptop. `examples/hello`
310
- exercises every feature; it and the dashboard are what `.github/workflows/deploy-cloud.yml` deploys.
310
+ exercises every feature and is what `.github/workflows/deploy-cloud.yml` deploys.
311
311
 
312
312
  ### Dashboard and MCP
313
313
 
314
- [devkit.atmagaming.com](https://devkit.atmagaming.com) (`apps/dashboard`) shows every project and
314
+ [devkit.atmagaming.com](https://devkit.atmagaming.com) ([elumixor/desk-devkit](https://github.com/elumixor/desk-devkit),
315
+ a SvelteKit app in the desk suite's style) shows every project and
315
316
  stage, what is live, the last day's calls, errors and p95, the deploy history and the function
316
317
  logs. It is itself a project on the platform; its function may read the deploy records, CloudWatch
317
318
  metrics and `dk-*` log groups through the `permissions` option. Sign-in is the desk suite's Clerk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elumixor/devkit",
3
- "version": "0.12.7",
3
+ "version": "0.12.9",
4
4
  "description": "Dev orchestrator for bun monorepos — free ports, run apps side-by-side, open the browser when ready",
5
5
  "author": "elumixor",
6
6
  "license": "ISC",
@@ -266,7 +266,13 @@ export async function deployPolicy(): Promise<PolicyDocument> {
266
266
  };
267
267
  }
268
268
 
269
- /** The role GitHub Actions assumes: only `elumixor/*` repos, only on the branches that deploy. */
269
+ /** elumixor's GitHub account id, which repos made since GitHub's immutable OIDC subjects name instead of a path. */
270
+ const GITHUB_OWNER_ID = 12294750;
271
+
272
+ /**
273
+ * The role GitHub Actions assumes: only `elumixor/*` repos, only on the branches that deploy. Older repos send
274
+ * `repo:elumixor/<repo>:…`, newer ones `repo:elumixor@<owner id>/<repo>@<repo id>:…`.
275
+ */
270
276
  export async function ensureDeployRole(branches: readonly string[]) {
271
277
  const account = await accountId();
272
278
  const policyArn = await ensureManagedPolicy(platform.deployPolicy, await deployPolicy());
@@ -282,9 +288,10 @@ export async function ensureDeployRole(branches: readonly string[]) {
282
288
  Condition: {
283
289
  StringEquals: { "token.actions.githubusercontent.com:aud": "sts.amazonaws.com" },
284
290
  StringLike: {
285
- "token.actions.githubusercontent.com:sub": branches.map(
286
- (branch) => `repo:elumixor/*:ref:refs/heads/${branch}`,
287
- ),
291
+ "token.actions.githubusercontent.com:sub": branches.flatMap((branch) => [
292
+ `repo:elumixor/*:ref:refs/heads/${branch}`,
293
+ `repo:elumixor@${GITHUB_OWNER_ID}/*:ref:refs/heads/${branch}`,
294
+ ]),
288
295
  },
289
296
  },
290
297
  },
@@ -99,6 +99,8 @@ export async function release(target: Target, options: ReleaseOptions) {
99
99
  log(" made a CRON_SECRET for the stage");
100
100
  }
101
101
  const env: Env = {
102
+ // What Vercel sets on every deployment, so `NODE_ENV === "production"` checks read the same here.
103
+ NODE_ENV: "production",
102
104
  ...stageEnv,
103
105
  DK_PROJECT: target.project,
104
106
  DK_STAGE: target.stage,