skuba 11.0.1-test-external-20250525154828 → 11.1.0-jest30-20250605013156
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/lib/api/git/commitAllChanges.js +10 -6
- package/lib/api/git/commitAllChanges.js.map +3 -3
- package/lib/api/git/getChangedFiles.js +2 -1
- package/lib/api/git/getChangedFiles.js.map +3 -3
- package/lib/api/github/push.js +5 -6
- package/lib/api/github/push.js.map +2 -2
- package/lib/cli/build/esbuild.js +17 -1
- package/lib/cli/build/esbuild.js.map +3 -3
- package/lib/cli/configure/processing/prettier.d.ts +1 -1
- package/lib/cli/configure/processing/prettier.js +8 -6
- package/lib/cli/configure/processing/prettier.js.map +3 -3
- package/package.json +4 -3
- package/template/express-rest-api/Dockerfile.dev-deps +1 -1
- package/template/greeter/Dockerfile +1 -1
- package/template/greeter/package.json +1 -1
- package/template/koa-rest-api/Dockerfile.dev-deps +1 -1
- package/template/koa-rest-api/package.json +4 -4
- package/template/lambda-sqs-worker-cdk/Dockerfile +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +4 -0
- package/template/lambda-sqs-worker-cdk/package.json +1 -1
|
@@ -53,17 +53,21 @@ const commitAllChanges = async ({
|
|
|
53
53
|
throw new Error(`Could not find Git root from directory: ${dir}`);
|
|
54
54
|
}
|
|
55
55
|
await Promise.all(
|
|
56
|
-
changedFiles.map(
|
|
57
|
-
|
|
56
|
+
changedFiles.map(async (file) => {
|
|
57
|
+
const relativePath = import_path.default.relative(dir, file.path);
|
|
58
|
+
if (relativePath.startsWith("..")) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
return file.state === "deleted" ? import_isomorphic_git.default.remove({
|
|
58
62
|
fs: import_fs_extra.default,
|
|
59
63
|
dir: gitRoot,
|
|
60
|
-
filepath:
|
|
64
|
+
filepath: file.path
|
|
61
65
|
}) : import_isomorphic_git.default.add({
|
|
62
66
|
fs: import_fs_extra.default,
|
|
63
67
|
dir: gitRoot,
|
|
64
|
-
filepath:
|
|
65
|
-
})
|
|
66
|
-
)
|
|
68
|
+
filepath: file.path
|
|
69
|
+
});
|
|
70
|
+
})
|
|
67
71
|
);
|
|
68
72
|
return (0, import_commit.commit)({
|
|
69
73
|
dir: gitRoot,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/api/git/commitAllChanges.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport fs from 'fs-extra';\nimport git from 'isomorphic-git';\n\nimport { type Identity, commit } from './commit';\nimport { findRoot } from './findRoot';\nimport { type ChangedFile, getChangedFiles } from './getChangedFiles';\n\ninterface CommitAllParameters {\n dir: string;\n message: string;\n author?: Identity;\n committer?: Identity;\n\n /**\n * File changes to exclude from the commit.\n *\n * Defaults to `[]` (no exclusions).\n */\n ignore?: ChangedFile[];\n}\n\n/**\n * Stages all changes and writes a commit to the local Git repository.\n */\nexport const commitAllChanges = async ({\n dir,\n message,\n\n author,\n committer,\n ignore,\n}: CommitAllParameters): Promise<string | undefined> => {\n const changedFiles = await getChangedFiles({ dir, ignore });\n\n if (!changedFiles.length) {\n return;\n }\n\n const gitRoot = await findRoot({ dir });\n\n if (!gitRoot) {\n throw new Error(`Could not find Git root from directory: ${dir}`);\n }\n\n await Promise.all(\n changedFiles.map((file)
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,sBAAe;AACf,4BAAgB;AAEhB,oBAAsC;AACtC,sBAAyB;AACzB,6BAAkD;AAmB3C,MAAM,mBAAmB,OAAO;AAAA,EACrC;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AACF,MAAwD;AACtD,QAAM,eAAe,UAAM,wCAAgB,EAAE,KAAK,OAAO,CAAC;AAE1D,MAAI,CAAC,aAAa,QAAQ;AACxB;AAAA,EACF;AAEA,QAAM,UAAU,UAAM,0BAAS,EAAE,IAAI,CAAC;AAEtC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2CAA2C,GAAG,EAAE;AAAA,EAClE;AAEA,QAAM,QAAQ;AAAA,IACZ,aAAa;
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport fs from 'fs-extra';\nimport git from 'isomorphic-git';\n\nimport { type Identity, commit } from './commit';\nimport { findRoot } from './findRoot';\nimport { type ChangedFile, getChangedFiles } from './getChangedFiles';\n\ninterface CommitAllParameters {\n dir: string;\n message: string;\n author?: Identity;\n committer?: Identity;\n\n /**\n * File changes to exclude from the commit.\n *\n * Defaults to `[]` (no exclusions).\n */\n ignore?: ChangedFile[];\n}\n\n/**\n * Stages all changes and writes a commit to the local Git repository.\n */\nexport const commitAllChanges = async ({\n dir,\n message,\n\n author,\n committer,\n ignore,\n}: CommitAllParameters): Promise<string | undefined> => {\n const changedFiles = await getChangedFiles({ dir, ignore });\n\n if (!changedFiles.length) {\n return;\n }\n\n const gitRoot = await findRoot({ dir });\n\n if (!gitRoot) {\n throw new Error(`Could not find Git root from directory: ${dir}`);\n }\n\n await Promise.all(\n changedFiles.map(async (file) => {\n const relativePath = path.relative(dir, file.path);\n\n // Skipping file outside working directory, see https://github.com/seek-oss/skuba/pull/1269#discussion_r1335308704\n if (relativePath.startsWith('..')) {\n return;\n }\n\n return file.state === 'deleted'\n ? git.remove({\n fs,\n dir: gitRoot,\n filepath: file.path,\n })\n : git.add({\n fs,\n dir: gitRoot,\n filepath: file.path,\n });\n }),\n );\n\n return commit({\n dir: gitRoot,\n message,\n author,\n committer,\n });\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,sBAAe;AACf,4BAAgB;AAEhB,oBAAsC;AACtC,sBAAyB;AACzB,6BAAkD;AAmB3C,MAAM,mBAAmB,OAAO;AAAA,EACrC;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AACF,MAAwD;AACtD,QAAM,eAAe,UAAM,wCAAgB,EAAE,KAAK,OAAO,CAAC;AAE1D,MAAI,CAAC,aAAa,QAAQ;AACxB;AAAA,EACF;AAEA,QAAM,UAAU,UAAM,0BAAS,EAAE,IAAI,CAAC;AAEtC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2CAA2C,GAAG,EAAE;AAAA,EAClE;AAEA,QAAM,QAAQ;AAAA,IACZ,aAAa,IAAI,OAAO,SAAS;AAC/B,YAAM,eAAe,YAAAA,QAAK,SAAS,KAAK,KAAK,IAAI;AAGjD,UAAI,aAAa,WAAW,IAAI,GAAG;AACjC;AAAA,MACF;AAEA,aAAO,KAAK,UAAU,YAClB,sBAAAC,QAAI,OAAO;AAAA,QACT,oBAAAC;AAAA,QACA,KAAK;AAAA,QACL,UAAU,KAAK;AAAA,MACjB,CAAC,IACD,sBAAAD,QAAI,IAAI;AAAA,QACN,oBAAAC;AAAA,QACA,KAAK;AAAA,QACL,UAAU,KAAK;AAAA,MACjB,CAAC;AAAA,IACP,CAAC;AAAA,EACH;AAEA,aAAO,sBAAO;AAAA,IACZ,KAAK;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;",
|
|
6
|
+
"names": ["path", "git", "fs"]
|
|
7
7
|
}
|
|
@@ -47,7 +47,8 @@ const getChangedFiles = async ({
|
|
|
47
47
|
dir,
|
|
48
48
|
ignore = []
|
|
49
49
|
}) => {
|
|
50
|
-
const
|
|
50
|
+
const gitRoot = await (0, import_isomorphic_git.findRoot)({ fs: import_fs_extra.default, filepath: dir });
|
|
51
|
+
const allFiles = await import_isomorphic_git.default.statusMatrix({ fs: import_fs_extra.default, dir: gitRoot ?? dir });
|
|
51
52
|
return allFiles.filter(
|
|
52
53
|
(row) => row[import_statusMatrix.HEAD] !== import_statusMatrix.UNMODIFIED || row[import_statusMatrix.WORKDIR] !== import_statusMatrix.UNMODIFIED || row[import_statusMatrix.STAGE] !== import_statusMatrix.UNMODIFIED
|
|
53
54
|
).map((row) => ({ path: row[import_statusMatrix.FILEPATH], state: mapState(row) })).filter(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/api/git/getChangedFiles.ts"],
|
|
4
|
-
"sourcesContent": ["import fs from 'fs-extra';\nimport git from 'isomorphic-git';\n\nimport {\n ABSENT,\n FILEPATH,\n HEAD,\n MODIFIED,\n STAGE,\n UNMODIFIED,\n WORKDIR,\n} from './statusMatrix';\n\ntype ChangedFileState = 'added' | 'modified' | 'deleted';\nexport interface ChangedFile {\n path: string;\n state: ChangedFileState;\n}\ninterface ChangedFilesParameters {\n dir: string;\n\n /**\n * File changes to exclude from the result.\n *\n * Defaults to `[]` (no exclusions).\n */\n ignore?: ChangedFile[];\n}\n\nconst mapState = (\n row: [string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3],\n): ChangedFileState => {\n if (row[HEAD] === ABSENT) {\n return 'added';\n }\n\n if (row[WORKDIR] === MODIFIED) {\n return 'modified';\n }\n\n return 'deleted';\n};\n\n/**\n * Returns all the files which have been added, modified or deleted in the\n * working directory of the local Git repository since the last commit.\n */\nexport const getChangedFiles = async ({\n dir,\n\n ignore = [],\n}: ChangedFilesParameters): Promise<ChangedFile[]> => {\n const allFiles = await git.statusMatrix({ fs, dir });\n return allFiles\n .filter(\n (row) =>\n row[HEAD] !== UNMODIFIED ||\n row[WORKDIR] !== UNMODIFIED ||\n row[STAGE] !== UNMODIFIED,\n )\n .map((row) => ({ path: row[FILEPATH], state: mapState(row) }))\n .filter(\n (changedFile) =>\n !ignore.some(\n (i) => i.path === changedFile.path && i.state === changedFile.state,\n ),\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AACf,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import fs from 'fs-extra';\nimport git, { findRoot } from 'isomorphic-git';\n\nimport {\n ABSENT,\n FILEPATH,\n HEAD,\n MODIFIED,\n STAGE,\n UNMODIFIED,\n WORKDIR,\n} from './statusMatrix';\n\ntype ChangedFileState = 'added' | 'modified' | 'deleted';\nexport interface ChangedFile {\n path: string;\n state: ChangedFileState;\n}\ninterface ChangedFilesParameters {\n dir: string;\n\n /**\n * File changes to exclude from the result.\n *\n * Defaults to `[]` (no exclusions).\n */\n ignore?: ChangedFile[];\n}\n\nconst mapState = (\n row: [string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3],\n): ChangedFileState => {\n if (row[HEAD] === ABSENT) {\n return 'added';\n }\n\n if (row[WORKDIR] === MODIFIED) {\n return 'modified';\n }\n\n return 'deleted';\n};\n\n/**\n * Returns all the files which have been added, modified or deleted in the\n * working directory of the local Git repository since the last commit.\n */\nexport const getChangedFiles = async ({\n dir,\n\n ignore = [],\n}: ChangedFilesParameters): Promise<ChangedFile[]> => {\n const gitRoot = await findRoot({ fs, filepath: dir });\n const allFiles = await git.statusMatrix({ fs, dir: gitRoot ?? dir });\n return allFiles\n .filter(\n (row) =>\n row[HEAD] !== UNMODIFIED ||\n row[WORKDIR] !== UNMODIFIED ||\n row[STAGE] !== UNMODIFIED,\n )\n .map((row) => ({ path: row[FILEPATH], state: mapState(row) }))\n .filter(\n (changedFile) =>\n !ignore.some(\n (i) => i.path === changedFile.path && i.state === changedFile.state,\n ),\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AACf,4BAA8B;AAE9B,0BAQO;AAkBP,MAAM,WAAW,CACf,QACqB;AACrB,MAAI,IAAI,wBAAI,MAAM,4BAAQ;AACxB,WAAO;AAAA,EACT;AAEA,MAAI,IAAI,2BAAO,MAAM,8BAAU;AAC7B,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAMO,MAAM,kBAAkB,OAAO;AAAA,EACpC;AAAA,EAEA,SAAS,CAAC;AACZ,MAAsD;AACpD,QAAM,UAAU,UAAM,gCAAS,EAAE,oBAAAA,SAAI,UAAU,IAAI,CAAC;AACpD,QAAM,WAAW,MAAM,sBAAAC,QAAI,aAAa,EAAE,oBAAAD,SAAI,KAAK,WAAW,IAAI,CAAC;AACnE,SAAO,SACJ;AAAA,IACC,CAAC,QACC,IAAI,wBAAI,MAAM,kCACd,IAAI,2BAAO,MAAM,kCACjB,IAAI,yBAAK,MAAM;AAAA,EACnB,EACC,IAAI,CAAC,SAAS,EAAE,MAAM,IAAI,4BAAQ,GAAG,OAAO,SAAS,GAAG,EAAE,EAAE,EAC5D;AAAA,IACC,CAAC,gBACC,CAAC,OAAO;AAAA,MACN,CAAC,MAAM,EAAE,SAAS,YAAY,QAAQ,EAAE,UAAU,YAAY;AAAA,IAChE;AAAA,EACJ;AACJ;",
|
|
6
|
+
"names": ["fs", "git"]
|
|
7
7
|
}
|
package/lib/api/github/push.js
CHANGED
|
@@ -86,23 +86,22 @@ const readFileChanges = async (dir, changedFiles) => {
|
|
|
86
86
|
{ added: [], deleted: [] }
|
|
87
87
|
);
|
|
88
88
|
const gitRoot = await Git.findRoot({ dir });
|
|
89
|
-
const
|
|
89
|
+
const toRootPath = (filePath) => {
|
|
90
90
|
if (!gitRoot) {
|
|
91
91
|
return filePath;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
return import_path.default.join(pathDir, filePath);
|
|
93
|
+
return import_path.default.resolve(gitRoot, filePath);
|
|
95
94
|
};
|
|
96
95
|
const additions = await Promise.all(
|
|
97
96
|
added.map(async (filePath) => ({
|
|
98
|
-
path:
|
|
99
|
-
contents: await import_fs_extra.default.promises.readFile(filePath, {
|
|
97
|
+
path: filePath,
|
|
98
|
+
contents: await import_fs_extra.default.promises.readFile(toRootPath(filePath), {
|
|
100
99
|
encoding: "base64"
|
|
101
100
|
})
|
|
102
101
|
}))
|
|
103
102
|
);
|
|
104
103
|
const deletions = deleted.map((filePath) => ({
|
|
105
|
-
path:
|
|
104
|
+
path: filePath
|
|
106
105
|
}));
|
|
107
106
|
return {
|
|
108
107
|
additions,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/api/github/push.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport type { CreateCommitOnBranchInput } from '@octokit/graphql-schema';\nimport fs from 'fs-extra';\n\nimport * as Git from '../git';\n\nimport { apiTokenFromEnvironment } from './environment';\nimport { graphql } from './octokit';\n\ninterface CreateCommitResult {\n createCommitOnBranch: {\n commit: {\n oid: string;\n };\n };\n}\n\ninterface UploadAllFileChangesParams {\n dir: string;\n /**\n * The branch name\n */\n branch: string;\n /**\n * The headline of the commit message\n */\n messageHeadline: string;\n\n /**\n * File changes to exclude from the upload.\n *\n * Defaults to `[]` (no exclusions).\n */\n ignore?: Git.ChangedFile[];\n /**\n * The body of the commit message\n */\n messageBody?: string;\n /**\n * Updates the local Git repository to match the new remote branch state\n */\n updateLocal?: boolean;\n}\n\n/**\n * Retrieves all file changes from the local Git repository using\n * `getChangedFiles`, then uploads the changes to a specified GitHub branch\n * using `uploadFileChanges`.\n *\n * Returns the commit ID, or `undefined` if there are no changes to commit.\n *\n * The file changes will appear as verified commits on GitHub.\n *\n * This will not update the local Git repository unless `updateLocal` is\n * specified.\n */\nexport const uploadAllFileChanges = async ({\n branch,\n dir,\n messageHeadline,\n\n ignore,\n messageBody,\n updateLocal = false,\n}: UploadAllFileChangesParams): Promise<string | undefined> => {\n const changedFiles = await Git.getChangedFiles({ dir, ignore });\n\n if (!changedFiles.length) {\n return;\n }\n\n const fileChanges = await readFileChanges(dir, changedFiles);\n\n const commitId = await uploadFileChanges({\n dir,\n branch,\n messageHeadline,\n messageBody,\n fileChanges,\n });\n\n if (updateLocal) {\n await Promise.all(\n [...fileChanges.additions, ...fileChanges.deletions].map((file) =>\n fs.rm(file.path),\n ),\n );\n\n await Git.fastForwardBranch({\n ref: branch,\n auth: { type: 'gitHubApp' },\n dir,\n });\n }\n\n return commitId;\n};\n\ninterface FileAddition {\n contents: unknown;\n path: string;\n}\n\ninterface FileDeletion {\n path: string;\n}\n\nexport interface FileChanges {\n additions: FileAddition[];\n deletions: FileDeletion[];\n}\n\n/**\n * Takes a list of `ChangedFiles`, reads them from the file system, and maps\n * them to GitHub GraphQL `FileChanges`.\n *\n * https://docs.github.com/en/graphql/reference/input-objects#filechanges\n */\nexport const readFileChanges = async (\n dir: string,\n changedFiles: Git.ChangedFile[],\n): Promise<FileChanges> => {\n const { added, deleted } = changedFiles.reduce<{\n added: string[];\n deleted: string[];\n }>(\n (files, changedFile) => {\n const filePath = changedFile.path;\n if (changedFile.state === 'deleted') {\n files.deleted.push(filePath);\n } else {\n files.added.push(filePath);\n }\n\n return files;\n },\n { added: [], deleted: [] },\n );\n\n const gitRoot = await Git.findRoot({ dir });\n\n const
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAGjB,sBAAe;AAEf,UAAqB;AAErB,yBAAwC;AACxC,qBAAwB;AAiDjB,MAAM,uBAAuB,OAAO;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA,cAAc;AAChB,MAA+D;AAC7D,QAAM,eAAe,MAAM,IAAI,gBAAgB,EAAE,KAAK,OAAO,CAAC;AAE9D,MAAI,CAAC,aAAa,QAAQ;AACxB;AAAA,EACF;AAEA,QAAM,cAAc,MAAM,gBAAgB,KAAK,YAAY;AAE3D,QAAM,WAAW,MAAM,kBAAkB;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,MAAI,aAAa;AACf,UAAM,QAAQ;AAAA,MACZ,CAAC,GAAG,YAAY,WAAW,GAAG,YAAY,SAAS,EAAE;AAAA,QAAI,CAAC,SACxD,gBAAAA,QAAG,GAAG,KAAK,IAAI;AAAA,MACjB;AAAA,IACF;AAEA,UAAM,IAAI,kBAAkB;AAAA,MAC1B,KAAK;AAAA,MACL,MAAM,EAAE,MAAM,YAAY;AAAA,MAC1B;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AACT;AAsBO,MAAM,kBAAkB,OAC7B,KACA,iBACyB;AACzB,QAAM,EAAE,OAAO,QAAQ,IAAI,aAAa;AAAA,IAItC,CAAC,OAAO,gBAAgB;AACtB,YAAM,WAAW,YAAY;AAC7B,UAAI,YAAY,UAAU,WAAW;AACnC,cAAM,QAAQ,KAAK,QAAQ;AAAA,MAC7B,OAAO;AACL,cAAM,MAAM,KAAK,QAAQ;AAAA,MAC3B;AAEA,aAAO;AAAA,IACT;AAAA,IACA,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,EAAE;AAAA,EAC3B;AAEA,QAAM,UAAU,MAAM,IAAI,SAAS,EAAE,IAAI,CAAC;AAE1C,QAAM,
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport type { CreateCommitOnBranchInput } from '@octokit/graphql-schema';\nimport fs from 'fs-extra';\n\nimport * as Git from '../git';\n\nimport { apiTokenFromEnvironment } from './environment';\nimport { graphql } from './octokit';\n\ninterface CreateCommitResult {\n createCommitOnBranch: {\n commit: {\n oid: string;\n };\n };\n}\n\ninterface UploadAllFileChangesParams {\n dir: string;\n /**\n * The branch name\n */\n branch: string;\n /**\n * The headline of the commit message\n */\n messageHeadline: string;\n\n /**\n * File changes to exclude from the upload.\n *\n * Defaults to `[]` (no exclusions).\n */\n ignore?: Git.ChangedFile[];\n /**\n * The body of the commit message\n */\n messageBody?: string;\n /**\n * Updates the local Git repository to match the new remote branch state\n */\n updateLocal?: boolean;\n}\n\n/**\n * Retrieves all file changes from the local Git repository using\n * `getChangedFiles`, then uploads the changes to a specified GitHub branch\n * using `uploadFileChanges`.\n *\n * Returns the commit ID, or `undefined` if there are no changes to commit.\n *\n * The file changes will appear as verified commits on GitHub.\n *\n * This will not update the local Git repository unless `updateLocal` is\n * specified.\n */\nexport const uploadAllFileChanges = async ({\n branch,\n dir,\n messageHeadline,\n\n ignore,\n messageBody,\n updateLocal = false,\n}: UploadAllFileChangesParams): Promise<string | undefined> => {\n const changedFiles = await Git.getChangedFiles({ dir, ignore });\n\n if (!changedFiles.length) {\n return;\n }\n\n const fileChanges = await readFileChanges(dir, changedFiles);\n\n const commitId = await uploadFileChanges({\n dir,\n branch,\n messageHeadline,\n messageBody,\n fileChanges,\n });\n\n if (updateLocal) {\n await Promise.all(\n [...fileChanges.additions, ...fileChanges.deletions].map((file) =>\n fs.rm(file.path),\n ),\n );\n\n await Git.fastForwardBranch({\n ref: branch,\n auth: { type: 'gitHubApp' },\n dir,\n });\n }\n\n return commitId;\n};\n\ninterface FileAddition {\n contents: unknown;\n path: string;\n}\n\ninterface FileDeletion {\n path: string;\n}\n\nexport interface FileChanges {\n additions: FileAddition[];\n deletions: FileDeletion[];\n}\n\n/**\n * Takes a list of `ChangedFiles`, reads them from the file system, and maps\n * them to GitHub GraphQL `FileChanges`.\n *\n * https://docs.github.com/en/graphql/reference/input-objects#filechanges\n */\nexport const readFileChanges = async (\n dir: string,\n changedFiles: Git.ChangedFile[],\n): Promise<FileChanges> => {\n const { added, deleted } = changedFiles.reduce<{\n added: string[];\n deleted: string[];\n }>(\n (files, changedFile) => {\n const filePath = changedFile.path;\n if (changedFile.state === 'deleted') {\n files.deleted.push(filePath);\n } else {\n files.added.push(filePath);\n }\n\n return files;\n },\n { added: [], deleted: [] },\n );\n\n const gitRoot = await Git.findRoot({ dir });\n\n const toRootPath = (filePath: string) => {\n if (!gitRoot) {\n return filePath;\n }\n\n return path.resolve(gitRoot, filePath);\n };\n\n const additions: FileAddition[] = await Promise.all(\n added.map(async (filePath) => ({\n path: filePath,\n contents: await fs.promises.readFile(toRootPath(filePath), {\n encoding: 'base64',\n }),\n })),\n );\n\n const deletions: FileDeletion[] = deleted.map((filePath) => ({\n path: filePath,\n }));\n\n return {\n additions,\n deletions,\n };\n};\n\ninterface UploadFileChangesParams {\n dir: string;\n /**\n * The branch name\n */\n branch: string;\n /**\n * The headline of the commit message\n */\n messageHeadline: string;\n /**\n * The body of the commit message\n */\n messageBody?: string;\n /**\n * File additions and deletions\n */\n fileChanges: FileChanges;\n}\n\n/**\n * Uploads file changes from the local workspace to a specified GitHub branch.\n *\n * The file changes will appear as verified commits on GitHub.\n *\n * This will not update the local Git repository.\n */\nexport const uploadFileChanges = async ({\n dir,\n branch,\n messageHeadline,\n messageBody,\n fileChanges,\n}: UploadFileChangesParams): Promise<string> => {\n const authToken = apiTokenFromEnvironment();\n if (!authToken) {\n throw new Error(\n 'Could not read a GitHub API token from the environment. Please set GITHUB_API_TOKEN or GITHUB_TOKEN.',\n );\n }\n\n const [{ owner, repo }, headCommitId] = await Promise.all([\n Git.getOwnerAndRepo({ dir }),\n Git.getHeadCommitId({ dir }),\n ]);\n\n const input: CreateCommitOnBranchInput = {\n branch: {\n repositoryNameWithOwner: `${owner}/${repo}`,\n branchName: branch,\n },\n message: {\n headline: messageHeadline,\n body: messageBody,\n },\n expectedHeadOid: headCommitId,\n clientMutationId: 'skuba',\n fileChanges,\n };\n\n const result = await graphql<CreateCommitResult>(\n `\n mutation Mutation($input: CreateCommitOnBranchInput!) {\n createCommitOnBranch(input: $input) {\n commit {\n oid\n }\n }\n }\n `,\n {\n input,\n headers: {\n authorization: `Bearer ${authToken}`,\n },\n },\n );\n\n return result.createCommitOnBranch.commit.oid;\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["fs", "path"]
|
|
7
7
|
}
|
package/lib/cli/build/esbuild.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
var esbuild_exports = {};
|
|
20
30
|
__export(esbuild_exports, {
|
|
@@ -22,6 +32,7 @@ __export(esbuild_exports, {
|
|
|
22
32
|
});
|
|
23
33
|
module.exports = __toCommonJS(esbuild_exports);
|
|
24
34
|
var import_util = require("util");
|
|
35
|
+
var import_tsconfig_paths = __toESM(require("@esbuild-plugins/tsconfig-paths"));
|
|
25
36
|
var import_esbuild = require("esbuild");
|
|
26
37
|
var import_typescript = require("typescript");
|
|
27
38
|
var import_logging = require("../../utils/logging");
|
|
@@ -56,7 +67,12 @@ const esbuild = async ({ debug }, args = process.argv.slice(2)) => {
|
|
|
56
67
|
logLevel: debug ? "debug" : "info",
|
|
57
68
|
logLimit: 0,
|
|
58
69
|
platform: compilerOptions.moduleResolution === import_typescript.ModuleResolutionKind.NodeJs ? "node" : void 0,
|
|
59
|
-
|
|
70
|
+
plugins: bundle ? [] : [
|
|
71
|
+
// evanw/esbuild#394
|
|
72
|
+
(0, import_tsconfig_paths.default)({
|
|
73
|
+
tsconfig: { baseUrl: compilerOptions.baseUrl, compilerOptions }
|
|
74
|
+
})
|
|
75
|
+
],
|
|
60
76
|
sourcemap: compilerOptions.sourceMap,
|
|
61
77
|
// TODO: as of 0.18, the esbuild CLI no longer infers the target property to
|
|
62
78
|
// avoid ambiguity where multiple `tsconfig.json`s are involved in a build.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/build/esbuild.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport { build } from 'esbuild';\nimport { ModuleKind, ModuleResolutionKind, ScriptTarget } from 'typescript';\n\nimport { createLogger } from '../../utils/logging';\n\nimport { parseTscArgs } from './args';\nimport { readTsconfig, tsc } from './tsc';\n\ninterface EsbuildParameters {\n debug: boolean;\n}\n\nexport const esbuild = async (\n { debug }: EsbuildParameters,\n args = process.argv.slice(2),\n) => {\n const log = createLogger({ debug });\n\n const tscArgs = parseTscArgs(args);\n\n if (tscArgs.build) {\n log.err(\n 'skuba does not currently support the tsc --build flag with esbuild',\n );\n process.exitCode = 1;\n return;\n }\n\n const parsedCommandLine = readTsconfig(args, log);\n\n if (!parsedCommandLine || process.exitCode) {\n return;\n }\n\n const { fileNames: entryPoints, options: compilerOptions } =\n parsedCommandLine;\n\n log.debug(log.bold('Files'));\n entryPoints.forEach((filepath) => log.debug(filepath));\n\n log.debug(log.bold('Compiler options'));\n log.debug(inspect(compilerOptions));\n\n const start = process.hrtime.bigint();\n\n // TODO: support `bundle`, `minify`, `splitting`, `treeShaking`\n const bundle = false;\n\n await build({\n bundle,\n entryPoints,\n format: compilerOptions.module === ModuleKind.CommonJS ? 'cjs' : undefined,\n outdir: compilerOptions.outDir,\n logLevel: debug ? 'debug' : 'info',\n logLimit: 0,\n platform:\n compilerOptions.moduleResolution === ModuleResolutionKind.NodeJs\n ? 'node'\n : undefined,\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport tsconfigPaths from '@esbuild-plugins/tsconfig-paths';\nimport { build } from 'esbuild';\nimport { ModuleKind, ModuleResolutionKind, ScriptTarget } from 'typescript';\n\nimport { createLogger } from '../../utils/logging';\n\nimport { parseTscArgs } from './args';\nimport { readTsconfig, tsc } from './tsc';\n\ninterface EsbuildParameters {\n debug: boolean;\n}\n\nexport const esbuild = async (\n { debug }: EsbuildParameters,\n args = process.argv.slice(2),\n) => {\n const log = createLogger({ debug });\n\n const tscArgs = parseTscArgs(args);\n\n if (tscArgs.build) {\n log.err(\n 'skuba does not currently support the tsc --build flag with esbuild',\n );\n process.exitCode = 1;\n return;\n }\n\n const parsedCommandLine = readTsconfig(args, log);\n\n if (!parsedCommandLine || process.exitCode) {\n return;\n }\n\n const { fileNames: entryPoints, options: compilerOptions } =\n parsedCommandLine;\n\n log.debug(log.bold('Files'));\n entryPoints.forEach((filepath) => log.debug(filepath));\n\n log.debug(log.bold('Compiler options'));\n log.debug(inspect(compilerOptions));\n\n const start = process.hrtime.bigint();\n\n // TODO: support `bundle`, `minify`, `splitting`, `treeShaking`\n const bundle = false;\n\n await build({\n bundle,\n entryPoints,\n format: compilerOptions.module === ModuleKind.CommonJS ? 'cjs' : undefined,\n outdir: compilerOptions.outDir,\n logLevel: debug ? 'debug' : 'info',\n logLimit: 0,\n platform:\n compilerOptions.moduleResolution === ModuleResolutionKind.NodeJs\n ? 'node'\n : undefined,\n plugins: bundle\n ? []\n : [\n // evanw/esbuild#394\n tsconfigPaths({\n tsconfig: { baseUrl: compilerOptions.baseUrl, compilerOptions },\n }),\n ],\n sourcemap: compilerOptions.sourceMap,\n // TODO: as of 0.18, the esbuild CLI no longer infers the target property to\n // avoid ambiguity where multiple `tsconfig.json`s are involved in a build.\n // This would be unusual for a typical SEEK project but we can still explore\n // an explicit setting once we implement `skuba.config.ts` (#1167).\n target: compilerOptions.target\n ? ScriptTarget[compilerOptions.target].toLocaleLowerCase()\n : undefined,\n tsconfig: tscArgs.pathname,\n });\n\n const end = process.hrtime.bigint();\n\n log.plain(`Built in ${log.timing(start, end)}.`);\n\n if (compilerOptions.declaration) {\n await tsc([\n '--declaration',\n '--emitDeclarationOnly',\n ...(tscArgs.project ? ['--project', tscArgs.project] : []),\n ]);\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,4BAA0B;AAC1B,qBAAsB;AACtB,wBAA+D;AAE/D,qBAA6B;AAE7B,kBAA6B;AAC7B,iBAAkC;AAM3B,MAAM,UAAU,OACrB,EAAE,MAAM,GACR,OAAO,QAAQ,KAAK,MAAM,CAAC,MACxB;AACH,QAAM,UAAM,6BAAa,EAAE,MAAM,CAAC;AAElC,QAAM,cAAU,0BAAa,IAAI;AAEjC,MAAI,QAAQ,OAAO;AACjB,QAAI;AAAA,MACF;AAAA,IACF;AACA,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,QAAM,wBAAoB,yBAAa,MAAM,GAAG;AAEhD,MAAI,CAAC,qBAAqB,QAAQ,UAAU;AAC1C;AAAA,EACF;AAEA,QAAM,EAAE,WAAW,aAAa,SAAS,gBAAgB,IACvD;AAEF,MAAI,MAAM,IAAI,KAAK,OAAO,CAAC;AAC3B,cAAY,QAAQ,CAAC,aAAa,IAAI,MAAM,QAAQ,CAAC;AAErD,MAAI,MAAM,IAAI,KAAK,kBAAkB,CAAC;AACtC,MAAI,UAAM,qBAAQ,eAAe,CAAC;AAElC,QAAM,QAAQ,QAAQ,OAAO,OAAO;AAGpC,QAAM,SAAS;AAEf,YAAM,sBAAM;AAAA,IACV;AAAA,IACA;AAAA,IACA,QAAQ,gBAAgB,WAAW,6BAAW,WAAW,QAAQ;AAAA,IACjE,QAAQ,gBAAgB;AAAA,IACxB,UAAU,QAAQ,UAAU;AAAA,IAC5B,UAAU;AAAA,IACV,UACE,gBAAgB,qBAAqB,uCAAqB,SACtD,SACA;AAAA,IACN,SAAS,SACL,CAAC,IACD;AAAA;AAAA,UAEE,sBAAAA,SAAc;AAAA,QACZ,UAAU,EAAE,SAAS,gBAAgB,SAAS,gBAAgB;AAAA,MAChE,CAAC;AAAA,IACH;AAAA,IACJ,WAAW,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,IAK3B,QAAQ,gBAAgB,SACpB,+BAAa,gBAAgB,MAAM,EAAE,kBAAkB,IACvD;AAAA,IACJ,UAAU,QAAQ;AAAA,EACpB,CAAC;AAED,QAAM,MAAM,QAAQ,OAAO,OAAO;AAElC,MAAI,MAAM,YAAY,IAAI,OAAO,OAAO,GAAG,CAAC,GAAG;AAE/C,MAAI,gBAAgB,aAAa;AAC/B,cAAM,gBAAI;AAAA,MACR;AAAA,MACA;AAAA,MACA,GAAI,QAAQ,UAAU,CAAC,aAAa,QAAQ,OAAO,IAAI,CAAC;AAAA,IAC1D,CAAC;AAAA,EACH;AACF;",
|
|
6
|
+
"names": ["tsconfigPaths"]
|
|
7
7
|
}
|
|
@@ -31,12 +31,14 @@ __export(prettier_exports, {
|
|
|
31
31
|
formatPrettier: () => formatPrettier
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(prettier_exports);
|
|
34
|
-
var import_prettier = __toESM(require("prettier"));
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
var import_prettier = __toESM(require("../../../../config/prettier"));
|
|
35
|
+
const formatPrettier = async (source, options) => {
|
|
36
|
+
const prettier = await import("prettier");
|
|
37
|
+
return prettier.format(source, {
|
|
38
|
+
...options,
|
|
39
|
+
...import_prettier.default
|
|
40
|
+
});
|
|
41
|
+
};
|
|
40
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
43
|
0 && (module.exports = {
|
|
42
44
|
formatPrettier
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/prettier.ts"],
|
|
4
|
-
"sourcesContent": ["import prettier from 'prettier';\n\nimport prettierConfig from '../../../../config/prettier';\n\ntype Options = Pick<prettier.Options, 'filepath' | 'parser'>;\n\nexport const formatPrettier = (source: string, options: Options)
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import type prettier from 'prettier';\n\nimport prettierConfig from '../../../../config/prettier';\n\ntype Options = Pick<prettier.Options, 'filepath' | 'parser'>;\n\nexport const formatPrettier = async (source: string, options: Options) => {\n const prettier = await import('prettier');\n return prettier.format(source, {\n ...options,\n ...prettierConfig,\n });\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAA2B;AAIpB,MAAM,iBAAiB,OAAO,QAAgB,YAAqB;AACxE,QAAM,WAAW,MAAM,OAAO,UAAU;AACxC,SAAO,SAAS,OAAO,QAAQ;AAAA,IAC7B,GAAG;AAAA,IACH,GAAG,gBAAAA;AAAA,EACL,CAAC;AACH;",
|
|
6
|
+
"names": ["prettierConfig"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skuba",
|
|
3
|
-
"version": "11.0
|
|
3
|
+
"version": "11.1.0-jest30-20250605013156",
|
|
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",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
+
"@esbuild-plugins/tsconfig-paths": "^0.1.0",
|
|
53
54
|
"@eslint/migrate-config": "~1.3.8",
|
|
54
55
|
"@jest/types": "^29.0.0",
|
|
55
56
|
"@octokit/graphql": "^9.0.0",
|
|
@@ -75,7 +76,7 @@
|
|
|
75
76
|
"ignore": "^7.0.0",
|
|
76
77
|
"is-installed-globally": "^0.4.0",
|
|
77
78
|
"isomorphic-git": "^1.11.1",
|
|
78
|
-
"jest": "^
|
|
79
|
+
"jest": "^30.0.0-beta.4",
|
|
79
80
|
"jest-watch-typeahead": "^2.1.1",
|
|
80
81
|
"lodash.mergewith": "^4.6.2",
|
|
81
82
|
"minimist": "^1.2.6",
|
|
@@ -97,7 +98,7 @@
|
|
|
97
98
|
"tsx": "^4.16.2",
|
|
98
99
|
"typescript": "~5.8.0",
|
|
99
100
|
"zod": "^3.22.4",
|
|
100
|
-
"eslint-config-skuba": "6.1.0
|
|
101
|
+
"eslint-config-skuba": "6.1.0"
|
|
101
102
|
},
|
|
102
103
|
"devDependencies": {
|
|
103
104
|
"@changesets/cli": "2.29.3",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"@koa/router": "^13.0.0",
|
|
18
18
|
"@opentelemetry/api": "^1.9.0",
|
|
19
19
|
"@opentelemetry/core": "^2.0.0",
|
|
20
|
-
"@opentelemetry/exporter-trace-otlp-grpc": "^0.
|
|
21
|
-
"@opentelemetry/instrumentation-aws-sdk": "^0.
|
|
22
|
-
"@opentelemetry/instrumentation-http": "^0.
|
|
20
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.201.0",
|
|
21
|
+
"@opentelemetry/instrumentation-aws-sdk": "^0.53.0",
|
|
22
|
+
"@opentelemetry/instrumentation-http": "^0.201.0",
|
|
23
23
|
"@opentelemetry/propagator-b3": "^2.0.0",
|
|
24
|
-
"@opentelemetry/sdk-node": "^0.
|
|
24
|
+
"@opentelemetry/sdk-node": "^0.201.0",
|
|
25
25
|
"@seek/logger": "^9.0.0",
|
|
26
26
|
"hot-shots": "^10.0.0",
|
|
27
27
|
"koa": "^2.16.1",
|
|
@@ -187,6 +187,8 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
|
|
|
187
187
|
"DD_SERVERLESS_APPSEC_ENABLED": "false",
|
|
188
188
|
"DD_SERVERLESS_LOGS_ENABLED": "false",
|
|
189
189
|
"DD_SITE": "datadoghq.com",
|
|
190
|
+
"DD_TRACE_CLOUD_REQUEST_PAYLOAD_TAGGING": "$.*",
|
|
191
|
+
"DD_TRACE_CLOUD_RESPONSE_PAYLOAD_TAGGING": "$.*",
|
|
190
192
|
"DD_TRACE_ENABLED": "true",
|
|
191
193
|
"DESTINATION_SNS_TOPIC_ARN": {
|
|
192
194
|
"Ref": "destinationtopicDCE2E0B8",
|
|
@@ -915,6 +917,8 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
|
|
|
915
917
|
"DD_SERVERLESS_APPSEC_ENABLED": "false",
|
|
916
918
|
"DD_SERVERLESS_LOGS_ENABLED": "false",
|
|
917
919
|
"DD_SITE": "datadoghq.com",
|
|
920
|
+
"DD_TRACE_CLOUD_REQUEST_PAYLOAD_TAGGING": "$.*",
|
|
921
|
+
"DD_TRACE_CLOUD_RESPONSE_PAYLOAD_TAGGING": "$.*",
|
|
918
922
|
"DD_TRACE_ENABLED": "true",
|
|
919
923
|
"DESTINATION_SNS_TOPIC_ARN": {
|
|
920
924
|
"Ref": "destinationtopicDCE2E0B8",
|