skuba 8.1.0 → 8.2.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.
Files changed (33) hide show
  1. package/lib/api/github/checkRun.js +2 -2
  2. package/lib/api/github/checkRun.js.map +2 -2
  3. package/lib/api/github/issueComment.js +2 -2
  4. package/lib/api/github/issueComment.js.map +2 -2
  5. package/lib/api/github/octokit.d.ts +4 -0
  6. package/lib/api/github/octokit.js +3 -0
  7. package/lib/api/github/octokit.js.map +2 -2
  8. package/lib/api/github/pullRequest.d.ts +1 -1
  9. package/lib/api/github/pullRequest.js +2 -2
  10. package/lib/api/github/pullRequest.js.map +2 -2
  11. package/lib/cli/configure/index.js +2 -2
  12. package/lib/cli/configure/index.js.map +2 -2
  13. package/package.json +2 -2
  14. package/template/base/_.gitignore +1 -0
  15. package/template/base/_.npmrc +1 -0
  16. package/template/express-rest-api/.buildkite/pipeline.yml +1 -0
  17. package/template/express-rest-api/README.md +3 -3
  18. package/template/greeter/.buildkite/pipeline.yml +1 -0
  19. package/template/greeter/README.md +3 -3
  20. package/template/koa-rest-api/.buildkite/pipeline.yml +1 -0
  21. package/template/koa-rest-api/README.md +3 -3
  22. package/template/koa-rest-api/src/api/jobs/index.ts +1 -1
  23. package/template/koa-rest-api/src/app.test.ts +5 -10
  24. package/template/koa-rest-api/src/framework/validation.test.ts +1 -1
  25. package/template/lambda-sqs-worker/.buildkite/pipeline.yml +1 -0
  26. package/template/lambda-sqs-worker/README.md +3 -3
  27. package/template/lambda-sqs-worker/_.npmrc +1 -0
  28. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +1 -0
  29. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +30 -0
  30. package/template/oss-npm-package/README.md +3 -3
  31. package/template/private-npm-package/.buildkite/pipeline.yml +1 -0
  32. package/template/private-npm-package/README.md +1 -1
  33. /package/template/koa-rest-api/src/framework/{middleware.ts → bodyParser.ts} +0 -0
@@ -31,10 +31,10 @@ __export(checkRun_exports, {
31
31
  createCheckRun: () => createCheckRun
32
32
  });
33
33
  module.exports = __toCommonJS(checkRun_exports);
34
- var import_rest = require("@octokit/rest");
35
34
  var import_logging = require("../../utils/logging");
36
35
  var Git = __toESM(require("../git"));
37
36
  var import_environment = require("./environment");
37
+ var import_octokit = require("./octokit");
38
38
  const GITHUB_MAX_ANNOTATIONS = 50;
39
39
  const suffixTitle = (title, inputAnnotations) => {
40
40
  const addedAnnotations = inputAnnotations > GITHUB_MAX_ANNOTATIONS ? GITHUB_MAX_ANNOTATIONS : inputAnnotations;
@@ -59,7 +59,7 @@ const createCheckRun = async ({
59
59
  Git.getHeadCommitId({ dir }),
60
60
  Git.getOwnerAndRepo({ dir })
61
61
  ]);
62
- const client = new import_rest.Octokit({ auth: (0, import_environment.apiTokenFromEnvironment)() });
62
+ const client = await (0, import_octokit.createRestClient)({ auth: (0, import_environment.apiTokenFromEnvironment)() });
63
63
  await client.checks.create({
64
64
  conclusion,
65
65
  head_sha: commitId,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/api/github/checkRun.ts"],
4
- "sourcesContent": ["import { Octokit } from '@octokit/rest';\nimport type { Endpoints } from '@octokit/types';\n\nimport { pluralise } from '../../utils/logging';\nimport * as Git from '../git';\n\nimport { apiTokenFromEnvironment } from './environment';\n\ntype Output = NonNullable<\n Endpoints['PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}']['parameters']['output']\n>;\n\nexport type Annotation = NonNullable<Output['annotations']>[number];\n\nconst GITHUB_MAX_ANNOTATIONS = 50;\n\n/**\n * Suffixes the title with the number of annotations added, e.g.\n *\n * ```text\n * Build #12 failed (24 annotations added)\n * ```\n */\nconst suffixTitle = (title: string, inputAnnotations: number): string => {\n const addedAnnotations =\n inputAnnotations > GITHUB_MAX_ANNOTATIONS\n ? GITHUB_MAX_ANNOTATIONS\n : inputAnnotations;\n\n return `${title} (${pluralise(addedAnnotations, 'annotation')} added)`;\n};\n\n/**\n * Enriches the summary with more context about the check run.\n */\nconst createEnrichedSummary = (\n summary: string,\n inputAnnotations: number,\n): string =>\n [\n summary,\n ...(inputAnnotations > GITHUB_MAX_ANNOTATIONS\n ? [\n `${inputAnnotations} annotations were provided, but only the first ${GITHUB_MAX_ANNOTATIONS} are visible in GitHub.`,\n ]\n : []),\n ].join('\\n\\n');\n\n/**\n * {@link https://docs.github.com/en/rest/reference/checks#create-a-check-run}\n */\ninterface CreateCheckRunParameters {\n /**\n * Adds information from your analysis to specific lines of code.\n * Annotations are visible on GitHub in the **Checks** and **Files changed**\n * tab of the pull request.\n */\n annotations: Annotation[];\n\n /**\n * The final conclusion of the check.\n */\n conclusion: 'failure' | 'success';\n\n /**\n * The name of the check. For example, \"code-coverage\".\n */\n name: string;\n\n /**\n * The summary of the check run. This parameter supports Markdown.\n */\n summary: string;\n\n /**\n * The details of the check run. This parameter supports Markdown.\n */\n text?: string;\n\n /**\n * The title of the check run.\n */\n title: string;\n}\n\n/**\n * Asynchronously creates a GitHub check run with annotations.\n *\n * The first 50 `annotations` are written in full to GitHub.\n *\n * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with the `checks:write` permission\n * must be present on the environment.\n */\nexport const createCheckRun = async ({\n annotations,\n conclusion,\n name,\n summary,\n text,\n title,\n}: CreateCheckRunParameters): Promise<void> => {\n const dir = process.cwd();\n\n const [commitId, { owner, repo }] = await Promise.all([\n Git.getHeadCommitId({ dir }),\n Git.getOwnerAndRepo({ dir }),\n ]);\n\n const client = new Octokit({ auth: apiTokenFromEnvironment() });\n\n await client.checks.create({\n conclusion,\n head_sha: commitId,\n name,\n output: {\n annotations: annotations.slice(0, GITHUB_MAX_ANNOTATIONS),\n summary: createEnrichedSummary(summary, annotations.length),\n text,\n title: suffixTitle(title, annotations.length),\n },\n owner,\n repo,\n });\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAGxB,qBAA0B;AAC1B,UAAqB;AAErB,yBAAwC;AAQxC,MAAM,yBAAyB;AAS/B,MAAM,cAAc,CAAC,OAAe,qBAAqC;AACvE,QAAM,mBACJ,mBAAmB,yBACf,yBACA;AAEN,SAAO,GAAG,KAAK,SAAK,0BAAU,kBAAkB,YAAY,CAAC;AAC/D;AAKA,MAAM,wBAAwB,CAC5B,SACA,qBAEA;AAAA,EACE;AAAA,EACA,GAAI,mBAAmB,yBACnB;AAAA,IACE,GAAG,gBAAgB,kDAAkD,sBAAsB;AAAA,EAC7F,IACA,CAAC;AACP,EAAE,KAAK,MAAM;AA+CR,MAAM,iBAAiB,OAAO;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA+C;AAC7C,QAAM,MAAM,QAAQ,IAAI;AAExB,QAAM,CAAC,UAAU,EAAE,OAAO,KAAK,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,IACpD,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAAA,IAC3B,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAAA,EAC7B,CAAC;AAED,QAAM,SAAS,IAAI,oBAAQ,EAAE,UAAM,4CAAwB,EAAE,CAAC;AAE9D,QAAM,OAAO,OAAO,OAAO;AAAA,IACzB;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACN,aAAa,YAAY,MAAM,GAAG,sBAAsB;AAAA,MACxD,SAAS,sBAAsB,SAAS,YAAY,MAAM;AAAA,MAC1D;AAAA,MACA,OAAO,YAAY,OAAO,YAAY,MAAM;AAAA,IAC9C;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;",
4
+ "sourcesContent": ["import type { Endpoints } from '@octokit/types';\n\nimport { pluralise } from '../../utils/logging';\nimport * as Git from '../git';\n\nimport { apiTokenFromEnvironment } from './environment';\nimport { createRestClient } from './octokit';\n\ntype Output = NonNullable<\n Endpoints['PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}']['parameters']['output']\n>;\n\nexport type Annotation = NonNullable<Output['annotations']>[number];\n\nconst GITHUB_MAX_ANNOTATIONS = 50;\n\n/**\n * Suffixes the title with the number of annotations added, e.g.\n *\n * ```text\n * Build #12 failed (24 annotations added)\n * ```\n */\nconst suffixTitle = (title: string, inputAnnotations: number): string => {\n const addedAnnotations =\n inputAnnotations > GITHUB_MAX_ANNOTATIONS\n ? GITHUB_MAX_ANNOTATIONS\n : inputAnnotations;\n\n return `${title} (${pluralise(addedAnnotations, 'annotation')} added)`;\n};\n\n/**\n * Enriches the summary with more context about the check run.\n */\nconst createEnrichedSummary = (\n summary: string,\n inputAnnotations: number,\n): string =>\n [\n summary,\n ...(inputAnnotations > GITHUB_MAX_ANNOTATIONS\n ? [\n `${inputAnnotations} annotations were provided, but only the first ${GITHUB_MAX_ANNOTATIONS} are visible in GitHub.`,\n ]\n : []),\n ].join('\\n\\n');\n\n/**\n * {@link https://docs.github.com/en/rest/reference/checks#create-a-check-run}\n */\ninterface CreateCheckRunParameters {\n /**\n * Adds information from your analysis to specific lines of code.\n * Annotations are visible on GitHub in the **Checks** and **Files changed**\n * tab of the pull request.\n */\n annotations: Annotation[];\n\n /**\n * The final conclusion of the check.\n */\n conclusion: 'failure' | 'success';\n\n /**\n * The name of the check. For example, \"code-coverage\".\n */\n name: string;\n\n /**\n * The summary of the check run. This parameter supports Markdown.\n */\n summary: string;\n\n /**\n * The details of the check run. This parameter supports Markdown.\n */\n text?: string;\n\n /**\n * The title of the check run.\n */\n title: string;\n}\n\n/**\n * Asynchronously creates a GitHub check run with annotations.\n *\n * The first 50 `annotations` are written in full to GitHub.\n *\n * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with the `checks:write` permission\n * must be present on the environment.\n */\nexport const createCheckRun = async ({\n annotations,\n conclusion,\n name,\n summary,\n text,\n title,\n}: CreateCheckRunParameters): Promise<void> => {\n const dir = process.cwd();\n\n const [commitId, { owner, repo }] = await Promise.all([\n Git.getHeadCommitId({ dir }),\n Git.getOwnerAndRepo({ dir }),\n ]);\n\n const client = await createRestClient({ auth: apiTokenFromEnvironment() });\n\n await client.checks.create({\n conclusion,\n head_sha: commitId,\n name,\n output: {\n annotations: annotations.slice(0, GITHUB_MAX_ANNOTATIONS),\n summary: createEnrichedSummary(summary, annotations.length),\n text,\n title: suffixTitle(title, annotations.length),\n },\n owner,\n repo,\n });\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,qBAA0B;AAC1B,UAAqB;AAErB,yBAAwC;AACxC,qBAAiC;AAQjC,MAAM,yBAAyB;AAS/B,MAAM,cAAc,CAAC,OAAe,qBAAqC;AACvE,QAAM,mBACJ,mBAAmB,yBACf,yBACA;AAEN,SAAO,GAAG,KAAK,SAAK,0BAAU,kBAAkB,YAAY,CAAC;AAC/D;AAKA,MAAM,wBAAwB,CAC5B,SACA,qBAEA;AAAA,EACE;AAAA,EACA,GAAI,mBAAmB,yBACnB;AAAA,IACE,GAAG,gBAAgB,kDAAkD,sBAAsB;AAAA,EAC7F,IACA,CAAC;AACP,EAAE,KAAK,MAAM;AA+CR,MAAM,iBAAiB,OAAO;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA+C;AAC7C,QAAM,MAAM,QAAQ,IAAI;AAExB,QAAM,CAAC,UAAU,EAAE,OAAO,KAAK,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,IACpD,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAAA,IAC3B,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAAA,EAC7B,CAAC;AAED,QAAM,SAAS,UAAM,iCAAiB,EAAE,UAAM,4CAAwB,EAAE,CAAC;AAEzE,QAAM,OAAO,OAAO,OAAO;AAAA,IACzB;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACN,aAAa,YAAY,MAAM,GAAG,sBAAsB;AAAA,MACxD,SAAS,sBAAsB,SAAS,YAAY,MAAM;AAAA,MAC1D;AAAA,MACA,OAAO,YAAY,OAAO,YAAY,MAAM;AAAA,IAC9C;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -31,9 +31,9 @@ __export(issueComment_exports, {
31
31
  putIssueComment: () => putIssueComment
32
32
  });
33
33
  module.exports = __toCommonJS(issueComment_exports);
34
- var import_rest = require("@octokit/rest");
35
34
  var Git = __toESM(require("../git"));
36
35
  var import_environment = require("./environment");
36
+ var import_octokit = require("./octokit");
37
37
  var import_pullRequest = require("./pullRequest");
38
38
  const getUserId = async (client) => {
39
39
  const { data } = await client.users.getAuthenticated();
@@ -43,7 +43,7 @@ const putIssueComment = async (params) => {
43
43
  const env = params.env ?? process.env;
44
44
  const dir = process.cwd();
45
45
  const { owner, repo } = await Git.getOwnerAndRepo({ dir });
46
- const client = new import_rest.Octokit({ auth: (0, import_environment.apiTokenFromEnvironment)() });
46
+ const client = await (0, import_octokit.createRestClient)({ auth: (0, import_environment.apiTokenFromEnvironment)() });
47
47
  const issueNumber = params.issueNumber ?? await (0, import_pullRequest.getPullRequestNumber)({ client, env });
48
48
  if (!issueNumber) {
49
49
  throw new Error("Failed to infer an issue number");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/api/github/issueComment.ts"],
4
- "sourcesContent": ["import { Octokit } from '@octokit/rest';\n\nimport * as Git from '../git';\n\nimport { apiTokenFromEnvironment } from './environment';\nimport { getPullRequestNumber } from './pullRequest';\n\nconst getUserId = async (client: Octokit): Promise<number> => {\n const { data } = await client.users.getAuthenticated();\n\n return data.id;\n};\n\n/**\n * https://docs.github.com/en/rest/reference/issues#create-an-issue-comment\n */\ninterface PutIssueCommentParameters {\n /**\n * The body of the issue comment.\n */\n body: string;\n\n /**\n * An internal identifier for the issue comment.\n *\n * This can be used to scope a given `put` to a particular comment, preventing\n * it from clobbering other comments from the same bot or user.\n *\n * The identifier is embedded as hidden content in the comment body.\n */\n internalId?: string;\n\n env?: Record<string, string | undefined>;\n\n /**\n * The number that identifies the GitHub issue.\n *\n * If this is not provided, the number will be inferred from the GitHub Repos\n * API by finding the latest pull request associated with the head commit.\n *\n * https://docs.github.com/en/rest/reference/repos#list-pull-requests-associated-with-a-commit\n */\n issueNumber?: number;\n\n /**\n * The ID of authenticated bot or user that is putting the issue comment.\n *\n * This drives our `put` behaviour, which tries to locate and edit an existing\n * comment before creating a new one. If this is not provided, the ID will be\n * inferred from the GitHub Users API.\n *\n * https://docs.github.com/en/rest/reference/users#get-the-authenticated-user\n *\n * If you're at SEEK and using BuildAgency's GitHub API integration, you may\n * use `'seek-build-agency'` as an optimisation to skip the user lookup.\n *\n * https://api.github.com/users/buildagencygitapitoken[bot]\n */\n userId?: number | 'seek-build-agency';\n}\n\ninterface IssueComment {\n id: number;\n}\n\n/**\n * Asynchronously creates or updates a GitHub issue comment.\n *\n * This emulates `put` behaviour by overwriting the first existing comment by\n * the same author on the issue, enabling use cases like a persistent bot\n * comment at the top of the pull request that reflects the current status of a\n * CI check.\n *\n * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with write permissions must be present\n * on the environment.\n */\nexport const putIssueComment = async (\n params: PutIssueCommentParameters,\n): Promise<IssueComment> => {\n const env = params.env ?? process.env;\n\n const dir = process.cwd();\n\n const { owner, repo } = await Git.getOwnerAndRepo({ dir });\n\n const client = new Octokit({ auth: apiTokenFromEnvironment() });\n\n const issueNumber =\n params.issueNumber ?? (await getPullRequestNumber({ client, env }));\n\n if (!issueNumber) {\n throw new Error('Failed to infer an issue number');\n }\n\n const comments = await client.issues.listComments({\n issue_number: issueNumber,\n owner,\n repo,\n });\n\n const userId: number =\n params.userId === 'seek-build-agency'\n ? // https://api.github.com/users/buildagencygitapitoken[bot]\n 87109344\n : params.userId ?? (await getUserId(client));\n\n const commentId = comments.data.find(\n (comment) =>\n comment.user?.id === userId &&\n (params.internalId\n ? comment.body?.endsWith(`\\n\\n<!-- ${params.internalId} -->`)\n : true),\n )?.id;\n\n const body = params.internalId\n ? [params.body.trim(), `<!-- ${params.internalId} -->`].join('\\n\\n')\n : params.body.trim();\n\n const response = await (commentId\n ? client.issues.updateComment({\n body,\n comment_id: commentId,\n issue_number: issueNumber,\n owner,\n repo,\n })\n : client.issues.createComment({\n body,\n issue_number: issueNumber,\n owner,\n repo,\n }));\n\n return {\n id: response.data.id,\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,UAAqB;AAErB,yBAAwC;AACxC,yBAAqC;AAErC,MAAM,YAAY,OAAO,WAAqC;AAC5D,QAAM,EAAE,KAAK,IAAI,MAAM,OAAO,MAAM,iBAAiB;AAErD,SAAO,KAAK;AACd;AAiEO,MAAM,kBAAkB,OAC7B,WAC0B;AAC1B,QAAM,MAAM,OAAO,OAAO,QAAQ;AAElC,QAAM,MAAM,QAAQ,IAAI;AAExB,QAAM,EAAE,OAAO,KAAK,IAAI,MAAM,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAEzD,QAAM,SAAS,IAAI,oBAAQ,EAAE,UAAM,4CAAwB,EAAE,CAAC;AAE9D,QAAM,cACJ,OAAO,eAAgB,UAAM,yCAAqB,EAAE,QAAQ,IAAI,CAAC;AAEnE,MAAI,CAAC,aAAa;AAChB,UAAM,IAAI,MAAM,iCAAiC;AAAA,EACnD;AAEA,QAAM,WAAW,MAAM,OAAO,OAAO,aAAa;AAAA,IAChD,cAAc;AAAA,IACd;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,SACJ,OAAO,WAAW;AAAA;AAAA,IAEd;AAAA,MACA,OAAO,UAAW,MAAM,UAAU,MAAM;AAE9C,QAAM,YAAY,SAAS,KAAK;AAAA,IAC9B,CAAC,YACC,QAAQ,MAAM,OAAO,WACpB,OAAO,aACJ,QAAQ,MAAM,SAAS;AAAA;AAAA,OAAY,OAAO,UAAU,MAAM,IAC1D;AAAA,EACR,GAAG;AAEH,QAAM,OAAO,OAAO,aAChB,CAAC,OAAO,KAAK,KAAK,GAAG,QAAQ,OAAO,UAAU,MAAM,EAAE,KAAK,MAAM,IACjE,OAAO,KAAK,KAAK;AAErB,QAAM,WAAW,OAAO,YACpB,OAAO,OAAO,cAAc;AAAA,IAC1B;AAAA,IACA,YAAY;AAAA,IACZ,cAAc;AAAA,IACd;AAAA,IACA;AAAA,EACF,CAAC,IACD,OAAO,OAAO,cAAc;AAAA,IAC1B;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,EACF,CAAC;AAEL,SAAO;AAAA,IACL,IAAI,SAAS,KAAK;AAAA,EACpB;AACF;",
4
+ "sourcesContent": ["import type { Octokit } from '@octokit/rest';\n\nimport * as Git from '../git';\n\nimport { apiTokenFromEnvironment } from './environment';\nimport { createRestClient } from './octokit';\nimport { getPullRequestNumber } from './pullRequest';\n\nconst getUserId = async (client: Octokit): Promise<number> => {\n const { data } = await client.users.getAuthenticated();\n\n return data.id;\n};\n\n/**\n * https://docs.github.com/en/rest/reference/issues#create-an-issue-comment\n */\ninterface PutIssueCommentParameters {\n /**\n * The body of the issue comment.\n */\n body: string;\n\n /**\n * An internal identifier for the issue comment.\n *\n * This can be used to scope a given `put` to a particular comment, preventing\n * it from clobbering other comments from the same bot or user.\n *\n * The identifier is embedded as hidden content in the comment body.\n */\n internalId?: string;\n\n env?: Record<string, string | undefined>;\n\n /**\n * The number that identifies the GitHub issue.\n *\n * If this is not provided, the number will be inferred from the GitHub Repos\n * API by finding the latest pull request associated with the head commit.\n *\n * https://docs.github.com/en/rest/reference/repos#list-pull-requests-associated-with-a-commit\n */\n issueNumber?: number;\n\n /**\n * The ID of authenticated bot or user that is putting the issue comment.\n *\n * This drives our `put` behaviour, which tries to locate and edit an existing\n * comment before creating a new one. If this is not provided, the ID will be\n * inferred from the GitHub Users API.\n *\n * https://docs.github.com/en/rest/reference/users#get-the-authenticated-user\n *\n * If you're at SEEK and using BuildAgency's GitHub API integration, you may\n * use `'seek-build-agency'` as an optimisation to skip the user lookup.\n *\n * https://api.github.com/users/buildagencygitapitoken[bot]\n */\n userId?: number | 'seek-build-agency';\n}\n\ninterface IssueComment {\n id: number;\n}\n\n/**\n * Asynchronously creates or updates a GitHub issue comment.\n *\n * This emulates `put` behaviour by overwriting the first existing comment by\n * the same author on the issue, enabling use cases like a persistent bot\n * comment at the top of the pull request that reflects the current status of a\n * CI check.\n *\n * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with write permissions must be present\n * on the environment.\n */\nexport const putIssueComment = async (\n params: PutIssueCommentParameters,\n): Promise<IssueComment> => {\n const env = params.env ?? process.env;\n\n const dir = process.cwd();\n\n const { owner, repo } = await Git.getOwnerAndRepo({ dir });\n\n const client = await createRestClient({ auth: apiTokenFromEnvironment() });\n\n const issueNumber =\n params.issueNumber ?? (await getPullRequestNumber({ client, env }));\n\n if (!issueNumber) {\n throw new Error('Failed to infer an issue number');\n }\n\n const comments = await client.issues.listComments({\n issue_number: issueNumber,\n owner,\n repo,\n });\n\n const userId: number =\n params.userId === 'seek-build-agency'\n ? // https://api.github.com/users/buildagencygitapitoken[bot]\n 87109344\n : params.userId ?? (await getUserId(client));\n\n const commentId = comments.data.find(\n (comment) =>\n comment.user?.id === userId &&\n (params.internalId\n ? comment.body?.endsWith(`\\n\\n<!-- ${params.internalId} -->`)\n : true),\n )?.id;\n\n const body = params.internalId\n ? [params.body.trim(), `<!-- ${params.internalId} -->`].join('\\n\\n')\n : params.body.trim();\n\n const response = await (commentId\n ? client.issues.updateComment({\n body,\n comment_id: commentId,\n issue_number: issueNumber,\n owner,\n repo,\n })\n : client.issues.createComment({\n body,\n issue_number: issueNumber,\n owner,\n repo,\n }));\n\n return {\n id: response.data.id,\n };\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,UAAqB;AAErB,yBAAwC;AACxC,qBAAiC;AACjC,yBAAqC;AAErC,MAAM,YAAY,OAAO,WAAqC;AAC5D,QAAM,EAAE,KAAK,IAAI,MAAM,OAAO,MAAM,iBAAiB;AAErD,SAAO,KAAK;AACd;AAiEO,MAAM,kBAAkB,OAC7B,WAC0B;AAC1B,QAAM,MAAM,OAAO,OAAO,QAAQ;AAElC,QAAM,MAAM,QAAQ,IAAI;AAExB,QAAM,EAAE,OAAO,KAAK,IAAI,MAAM,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAEzD,QAAM,SAAS,UAAM,iCAAiB,EAAE,UAAM,4CAAwB,EAAE,CAAC;AAEzE,QAAM,cACJ,OAAO,eAAgB,UAAM,yCAAqB,EAAE,QAAQ,IAAI,CAAC;AAEnE,MAAI,CAAC,aAAa;AAChB,UAAM,IAAI,MAAM,iCAAiC;AAAA,EACnD;AAEA,QAAM,WAAW,MAAM,OAAO,OAAO,aAAa;AAAA,IAChD,cAAc;AAAA,IACd;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,SACJ,OAAO,WAAW;AAAA;AAAA,IAEd;AAAA,MACA,OAAO,UAAW,MAAM,UAAU,MAAM;AAE9C,QAAM,YAAY,SAAS,KAAK;AAAA,IAC9B,CAAC,YACC,QAAQ,MAAM,OAAO,WACpB,OAAO,aACJ,QAAQ,MAAM,SAAS;AAAA;AAAA,OAAY,OAAO,UAAU,MAAM,IAC1D;AAAA,EACR,GAAG;AAEH,QAAM,OAAO,OAAO,aAChB,CAAC,OAAO,KAAK,KAAK,GAAG,QAAQ,OAAO,UAAU,MAAM,EAAE,KAAK,MAAM,IACjE,OAAO,KAAK,KAAK;AAErB,QAAM,WAAW,OAAO,YACpB,OAAO,OAAO,cAAc;AAAA,IAC1B;AAAA,IACA,YAAY;AAAA,IACZ,cAAc;AAAA,IACd;AAAA,IACA;AAAA,EACF,CAAC,IACD,OAAO,OAAO,cAAc;AAAA,IAC1B;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,EACF,CAAC;AAEL,SAAO;AAAA,IACL,IAAI,SAAS,KAAK;AAAA,EACpB;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,6 @@
1
+ import type { Octokit } from '@octokit/rest';
1
2
  import type { RequestParameters } from '@octokit/types';
3
+ export declare const createRestClient: (options: {
4
+ auth: unknown;
5
+ }) => Promise<Octokit>;
2
6
  export declare const graphql: <ResponseData>(query: string, parameters?: RequestParameters) => Promise<ResponseData>;
@@ -28,12 +28,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var octokit_exports = {};
30
30
  __export(octokit_exports, {
31
+ createRestClient: () => createRestClient,
31
32
  graphql: () => graphql
32
33
  });
33
34
  module.exports = __toCommonJS(octokit_exports);
35
+ const createRestClient = async (options) => new (await import("@octokit/rest")).Octokit(options);
34
36
  const graphql = async (query, parameters) => (await import("@octokit/graphql")).graphql(query, parameters);
35
37
  // Annotate the CommonJS export names for ESM import in node:
36
38
  0 && (module.exports = {
39
+ createRestClient,
37
40
  graphql
38
41
  });
39
42
  //# sourceMappingURL=octokit.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/api/github/octokit.ts"],
4
- "sourcesContent": ["import type { RequestParameters } from '@octokit/types';\n\nexport const graphql = async <ResponseData>(\n query: string,\n parameters?: RequestParameters,\n) =>\n (await import('@octokit/graphql')).graphql<ResponseData>(query, parameters);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,UAAU,OACrB,OACA,gBAEC,MAAM,OAAO,kBAAkB,GAAG,QAAsB,OAAO,UAAU;",
4
+ "sourcesContent": ["import type { Octokit } from '@octokit/rest';\nimport type { RequestParameters } from '@octokit/types';\n\nexport const createRestClient = async (options: {\n auth: unknown;\n}): Promise<Octokit> => new (await import('@octokit/rest')).Octokit(options);\n\nexport const graphql = async <ResponseData>(\n query: string,\n parameters?: RequestParameters,\n) =>\n (await import('@octokit/graphql')).graphql<ResponseData>(query, parameters);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,mBAAmB,OAAO,YAEf,KAAK,MAAM,OAAO,eAAe,GAAG,QAAQ,OAAO;AAEpE,MAAM,UAAU,OACrB,OACA,gBAEC,MAAM,OAAO,kBAAkB,GAAG,QAAsB,OAAO,UAAU;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Octokit } from '@octokit/rest';
1
+ import type { Octokit } from '@octokit/rest';
2
2
  interface GetPullRequestParameters {
3
3
  /**
4
4
  * A preconstructed Octokit client to interact with GitHub's APIs.
@@ -31,9 +31,9 @@ __export(pullRequest_exports, {
31
31
  getPullRequestNumber: () => getPullRequestNumber
32
32
  });
33
33
  module.exports = __toCommonJS(pullRequest_exports);
34
- var import_rest = require("@octokit/rest");
35
34
  var Git = __toESM(require("../git"));
36
35
  var import_environment = require("./environment");
36
+ var import_octokit = require("./octokit");
37
37
  const getPullRequestNumber = async (params = {}) => {
38
38
  const env = params.env ?? process.env;
39
39
  const dir = process.cwd();
@@ -43,7 +43,7 @@ const getPullRequestNumber = async (params = {}) => {
43
43
  if (Number.isSafeInteger(number)) {
44
44
  return number;
45
45
  }
46
- const client = params.client ?? new import_rest.Octokit({ auth: (0, import_environment.apiTokenFromEnvironment)() });
46
+ const client = params.client ?? await (0, import_octokit.createRestClient)({ auth: (0, import_environment.apiTokenFromEnvironment)() });
47
47
  const [commitId, { owner, repo }] = await Promise.all([
48
48
  Git.getHeadCommitId({ dir, env }),
49
49
  Git.getOwnerAndRepo({ dir })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/api/github/pullRequest.ts"],
4
- "sourcesContent": ["import { Octokit } from '@octokit/rest';\n\nimport * as Git from '../git';\n\nimport { apiTokenFromEnvironment } from './environment';\n\ninterface GetPullRequestParameters {\n /**\n * A preconstructed Octokit client to interact with GitHub's APIs.\n *\n * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with write permissions must be\n * present on the environment if this is not provided.\n */\n client?: Octokit;\n\n env?: Record<string, string | undefined>;\n}\n\n/**\n * Gets the number of the current pull request.\n *\n * This tries to extract the pull request from common CI environment variables,\n * and falls back to querying the GitHub Repos API for the latest pull request\n * associated with the head commit. An error is thrown if there are no\n * associated pull requests, or if they are all closed or locked.\n */\nexport const getPullRequestNumber = async (\n params: GetPullRequestParameters = {},\n): Promise<number> => {\n const env = params.env ?? process.env;\n\n const dir = process.cwd();\n\n const number = Number(\n env.BUILDKITE_PULL_REQUEST ??\n env.GITHUB_REF?.replace(/^refs\\/pull\\/(\\d+).*$/, '$1'),\n );\n\n if (Number.isSafeInteger(number)) {\n return number;\n }\n\n const client =\n params.client ?? new Octokit({ auth: apiTokenFromEnvironment() });\n\n const [commitId, { owner, repo }] = await Promise.all([\n Git.getHeadCommitId({ dir, env }),\n Git.getOwnerAndRepo({ dir }),\n ]);\n\n const response = await client.repos.listPullRequestsAssociatedWithCommit({\n commit_sha: commitId,\n owner,\n repo,\n });\n\n const data = response.data\n .filter((pr) => pr.state === 'open' && !pr.locked)\n .sort((a, b) => b.updated_at.localeCompare(a.updated_at));\n\n const pullRequestData = data[0];\n if (!pullRequestData) {\n throw new Error(\n `Commit ${commitId} is not associated with an open GitHub pull request`,\n );\n }\n\n return pullRequestData.number;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,UAAqB;AAErB,yBAAwC;AAsBjC,MAAM,uBAAuB,OAClC,SAAmC,CAAC,MAChB;AACpB,QAAM,MAAM,OAAO,OAAO,QAAQ;AAElC,QAAM,MAAM,QAAQ,IAAI;AAExB,QAAM,SAAS;AAAA,IACb,IAAI,0BACF,IAAI,YAAY,QAAQ,yBAAyB,IAAI;AAAA,EACzD;AAEA,MAAI,OAAO,cAAc,MAAM,GAAG;AAChC,WAAO;AAAA,EACT;AAEA,QAAM,SACJ,OAAO,UAAU,IAAI,oBAAQ,EAAE,UAAM,4CAAwB,EAAE,CAAC;AAElE,QAAM,CAAC,UAAU,EAAE,OAAO,KAAK,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,IACpD,IAAI,gBAAgB,EAAE,KAAK,IAAI,CAAC;AAAA,IAChC,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAAA,EAC7B,CAAC;AAED,QAAM,WAAW,MAAM,OAAO,MAAM,qCAAqC;AAAA,IACvE,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,OAAO,SAAS,KACnB,OAAO,CAAC,OAAO,GAAG,UAAU,UAAU,CAAC,GAAG,MAAM,EAChD,KAAK,CAAC,GAAG,MAAM,EAAE,WAAW,cAAc,EAAE,UAAU,CAAC;AAE1D,QAAM,kBAAkB,KAAK,CAAC;AAC9B,MAAI,CAAC,iBAAiB;AACpB,UAAM,IAAI;AAAA,MACR,UAAU,QAAQ;AAAA,IACpB;AAAA,EACF;AAEA,SAAO,gBAAgB;AACzB;",
4
+ "sourcesContent": ["import type { Octokit } from '@octokit/rest';\n\nimport * as Git from '../git';\n\nimport { apiTokenFromEnvironment } from './environment';\nimport { createRestClient } from './octokit';\n\ninterface GetPullRequestParameters {\n /**\n * A preconstructed Octokit client to interact with GitHub's APIs.\n *\n * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with write permissions must be\n * present on the environment if this is not provided.\n */\n client?: Octokit;\n\n env?: Record<string, string | undefined>;\n}\n\n/**\n * Gets the number of the current pull request.\n *\n * This tries to extract the pull request from common CI environment variables,\n * and falls back to querying the GitHub Repos API for the latest pull request\n * associated with the head commit. An error is thrown if there are no\n * associated pull requests, or if they are all closed or locked.\n */\nexport const getPullRequestNumber = async (\n params: GetPullRequestParameters = {},\n): Promise<number> => {\n const env = params.env ?? process.env;\n\n const dir = process.cwd();\n\n const number = Number(\n env.BUILDKITE_PULL_REQUEST ??\n env.GITHUB_REF?.replace(/^refs\\/pull\\/(\\d+).*$/, '$1'),\n );\n\n if (Number.isSafeInteger(number)) {\n return number;\n }\n\n const client =\n params.client ??\n (await createRestClient({ auth: apiTokenFromEnvironment() }));\n\n const [commitId, { owner, repo }] = await Promise.all([\n Git.getHeadCommitId({ dir, env }),\n Git.getOwnerAndRepo({ dir }),\n ]);\n\n const response = await client.repos.listPullRequestsAssociatedWithCommit({\n commit_sha: commitId,\n owner,\n repo,\n });\n\n const data = response.data\n .filter((pr) => pr.state === 'open' && !pr.locked)\n .sort((a, b) => b.updated_at.localeCompare(a.updated_at));\n\n const pullRequestData = data[0];\n if (!pullRequestData) {\n throw new Error(\n `Commit ${commitId} is not associated with an open GitHub pull request`,\n );\n }\n\n return pullRequestData.number;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,UAAqB;AAErB,yBAAwC;AACxC,qBAAiC;AAsB1B,MAAM,uBAAuB,OAClC,SAAmC,CAAC,MAChB;AACpB,QAAM,MAAM,OAAO,OAAO,QAAQ;AAElC,QAAM,MAAM,QAAQ,IAAI;AAExB,QAAM,SAAS;AAAA,IACb,IAAI,0BACF,IAAI,YAAY,QAAQ,yBAAyB,IAAI;AAAA,EACzD;AAEA,MAAI,OAAO,cAAc,MAAM,GAAG;AAChC,WAAO;AAAA,EACT;AAEA,QAAM,SACJ,OAAO,UACN,UAAM,iCAAiB,EAAE,UAAM,4CAAwB,EAAE,CAAC;AAE7D,QAAM,CAAC,UAAU,EAAE,OAAO,KAAK,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,IACpD,IAAI,gBAAgB,EAAE,KAAK,IAAI,CAAC;AAAA,IAChC,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAAA,EAC7B,CAAC;AAED,QAAM,WAAW,MAAM,OAAO,MAAM,qCAAqC;AAAA,IACvE,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,OAAO,SAAS,KACnB,OAAO,CAAC,OAAO,GAAG,UAAU,UAAU,CAAC,GAAG,MAAM,EAChD,KAAK,CAAC,GAAG,MAAM,EAAE,WAAW,cAAc,EAAE,UAAU,CAAC;AAE1D,QAAM,kBAAkB,KAAK,CAAC;AAC9B,MAAI,CAAC,iBAAiB;AACpB,UAAM,IAAI;AAAA,MACR,UAAU,QAAQ;AAAA,IACpB;AAAA,EACF;AAEA,SAAO,gBAAgB;AACzB;",
6
6
  "names": []
7
7
  }
@@ -129,7 +129,7 @@ const configure = async () => {
129
129
  import_logging.log.warn(import_logging.log.bold("\u2717 Failed to install dependencies. Resume with:"));
130
130
  import_logging.log.newline();
131
131
  import_logging.log.plain(import_logging.log.bold(packageManager.install));
132
- import_logging.log.plain(import_logging.log.bold(packageManager, "format"));
132
+ import_logging.log.plain(import_logging.log.bold(packageManager.command, "format"));
133
133
  import_logging.log.newline();
134
134
  process.exitCode = 1;
135
135
  return;
@@ -139,7 +139,7 @@ const configure = async () => {
139
139
  import_logging.log.newline();
140
140
  import_logging.log.ok(import_logging.log.bold("\u2714 All done! Try running:"));
141
141
  import_logging.log.newline();
142
- import_logging.log.plain(import_logging.log.bold(packageManager, "format"));
142
+ import_logging.log.plain(import_logging.log.bold(packageManager.command, "format"));
143
143
  }
144
144
  import_logging.log.newline();
145
145
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/configure/index.ts"],
4
- "sourcesContent": ["import path from 'path';\n\nimport { Select } from 'enquirer';\n\nimport { createInclusionFilter } from '../../utils/dir';\nimport { createExec, ensureCommands } from '../../utils/exec';\nimport { log } from '../../utils/logging';\nimport { showLogoAndVersionInfo } from '../../utils/logo';\nimport { detectPackageManager } from '../../utils/packageManager';\nimport { BASE_TEMPLATE_DIR } from '../../utils/template';\nimport { hasProp } from '../../utils/validation';\n\nimport { analyseConfiguration } from './analyseConfiguration';\nimport { analyseDependencies } from './analyseDependencies';\nimport { auditWorkingTree } from './analysis/git';\nimport { getDestinationManifest } from './analysis/package';\nimport { ensureTemplateCompletion } from './ensureTemplateCompletion';\nimport { getEntryPoint } from './getEntryPoint';\nimport { getProjectType } from './getProjectType';\n\nconst shouldApply = async (name: string) => {\n if (!process.stdin.isTTY) {\n return 'yes';\n }\n const prompt = new Select({\n choices: ['yes', 'no'] as const,\n message: 'Apply changes?',\n name,\n });\n\n const result = await prompt.run();\n\n return result === 'yes';\n};\n\nexport const configure = async () => {\n await showLogoAndVersionInfo();\n\n const [manifest, packageManager] = await Promise.all([\n getDestinationManifest(),\n detectPackageManager(),\n ]);\n\n await ensureCommands(packageManager.command);\n\n const destinationRoot = path.dirname(manifest.path);\n\n log.plain('Detected project root:', log.bold(destinationRoot));\n\n const [include] = await Promise.all([\n createInclusionFilter([\n path.join(destinationRoot, '.gitignore'),\n path.join(BASE_TEMPLATE_DIR, '_.gitignore'),\n ]),\n\n auditWorkingTree(destinationRoot),\n ]);\n\n const templateConfig = await ensureTemplateCompletion({\n destinationRoot,\n include,\n manifest,\n });\n\n const type = await getProjectType({\n manifest,\n templateConfig,\n });\n\n const entryPoint = await getEntryPoint({\n destinationRoot,\n manifest,\n templateConfig,\n type,\n });\n\n const fixDependencies = await analyseDependencies({\n destinationRoot,\n include,\n manifest,\n type,\n });\n\n if (fixDependencies) {\n log.newline();\n\n if (await shouldApply('fixDependencies')) {\n await fixDependencies();\n }\n }\n\n const firstRun = hasProp(manifest.packageJson, 'skuba');\n\n const fixConfiguration = await analyseConfiguration({\n destinationRoot,\n entryPoint,\n firstRun,\n packageManager,\n type,\n });\n\n if (fixConfiguration) {\n log.newline();\n\n if (await shouldApply('fixConfiguration')) {\n await fixConfiguration();\n }\n }\n\n if (fixDependencies) {\n const exec = createExec({\n stdio: 'pipe',\n streamStdio: packageManager.command,\n });\n\n log.newline();\n try {\n await exec(packageManager.install);\n } catch {\n log.newline();\n log.warn(log.bold('\u2717 Failed to install dependencies. Resume with:'));\n\n log.newline();\n log.plain(log.bold(packageManager.install));\n log.plain(log.bold(packageManager, 'format'));\n\n log.newline();\n process.exitCode = 1;\n return;\n }\n }\n\n if (fixConfiguration ?? fixDependencies) {\n log.newline();\n log.ok(log.bold('\u2714 All done! Try running:'));\n\n log.newline();\n log.plain(log.bold(packageManager, 'format'));\n }\n\n log.newline();\n};\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import path from 'path';\n\nimport { Select } from 'enquirer';\n\nimport { createInclusionFilter } from '../../utils/dir';\nimport { createExec, ensureCommands } from '../../utils/exec';\nimport { log } from '../../utils/logging';\nimport { showLogoAndVersionInfo } from '../../utils/logo';\nimport { detectPackageManager } from '../../utils/packageManager';\nimport { BASE_TEMPLATE_DIR } from '../../utils/template';\nimport { hasProp } from '../../utils/validation';\n\nimport { analyseConfiguration } from './analyseConfiguration';\nimport { analyseDependencies } from './analyseDependencies';\nimport { auditWorkingTree } from './analysis/git';\nimport { getDestinationManifest } from './analysis/package';\nimport { ensureTemplateCompletion } from './ensureTemplateCompletion';\nimport { getEntryPoint } from './getEntryPoint';\nimport { getProjectType } from './getProjectType';\n\nconst shouldApply = async (name: string) => {\n if (!process.stdin.isTTY) {\n return 'yes';\n }\n const prompt = new Select({\n choices: ['yes', 'no'] as const,\n message: 'Apply changes?',\n name,\n });\n\n const result = await prompt.run();\n\n return result === 'yes';\n};\n\nexport const configure = async () => {\n await showLogoAndVersionInfo();\n\n const [manifest, packageManager] = await Promise.all([\n getDestinationManifest(),\n detectPackageManager(),\n ]);\n\n await ensureCommands(packageManager.command);\n\n const destinationRoot = path.dirname(manifest.path);\n\n log.plain('Detected project root:', log.bold(destinationRoot));\n\n const [include] = await Promise.all([\n createInclusionFilter([\n path.join(destinationRoot, '.gitignore'),\n path.join(BASE_TEMPLATE_DIR, '_.gitignore'),\n ]),\n\n auditWorkingTree(destinationRoot),\n ]);\n\n const templateConfig = await ensureTemplateCompletion({\n destinationRoot,\n include,\n manifest,\n });\n\n const type = await getProjectType({\n manifest,\n templateConfig,\n });\n\n const entryPoint = await getEntryPoint({\n destinationRoot,\n manifest,\n templateConfig,\n type,\n });\n\n const fixDependencies = await analyseDependencies({\n destinationRoot,\n include,\n manifest,\n type,\n });\n\n if (fixDependencies) {\n log.newline();\n\n if (await shouldApply('fixDependencies')) {\n await fixDependencies();\n }\n }\n\n const firstRun = hasProp(manifest.packageJson, 'skuba');\n\n const fixConfiguration = await analyseConfiguration({\n destinationRoot,\n entryPoint,\n firstRun,\n packageManager,\n type,\n });\n\n if (fixConfiguration) {\n log.newline();\n\n if (await shouldApply('fixConfiguration')) {\n await fixConfiguration();\n }\n }\n\n if (fixDependencies) {\n const exec = createExec({\n stdio: 'pipe',\n streamStdio: packageManager.command,\n });\n\n log.newline();\n try {\n await exec(packageManager.install);\n } catch {\n log.newline();\n log.warn(log.bold('\u2717 Failed to install dependencies. Resume with:'));\n\n log.newline();\n log.plain(log.bold(packageManager.install));\n log.plain(log.bold(packageManager.command, 'format'));\n\n log.newline();\n process.exitCode = 1;\n return;\n }\n }\n\n if (fixConfiguration ?? fixDependencies) {\n log.newline();\n log.ok(log.bold('\u2714 All done! Try running:'));\n\n log.newline();\n log.plain(log.bold(packageManager.command, 'format'));\n }\n\n log.newline();\n};\n"],
5
+ "mappings": "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",
6
6
  "names": ["path"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skuba",
3
- "version": "8.1.0",
3
+ "version": "8.2.0",
4
4
  "private": false,
5
5
  "description": "SEEK development toolkit for backend applications and packages",
6
6
  "homepage": "https://github.com/seek-oss/skuba#readme",
@@ -54,7 +54,7 @@
54
54
  "@jest/types": "^29.0.0",
55
55
  "@octokit/graphql": "^8.0.0",
56
56
  "@octokit/graphql-schema": "^15.3.0",
57
- "@octokit/rest": "^20.0.0",
57
+ "@octokit/rest": "^21.0.0",
58
58
  "@octokit/types": "^13.0.0",
59
59
  "@types/jest": "^29.0.0",
60
60
  "@types/node": ">=18.12",
@@ -6,6 +6,7 @@
6
6
  .cdk.staging/
7
7
  .serverless/
8
8
  cdk.out/
9
+ cdk.context.json
9
10
  node_modules*/
10
11
 
11
12
  /coverage*/
@@ -1,4 +1,5 @@
1
1
  # managed by skuba
2
+ package-manager-strict-version=true
2
3
  public-hoist-pattern[]="@types*"
3
4
  public-hoist-pattern[]="*eslint*"
4
5
  public-hoist-pattern[]="*prettier*"
@@ -1,3 +1,4 @@
1
+ $schema: https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
1
2
  agents:
2
3
  queue: <%- prodBuildkiteQueueName %>
3
4
 
@@ -12,15 +12,15 @@ Next steps:
12
12
 
13
13
  2. [ ] Create a new repository in the appropriate GitHub organisation.
14
14
  3. [ ] Add the repository to BuildAgency;
15
- see [Builds at SEEK] for more information.
15
+ see our internal [Buildkite Docs] for more information.
16
16
  4. [ ] Add Datadog configuration and data classification tags to [.gantry/common.yml](.gantry/common.yml);
17
17
  see the [Gantry] documentation for more information.
18
18
  5. [ ] Push local commits to the upstream GitHub branch.
19
19
  6. [ ] Configure [GitHub repository settings].
20
20
  7. [ ] Delete this checklist 😌.
21
21
 
22
- [builds at seek]: https://backstage.myseek.xyz/docs/default/component/builds-cicd-seek/
23
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
22
+ [Buildkite Docs]: https://backstage.myseek.xyz/docs/default/component/buildkite-docs
23
+ [GitHub repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
24
24
 
25
25
  ## Design
26
26
 
@@ -1,3 +1,4 @@
1
+ $schema: https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
1
2
  agents:
2
3
  queue: <%- prodBuildkiteQueueName %>
3
4
 
@@ -12,13 +12,13 @@ Next steps:
12
12
 
13
13
  2. [ ] Create a new repository in the appropriate GitHub organisation.
14
14
  3. [ ] Add the repository to BuildAgency;
15
- see [Builds at SEEK] for more information.
15
+ see our internal [Buildkite Docs] for more information.
16
16
  4. [ ] Push local commits to the upstream GitHub branch.
17
17
  5. [ ] Configure [GitHub repository settings].
18
18
  6. [ ] Delete this checklist 😌.
19
19
 
20
- [builds at seek]: https://backstage.myseek.xyz/docs/default/component/builds-cicd-seek/
21
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
20
+ [Buildkite Docs]: https://backstage.myseek.xyz/docs/default/component/buildkite-docs
21
+ [GitHub repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
22
22
 
23
23
  ## Design
24
24
 
@@ -1,3 +1,4 @@
1
+ $schema: https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
1
2
  agents:
2
3
  queue: <%- prodBuildkiteQueueName %>
3
4
 
@@ -12,15 +12,15 @@ Next steps:
12
12
 
13
13
  2. [ ] Create a new repository in the appropriate GitHub organisation.
14
14
  3. [ ] Add the repository to BuildAgency;
15
- see [Builds at SEEK] for more information.
15
+ see our internal [Buildkite Docs] for more information.
16
16
  4. [ ] Add Datadog configuration and data classification tags to [.gantry/common.yml](.gantry/common.yml);
17
17
  see the [Gantry] documentation for more information.
18
18
  5. [ ] Push local commits to the upstream GitHub branch.
19
19
  6. [ ] Configure [GitHub repository settings].
20
20
  7. [ ] Delete this checklist 😌.
21
21
 
22
- [builds at seek]: https://backstage.myseek.xyz/docs/default/component/builds-cicd-seek/
23
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
22
+ [Buildkite Docs]: https://backstage.myseek.xyz/docs/default/component/buildkite-docs
23
+ [GitHub repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
24
24
 
25
25
  ## Design
26
26
 
@@ -1,6 +1,6 @@
1
1
  import Router from '@koa/router';
2
2
 
3
- import { jsonBodyParser } from 'src/framework/middleware';
3
+ import { jsonBodyParser } from 'src/framework/bodyParser';
4
4
 
5
5
  import { getJobsHandler } from './getJobs';
6
6
  import { postJobHandler } from './postJob';
@@ -10,16 +10,11 @@ describe('app', () => {
10
10
 
11
11
  it('has a happy health check', () => agent.get('/health').expect(200, ''));
12
12
 
13
- it('has a reachable smoke test', async () => {
14
- const response = await agent.get('/smoke');
15
- expect(response.status).not.toBe(404);
16
- });
13
+ it('has a reachable smoke test', () =>
14
+ agent.options('/smoke').expect(200, '').expect('Allow', 'HEAD, GET'));
17
15
 
18
- it('has a reachable nested route', async () => {
19
- const response = await agent.get('/jobs');
20
- expect(response.status).not.toBe(404);
21
- });
16
+ it('has a reachable nested route', () =>
17
+ agent.options('/jobs').expect(200, '').expect('Allow', /POST/));
22
18
 
23
- it('has OPTIONS for a nested route', () =>
24
- agent.options('/jobs').expect(200).expect('allow', /HEAD/));
19
+ it('handles an unknown route', () => agent.options('/admin.php').expect(404));
25
20
  });
@@ -5,7 +5,7 @@ import {
5
5
  mockIdDescription,
6
6
  } from 'src/testing/types';
7
7
 
8
- import { jsonBodyParser } from './middleware';
8
+ import { jsonBodyParser } from './bodyParser';
9
9
  import { validate } from './validation';
10
10
 
11
11
  const agent = agentFromMiddleware(jsonBodyParser, (ctx) => {
@@ -1,3 +1,4 @@
1
+ $schema: https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
1
2
  agents:
2
3
  queue: <%- prodBuildkiteQueueName %>
3
4
 
@@ -12,14 +12,14 @@ Next steps:
12
12
 
13
13
  2. [ ] Create a new repository in the appropriate GitHub organisation.
14
14
  3. [ ] Add the repository to BuildAgency;
15
- see [Builds at SEEK] for more information.
15
+ see our internal [Buildkite Docs] for more information.
16
16
  4. [ ] Add Datadog extension, deployment bucket configuration and data classification tags to [serverless.yml](serverless.yml).
17
17
  5. [ ] Push local commits to the upstream GitHub branch.
18
18
  6. [ ] Configure [GitHub repository settings].
19
19
  7. [ ] Delete this checklist 😌.
20
20
 
21
- [builds at seek]: https://backstage.myseek.xyz/docs/default/component/builds-cicd-seek/
22
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
21
+ [Buildkite Docs]: https://backstage.myseek.xyz/docs/default/component/buildkite-docs
22
+ [GitHub repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
23
23
 
24
24
  ## Design
25
25
 
@@ -1,4 +1,5 @@
1
1
  # managed by skuba
2
+ package-manager-strict-version=true
2
3
  public-hoist-pattern[]="@types*"
3
4
  public-hoist-pattern[]="*eslint*"
4
5
  public-hoist-pattern[]="*prettier*"
@@ -1,3 +1,4 @@
1
+ $schema: https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
1
2
  agents:
2
3
  queue: <%- prodBuildkiteQueueName %>
3
4
 
@@ -37,9 +37,18 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
37
37
  "ap-southeast-4": {
38
38
  "codedeploy": "codedeploy.ap-southeast-4.amazonaws.com",
39
39
  },
40
+ "ap-southeast-5": {
41
+ "codedeploy": "codedeploy.ap-southeast-5.amazonaws.com",
42
+ },
43
+ "ap-southeast-7": {
44
+ "codedeploy": "codedeploy.ap-southeast-7.amazonaws.com",
45
+ },
40
46
  "ca-central-1": {
41
47
  "codedeploy": "codedeploy.ca-central-1.amazonaws.com",
42
48
  },
49
+ "ca-west-1": {
50
+ "codedeploy": "codedeploy.ca-west-1.amazonaws.com",
51
+ },
43
52
  "cn-north-1": {
44
53
  "codedeploy": "codedeploy.cn-north-1.amazonaws.com.cn",
45
54
  },
@@ -52,6 +61,9 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
52
61
  "eu-central-2": {
53
62
  "codedeploy": "codedeploy.eu-central-2.amazonaws.com",
54
63
  },
64
+ "eu-isoe-west-1": {
65
+ "codedeploy": "codedeploy.eu-isoe-west-1.amazonaws.com",
66
+ },
55
67
  "eu-north-1": {
56
68
  "codedeploy": "codedeploy.eu-north-1.amazonaws.com",
57
69
  },
@@ -79,6 +91,9 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
79
91
  "me-south-1": {
80
92
  "codedeploy": "codedeploy.me-south-1.amazonaws.com",
81
93
  },
94
+ "mx-central-1": {
95
+ "codedeploy": "codedeploy.mx-central-1.amazonaws.com",
96
+ },
82
97
  "sa-east-1": {
83
98
  "codedeploy": "codedeploy.sa-east-1.amazonaws.com",
84
99
  },
@@ -1085,9 +1100,18 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
1085
1100
  "ap-southeast-4": {
1086
1101
  "codedeploy": "codedeploy.ap-southeast-4.amazonaws.com",
1087
1102
  },
1103
+ "ap-southeast-5": {
1104
+ "codedeploy": "codedeploy.ap-southeast-5.amazonaws.com",
1105
+ },
1106
+ "ap-southeast-7": {
1107
+ "codedeploy": "codedeploy.ap-southeast-7.amazonaws.com",
1108
+ },
1088
1109
  "ca-central-1": {
1089
1110
  "codedeploy": "codedeploy.ca-central-1.amazonaws.com",
1090
1111
  },
1112
+ "ca-west-1": {
1113
+ "codedeploy": "codedeploy.ca-west-1.amazonaws.com",
1114
+ },
1091
1115
  "cn-north-1": {
1092
1116
  "codedeploy": "codedeploy.cn-north-1.amazonaws.com.cn",
1093
1117
  },
@@ -1100,6 +1124,9 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
1100
1124
  "eu-central-2": {
1101
1125
  "codedeploy": "codedeploy.eu-central-2.amazonaws.com",
1102
1126
  },
1127
+ "eu-isoe-west-1": {
1128
+ "codedeploy": "codedeploy.eu-isoe-west-1.amazonaws.com",
1129
+ },
1103
1130
  "eu-north-1": {
1104
1131
  "codedeploy": "codedeploy.eu-north-1.amazonaws.com",
1105
1132
  },
@@ -1127,6 +1154,9 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
1127
1154
  "me-south-1": {
1128
1155
  "codedeploy": "codedeploy.me-south-1.amazonaws.com",
1129
1156
  },
1157
+ "mx-central-1": {
1158
+ "codedeploy": "codedeploy.mx-central-1.amazonaws.com",
1159
+ },
1130
1160
  "sa-east-1": {
1131
1161
  "codedeploy": "codedeploy.sa-east-1.amazonaws.com",
1132
1162
  },
@@ -17,9 +17,9 @@ Next steps:
17
17
  6. [ ] Delete this checklist 😌.
18
18
 
19
19
  [#open-source]: https://slack.com/app_redirect?channel=C39P1H2SU
20
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
21
- [renovate]: https://github.com/apps/renovate
22
- [seek's open source rfc]: https://rfc.skinfra.xyz/RFC016-Open-Source.html
20
+ [GitHub repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
21
+ [Renovate]: https://github.com/apps/renovate
22
+ [SEEK's Open Source RFC]: https://rfc.skinfra.xyz/RFC016-Open-Source.html
23
23
 
24
24
  ## API
25
25
 
@@ -1,3 +1,4 @@
1
+ $schema: https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
1
2
  agents:
2
3
  queue: artefacts:npm2
3
4
 
@@ -14,7 +14,7 @@ Next steps:
14
14
  4. [ ] Configure [GitHub repository settings].
15
15
  5. [ ] Delete this checklist 😌.
16
16
 
17
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
17
+ [GitHub repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
18
18
  [installing on your repository]: https://github.com/SEEK-Jobs/gutenberg#installing-on-your-repository
19
19
 
20
20
  ## API