@simplysf/simply-cicd 0.10.4 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +136 -32
- package/lib/commands/simply/cicd/build/publish-utam-page-objects.d.ts +27 -0
- package/lib/commands/simply/cicd/build/publish-utam-page-objects.js +104 -0
- package/lib/commands/simply/cicd/build/publish-utam-page-objects.js.map +1 -0
- package/lib/common/build/createPackageVersion.d.ts +15 -0
- package/lib/common/build/createPackageVersion.js +15 -2
- package/lib/common/build/createPackageVersion.js.map +1 -1
- package/lib/common/build/publishUtamPageObjects.d.ts +51 -0
- package/lib/common/build/publishUtamPageObjects.js +281 -0
- package/lib/common/build/publishUtamPageObjects.js.map +1 -0
- package/lib/common/build/skipGuard.js +1 -0
- package/lib/common/build/skipGuard.js.map +1 -1
- package/lib/common/build/utamPageObjects.d.ts +159 -0
- package/lib/common/build/utamPageObjects.js +277 -0
- package/lib/common/build/utamPageObjects.js.map +1 -0
- package/messages/simply.cicd.build.publish-utam-page-objects.md +85 -0
- package/package.json +3 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type NpmAccess = 'public' | 'restricted';
|
|
2
|
+
export type PublishUtamPageObjectsOptions = {
|
|
3
|
+
/** The packaging Dev Hub's alias. Must already be authenticated. */
|
|
4
|
+
packagingDevhub: string;
|
|
5
|
+
subscriberPackageVersionId?: string;
|
|
6
|
+
/** Overrides `plugins.simply.utam.packageName`. */
|
|
7
|
+
npmPackageName?: string;
|
|
8
|
+
npmRegistry?: string;
|
|
9
|
+
npmToken?: string;
|
|
10
|
+
npmAccess?: NpmAccess;
|
|
11
|
+
/** Overrides the dist-tag derived from the git tag's suffix. */
|
|
12
|
+
npmDistTag?: string;
|
|
13
|
+
ciCommitRefName?: string;
|
|
14
|
+
packageReleaseBranchPrefix?: string;
|
|
15
|
+
/** npm spec of the UTAM compiler to install into the staging directory. */
|
|
16
|
+
utamVersion?: string;
|
|
17
|
+
/** Compile and `npm pack`, but don't publish. */
|
|
18
|
+
dryRun?: boolean;
|
|
19
|
+
/** Dotenv file to append the published name and version to. */
|
|
20
|
+
out?: string;
|
|
21
|
+
/** Dotenv file to read `SUBSCRIBER_PACKAGE_VERSION_ID` from. */
|
|
22
|
+
envFile?: string;
|
|
23
|
+
debug?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type PublishUtamPageObjectsResult = {
|
|
27
|
+
skipped: boolean;
|
|
28
|
+
published: boolean;
|
|
29
|
+
/** True when this exact version was already on the registry, so nothing needed publishing. */
|
|
30
|
+
alreadyPublished?: boolean;
|
|
31
|
+
packageName?: string;
|
|
32
|
+
version?: string;
|
|
33
|
+
distTag?: string;
|
|
34
|
+
/** Path to the packed tarball, on `--dry-run` only. */
|
|
35
|
+
tarball?: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Compile the project's UTAM page objects for one package version and publish them as an npm
|
|
39
|
+
* package whose version is derived from the Salesforce version number.
|
|
40
|
+
*
|
|
41
|
+
* Runs after `create-package-version`, whose `04t` it takes as input, so that every Unlocked
|
|
42
|
+
* Package version has a corresponding page-object package a UI-test suite can pin to. See
|
|
43
|
+
* `docs/design/0037-utam-page-objects-publish.md` for the reasoning, particularly the version
|
|
44
|
+
* mapping and why the compiler config is generated per build rather than read from the repo.
|
|
45
|
+
*
|
|
46
|
+
* Skips (without failing) when the package didn't change, when the job is disabled, when no `04t`
|
|
47
|
+
* can be found, when the project authors no page objects, or when this exact version is already on
|
|
48
|
+
* the registry. Everything past those guards throws on failure: a missing page-object package would
|
|
49
|
+
* silently break every UI test pinned to that version.
|
|
50
|
+
*/
|
|
51
|
+
export declare function publishUtamPageObjects(options: PublishUtamPageObjectsOptions): Promise<PublishUtamPageObjectsResult>;
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, SimplySF.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { promises as fs } from 'node:fs';
|
|
17
|
+
import os from 'node:os';
|
|
18
|
+
import path from 'node:path';
|
|
19
|
+
import { execa } from 'execa';
|
|
20
|
+
import { getDefaultPackageDirectory, readSfdxProject } from '@simplysf/simply-core';
|
|
21
|
+
import { runSfJson } from '../exec/sfCli.js';
|
|
22
|
+
import { appendToEnvFile } from '../env.js';
|
|
23
|
+
import { logger } from '../logger.js';
|
|
24
|
+
import { getSkipReason } from './skipGuard.js';
|
|
25
|
+
import { buildCompilerConfig, buildNpmrc, buildPackageManifest, buildProvenanceLine, determineTagSuffix, findPageObjectSources, readUtamPluginConfig, resolveSubscriberPackageVersionId, toDistTag, toNpmVersion, toUtamCoreRange, toVersionTag, UTAM_PACKAGE_KEY, UTAM_VERSION_KEY, } from './utamPageObjects.js';
|
|
26
|
+
/** The default dotenv file, matching what `create-package-version`/`create-fallback-tag` write. */
|
|
27
|
+
const DEFAULT_ENV_FILE = 'subscriberPackageVersionId.env';
|
|
28
|
+
/** A run that did nothing, in the shape every guard returns. */
|
|
29
|
+
function skip() {
|
|
30
|
+
return { skipped: true, published: false };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Whether `spec` already resolves on the target registry.
|
|
34
|
+
*
|
|
35
|
+
* A failure is read as "not published" rather than propagated: the overwhelmingly common cause is
|
|
36
|
+
* the 404 for a version that doesn't exist yet, and any other cause (auth, network) will fail the
|
|
37
|
+
* publish immediately afterwards with a better message than this check could give.
|
|
38
|
+
*/
|
|
39
|
+
async function isAlreadyPublished(spec, cwd, registry) {
|
|
40
|
+
const args = ['view', spec, 'version'];
|
|
41
|
+
if (registry) {
|
|
42
|
+
args.push('--registry', registry);
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const { stdout } = await execa('npm', args, { cwd });
|
|
46
|
+
return stdout.trim().length > 0;
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Install the UTAM compiler into the staging directory and return the version installed alongside
|
|
54
|
+
* the entry point to run it with.
|
|
55
|
+
*
|
|
56
|
+
* Installed at run time rather than declared as a dependency of this plugin: the compiler pulls in
|
|
57
|
+
* rollup and the whole `@utam/*` family, which every `simply-cicd` user would otherwise carry for a
|
|
58
|
+
* feature most of them never enable. `lwc-jest` sets the same precedent.
|
|
59
|
+
*/
|
|
60
|
+
async function installCompiler(stagingDir, utamVersion, debug) {
|
|
61
|
+
logger.info(`Installing the UTAM compiler (utam@${utamVersion})...`);
|
|
62
|
+
await execa('npm', ['install', '--no-save', '--no-audit', '--no-fund', `utam@${utamVersion}`], {
|
|
63
|
+
cwd: stagingDir,
|
|
64
|
+
stdio: debug ? 'inherit' : 'pipe',
|
|
65
|
+
});
|
|
66
|
+
const moduleDir = path.join(stagingDir, 'node_modules', 'utam');
|
|
67
|
+
const manifest = JSON.parse(await fs.readFile(path.join(moduleDir, 'package.json'), 'utf8'));
|
|
68
|
+
const binRelative = typeof manifest.bin === 'string' ? manifest.bin : manifest.bin?.utam;
|
|
69
|
+
if (!manifest.version || !binRelative) {
|
|
70
|
+
throw new Error(`The installed utam@${utamVersion} declares no version or no "utam" bin entry.`);
|
|
71
|
+
}
|
|
72
|
+
logger.info(`Installed utam@${manifest.version}.`);
|
|
73
|
+
return { version: manifest.version, entry: path.join(moduleDir, binRelative) };
|
|
74
|
+
}
|
|
75
|
+
/** Copy each `.utam.json` into the staged package, preserving its path under the package directory. */
|
|
76
|
+
async function stageSources(sources, pageObjectsRootDir, stagingDir) {
|
|
77
|
+
for (const source of sources) {
|
|
78
|
+
const destination = path.join(stagingDir, 'source', path.relative(pageObjectsRootDir, source));
|
|
79
|
+
// eslint-disable-next-line no-await-in-loop -- a handful of small files; ordering keeps the log readable
|
|
80
|
+
await fs.mkdir(path.dirname(destination), { recursive: true });
|
|
81
|
+
// eslint-disable-next-line no-await-in-loop -- as above
|
|
82
|
+
await fs.copyFile(source, destination);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Resolve every input the publish needs, or decide there is nothing to publish.
|
|
87
|
+
*
|
|
88
|
+
* Holds the four guards that depend on reading something — the package version ID, the project,
|
|
89
|
+
* its page objects — so that the caller is left with the flow rather than the lookups.
|
|
90
|
+
*
|
|
91
|
+
* @returns `undefined` when a guard says to skip, having already logged why.
|
|
92
|
+
*/
|
|
93
|
+
async function resolveTarget(options) {
|
|
94
|
+
const envFile = options.envFile ?? DEFAULT_ENV_FILE;
|
|
95
|
+
const subscriberPackageVersionId = await resolveSubscriberPackageVersionId({
|
|
96
|
+
flagValue: options.subscriberPackageVersionId,
|
|
97
|
+
envFile,
|
|
98
|
+
});
|
|
99
|
+
if (!subscriberPackageVersionId) {
|
|
100
|
+
logger.warn(`No package version ID given, in the environment, or in ${envFile}. ` +
|
|
101
|
+
'This build created no package version, so there are no page objects to publish. Skipping.');
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
const sfdxProjectJson = await readSfdxProject();
|
|
105
|
+
const defaultPackageDir = getDefaultPackageDirectory(sfdxProjectJson);
|
|
106
|
+
if (!defaultPackageDir?.path) {
|
|
107
|
+
throw new Error('A default package directory with a `path` must be specified in sfdx-project.json.');
|
|
108
|
+
}
|
|
109
|
+
const pageObjectsRootDir = path.resolve(defaultPackageDir.path);
|
|
110
|
+
const sources = await findPageObjectSources(pageObjectsRootDir);
|
|
111
|
+
if (sources.length === 0) {
|
|
112
|
+
logger.info(`No UTAM page objects found under ${defaultPackageDir.path}. Skipping.`);
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
logger.info(`Found ${sources.length} UTAM page object(s) under ${defaultPackageDir.path}.`);
|
|
116
|
+
const utamPluginConfig = readUtamPluginConfig(sfdxProjectJson);
|
|
117
|
+
const npmPackageName = options.npmPackageName ?? utamPluginConfig.packageName;
|
|
118
|
+
if (!npmPackageName) {
|
|
119
|
+
throw new Error('No npm package name to publish under. Pass --npm-package-name, or set `plugins.simply.utam.packageName` in sfdx-project.json.');
|
|
120
|
+
}
|
|
121
|
+
const { result: report } = await runSfJson([
|
|
122
|
+
'package',
|
|
123
|
+
'version',
|
|
124
|
+
'report',
|
|
125
|
+
'--package',
|
|
126
|
+
subscriberPackageVersionId,
|
|
127
|
+
'--target-dev-hub',
|
|
128
|
+
options.packagingDevhub,
|
|
129
|
+
'--json',
|
|
130
|
+
]);
|
|
131
|
+
if (!report.Version) {
|
|
132
|
+
throw new Error(`Could not read a version number for ${subscriberPackageVersionId} from its package version report.`);
|
|
133
|
+
}
|
|
134
|
+
const tagSuffix = determineTagSuffix(report.Version, defaultPackageDir.branch, options.ciCommitRefName, options.packageReleaseBranchPrefix);
|
|
135
|
+
return {
|
|
136
|
+
subscriberPackageVersionId,
|
|
137
|
+
pageObjectsRootDir,
|
|
138
|
+
sources,
|
|
139
|
+
utamPluginConfig,
|
|
140
|
+
npmPackageName,
|
|
141
|
+
salesforcePackageName: report.Package2Name ?? defaultPackageDir.package ?? 'package',
|
|
142
|
+
salesforceVersion: report.Version,
|
|
143
|
+
version: toNpmVersion(report.Version, tagSuffix),
|
|
144
|
+
distTag: options.npmDistTag ?? toDistTag(tagSuffix),
|
|
145
|
+
versionTag: toVersionTag(report.Version, tagSuffix),
|
|
146
|
+
commitSha: report.Tag,
|
|
147
|
+
pipelineUrl: report.Description,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Fill the staging directory with a publishable package: the compiler, its generated config, the
|
|
152
|
+
* compiled output, the source JSON, and the manifest describing all of it.
|
|
153
|
+
*/
|
|
154
|
+
async function buildStagedPackage(stagingDir, target, options) {
|
|
155
|
+
const compiler = await installCompiler(stagingDir, options.utamVersion ?? '^3', options.debug ?? false);
|
|
156
|
+
const baseConfig = target.utamPluginConfig.compilerConfig
|
|
157
|
+
? JSON.parse(await fs.readFile(target.utamPluginConfig.compilerConfig, 'utf8'))
|
|
158
|
+
: undefined;
|
|
159
|
+
const compilerConfigPath = path.join(stagingDir, 'utam.config.json');
|
|
160
|
+
await fs.writeFile(compilerConfigPath, JSON.stringify(buildCompilerConfig({
|
|
161
|
+
pageObjectsRootDir: target.pageObjectsRootDir,
|
|
162
|
+
stagingDir,
|
|
163
|
+
npmPackageName: target.npmPackageName,
|
|
164
|
+
version: target.version,
|
|
165
|
+
copyright: buildProvenanceLine(target.salesforcePackageName, target.salesforceVersion, target.subscriberPackageVersionId),
|
|
166
|
+
alias: target.utamPluginConfig.alias,
|
|
167
|
+
baseConfig,
|
|
168
|
+
}), null, 2));
|
|
169
|
+
logger.info('Compiling page objects...');
|
|
170
|
+
// Run the installed compiler's entry point with this same Node rather than going through npx,
|
|
171
|
+
// which would be free to reach the network for a package that is already sitting right here.
|
|
172
|
+
await execa(process.execPath, [compiler.entry, '-c', compilerConfigPath], {
|
|
173
|
+
cwd: stagingDir,
|
|
174
|
+
stdio: options.debug ? 'inherit' : 'pipe',
|
|
175
|
+
});
|
|
176
|
+
await stageSources(target.sources, target.pageObjectsRootDir, stagingDir);
|
|
177
|
+
await fs.writeFile(path.join(stagingDir, 'package.json'), `${JSON.stringify(buildPackageManifest({
|
|
178
|
+
npmPackageName: target.npmPackageName,
|
|
179
|
+
version: target.version,
|
|
180
|
+
salesforcePackageName: target.salesforcePackageName,
|
|
181
|
+
salesforceVersion: target.salesforceVersion,
|
|
182
|
+
subscriberPackageVersionId: target.subscriberPackageVersionId,
|
|
183
|
+
versionTag: target.versionTag,
|
|
184
|
+
commitSha: target.commitSha,
|
|
185
|
+
pipelineUrl: target.pipelineUrl,
|
|
186
|
+
utamCoreRange: toUtamCoreRange(compiler.version),
|
|
187
|
+
projectPeerDependencies: target.utamPluginConfig.peerDependencies,
|
|
188
|
+
}), null, 2)}\n`);
|
|
189
|
+
}
|
|
190
|
+
/** `npm publish` the staged package, targeting the registry and access level the pipeline asked for. */
|
|
191
|
+
async function publishStaged(stagingDir, distTag, options) {
|
|
192
|
+
const args = ['publish', '--tag', distTag];
|
|
193
|
+
if (options.npmRegistry) {
|
|
194
|
+
args.push('--registry', options.npmRegistry);
|
|
195
|
+
}
|
|
196
|
+
if (options.npmAccess) {
|
|
197
|
+
args.push('--access', options.npmAccess);
|
|
198
|
+
}
|
|
199
|
+
await execa('npm', args, { cwd: stagingDir, stdio: options.debug ? 'inherit' : 'pipe' });
|
|
200
|
+
}
|
|
201
|
+
/** `npm pack` the staged package and copy the tarball where a CI job can collect it as an artifact. */
|
|
202
|
+
async function packTarball(stagingDir) {
|
|
203
|
+
const { stdout } = await execa('npm', ['pack', '--json'], { cwd: stagingDir });
|
|
204
|
+
const packed = JSON.parse(stdout);
|
|
205
|
+
const filename = packed[0]?.filename;
|
|
206
|
+
if (!filename) {
|
|
207
|
+
throw new Error('npm pack did not report a tarball filename.');
|
|
208
|
+
}
|
|
209
|
+
const destination = path.join(process.cwd(), filename);
|
|
210
|
+
await fs.copyFile(path.join(stagingDir, filename), destination);
|
|
211
|
+
return destination;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Compile the project's UTAM page objects for one package version and publish them as an npm
|
|
215
|
+
* package whose version is derived from the Salesforce version number.
|
|
216
|
+
*
|
|
217
|
+
* Runs after `create-package-version`, whose `04t` it takes as input, so that every Unlocked
|
|
218
|
+
* Package version has a corresponding page-object package a UI-test suite can pin to. See
|
|
219
|
+
* `docs/design/0037-utam-page-objects-publish.md` for the reasoning, particularly the version
|
|
220
|
+
* mapping and why the compiler config is generated per build rather than read from the repo.
|
|
221
|
+
*
|
|
222
|
+
* Skips (without failing) when the package didn't change, when the job is disabled, when no `04t`
|
|
223
|
+
* can be found, when the project authors no page objects, or when this exact version is already on
|
|
224
|
+
* the registry. Everything past those guards throws on failure: a missing page-object package would
|
|
225
|
+
* silently break every UI test pinned to that version.
|
|
226
|
+
*/
|
|
227
|
+
export async function publishUtamPageObjects(options) {
|
|
228
|
+
const skipReason = getSkipReason('publish-utam-page-objects');
|
|
229
|
+
if (skipReason) {
|
|
230
|
+
logger.warn(skipReason);
|
|
231
|
+
return skip();
|
|
232
|
+
}
|
|
233
|
+
if (options.disabled) {
|
|
234
|
+
logger.warn('publish-utam-page-objects is disabled. Skipping.');
|
|
235
|
+
return skip();
|
|
236
|
+
}
|
|
237
|
+
const target = await resolveTarget(options);
|
|
238
|
+
if (!target) {
|
|
239
|
+
return skip();
|
|
240
|
+
}
|
|
241
|
+
const { npmPackageName, version, distTag } = target;
|
|
242
|
+
const outFile = options.out ?? DEFAULT_ENV_FILE;
|
|
243
|
+
const publishedKeys = { [UTAM_PACKAGE_KEY]: npmPackageName, [UTAM_VERSION_KEY]: version };
|
|
244
|
+
logger.info(`Publishing ${npmPackageName}@${version} (dist-tag ${distTag}) for ${target.salesforceVersion}.`);
|
|
245
|
+
// Never inside the repo: the checkout is what gets compiled, and a generated package.json next to
|
|
246
|
+
// sfdx-project.json would be picked up by anything else the job runs.
|
|
247
|
+
const stagingDir = await fs.mkdtemp(path.join(os.tmpdir(), 'simply-cicd-utam-'));
|
|
248
|
+
if (options.debug) {
|
|
249
|
+
logger.debug(`Staging directory: ${stagingDir}`);
|
|
250
|
+
}
|
|
251
|
+
try {
|
|
252
|
+
if (options.npmToken) {
|
|
253
|
+
await fs.writeFile(path.join(stagingDir, '.npmrc'), buildNpmrc(options.npmToken, options.npmRegistry));
|
|
254
|
+
}
|
|
255
|
+
if (!options.dryRun &&
|
|
256
|
+
(await isAlreadyPublished(`${npmPackageName}@${version}`, stagingDir, options.npmRegistry))) {
|
|
257
|
+
logger.info(`${npmPackageName}@${version} is already published. Skipping.`);
|
|
258
|
+
appendToEnvFile(outFile, publishedKeys);
|
|
259
|
+
return { skipped: true, published: false, alreadyPublished: true, packageName: npmPackageName, version, distTag };
|
|
260
|
+
}
|
|
261
|
+
await buildStagedPackage(stagingDir, target, options);
|
|
262
|
+
if (options.dryRun) {
|
|
263
|
+
const tarball = await packTarball(stagingDir);
|
|
264
|
+
logger.success(`Dry run: packed ${npmPackageName}@${version} to ${tarball}. Nothing was published.`);
|
|
265
|
+
return { skipped: false, published: false, packageName: npmPackageName, version, distTag, tarball };
|
|
266
|
+
}
|
|
267
|
+
await publishStaged(stagingDir, distTag, options);
|
|
268
|
+
logger.success(`Published ${npmPackageName}@${version} (dist-tag ${distTag}).`);
|
|
269
|
+
appendToEnvFile(outFile, publishedKeys);
|
|
270
|
+
return { skipped: false, published: true, packageName: npmPackageName, version, distTag };
|
|
271
|
+
}
|
|
272
|
+
finally {
|
|
273
|
+
if (options.debug) {
|
|
274
|
+
logger.debug(`Leaving the staging directory in place for inspection: ${stagingDir}`);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
await fs.rm(stagingDir, { recursive: true, force: true });
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=publishUtamPageObjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishUtamPageObjects.js","sourceRoot":"","sources":["../../../src/common/build/publishUtamPageObjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC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I,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skipGuard.js","sourceRoot":"","sources":["../../../src/common/build/skipGuard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,0EAA0E;AAC1E,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,wBAAwB;
|
|
1
|
+
{"version":3,"file":"skipGuard.js","sourceRoot":"","sources":["../../../src/common/build/skipGuard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,0EAA0E;AAC1E,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,wBAAwB;IACxB,2BAA2B;CAC5B,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAI,0BAA0B,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,OAAO,EAAE,CAAC;QACnF,OAAO,sEAAsE,GAAG,EAAE,CAAC;IACrF,CAAC;IAED,IAAI,GAAG,KAAK,qBAAqB,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM,EAAE,CAAC;QAC5E,OAAO,kFAAkF,CAAC;IAC5F,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { type SfdxProject } from '@simplysf/simply-core';
|
|
2
|
+
/** The dotenv key `create-package-version` and `create-fallback-tag` both write their `04t` under. */
|
|
3
|
+
export declare const SUBSCRIBER_PACKAGE_VERSION_ID_KEY = "SUBSCRIBER_PACKAGE_VERSION_ID";
|
|
4
|
+
/** The dotenv keys this feature writes, for a downstream UI-test job to install by. */
|
|
5
|
+
export declare const UTAM_PACKAGE_KEY = "UTAM_PAGE_OBJECTS_PACKAGE";
|
|
6
|
+
export declare const UTAM_VERSION_KEY = "UTAM_PAGE_OBJECTS_VERSION";
|
|
7
|
+
/** The compiler's own default mask, restated so the generated config never depends on it drifting. */
|
|
8
|
+
export declare const PAGE_OBJECTS_FILE_MASK: string[];
|
|
9
|
+
/** `plugins.simply.utam` in `sfdx-project.json`. Every field is optional. */
|
|
10
|
+
export type UtamPluginConfig = {
|
|
11
|
+
/** npm package name to publish under. Required unless `--npm-package-name` is passed. */
|
|
12
|
+
packageName?: string;
|
|
13
|
+
/** UTAM compiler type-alias map, passed through to the generated compiler config. */
|
|
14
|
+
alias?: Record<string, string>;
|
|
15
|
+
/** Peer dependencies to merge into the generated package, e.g. `salesforce-pageobjects`. */
|
|
16
|
+
peerDependencies?: Record<string, string>;
|
|
17
|
+
/** Path to a compiler config whose keys the command doesn't own (`profiles`, `lint`, …). */
|
|
18
|
+
compilerConfig?: string;
|
|
19
|
+
};
|
|
20
|
+
/** @returns `plugins.simply.utam`, or an empty object when the project declares none. */
|
|
21
|
+
export declare function readUtamPluginConfig(project: SfdxProject): UtamPluginConfig;
|
|
22
|
+
/**
|
|
23
|
+
* Reduce a git tag suffix to something semver accepts as a prerelease identifier.
|
|
24
|
+
*
|
|
25
|
+
* Semver's prerelease alphabet is `[0-9A-Za-z-]`; a branch name's `/` and `.` are the common
|
|
26
|
+
* offenders, so each run of anything else collapses to a single hyphen.
|
|
27
|
+
*/
|
|
28
|
+
export declare function sanitizePrereleaseId(raw: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* The suffix `create-package-version` would append to this build's git tag, or `undefined` for a
|
|
31
|
+
* release-branch build that gets a bare `v<version>`.
|
|
32
|
+
*
|
|
33
|
+
* Derived by asking {@link determineVersionTag} for the tag and taking what it added, rather than
|
|
34
|
+
* re-deciding: the whole point of the mapping is that the npm version reads like the git tag, and
|
|
35
|
+
* two copies of the rule would eventually disagree.
|
|
36
|
+
*/
|
|
37
|
+
export declare function determineTagSuffix(salesforceVersion: string, branchAttribute: string | undefined, ciCommitRefName: string | undefined, packageReleaseBranchPrefix: string | undefined): string | undefined;
|
|
38
|
+
/** @returns The git tag `create-package-version` recorded this package version under. */
|
|
39
|
+
export declare function toVersionTag(salesforceVersion: string, tagSuffix?: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Map a Salesforce package version onto a semver version.
|
|
42
|
+
*
|
|
43
|
+
* The build number becomes the first prerelease identifier and the git tag's suffix, if any, the
|
|
44
|
+
* second — so `1.2.3.4` on a release branch is `1.2.3-4`, and the same version built from `beta`
|
|
45
|
+
* is `1.2.3-4.beta`. This is the transformation `sfdx-project.json` already uses for a dependency
|
|
46
|
+
* pin (`"package": "MyPackage@1.2.3-4"`), not a new convention.
|
|
47
|
+
*
|
|
48
|
+
* @throws {Error} If the version isn't `major.minor.patch.build`. Publishing a version derived
|
|
49
|
+
* from something unrecognised is worse than failing the job.
|
|
50
|
+
*/
|
|
51
|
+
export declare function toNpmVersion(salesforceVersion: string, tagSuffix?: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* The npm dist-tag for a build: `latest` for a release-branch build, else the sanitized tag suffix,
|
|
54
|
+
* so `npm install <pkg>@beta` reaches the newest build off the `beta` package branch.
|
|
55
|
+
*/
|
|
56
|
+
export declare function toDistTag(tagSuffix?: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* The `@utam/core` range the generated package declares as a peer, derived from the compiler that
|
|
59
|
+
* actually produced the output rather than hardcoded — generated page objects import `@utam/core`
|
|
60
|
+
* directly, and a consumer must resolve one copy of it across everything they load.
|
|
61
|
+
*/
|
|
62
|
+
export declare function toUtamCoreRange(utamVersion: string): string;
|
|
63
|
+
/** The one line identifying which package version produced this output, used as both description and file header. */
|
|
64
|
+
export declare function buildProvenanceLine(packageName: string, salesforceVersion: string, subscriberPackageVersionId: string): string;
|
|
65
|
+
export type PackageManifestOptions = {
|
|
66
|
+
/** npm package name to publish under. */
|
|
67
|
+
npmPackageName: string;
|
|
68
|
+
/** The derived semver version. */
|
|
69
|
+
version: string;
|
|
70
|
+
/** The Salesforce package's name, for the provenance block. */
|
|
71
|
+
salesforcePackageName: string;
|
|
72
|
+
/** The Salesforce version, as `major.minor.patch.build`. */
|
|
73
|
+
salesforceVersion: string;
|
|
74
|
+
subscriberPackageVersionId: string;
|
|
75
|
+
/** The git tag `create-package-version` recorded this version under. */
|
|
76
|
+
versionTag: string;
|
|
77
|
+
/** The commit this package version was built from — the package version's `Tag` field. */
|
|
78
|
+
commitSha?: string;
|
|
79
|
+
/** The pipeline that built it — the package version's `Description` field. */
|
|
80
|
+
pipelineUrl?: string;
|
|
81
|
+
/** The `@utam/core` peer range, from {@link toUtamCoreRange}. */
|
|
82
|
+
utamCoreRange: string;
|
|
83
|
+
/** Extra peers from `plugins.simply.utam.peerDependencies`. */
|
|
84
|
+
projectPeerDependencies?: Record<string, string>;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* The `package.json` for the published page-object package.
|
|
88
|
+
*
|
|
89
|
+
* Shaped after `salesforce-pageobjects`, which is what every UTAM consumer already imports from:
|
|
90
|
+
* ESM with a CJS fallback, page objects addressed by path (`<pkg>/pageObjects/<name>`), and the
|
|
91
|
+
* source JSON shipped alongside. The one deliberate difference is that `@utam/core` is declared as
|
|
92
|
+
* a peer here instead of being left to whatever the test's adapter drags in.
|
|
93
|
+
*/
|
|
94
|
+
export declare function buildPackageManifest(options: PackageManifestOptions): Record<string, unknown>;
|
|
95
|
+
export type CompilerConfigOptions = {
|
|
96
|
+
/** Absolute path to the default package directory the page objects are authored under. */
|
|
97
|
+
pageObjectsRootDir: string;
|
|
98
|
+
/** Absolute path to the staging directory the compiler writes into. */
|
|
99
|
+
stagingDir: string;
|
|
100
|
+
npmPackageName: string;
|
|
101
|
+
version: string;
|
|
102
|
+
/** The provenance line, stamped as each generated file's header comment. */
|
|
103
|
+
copyright: string;
|
|
104
|
+
alias?: Record<string, string>;
|
|
105
|
+
/** Parsed `plugins.simply.utam.compilerConfig`, whose keys this command doesn't own. */
|
|
106
|
+
baseConfig?: Record<string, unknown>;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* The `utam.config.json` the compiler is invoked with.
|
|
110
|
+
*
|
|
111
|
+
* Generated per build rather than read from the repo because the compiler has no flag for
|
|
112
|
+
* `version` — the only way to stamp the Salesforce version into the output is through the config
|
|
113
|
+
* file, so it cannot be a static artifact. A project's own config is merged underneath: the command
|
|
114
|
+
* owns the root, the masks, the output directories, `module`, `version`, and `copyright`; the
|
|
115
|
+
* project keeps everything else (`profiles`, `lint`, `interruptCompilerOnError`, …).
|
|
116
|
+
*/
|
|
117
|
+
export declare function buildCompilerConfig(options: CompilerConfigOptions): Record<string, unknown>;
|
|
118
|
+
/**
|
|
119
|
+
* Every `.utam.json` authored under `rootDir`, matching the compiler's own `__utam__` convention.
|
|
120
|
+
*
|
|
121
|
+
* Walks the tree rather than globbing so this package takes on no glob dependency for one lookup.
|
|
122
|
+
*
|
|
123
|
+
* @returns Absolute paths, sorted. Empty when `rootDir` doesn't exist — a project that hasn't
|
|
124
|
+
* adopted UTAM is a skip, not an error.
|
|
125
|
+
*/
|
|
126
|
+
export declare function findPageObjectSources(rootDir: string): Promise<string[]>;
|
|
127
|
+
/** @returns The last value assigned to `key` in dotenv-shaped `content`, or `undefined`. */
|
|
128
|
+
export declare function readEnvFileValue(content: string, key: string): string | undefined;
|
|
129
|
+
export type ResolveSubscriberPackageVersionIdOptions = {
|
|
130
|
+
/** `--subscriber-package-version-id`, if passed. */
|
|
131
|
+
flagValue?: string;
|
|
132
|
+
/** The environment to read `SUBSCRIBER_PACKAGE_VERSION_ID` from. Defaults to `process.env`. */
|
|
133
|
+
env?: NodeJS.ProcessEnv;
|
|
134
|
+
/** Dotenv file to fall back to — the one `create-package-version` wrote earlier in this job. */
|
|
135
|
+
envFile: string;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Find the `04t` this run should publish page objects for.
|
|
139
|
+
*
|
|
140
|
+
* Three sources, because the command is useful from two pipeline shapes and they surface the value
|
|
141
|
+
* differently: an explicit flag; `SUBSCRIBER_PACKAGE_VERSION_ID` in the environment, which is how a
|
|
142
|
+
* *separate* job receives `create-package-version`'s dotenv report artifact; and the dotenv file
|
|
143
|
+
* itself, which is how the *same* job sees it, since a dotenv report only ever reaches other jobs.
|
|
144
|
+
*
|
|
145
|
+
* An explicit flag that isn't a `04t` throws — the caller asked for something specific and got it
|
|
146
|
+
* wrong. A malformed value discovered rather than passed only warns, and the search continues.
|
|
147
|
+
*
|
|
148
|
+
* @returns The ID, or `undefined` when no source has one.
|
|
149
|
+
* @throws {Error} If `flagValue` is not a subscriber package version ID.
|
|
150
|
+
*/
|
|
151
|
+
export declare function resolveSubscriberPackageVersionId(options: ResolveSubscriberPackageVersionIdOptions): Promise<string | undefined>;
|
|
152
|
+
/**
|
|
153
|
+
* The `.npmrc` written into the staging directory when `--npm-token` is given.
|
|
154
|
+
*
|
|
155
|
+
* Auth lines only, deliberately: setting `registry=` here would also redirect the compiler's own
|
|
156
|
+
* `npm install utam@…`, which has no business going through a project-scoped package registry.
|
|
157
|
+
* Every command that must target the publish registry passes `--registry` explicitly instead.
|
|
158
|
+
*/
|
|
159
|
+
export declare function buildNpmrc(token: string, registry?: string): string;
|