"Fossies" - the Fresh Open Source Software Archive 
Member "angular-cli-15.2.4/tests/legacy-cli/e2e/setup/010-local-publish.ts" (16 Mar 2023, 952 Bytes) of package /linux/www/angular-cli-15.2.4.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 import { getGlobalVariable } from '../utils/env';
2 import { PkgInfo } from '../utils/packages';
3 import { globalNpm, extractNpmEnv } from '../utils/process';
4 import { isPrereleaseCli } from '../utils/project';
5
6 export default async function () {
7 const testRegistry: string = getGlobalVariable('package-registry');
8 const packageTars: PkgInfo[] = Object.values(getGlobalVariable('package-tars'));
9
10 // Publish packages specified with --package
11 await Promise.all(
12 packageTars.map(({ path: p }) =>
13 globalNpm(
14 [
15 'publish',
16 `--registry=${testRegistry}`,
17 '--tag',
18 isPrereleaseCli() ? 'next' : 'latest',
19 p,
20 ],
21 {
22 ...extractNpmEnv(),
23 // Also set an auth token value for the local test registry which is required by npm 7+
24 // even though it is never actually used.
25 'NPM_CONFIG__AUTH': 'e2e-testing',
26 },
27 ),
28 ),
29 );
30 }