2024-11-28 23:22:31 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright Google LLC All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
|
|
|
*/
|
|
|
|
|
|
2025-04-30 23:12:06 +00:00
|
|
|
import {dirname, resolve as resolvePath} from 'node:path';
|
2022-12-22 15:02:16 +00:00
|
|
|
import {fileURLToPath} from 'node:url';
|
2025-04-30 23:12:06 +00:00
|
|
|
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
|
|
|
|
|
import {GithubClient} from '../shared/github-client.mjs';
|
2022-12-22 15:02:16 +00:00
|
|
|
|
|
|
|
|
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
2025-04-30 23:12:06 +00:00
|
|
|
|
|
|
|
|
const CLI_BUILDS_REPO = 'angular/cli-builds';
|
2024-04-08 10:20:59 +00:00
|
|
|
const CLI_HELP_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cli/help');
|
2022-12-22 15:02:16 +00:00
|
|
|
|
|
|
|
|
async function main() {
|
2025-04-30 23:12:06 +00:00
|
|
|
await copyJsonAssets({
|
|
|
|
|
repo: CLI_BUILDS_REPO,
|
|
|
|
|
assetsPath: 'help',
|
|
|
|
|
destPath: CLI_HELP_CONTENT_PATH,
|
|
|
|
|
githubApi: new GithubClient(
|
|
|
|
|
CLI_BUILDS_REPO,
|
|
|
|
|
process.env.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN,
|
|
|
|
|
'ADEV_Angular_CLI_Sources_Update',
|
2024-03-05 16:20:15 +00:00
|
|
|
),
|
2022-12-22 15:02:16 +00:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
main().catch((err) => {
|
|
|
|
|
console.error(err);
|
|
|
|
|
process.exit(1);
|
|
|
|
|
});
|