@eclipse-glsp/cli 2.3.0-next.164 → 2.3.0-next.17
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 +143 -38
- package/dist/cli.js +21959 -0
- package/dist/cli.js.map +6 -0
- package/package.json +22 -29
- package/bin/glsp +0 -2
- package/lib/app.d.ts +0 -2
- package/lib/app.d.ts.map +0 -1
- package/lib/app.js +0 -35
- package/lib/app.js.map +0 -1
- package/lib/commands/check-header.d.ts +0 -21
- package/lib/commands/check-header.d.ts.map +0 -1
- package/lib/commands/check-header.js +0 -240
- package/lib/commands/check-header.js.map +0 -1
- package/lib/commands/coverage-report.d.ts +0 -29
- package/lib/commands/coverage-report.d.ts.map +0 -1
- package/lib/commands/coverage-report.js +0 -126
- package/lib/commands/coverage-report.js.map +0 -1
- package/lib/commands/generate-index.d.ts +0 -46
- package/lib/commands/generate-index.d.ts.map +0 -1
- package/lib/commands/generate-index.js +0 -172
- package/lib/commands/generate-index.js.map +0 -1
- package/lib/commands/release/common.d.ts +0 -68
- package/lib/commands/release/common.d.ts.map +0 -1
- package/lib/commands/release/common.js +0 -293
- package/lib/commands/release/common.js.map +0 -1
- package/lib/commands/release/release-client.d.ts +0 -3
- package/lib/commands/release/release-client.d.ts.map +0 -1
- package/lib/commands/release/release-client.js +0 -58
- package/lib/commands/release/release-client.js.map +0 -1
- package/lib/commands/release/release-eclipse-integration.d.ts +0 -18
- package/lib/commands/release/release-eclipse-integration.d.ts.map +0 -1
- package/lib/commands/release/release-eclipse-integration.js +0 -93
- package/lib/commands/release/release-eclipse-integration.js.map +0 -1
- package/lib/commands/release/release-java-server.d.ts +0 -3
- package/lib/commands/release/release-java-server.d.ts.map +0 -1
- package/lib/commands/release/release-java-server.js +0 -71
- package/lib/commands/release/release-java-server.js.map +0 -1
- package/lib/commands/release/release-server-node.d.ts +0 -18
- package/lib/commands/release/release-server-node.d.ts.map +0 -1
- package/lib/commands/release/release-server-node.js +0 -54
- package/lib/commands/release/release-server-node.js.map +0 -1
- package/lib/commands/release/release-theia-integration.d.ts +0 -18
- package/lib/commands/release/release-theia-integration.d.ts.map +0 -1
- package/lib/commands/release/release-theia-integration.js +0 -54
- package/lib/commands/release/release-theia-integration.js.map +0 -1
- package/lib/commands/release/release-vscode-integration.d.ts +0 -18
- package/lib/commands/release/release-vscode-integration.d.ts.map +0 -1
- package/lib/commands/release/release-vscode-integration.js +0 -54
- package/lib/commands/release/release-vscode-integration.js.map +0 -1
- package/lib/commands/release/release.d.ts +0 -14
- package/lib/commands/release/release.d.ts.map +0 -1
- package/lib/commands/release/release.js +0 -191
- package/lib/commands/release/release.js.map +0 -1
- package/lib/commands/update-next.d.ts +0 -20
- package/lib/commands/update-next.d.ts.map +0 -1
- package/lib/commands/update-next.js +0 -146
- package/lib/commands/update-next.js.map +0 -1
- package/lib/util/command-util.d.ts +0 -26
- package/lib/util/command-util.d.ts.map +0 -1
- package/lib/util/command-util.js +0 -56
- package/lib/util/command-util.js.map +0 -1
- package/lib/util/git-util.d.ts +0 -42
- package/lib/util/git-util.d.ts.map +0 -1
- package/lib/util/git-util.js +0 -125
- package/lib/util/git-util.js.map +0 -1
- package/lib/util/logger.d.ts +0 -23
- package/lib/util/logger.d.ts.map +0 -1
- package/lib/util/logger.js +0 -50
- package/lib/util/logger.js.map +0 -1
- package/lib/util/validation-util.d.ts +0 -5
- package/lib/util/validation-util.d.ts.map +0 -1
- package/lib/util/validation-util.js +0 -86
- package/lib/util/validation-util.js.map +0 -1
- package/src/app.ts +0 -34
- package/src/commands/check-header.ts +0 -280
- package/src/commands/coverage-report.ts +0 -113
- package/src/commands/generate-index.ts +0 -169
- package/src/commands/release/common.ts +0 -306
- package/src/commands/release/release-client.ts +0 -55
- package/src/commands/release/release-eclipse-integration.ts +0 -113
- package/src/commands/release/release-java-server.ts +0 -73
- package/src/commands/release/release-server-node.ts +0 -61
- package/src/commands/release/release-theia-integration.ts +0 -65
- package/src/commands/release/release-vscode-integration.ts +0 -67
- package/src/commands/release/release.ts +0 -215
- package/src/commands/update-next.ts +0 -129
- package/src/util/command-util.ts +0 -54
- package/src/util/git-util.ts +0 -123
- package/src/util/logger.ts +0 -57
- package/src/util/validation-util.ts +0 -62
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2023-2024 EclipseSource and others.
|
|
4
|
-
*
|
|
5
|
-
* This program and the accompanying materials are made available under the
|
|
6
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
*
|
|
9
|
-
* This Source Code may also be made available under the following Secondary
|
|
10
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
* with the GNU Classpath Exception which is available at
|
|
13
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
*
|
|
15
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
-
********************************************************************************/
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
-
};
|
|
43
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.extractReusableContent = exports.createExport = exports.writeIndex = exports.isChildFile = exports.isChildDirectory = exports.isChild = exports.getLevel = exports.isFile = exports.isDirectory = exports.isDirectChild = exports.generateIndex = exports.generateIndices = exports.GenerateIndex = void 0;
|
|
45
|
-
const commander_1 = require("commander");
|
|
46
|
-
const fs = __importStar(require("fs"));
|
|
47
|
-
const os = __importStar(require("os"));
|
|
48
|
-
const path = __importStar(require("path"));
|
|
49
|
-
const shelljs_1 = __importDefault(require("shelljs"));
|
|
50
|
-
const command_util_1 = require("../util/command-util");
|
|
51
|
-
const logger_1 = require("../util/logger");
|
|
52
|
-
const validation_util_1 = require("../util/validation-util");
|
|
53
|
-
exports.GenerateIndex = (0, command_util_1.baseCommand)() //
|
|
54
|
-
.name('generateIndex')
|
|
55
|
-
.description('Generate index files in a given source directory.')
|
|
56
|
-
.argument('<rootDir...>', 'The source directory for index generation.')
|
|
57
|
-
.option('-s, --singleIndex', 'Generate a single index file in the source directory instead of indices in each sub-directory', false)
|
|
58
|
-
.option('-f, --forceOverwrite', 'Overwrite existing index files and remove them if there are no entries', false)
|
|
59
|
-
.option('-m, --match [match patterns...]', 'File patterns to consider during indexing', ['**/*.ts', '**/*.tsx'])
|
|
60
|
-
.option('-i, --ignore [ignore patterns...]', 'File patterns to ignore during indexing', ['**/*.spec.ts', '**/*.spec.tsx', '**/*.d.ts'])
|
|
61
|
-
.addOption((0, commander_1.createOption)('-s, --style <importStyle>', 'Import Style').choices(['commonjs', 'esm']).default('commonjs'))
|
|
62
|
-
.option('--ignoreFile <ignoreFile>', 'The file that is used to specify patterns that should be ignored during indexing', '.indexignore')
|
|
63
|
-
.option('-v, --verbose', 'Generate verbose output during generation', false)
|
|
64
|
-
.action(generateIndices);
|
|
65
|
-
async function generateIndices(rootDirs, options) {
|
|
66
|
-
const dirs = rootDirs.map(rootDir => (0, validation_util_1.validateDirectory)(path.resolve(rootDir)));
|
|
67
|
-
const globby = await import('globby');
|
|
68
|
-
const ignoreFilter = (pattern, globbyOptions) => globby.globbySync(pattern, globbyOptions);
|
|
69
|
-
dirs.forEach(dir => generateIndex(dir, ignoreFilter, options));
|
|
70
|
-
}
|
|
71
|
-
exports.generateIndices = generateIndices;
|
|
72
|
-
async function generateIndex(rootDir, ignoreFilter, options) {
|
|
73
|
-
(0, logger_1.configureLogger)(options.verbose);
|
|
74
|
-
logger_1.LOGGER.debug('Run generateIndex for', rootDir, 'with the following options:', options);
|
|
75
|
-
shelljs_1.default.cd(rootDir);
|
|
76
|
-
const cwd = process.cwd();
|
|
77
|
-
// we want to match all given patterns and subdirectories and ignore all given patterns and (generated) index files
|
|
78
|
-
const pattern = typeof options.match === 'boolean' ? ['**/'] : [...options.match, '**/'];
|
|
79
|
-
const ignore = typeof options.ignore === 'boolean' ? ['**/index.ts'] : [...options.ignore, '**/index.ts'];
|
|
80
|
-
const globbyOptions = {
|
|
81
|
-
ignore,
|
|
82
|
-
cwd,
|
|
83
|
-
onlyFiles: options.singleIndex,
|
|
84
|
-
markDirectories: true, // directories have '/' at the end
|
|
85
|
-
ignoreFiles: '**/' + options.ignoreFile // users can add this file in their directories to ignore files for indexing
|
|
86
|
-
};
|
|
87
|
-
logger_1.LOGGER.debug('Search for children using the following globby options', globbyOptions);
|
|
88
|
-
const files = ignoreFilter(pattern, globbyOptions);
|
|
89
|
-
logger_1.LOGGER.debug('All children considered in the input directory', files);
|
|
90
|
-
const relativeRootDirectory = '';
|
|
91
|
-
if (options.singleIndex) {
|
|
92
|
-
writeIndex(relativeRootDirectory, files.filter(isFile), options);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
// sort by length so we deal with sub-directories before we deal with their parents to determine whether they are empty
|
|
96
|
-
const directories = [...files.filter(isDirectory), relativeRootDirectory].sort((left, right) => right.length - left.length);
|
|
97
|
-
const directoryChildren = new Map();
|
|
98
|
-
for (const directory of directories) {
|
|
99
|
-
const children = files.filter(file => isDirectChild(directory, file, () => { var _a; return !!((_a = directoryChildren.get(file)) === null || _a === void 0 ? void 0 : _a.length); }));
|
|
100
|
-
directoryChildren.set(directory, children);
|
|
101
|
-
writeIndex(directory, children, options);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
exports.generateIndex = generateIndex;
|
|
106
|
-
function isDirectChild(parent, child, childHasChildren) {
|
|
107
|
-
return isChildFile(parent, child) || (isChildDirectory(parent, child) && childHasChildren());
|
|
108
|
-
}
|
|
109
|
-
exports.isDirectChild = isDirectChild;
|
|
110
|
-
function isDirectory(file) {
|
|
111
|
-
return file.endsWith('/');
|
|
112
|
-
}
|
|
113
|
-
exports.isDirectory = isDirectory;
|
|
114
|
-
function isFile(file) {
|
|
115
|
-
return !isDirectory(file);
|
|
116
|
-
}
|
|
117
|
-
exports.isFile = isFile;
|
|
118
|
-
function getLevel(file) {
|
|
119
|
-
return file.split('/').length;
|
|
120
|
-
}
|
|
121
|
-
exports.getLevel = getLevel;
|
|
122
|
-
function isChild(parent, child) {
|
|
123
|
-
return child.startsWith(parent);
|
|
124
|
-
}
|
|
125
|
-
exports.isChild = isChild;
|
|
126
|
-
function isChildDirectory(parent, child) {
|
|
127
|
-
return isDirectory(child) && isChild(parent, child) && getLevel(child) === getLevel(parent) + 1;
|
|
128
|
-
}
|
|
129
|
-
exports.isChildDirectory = isChildDirectory;
|
|
130
|
-
function isChildFile(parent, child) {
|
|
131
|
-
return isFile(child) && isChild(parent, child) && getLevel(child) === getLevel(parent);
|
|
132
|
-
}
|
|
133
|
-
exports.isChildFile = isChildFile;
|
|
134
|
-
function writeIndex(directory, exports, options) {
|
|
135
|
-
const indexFile = path.join(process.cwd(), directory, 'index.ts');
|
|
136
|
-
if (exports.length === 0) {
|
|
137
|
-
if (options.forceOverwrite && fs.existsSync(indexFile)) {
|
|
138
|
-
logger_1.LOGGER.info('Remove index file', indexFile);
|
|
139
|
-
fs.rmSync(indexFile);
|
|
140
|
-
}
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
const exists = fs.existsSync(indexFile);
|
|
144
|
-
if (exists && !options.forceOverwrite) {
|
|
145
|
-
logger_1.LOGGER.info("Do not overwrite existing index file. Use '-f' to force an overwrite.", indexFile);
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
const headerContent = exists ? extractReusableContent(fs.readFileSync(indexFile, { encoding: 'utf-8' })) : '';
|
|
149
|
-
const exportContent = exports.map(exported => createExport(directory, exported, options)).sort();
|
|
150
|
-
const content = headerContent + exportContent.join(os.EOL) + os.EOL; // end with an empty line
|
|
151
|
-
logger_1.LOGGER.info((exists ? 'Overwrite' : 'Write') + ' index file', indexFile);
|
|
152
|
-
logger_1.LOGGER.debug(' ' + content.split(os.EOL).join(os.EOL + ' '));
|
|
153
|
-
fs.writeFileSync(indexFile, content, { flag: 'w' });
|
|
154
|
-
}
|
|
155
|
-
exports.writeIndex = writeIndex;
|
|
156
|
-
function createExport(directory, relativePath, options) {
|
|
157
|
-
// remove directory prefix, file extension and directory ending '/'
|
|
158
|
-
const parentPrefix = directory.length;
|
|
159
|
-
const suffix = isFile(relativePath) ? path.extname(relativePath).length : 1;
|
|
160
|
-
const relativeName = relativePath.substring(parentPrefix, relativePath.length - suffix);
|
|
161
|
-
const exportName = options.style === 'esm' && isFile(relativePath) ? relativeName + '.js' : relativeName;
|
|
162
|
-
const exportLine = `export * from './${exportName}';`;
|
|
163
|
-
return exportLine;
|
|
164
|
-
}
|
|
165
|
-
exports.createExport = createExport;
|
|
166
|
-
function extractReusableContent(fileContent) {
|
|
167
|
-
var _a, _b;
|
|
168
|
-
// all code before any actual export lines are considered re-usable
|
|
169
|
-
return (_b = (_a = fileContent.match(/^(.*?)(?=^export)/ms)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '';
|
|
170
|
-
}
|
|
171
|
-
exports.extractReusableContent = extractReusableContent;
|
|
172
|
-
//# sourceMappingURL=generate-index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-index.js","sourceRoot":"","sources":["../../src/commands/generate-index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElF,yCAAyC;AACzC,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,sDAAyB;AACzB,uDAAmD;AACnD,2CAAyD;AACzD,6DAA4D;AAqB/C,QAAA,aAAa,GAAG,IAAA,0BAAW,GAAE,CAAC,EAAE;KACxC,IAAI,CAAC,eAAe,CAAC;KACrB,WAAW,CAAC,mDAAmD,CAAC;KAChE,QAAQ,CAAC,cAAc,EAAE,4CAA4C,CAAC;KACtE,MAAM,CAAC,mBAAmB,EAAE,+FAA+F,EAAE,KAAK,CAAC;KACnI,MAAM,CAAC,sBAAsB,EAAE,wEAAwE,EAAE,KAAK,CAAC;KAC/G,MAAM,CAAC,iCAAiC,EAAE,2CAA2C,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KAC/G,MAAM,CAAC,mCAAmC,EAAE,yCAAyC,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;KACtI,SAAS,CAAC,IAAA,wBAAY,EAAC,2BAA2B,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,O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0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-2024 EclipseSource and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
export declare const VERDACCIO_REGISTRY = "http://localhost:4873/";
|
|
17
|
-
export interface ReleaseOptions {
|
|
18
|
-
component: Component;
|
|
19
|
-
releaseType: ReleaseType;
|
|
20
|
-
version: string;
|
|
21
|
-
checkoutDir: string;
|
|
22
|
-
branch: string;
|
|
23
|
-
verbose: boolean;
|
|
24
|
-
force: boolean;
|
|
25
|
-
publish: boolean;
|
|
26
|
-
npmDryRun: boolean;
|
|
27
|
-
draft: boolean;
|
|
28
|
-
}
|
|
29
|
-
export type ReleaseRepository = 'npm' | 'm2' | 'm2&p2' | 'p2';
|
|
30
|
-
export interface Component {
|
|
31
|
-
type: (typeof Component.CLI_CHOICES)[number];
|
|
32
|
-
releaseRepo: ReleaseRepository;
|
|
33
|
-
githubRepo: string;
|
|
34
|
-
directory: string;
|
|
35
|
-
}
|
|
36
|
-
export declare namespace Component {
|
|
37
|
-
const CLIENT: Component;
|
|
38
|
-
const THEIA_INTEGRATION: Component;
|
|
39
|
-
const VSCODE_INTEGRATION: Component;
|
|
40
|
-
const SERVER_NODE: Component;
|
|
41
|
-
const SERVER_JAVA: Component;
|
|
42
|
-
const ECLIPSE_INTEGRATION: Component;
|
|
43
|
-
const ALL: Component[];
|
|
44
|
-
const CLI_CHOICES: readonly ["client", "theia-integration", "vscode-integration", "eclipse-integration", "server-node", "server-java"];
|
|
45
|
-
function parse(cliChoice: string): Component;
|
|
46
|
-
function is(object: any): object is Component;
|
|
47
|
-
}
|
|
48
|
-
export declare namespace ReleaseType {
|
|
49
|
-
const CLI_CHOICES: readonly ["major", "minor", "patch", "rc", "custom"];
|
|
50
|
-
}
|
|
51
|
-
export type ReleaseType = (typeof ReleaseType.CLI_CHOICES)[number];
|
|
52
|
-
export declare function checkoutAndCd(options: ReleaseOptions): string;
|
|
53
|
-
export declare function commitAndTag(version: string, repositoryPath: string): string;
|
|
54
|
-
export declare function publish(repositoryPath: string, options: ReleaseOptions): void;
|
|
55
|
-
export declare function lernaSetVersion(repositoryPath: string, version: string): void;
|
|
56
|
-
export declare function yarnInstall(repositoryPath: string): void;
|
|
57
|
-
export declare function upgradeCommand(pckName: string, version: string): string;
|
|
58
|
-
export declare function updateVersion(...packages: {
|
|
59
|
-
name: string;
|
|
60
|
-
version: string;
|
|
61
|
-
}[]): void;
|
|
62
|
-
export declare function asMvnVersion(version: string): string;
|
|
63
|
-
export declare function checkIfNpmVersionIsNew(pckgName: string, newVersion: string): Promise<void>;
|
|
64
|
-
export declare function checkIfMavenVersionExists(groupId: string, artifactId: string, newVersion: string): void;
|
|
65
|
-
export declare function isExistingMavenVersion(groupId: string, artifactId: string, version: string): boolean;
|
|
66
|
-
export declare function checkJavaServerVersion(version: string, force?: boolean): void;
|
|
67
|
-
export declare function updateLernaForDryRun(): void;
|
|
68
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/commands/release/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAalF,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,MAAM,WAAW,cAAc;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AAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAsB7D;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAe5E;AAED,wBAAgB,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAuB7E;AAgCD,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAS7E;AAED,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAIxD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAGvE;AAED,wBAAgB,aAAa,CAAC,GAAG,QAAQ,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,IAAI,CAQpF;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhG;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAMvG;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAYpG;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,IAAI,CAW3E;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAK3C"}
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2022-2024 EclipseSource and others.
|
|
4
|
-
*
|
|
5
|
-
* This program and the accompanying materials are made available under the
|
|
6
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
*
|
|
9
|
-
* This Source Code may also be made available under the following Secondary
|
|
10
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
* with the GNU Classpath Exception which is available at
|
|
13
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
*
|
|
15
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
-
********************************************************************************/
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
-
};
|
|
43
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.updateLernaForDryRun = exports.checkJavaServerVersion = exports.isExistingMavenVersion = exports.checkIfMavenVersionExists = exports.checkIfNpmVersionIsNew = exports.asMvnVersion = exports.updateVersion = exports.upgradeCommand = exports.yarnInstall = exports.lernaSetVersion = exports.publish = exports.commitAndTag = exports.checkoutAndCd = exports.ReleaseType = exports.Component = exports.VERDACCIO_REGISTRY = void 0;
|
|
45
|
-
const fs = __importStar(require("fs"));
|
|
46
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
47
|
-
const path_1 = require("path");
|
|
48
|
-
const readline = __importStar(require("readline-sync"));
|
|
49
|
-
const semver = __importStar(require("semver"));
|
|
50
|
-
const shelljs_1 = __importDefault(require("shelljs"));
|
|
51
|
-
const command_util_1 = require("../../util/command-util");
|
|
52
|
-
const git_util_1 = require("../../util/git-util");
|
|
53
|
-
const logger_1 = require("../../util/logger");
|
|
54
|
-
const validation_util_1 = require("../../util/validation-util");
|
|
55
|
-
exports.VERDACCIO_REGISTRY = 'http://localhost:4873/';
|
|
56
|
-
var Component;
|
|
57
|
-
(function (Component) {
|
|
58
|
-
Component.CLIENT = {
|
|
59
|
-
type: 'client',
|
|
60
|
-
githubRepo: 'eclipse-glsp/glsp-client',
|
|
61
|
-
releaseRepo: 'npm',
|
|
62
|
-
directory: 'glsp-client'
|
|
63
|
-
};
|
|
64
|
-
Component.THEIA_INTEGRATION = {
|
|
65
|
-
type: 'theia-integration',
|
|
66
|
-
githubRepo: 'eclipse-glsp/glsp-theia-integration',
|
|
67
|
-
releaseRepo: 'npm',
|
|
68
|
-
directory: 'glsp-theia-integration'
|
|
69
|
-
};
|
|
70
|
-
Component.VSCODE_INTEGRATION = {
|
|
71
|
-
type: 'vscode-integration',
|
|
72
|
-
githubRepo: 'eclipse-glsp/glsp-vscode-integration',
|
|
73
|
-
releaseRepo: 'npm',
|
|
74
|
-
directory: 'glsp-vscode-integration'
|
|
75
|
-
};
|
|
76
|
-
Component.SERVER_NODE = {
|
|
77
|
-
type: 'server-node',
|
|
78
|
-
githubRepo: 'eclipse-glsp/glsp-server-node',
|
|
79
|
-
releaseRepo: 'npm',
|
|
80
|
-
directory: 'serer-node'
|
|
81
|
-
};
|
|
82
|
-
Component.SERVER_JAVA = {
|
|
83
|
-
type: 'server-java',
|
|
84
|
-
githubRepo: 'eclipse-glsp/glsp-server',
|
|
85
|
-
releaseRepo: 'm2&p2',
|
|
86
|
-
directory: 'glsp-server'
|
|
87
|
-
};
|
|
88
|
-
Component.ECLIPSE_INTEGRATION = {
|
|
89
|
-
type: 'eclipse-integration',
|
|
90
|
-
githubRepo: 'eclipse-glsp/glsp-eclipse-integration',
|
|
91
|
-
releaseRepo: 'm2',
|
|
92
|
-
directory: 'glsp-eclipse-integration'
|
|
93
|
-
};
|
|
94
|
-
Component.ALL = [Component.CLIENT, Component.THEIA_INTEGRATION, Component.VSCODE_INTEGRATION, Component.ECLIPSE_INTEGRATION, Component.SERVER_JAVA, Component.SERVER_NODE];
|
|
95
|
-
Component.CLI_CHOICES = [
|
|
96
|
-
'client',
|
|
97
|
-
'theia-integration',
|
|
98
|
-
'vscode-integration',
|
|
99
|
-
'eclipse-integration',
|
|
100
|
-
'server-node',
|
|
101
|
-
'server-java'
|
|
102
|
-
];
|
|
103
|
-
function parse(cliChoice) {
|
|
104
|
-
const key = cliChoice.toUpperCase().replace('-', '_');
|
|
105
|
-
const component = Component[key];
|
|
106
|
-
if (!component) {
|
|
107
|
-
throw new Error(`Could not parse component for type: ${cliChoice}`);
|
|
108
|
-
}
|
|
109
|
-
return component;
|
|
110
|
-
}
|
|
111
|
-
Component.parse = parse;
|
|
112
|
-
function is(object) {
|
|
113
|
-
return typeof object === 'object' && typeof object.type === 'string';
|
|
114
|
-
}
|
|
115
|
-
Component.is = is;
|
|
116
|
-
})(Component || (exports.Component = Component = {}));
|
|
117
|
-
var ReleaseType;
|
|
118
|
-
(function (ReleaseType) {
|
|
119
|
-
ReleaseType.CLI_CHOICES = ['major', 'minor', 'patch', 'rc', 'custom'];
|
|
120
|
-
})(ReleaseType || (exports.ReleaseType = ReleaseType = {}));
|
|
121
|
-
function checkoutAndCd(options) {
|
|
122
|
-
const ghUrl = options.component.githubRepo;
|
|
123
|
-
logger_1.LOGGER.info(`Clone repository '${ghUrl}' to directory: ${options.checkoutDir}`);
|
|
124
|
-
shelljs_1.default.cd(options.checkoutDir);
|
|
125
|
-
const directory = ghUrl.substring(ghUrl.lastIndexOf('/') + 1);
|
|
126
|
-
const repoPath = (0, path_1.resolve)(options.checkoutDir, directory);
|
|
127
|
-
if (fs.existsSync((0, path_1.resolve)(options.checkoutDir, directory))) {
|
|
128
|
-
if (options.force) {
|
|
129
|
-
logger_1.LOGGER.debug('A directory with the checkout name already exists.');
|
|
130
|
-
logger_1.LOGGER.debug('Force mode is enabled. The directory will be removed');
|
|
131
|
-
(0, command_util_1.fatalExec)(`rm -rf ${repoPath}`, `Could not remove directory: ${repoPath}`);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
throw new Error('Directory with the checkout name already exists.');
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
shelljs_1.default.exec(`gh repo clone ${ghUrl}`, (0, command_util_1.getShellConfig)());
|
|
138
|
-
logger_1.LOGGER.debug(`Successfully cloned to ${directory}`);
|
|
139
|
-
shelljs_1.default.cd(directory);
|
|
140
|
-
if (options.branch !== 'master' && options.branch !== 'main') {
|
|
141
|
-
shelljs_1.default.exec(`git checkout ${options.branch} `);
|
|
142
|
-
}
|
|
143
|
-
return shelljs_1.default.pwd();
|
|
144
|
-
}
|
|
145
|
-
exports.checkoutAndCd = checkoutAndCd;
|
|
146
|
-
function commitAndTag(version, repositoryPath) {
|
|
147
|
-
logger_1.LOGGER.info('Commit changes and create new tag');
|
|
148
|
-
shelljs_1.default.cd(repositoryPath);
|
|
149
|
-
logger_1.LOGGER.debug('Check wether the given url is a git repository');
|
|
150
|
-
if (!(0, git_util_1.isGitRepository)(shelljs_1.default.pwd())) {
|
|
151
|
-
throw new Error(`The given path is not a git repository: ${repositoryPath}`);
|
|
152
|
-
}
|
|
153
|
-
const tag = `v${version}`;
|
|
154
|
-
logger_1.LOGGER.debug(`Create tag with label: ${tag}}`);
|
|
155
|
-
shelljs_1.default.exec(`git checkout -b ${tag}`, (0, command_util_1.getShellConfig)());
|
|
156
|
-
shelljs_1.default.exec('git add .', (0, command_util_1.getShellConfig)());
|
|
157
|
-
shelljs_1.default.exec(`git commit -m "${tag}"`, (0, command_util_1.getShellConfig)());
|
|
158
|
-
shelljs_1.default.exec(`git tag ${tag}`, (0, command_util_1.getShellConfig)());
|
|
159
|
-
return tag;
|
|
160
|
-
}
|
|
161
|
-
exports.commitAndTag = commitAndTag;
|
|
162
|
-
function publish(repositoryPath, options) {
|
|
163
|
-
if (!options.publish || options.npmDryRun) {
|
|
164
|
-
logger_1.LOGGER.info('Skip publishing to Github');
|
|
165
|
-
if (options.npmDryRun && options.component.releaseRepo === 'npm') {
|
|
166
|
-
(0, command_util_1.fatalExec)('lerna publish from-git --no-git-reset --no-git-tag-version --no-verify-access --no-push --dist-tag rc --yes', 'Dry-run publish failed', { silent: false });
|
|
167
|
-
}
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
logger_1.LOGGER.info(`Publish new GH release ${options.draft ? '[DRAFT]' : ''}`);
|
|
171
|
-
shelljs_1.default.cd(repositoryPath);
|
|
172
|
-
if (!options.force && (0, git_util_1.hasGitChanges)()) {
|
|
173
|
-
throw new Error('Publish failed. The repository has pending changes');
|
|
174
|
-
}
|
|
175
|
-
const latestReleaseTag = (0, git_util_1.getLatestGithubRelease)();
|
|
176
|
-
const localTag = (0, git_util_1.getLatestTag)();
|
|
177
|
-
validateTag(latestReleaseTag, localTag);
|
|
178
|
-
const preRelease = options.releaseType === 'rc' || localTag.includes('-');
|
|
179
|
-
doPublish(localTag, preRelease, latestReleaseTag, options.draft);
|
|
180
|
-
}
|
|
181
|
-
exports.publish = publish;
|
|
182
|
-
function doPublish(tag, preRelease, latestRelease, draft) {
|
|
183
|
-
(0, command_util_1.fatalExec)(`git push origin HEAD:${tag}`, 'Could not push release branch to Github', (0, command_util_1.getShellConfig)({ silent: false }));
|
|
184
|
-
(0, command_util_1.fatalExec)(`git push origin tag ${tag}`, 'Could not push tag to Github', (0, command_util_1.getShellConfig)({ silent: false }));
|
|
185
|
-
const version = tagToVersion(tag);
|
|
186
|
-
const titleSuffix = preRelease ? ` Candidate ${version.substring(version.lastIndexOf('-RC') + 3)}` : '';
|
|
187
|
-
const title = `${version.replace(/-.*/, '')} Release${titleSuffix} `;
|
|
188
|
-
shelljs_1.default.exec(`gh release create ${tag} -t "${title}" --notes-start-tag ${latestRelease} --generate-notes ${draft ? '-d' : ''} ${preRelease ? '-p' : ''}`, (0, command_util_1.getShellConfig)());
|
|
189
|
-
}
|
|
190
|
-
function validateTag(currentReleaseTag, newTag) {
|
|
191
|
-
const releaseVersion = tagToVersion(currentReleaseTag);
|
|
192
|
-
const newVersion = tagToVersion(newTag);
|
|
193
|
-
if (!semver.satisfies(newVersion, `>${releaseVersion}`, { includePrerelease: true })) {
|
|
194
|
-
throw new Error(`Tag version is lower than the current release: ${newTag} `);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
function tagToVersion(tag) {
|
|
198
|
-
if (!tag.startsWith('v')) {
|
|
199
|
-
throw new Error(`Invalid format. The release tag should start with 'v': ${tag}`);
|
|
200
|
-
}
|
|
201
|
-
const version = tag.substring(1).replace('.RC', '-RC');
|
|
202
|
-
return (0, validation_util_1.validateVersion)(version);
|
|
203
|
-
}
|
|
204
|
-
function lernaSetVersion(repositoryPath, version) {
|
|
205
|
-
logger_1.LOGGER.info(`Bump version in ${repositoryPath} to: ${version}`);
|
|
206
|
-
shelljs_1.default.cd(repositoryPath);
|
|
207
|
-
(0, command_util_1.fatalExec)(`lerna version --exact ${version} --ignore-scripts --yes --no-push --no-git-tag-version`, 'Lerna version bump failed!', {
|
|
208
|
-
silent: false
|
|
209
|
-
});
|
|
210
|
-
logger_1.LOGGER.debug('Update root package.json version');
|
|
211
|
-
shelljs_1.default.exec(`jq '.version="${version}"' package.json > temp.json`, (0, command_util_1.getShellConfig)());
|
|
212
|
-
shelljs_1.default.exec('mv temp.json package.json ', (0, command_util_1.getShellConfig)());
|
|
213
|
-
}
|
|
214
|
-
exports.lernaSetVersion = lernaSetVersion;
|
|
215
|
-
function yarnInstall(repositoryPath) {
|
|
216
|
-
logger_1.LOGGER.debug(`Build ${repositoryPath}`);
|
|
217
|
-
shelljs_1.default.cd(repositoryPath);
|
|
218
|
-
(0, command_util_1.fatalExec)('yarn', 'Yarn build failed', (0, command_util_1.getShellConfig)({ silent: false }));
|
|
219
|
-
}
|
|
220
|
-
exports.yarnInstall = yarnInstall;
|
|
221
|
-
function upgradeCommand(pckName, version) {
|
|
222
|
-
logger_1.LOGGER.debug(`Upgrade '${pckName}' to version ${version}`);
|
|
223
|
-
return `lernaupdate --non-interactive --dependency ${pckName}@${version}`;
|
|
224
|
-
}
|
|
225
|
-
exports.upgradeCommand = upgradeCommand;
|
|
226
|
-
function updateVersion(...packages) {
|
|
227
|
-
packages.forEach(pckg => {
|
|
228
|
-
const result = shelljs_1.default.exec(upgradeCommand(pckg.name, pckg.version), (0, command_util_1.getShellConfig)({ silent: false })).stdout.trim();
|
|
229
|
-
if (result.includes('An error occurred:')) {
|
|
230
|
-
const errorMsg = result.substring(result.lastIndexOf('An error occurred:')).trim();
|
|
231
|
-
throw new Error(errorMsg);
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
exports.updateVersion = updateVersion;
|
|
236
|
-
function asMvnVersion(version) {
|
|
237
|
-
logger_1.LOGGER.debug(`Convert to maven conform version: ${version}`);
|
|
238
|
-
const mavenVersion = version.replace('-', '.');
|
|
239
|
-
logger_1.LOGGER.debug(`Maven version :${mavenVersion}`);
|
|
240
|
-
return mavenVersion;
|
|
241
|
-
}
|
|
242
|
-
exports.asMvnVersion = asMvnVersion;
|
|
243
|
-
async function checkIfNpmVersionIsNew(pckgName, newVersion) {
|
|
244
|
-
logger_1.LOGGER.debug(`Check that the release version is new i.e. does not exist on npm: ${newVersion}`);
|
|
245
|
-
const response = await (0, node_fetch_1.default)(`https://registry.npmjs.org/${pckgName}/${newVersion}`);
|
|
246
|
-
const data = await response.json();
|
|
247
|
-
if (typeof data === 'string' && data.includes('version not found:')) {
|
|
248
|
-
logger_1.LOGGER.debug(`Version '${newVersion}' does not exist on NPM. Continue with release`);
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
throw new Error(`Version '${newVersion} is already present on NPM!}`);
|
|
252
|
-
}
|
|
253
|
-
exports.checkIfNpmVersionIsNew = checkIfNpmVersionIsNew;
|
|
254
|
-
function checkIfMavenVersionExists(groupId, artifactId, newVersion) {
|
|
255
|
-
logger_1.LOGGER.debug('Check if maven version exists');
|
|
256
|
-
if (isExistingMavenVersion(groupId, artifactId, newVersion)) {
|
|
257
|
-
throw new Error(`Version '${newVersion} is already present on maven central!}`);
|
|
258
|
-
}
|
|
259
|
-
logger_1.LOGGER.debug(`Version '${newVersion}' does not exist on maven central. Continue with release`);
|
|
260
|
-
}
|
|
261
|
-
exports.checkIfMavenVersionExists = checkIfMavenVersionExists;
|
|
262
|
-
function isExistingMavenVersion(groupId, artifactId, version) {
|
|
263
|
-
const versions = shelljs_1.default
|
|
264
|
-
.exec(`wget -q -O - https://repo1.maven.org/maven2/${groupId.replace(/\./g, '/')}/${artifactId}/maven-metadata.xml`, (0, command_util_1.getShellConfig)())
|
|
265
|
-
.exec("grep -P '<version>\\K[^<]*'", (0, command_util_1.getShellConfig)())
|
|
266
|
-
.stdout.replace(/<\/?version>/g, '')
|
|
267
|
-
.split('\n')
|
|
268
|
-
.map(versionString => versionString.trim());
|
|
269
|
-
logger_1.LOGGER.debug(`${versions.length} released versions found:`, versions);
|
|
270
|
-
return versions.includes(version);
|
|
271
|
-
}
|
|
272
|
-
exports.isExistingMavenVersion = isExistingMavenVersion;
|
|
273
|
-
function checkJavaServerVersion(version, force = false) {
|
|
274
|
-
const mvnVersion = asMvnVersion(version);
|
|
275
|
-
if (!isExistingMavenVersion('org.eclipse.glsp', 'org.eclipse.glsp.server', mvnVersion)) {
|
|
276
|
-
// eslint-disable-next-line max-len
|
|
277
|
-
const errorMsg = `No Java GLSP server with version ${mvnVersion} found on maven central!. Please release a new Java GLSP Server version before publishing this release!`;
|
|
278
|
-
logger_1.LOGGER.warn(errorMsg);
|
|
279
|
-
if (force || readline.keyInYN('No Java GLSP server with corresponding version found. Do you want to continue anyways?')) {
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
throw new Error(errorMsg);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
exports.checkJavaServerVersion = checkJavaServerVersion;
|
|
286
|
-
function updateLernaForDryRun() {
|
|
287
|
-
logger_1.LOGGER.debug('Update lerna.json to use local publish registry');
|
|
288
|
-
shelljs_1.default.exec(`jq '.command.publish.registry="${exports.VERDACCIO_REGISTRY}"' lerna.json > temp.json`, (0, command_util_1.getShellConfig)());
|
|
289
|
-
shelljs_1.default.exec('mv temp.json lerna.json', (0, command_util_1.getShellConfig)());
|
|
290
|
-
shelljs_1.default.exec(`npm set registry ${exports.VERDACCIO_REGISTRY}`);
|
|
291
|
-
}
|
|
292
|
-
exports.updateLernaForDryRun = updateLernaForDryRun;
|
|
293
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/commands/release/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElF,uCAAyB;AACzB,4DAA+B;AAC/B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1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"release-client.d.ts","sourceRoot":"","sources":["../../../src/commands/release/release-client.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAyD,cAAc,EAAqC,MAAM,UAAU,CAAC;AAIpI,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.releaseClient = void 0;
|
|
7
|
-
/********************************************************************************
|
|
8
|
-
* Copyright (c) 2022-2024 EclipseSource and others.
|
|
9
|
-
*
|
|
10
|
-
* This program and the accompanying materials are made available under the
|
|
11
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
12
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
13
|
-
*
|
|
14
|
-
* This Source Code may also be made available under the following Secondary
|
|
15
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
16
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
17
|
-
* with the GNU Classpath Exception which is available at
|
|
18
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
19
|
-
*
|
|
20
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
21
|
-
********************************************************************************/
|
|
22
|
-
const shelljs_1 = __importDefault(require("shelljs"));
|
|
23
|
-
const command_util_1 = require("../../util/command-util");
|
|
24
|
-
const logger_1 = require("../../util/logger");
|
|
25
|
-
const common_1 = require("./common");
|
|
26
|
-
let REPO_ROOT;
|
|
27
|
-
async function releaseClient(options) {
|
|
28
|
-
logger_1.LOGGER.info('Prepare glsp-client release');
|
|
29
|
-
logger_1.LOGGER.debug('Release options: ', options.version);
|
|
30
|
-
REPO_ROOT = (0, common_1.checkoutAndCd)(options);
|
|
31
|
-
updateDownloadServerScript(options.version);
|
|
32
|
-
generateChangeLog();
|
|
33
|
-
(0, common_1.lernaSetVersion)(REPO_ROOT, options.version);
|
|
34
|
-
build();
|
|
35
|
-
if (options.npmDryRun) {
|
|
36
|
-
(0, common_1.updateLernaForDryRun)();
|
|
37
|
-
}
|
|
38
|
-
(0, common_1.commitAndTag)(options.version, REPO_ROOT);
|
|
39
|
-
(0, common_1.publish)(REPO_ROOT, options);
|
|
40
|
-
}
|
|
41
|
-
exports.releaseClient = releaseClient;
|
|
42
|
-
async function updateDownloadServerScript(version) {
|
|
43
|
-
logger_1.LOGGER.info('Update example server download config');
|
|
44
|
-
shelljs_1.default.cd(`${REPO_ROOT}/examples/workflow-standalone/scripts`);
|
|
45
|
-
const configFile = 'config.json';
|
|
46
|
-
logger_1.LOGGER.info('Update example server download config');
|
|
47
|
-
shelljs_1.default.exec(`jq '.version="${version}"' ${configFile} > temp.json`, (0, command_util_1.getShellConfig)());
|
|
48
|
-
shelljs_1.default.exec(`mv temp.json ${configFile}`, (0, command_util_1.getShellConfig)());
|
|
49
|
-
}
|
|
50
|
-
function generateChangeLog() {
|
|
51
|
-
// do nothing for now
|
|
52
|
-
}
|
|
53
|
-
function build() {
|
|
54
|
-
logger_1.LOGGER.info('Install & Build with yarn');
|
|
55
|
-
(0, common_1.yarnInstall)(REPO_ROOT);
|
|
56
|
-
logger_1.LOGGER.debug('Build successful');
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=release-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"release-client.js","sourceRoot":"","sources":["../../../src/commands/release/release-client.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,sDAAyB;AACzB,0DAAyD;AACzD,8CAA2C;AAC3C,qCAAoI;AAEpI,IAAI,SAAiB,CAAC;AAEf,KAAK,UAAU,aAAa,CA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