apify-test-tools 0.9.1-beta.11 → 0.9.1-beta.13
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/.github/workflows/public_push-build-latest.yaml +3 -1
- package/.github/workflows-package-version +1 -1
- package/CHANGELOG.md +1 -0
- package/CONTRIBUTING.md +2 -4
- package/README.md +68 -8
- package/bin/build-from-local.ts +2 -2
- package/bin/build.ts +114 -70
- package/bin/git.ts +140 -0
- package/bin/main.ts +128 -91
- package/bin/slack.ts +5 -2
- package/bin/types.ts +0 -73
- package/bin/utils.ts +2 -3
- package/dist/bin/build-from-local.js.map +1 -1
- package/dist/bin/build.d.ts +25 -4
- package/dist/bin/build.d.ts.map +1 -1
- package/dist/bin/build.js +76 -47
- package/dist/bin/build.js.map +1 -1
- package/dist/bin/git.d.ts +40 -0
- package/dist/bin/git.d.ts.map +1 -1
- package/dist/bin/git.js +118 -0
- package/dist/bin/git.js.map +1 -1
- package/dist/bin/main.d.ts +1 -20
- package/dist/bin/main.d.ts.map +1 -1
- package/dist/bin/main.js +65 -62
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/slack.d.ts.map +1 -1
- package/dist/bin/slack.js +4 -2
- package/dist/bin/slack.js.map +1 -1
- package/dist/bin/types.d.ts +0 -64
- package/dist/bin/types.d.ts.map +1 -1
- package/dist/bin/utils.d.ts.map +1 -1
- package/dist/bin/utils.js +2 -3
- package/dist/bin/utils.js.map +1 -1
- package/dist/test/unit/bin/build.test.d.ts +2 -0
- package/dist/test/unit/bin/build.test.d.ts.map +1 -0
- package/dist/test/unit/bin/build.test.js +46 -0
- package/dist/test/unit/bin/build.test.js.map +1 -0
- package/dist/test/unit/bin/git.test.js +104 -1
- package/dist/test/unit/bin/git.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/test/unit/bin/build.test.ts +68 -0
- package/test/unit/bin/git.test.ts +122 -0
- package/bin/github.ts +0 -69
- package/dist/bin/github.d.ts +0 -11
- package/dist/bin/github.d.ts.map +0 -1
- package/dist/bin/github.js +0 -59
- package/dist/bin/github.js.map +0 -1
package/bin/main.ts
CHANGED
|
@@ -2,19 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
import process from 'node:process';
|
|
4
4
|
|
|
5
|
-
import yargs, { type
|
|
5
|
+
import yargs, { type Options } from 'yargs';
|
|
6
6
|
// eslint-disable-next-line import/extensions --- With .js, it cannot find types
|
|
7
7
|
import { hideBin } from 'yargs/helpers';
|
|
8
8
|
|
|
9
9
|
import { deleteOldBuilds, runBuilds } from './build.js';
|
|
10
10
|
import { runBuildsFromLocal } from './build-from-local.js';
|
|
11
11
|
import { getChangedActors } from './diff-changes.js';
|
|
12
|
-
import {
|
|
13
|
-
|
|
12
|
+
import {
|
|
13
|
+
getBranchOnlyChangedFiles,
|
|
14
|
+
getChangedFiles,
|
|
15
|
+
getCommits,
|
|
16
|
+
getCurrentBranch,
|
|
17
|
+
getReleaseChanges,
|
|
18
|
+
getRepoName,
|
|
19
|
+
hasMergeFromTarget,
|
|
20
|
+
resolveReleaseBaseCommit,
|
|
21
|
+
resolveRepoUrl,
|
|
22
|
+
} from './git.js';
|
|
14
23
|
import { notifyToSlack } from './slack.js';
|
|
15
24
|
import { reportTestResults } from './test-report.js';
|
|
16
25
|
import type { Config } from './types.js';
|
|
17
|
-
import { setCwd
|
|
26
|
+
import { setCwd } from './utils.js';
|
|
18
27
|
import { readConfigFile } from './utils/config/load-config.js';
|
|
19
28
|
|
|
20
29
|
/**
|
|
@@ -22,44 +31,48 @@ import { readConfigFile } from './utils/config/load-config.js';
|
|
|
22
31
|
*/
|
|
23
32
|
const middlewares = [setCwd];
|
|
24
33
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
/*
|
|
35
|
+
* Option groups shared across commands. Each is a plain object passed to `.options()`, so a command's
|
|
36
|
+
* builder composes them by chaining (`y.options(gitRangeOptions).options(actorSelectionOptions)`)
|
|
37
|
+
* instead of nesting wrapper functions. `as const` keeps literals like `demandOption: true` so yargs
|
|
38
|
+
* can infer non-optional types; `satisfies` validates the shape without widening it.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/** Commit range to inspect: everything on `source-branch` since it diverged from `target-branch`. */
|
|
42
|
+
const gitRangeOptions = {
|
|
43
|
+
'target-branch': { type: 'string', demandOption: true },
|
|
44
|
+
'source-branch': { type: 'string', demandOption: true },
|
|
45
|
+
'base-commit': { type: 'string', demandOption: false },
|
|
46
|
+
} as const satisfies Record<string, Options>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Where to build the Actors from. Defaults to the `origin` remote, which is then checked against each
|
|
50
|
+
* Actor's default version. Passing it explicitly skips that check (see assertRepoUrlMatchesDefaultVersion).
|
|
51
|
+
*/
|
|
52
|
+
const repoUrlOptions = {
|
|
53
|
+
'repo-url': { type: 'string' },
|
|
54
|
+
} as const satisfies Record<string, Options>;
|
|
44
55
|
|
|
45
56
|
/**
|
|
46
57
|
* Actor-selection flags, applied to every command that reads the actor config so a caller can
|
|
47
58
|
* narrow the set it operates on (e.g. two-stage releases: `--ignore X`, then `--actors X`).
|
|
48
|
-
* Kept separate from `
|
|
59
|
+
* Kept separate from `gitRangeOptions` so the read-only git commands don't advertise flags they ignore.
|
|
49
60
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
61
|
+
const actorSelectionOptions = {
|
|
62
|
+
actors: { type: 'string', array: true, default: [] as string[] },
|
|
63
|
+
ignore: { type: 'string', array: true, default: [] as string[] },
|
|
64
|
+
} as const satisfies Record<string, Options>;
|
|
65
|
+
|
|
66
|
+
/** Flags for commands that trigger Apify builds. */
|
|
67
|
+
const buildOptions = {
|
|
68
|
+
'use-docker-cache': { type: 'boolean', default: false },
|
|
69
|
+
} as const satisfies Record<string, Options>;
|
|
70
|
+
|
|
71
|
+
/** Global flags, available to every command. */
|
|
72
|
+
const globalOptions = {
|
|
73
|
+
'dry-run': { type: 'boolean', default: false },
|
|
74
|
+
workspace: { type: 'string' },
|
|
75
|
+
} as const satisfies Record<string, Options>;
|
|
63
76
|
|
|
64
77
|
const resolveChangedActors = async (config: Config, { isLatest }: { isLatest: boolean }) => {
|
|
65
78
|
const actorConfigs = await readConfigFile(config);
|
|
@@ -98,37 +111,51 @@ const resolveChangedActors = async (config: Config, { isLatest }: { isLatest: bo
|
|
|
98
111
|
|
|
99
112
|
await yargs()
|
|
100
113
|
.scriptName('public-actors-utils')
|
|
101
|
-
.
|
|
102
|
-
type: 'boolean',
|
|
103
|
-
default: false,
|
|
104
|
-
})
|
|
105
|
-
.option('workspace', {
|
|
106
|
-
type: 'string',
|
|
107
|
-
})
|
|
114
|
+
.options(globalOptions)
|
|
108
115
|
.middleware(middlewares)
|
|
109
|
-
.command(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
.command(
|
|
117
|
+
'get-commits',
|
|
118
|
+
'',
|
|
119
|
+
(y) => y.options(gitRangeOptions),
|
|
120
|
+
(args) => {
|
|
121
|
+
const commits = getCommits(args);
|
|
122
|
+
console.log(JSON.stringify(commits));
|
|
123
|
+
},
|
|
124
|
+
)
|
|
125
|
+
.command(
|
|
126
|
+
'get-latest-commit',
|
|
127
|
+
'',
|
|
128
|
+
(y) => y.options(gitRangeOptions),
|
|
129
|
+
(args) => {
|
|
130
|
+
const commits = getCommits(args);
|
|
131
|
+
if (commits.length > 0) {
|
|
132
|
+
console.log(JSON.stringify(commits[commits.length - 1]));
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
)
|
|
136
|
+
.command(
|
|
137
|
+
'get-changed-files',
|
|
138
|
+
'',
|
|
139
|
+
(y) => y.options(gitRangeOptions),
|
|
140
|
+
(args) => {
|
|
141
|
+
const commits = getCommits(args);
|
|
142
|
+
const changedFiles = getChangedFiles(commits);
|
|
143
|
+
console.log(JSON.stringify(changedFiles));
|
|
144
|
+
},
|
|
145
|
+
)
|
|
146
|
+
.command(
|
|
147
|
+
'get-actor-configs',
|
|
148
|
+
'',
|
|
149
|
+
(y) => y.options(actorSelectionOptions),
|
|
150
|
+
async ({ actors, ignore }) => {
|
|
151
|
+
const actorConfigs = await readConfigFile({ actors, ignore });
|
|
152
|
+
console.log(JSON.stringify(actorConfigs));
|
|
153
|
+
},
|
|
154
|
+
)
|
|
128
155
|
.command(
|
|
129
156
|
'get-affected-actors',
|
|
130
157
|
'',
|
|
131
|
-
(
|
|
158
|
+
(y) => y.options(gitRangeOptions).options(actorSelectionOptions),
|
|
132
159
|
async (config) => {
|
|
133
160
|
const actorsChanged = await resolveChangedActors(config, { isLatest: false });
|
|
134
161
|
console.log(JSON.stringify(actorsChanged));
|
|
@@ -137,8 +164,8 @@ await yargs()
|
|
|
137
164
|
.command(
|
|
138
165
|
'report-tests',
|
|
139
166
|
'',
|
|
140
|
-
(
|
|
141
|
-
|
|
167
|
+
(y) =>
|
|
168
|
+
y
|
|
142
169
|
.option('report-file', { type: 'string', demandOption: true })
|
|
143
170
|
.option('report-slack-channel', { type: 'string' })
|
|
144
171
|
.option('job-url', { type: 'string' })
|
|
@@ -150,18 +177,11 @@ await yargs()
|
|
|
150
177
|
.command(
|
|
151
178
|
'build',
|
|
152
179
|
'',
|
|
153
|
-
(
|
|
180
|
+
(y) => y.options(gitRangeOptions).options(actorSelectionOptions).options(buildOptions).options(repoUrlOptions),
|
|
154
181
|
async (config) => {
|
|
155
182
|
const actorsChanged = await resolveChangedActors(config, { isLatest: false });
|
|
156
|
-
// https://github.com/apify-store/google-maps#:actors/lukaskrivka_google-maps-with-contact-details
|
|
157
|
-
// git@github.com:apify-store/google-maps#:actors/lukaskrivka_google-maps-with-contact-details
|
|
158
|
-
const repoUrl = spawnCommandInGhWorkspace(`git remote get-url origin`).replace(
|
|
159
|
-
/^https:\/\/github\.com\//,
|
|
160
|
-
'git@github.com:',
|
|
161
|
-
);
|
|
162
|
-
|
|
163
183
|
const builds = await runBuilds({
|
|
164
|
-
repoUrl,
|
|
184
|
+
...resolveRepoUrl(config.repoUrl),
|
|
165
185
|
actorConfigs: actorsChanged,
|
|
166
186
|
branch: config.sourceBranch.replace('origin/', ''),
|
|
167
187
|
dryRun: config.dryRun,
|
|
@@ -173,17 +193,27 @@ await yargs()
|
|
|
173
193
|
.command(
|
|
174
194
|
'release',
|
|
175
195
|
'',
|
|
176
|
-
(
|
|
177
|
-
|
|
178
|
-
.
|
|
179
|
-
.
|
|
196
|
+
(y) =>
|
|
197
|
+
y
|
|
198
|
+
.options(actorSelectionOptions)
|
|
199
|
+
.options(buildOptions)
|
|
200
|
+
.options(repoUrlOptions)
|
|
201
|
+
// The last commit that is already released, everything after it up to HEAD gets released.
|
|
202
|
+
// Required, see the README section "Releasing Actors" for how to set it for each merge strategy.
|
|
203
|
+
.option('base-commit', { type: 'string', demandOption: true })
|
|
180
204
|
.option('report-slack-channel', { type: 'string' })
|
|
181
|
-
.option('release-slack-channel', { type: 'string' })
|
|
182
|
-
.option('use-docker-cache', { type: 'boolean', default: false }),
|
|
205
|
+
.option('release-slack-channel', { type: 'string' }),
|
|
183
206
|
async (args) => {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
);
|
|
207
|
+
const baseSha = resolveReleaseBaseCommit(args.baseCommit);
|
|
208
|
+
const branch = getCurrentBranch();
|
|
209
|
+
const changes = getReleaseChanges(baseSha);
|
|
210
|
+
if (!changes) {
|
|
211
|
+
console.error(`HEAD is the base commit ${baseSha}, there is nothing new to release`);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const { commits, changedFiles, changelog } = changes;
|
|
215
|
+
const { repoUrl, shouldVerifyRepoUrl } = resolveRepoUrl(args.repoUrl);
|
|
216
|
+
|
|
187
217
|
const isLatest = true;
|
|
188
218
|
const actorConfigs = await readConfigFile(args);
|
|
189
219
|
const actorsChanged = getChangedActors({
|
|
@@ -196,6 +226,7 @@ await yargs()
|
|
|
196
226
|
const builds = await runBuilds({
|
|
197
227
|
isLatest,
|
|
198
228
|
repoUrl,
|
|
229
|
+
shouldVerifyRepoUrl,
|
|
199
230
|
actorConfigs: actorsChanged,
|
|
200
231
|
branch,
|
|
201
232
|
dryRun,
|
|
@@ -207,9 +238,10 @@ await yargs()
|
|
|
207
238
|
changedFiles,
|
|
208
239
|
commits,
|
|
209
240
|
changelog,
|
|
210
|
-
repository,
|
|
241
|
+
repository: getRepoName(repoUrl),
|
|
211
242
|
dryRun,
|
|
212
|
-
|
|
243
|
+
// The newest commit, same as the pushed head commit
|
|
244
|
+
author: commits[commits.length - 1].author,
|
|
213
245
|
reportSlackChannel,
|
|
214
246
|
releaseSlackChannel,
|
|
215
247
|
});
|
|
@@ -218,17 +250,22 @@ await yargs()
|
|
|
218
250
|
.command(
|
|
219
251
|
'build-from-local',
|
|
220
252
|
'',
|
|
221
|
-
(
|
|
253
|
+
(y) => y.options(actorSelectionOptions),
|
|
222
254
|
async ({ actors, ignore, dryRun }) => {
|
|
223
255
|
const actorConfigs = await readConfigFile({ actors, ignore });
|
|
224
256
|
const builds = await runBuildsFromLocal({ actorConfigs, dryRun });
|
|
225
257
|
console.log(JSON.stringify(builds));
|
|
226
258
|
},
|
|
227
259
|
)
|
|
228
|
-
.command(
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
260
|
+
.command(
|
|
261
|
+
'delete-old-builds',
|
|
262
|
+
'',
|
|
263
|
+
(y) => y.options(actorSelectionOptions),
|
|
264
|
+
async ({ actors, ignore }) => {
|
|
265
|
+
const actorConfigs = await readConfigFile({ actors, ignore });
|
|
266
|
+
await deleteOldBuilds(actorConfigs);
|
|
267
|
+
},
|
|
268
|
+
)
|
|
232
269
|
.strictCommands()
|
|
233
270
|
.demandCommand(1, 'Command is required')
|
|
234
271
|
.fail((msg, err, yargsInstance) => {
|
package/bin/slack.ts
CHANGED
|
@@ -14,6 +14,9 @@ type NotifyToSlackOptions = {
|
|
|
14
14
|
reportSlackChannel?: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
// Git authors come as "Name<email>", Slack only needs the name
|
|
18
|
+
const displayName = (author: string) => author.replace(/\s*<[^>]*>$/, '');
|
|
19
|
+
|
|
17
20
|
export const notifyToSlack = async ({
|
|
18
21
|
changedFiles,
|
|
19
22
|
commits,
|
|
@@ -30,7 +33,7 @@ export const notifyToSlack = async ({
|
|
|
30
33
|
console.warn('No new changelog entries found, did you forget to update it?');
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
let shortMessage = `*${repository}* – New release (by ${author}):\n\n`;
|
|
36
|
+
let shortMessage = `*${repository}* – New release (by ${displayName(author)}):\n\n`;
|
|
34
37
|
|
|
35
38
|
// This one is just for broader public that only cares about public facing changes
|
|
36
39
|
if (changelog && releaseSlackChannel) {
|
|
@@ -49,7 +52,7 @@ export const notifyToSlack = async ({
|
|
|
49
52
|
const commitsMessage = `${commits
|
|
50
53
|
.map(
|
|
51
54
|
({ author: commitAuthor, message }, index) =>
|
|
52
|
-
`${index + 1}. Commit message: ${message}\n\tAuthor: ${commitAuthor}.`,
|
|
55
|
+
`${index + 1}. Commit message: ${message}\n\tAuthor: ${displayName(commitAuthor)}.`,
|
|
53
56
|
)
|
|
54
57
|
.join('\n')}`;
|
|
55
58
|
const changedFilesMessage = `*Files changed*: ${changedFiles.map((file) => `\`${file}\``).join(', ')}`;
|
package/bin/types.ts
CHANGED
|
@@ -14,79 +14,6 @@ export type Commit = {
|
|
|
14
14
|
message: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
// NOTE: The GitHub types are incomplete, feel free to add fields/complete (not sure how stable GitHub API is)
|
|
18
|
-
export interface GitHubHeadCommit {
|
|
19
|
-
added: string[];
|
|
20
|
-
removed: string[];
|
|
21
|
-
modified: string[];
|
|
22
|
-
author: {
|
|
23
|
-
name: string;
|
|
24
|
-
};
|
|
25
|
-
message: string;
|
|
26
|
-
id: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface Repository {
|
|
30
|
-
full_name: string;
|
|
31
|
-
name: string;
|
|
32
|
-
ssh_url: string;
|
|
33
|
-
owner: {
|
|
34
|
-
login: string;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type GitHubEvent = GitHubEventPullRequest | GitHubEventPush;
|
|
39
|
-
|
|
40
|
-
export interface GitHubEventPullRequest {
|
|
41
|
-
// Type is our own variable we inject to have discriminated union
|
|
42
|
-
// The rest of the properties are raw from GitHub API
|
|
43
|
-
type: 'pull_request';
|
|
44
|
-
pull_request: {
|
|
45
|
-
number: number;
|
|
46
|
-
base: {
|
|
47
|
-
ref: string;
|
|
48
|
-
sha: string;
|
|
49
|
-
};
|
|
50
|
-
head: {
|
|
51
|
-
ref: string;
|
|
52
|
-
sha: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
repository: Repository;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface GitHubEventPush {
|
|
59
|
-
type: 'push';
|
|
60
|
-
head_commit: GitHubHeadCommit;
|
|
61
|
-
repository: Repository;
|
|
62
|
-
ref: string;
|
|
63
|
-
commits: GithubCommit[];
|
|
64
|
-
before: string;
|
|
65
|
-
after: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface GithubCommit {
|
|
69
|
-
id: string;
|
|
70
|
-
tree_id: string;
|
|
71
|
-
distinct: boolean;
|
|
72
|
-
message: string;
|
|
73
|
-
timestamp: string;
|
|
74
|
-
url: string;
|
|
75
|
-
author: {
|
|
76
|
-
name: string;
|
|
77
|
-
email: string;
|
|
78
|
-
username: string;
|
|
79
|
-
};
|
|
80
|
-
committer: {
|
|
81
|
-
name: string;
|
|
82
|
-
email: string;
|
|
83
|
-
username: string;
|
|
84
|
-
};
|
|
85
|
-
added: string[];
|
|
86
|
-
removed: string[];
|
|
87
|
-
modified: string[];
|
|
88
|
-
}
|
|
89
|
-
|
|
90
17
|
export interface BuildData {
|
|
91
18
|
buildId: string;
|
|
92
19
|
actorRawId: string;
|
package/bin/utils.ts
CHANGED
|
@@ -84,11 +84,10 @@ export const getEnvVar = (varName: string, defaultValue?: string): string => {
|
|
|
84
84
|
return value;
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
// Commands expect to run from the repository root (config file and Actor folders are relative to it).
|
|
88
|
+
// That is the current directory by default, --workspace points elsewhere, e.g. for local development.
|
|
87
89
|
export const setCwd = ({ workspace }: { workspace: string | undefined }) => {
|
|
88
90
|
if (workspace) {
|
|
89
91
|
process.chdir(workspace);
|
|
90
|
-
return;
|
|
91
92
|
}
|
|
92
|
-
const ghWorkspace = getEnvVar('GITHUB_WORKSPACE', process.cwd());
|
|
93
|
-
process.chdir(ghWorkspace);
|
|
94
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-from-local.js","sourceRoot":"","sources":["../../bin/build-from-local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,MAAM,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,e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2B;YAC1C,UAAU,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC;YACtF,UAAU,EAAE,eAAe,CAAC,OAAO;SACtC,CAAC;QACF,OAAO,OAAO,CAAC,qBAAqB,CAAC,2BAA2B,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;IAC3F,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
package/dist/bin/build.d.ts
CHANGED
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type * as ApifyClientTypes from 'apify-client';
|
|
2
2
|
import type { ActorConfig, BuildData } from './types.js';
|
|
3
3
|
export declare const LOCAL_SOURCE_VERSION_NUMBER = "0.98";
|
|
4
|
+
/**
|
|
5
|
+
* Finds the Actor's default version: the one whose build the default build tag points to.
|
|
6
|
+
* Usually tagged 'latest' but not necessarily (can be e.g. 'version-0').
|
|
7
|
+
*/
|
|
8
|
+
export declare const resolveDefaultVersion: (actorFullName: string, actorInfo: ApifyClientTypes.Actor) => {
|
|
9
|
+
defaultBuildNumber: string;
|
|
10
|
+
defaultVersionNumber: string;
|
|
11
|
+
defaultBuildTag: string;
|
|
12
|
+
defaultVersion: ApifyClientTypes.ActorVersion | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Guards against building an Actor from a different repository than it is published from, e.g. when the
|
|
16
|
+
* local `origin` remote is a fork or a mirror. Every build overwrites the version's Git URL, so building
|
|
17
|
+
* from the wrong remote would silently repoint the Actor. The default version is the source of truth
|
|
18
|
+
* since it is what users run. Skipped when the repo URL is passed explicitly, which is how you move an
|
|
19
|
+
* Actor to a new repository on purpose.
|
|
20
|
+
*/
|
|
21
|
+
export declare const assertRepoUrlMatchesDefaultVersion: (actorFullName: string, defaultVersion: ApifyClientTypes.ActorVersion | undefined, repoUrl: string) => void;
|
|
4
22
|
export declare class ApifyBuilder {
|
|
5
23
|
private readonly apifyClient;
|
|
6
24
|
private readonly actorFullName;
|
|
7
25
|
private constructor();
|
|
26
|
+
getActorInfo: () => Promise<ApifyClientTypes.Actor>;
|
|
8
27
|
getDefaultVersionAndTag: () => Promise<{
|
|
9
28
|
defaultBuildNumber: string;
|
|
10
29
|
defaultVersionNumber: string;
|
|
11
30
|
defaultBuildTag: string;
|
|
31
|
+
defaultVersion: ApifyClientTypes.ActorVersion | undefined;
|
|
12
32
|
}>;
|
|
13
33
|
uploadSourceZip: (versionNumber: string, zip: Buffer) => Promise<string>;
|
|
14
|
-
createVersionAndBuild: (versionNumber: string, actorVersion: ActorVersion, useCache: boolean) => Promise<BuildData>;
|
|
15
|
-
waitForBuildToFinish: (buildId: string) => Promise<Build>;
|
|
34
|
+
createVersionAndBuild: (versionNumber: string, actorVersion: ApifyClientTypes.ActorVersion, useCache: boolean, actorInfo?: ApifyClientTypes.Actor) => Promise<BuildData>;
|
|
35
|
+
waitForBuildToFinish: (buildId: string) => Promise<ApifyClientTypes.Build>;
|
|
16
36
|
static fromActorConfig: (actorConfig: ActorConfig) => ApifyBuilder;
|
|
17
37
|
/**
|
|
18
38
|
* Deletes build of all versions. Apify API doesn't allow to delete default build and we explicitly skip it
|
|
@@ -27,11 +47,12 @@ type RunBuildsOptions = {
|
|
|
27
47
|
actorConfigs: ActorConfig[];
|
|
28
48
|
isLatest?: boolean;
|
|
29
49
|
repoUrl: string;
|
|
50
|
+
shouldVerifyRepoUrl: boolean;
|
|
30
51
|
branch: string;
|
|
31
52
|
dryRun: boolean;
|
|
32
53
|
useDockerCache: boolean;
|
|
33
54
|
};
|
|
34
|
-
export declare const runBuilds: ({ repoUrl, branch, actorConfigs, isLatest, dryRun, useDockerCache, }: RunBuildsOptions) => Promise<BuildData[]>;
|
|
55
|
+
export declare const runBuilds: ({ repoUrl, shouldVerifyRepoUrl, branch, actorConfigs, isLatest, dryRun, useDockerCache, }: RunBuildsOptions) => Promise<BuildData[]>;
|
|
35
56
|
export declare const deleteOldBuilds: (actorConfigs: ActorConfig[]) => Promise<void>;
|
|
36
57
|
export {};
|
|
37
58
|
//# sourceMappingURL=build.d.ts.map
|
package/dist/bin/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../bin/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../bin/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,gBAAgB,MAAM,cAAc,CAAC;AAItD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAYzD,eAAO,MAAM,2BAA2B,SAAS,CAAC;AAQlD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,eAAe,MAAM,EAAE,WAAW,gBAAgB,CAAC,KAAK;;;;;CAsB7F,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC,GAC3C,eAAe,MAAM,EACrB,gBAAgB,gBAAgB,CAAC,YAAY,GAAG,SAAS,EACzD,SAAS,MAAM,SAoBlB,CAAC;AAEF,qBAAa,YAAY;IAEjB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAFlC,OAAO;IAKP,YAAY,QAAa,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAQtD;IAEF,uBAAuB;;;;;OAAoF;IAI3G,eAAe,GAAU,eAAe,MAAM,EAAE,KAAK,MAAM,KAAG,OAAO,CAAC,MAAM,CAAC,CAY3E;IAGF,qBAAqB,GACjB,eAAe,MAAM,EACrB,cAAc,gBAAgB,CAAC,YAAY,EAC3C,UAAU,OAAO,EACjB,YAAY,gBAAgB,CAAC,KAAK,KACnC,OAAO,CAAC,SAAS,CAAC,CAmBnB;IAEF,oBAAoB,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAmB7E;IAEF,MAAM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