@lakutata/cli 2.17.1 → 3.0.0-beta.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 +455 -28
- package/dist/esm/CLIApp.js +6 -0
- package/dist/esm/Config.js +53 -0
- package/dist/esm/controllers/CommandLineController.js +180 -0
- package/dist/esm/controllers/I18nController.js +67 -0
- package/dist/esm/controllers/MigrationController.js +66 -0
- package/dist/esm/controllers/NativeController.js +41 -0
- package/dist/esm/controllers/PackController.js +88 -0
- package/dist/esm/controllers/WorkspaceController.js +91 -0
- package/dist/esm/dtos/AddPackageDTO.js +25 -0
- package/dist/esm/dtos/BundleDTO.js +29 -0
- package/dist/esm/dtos/CleanDTO.js +17 -0
- package/dist/esm/dtos/CreateProjectDTO.js +61 -0
- package/dist/esm/dtos/ExecutableDTO.js +37 -0
- package/dist/esm/dtos/I18nDTO.js +41 -0
- package/dist/esm/dtos/InstallerDTO.js +33 -0
- package/dist/{options/ListTemplatesOptions.js → esm/dtos/ListTemplatesDTO.js} +5 -14
- package/dist/esm/dtos/MigrationDTO.js +45 -0
- package/dist/esm/dtos/NativeDTO.js +41 -0
- package/dist/esm/dtos/RunScriptDTO.js +33 -0
- package/dist/esm/dtos/VersionDTO.js +29 -0
- package/dist/esm/lib/AddPackage.js +487 -0
- package/dist/esm/lib/Builder.js +21 -0
- package/dist/esm/lib/Clean.js +146 -0
- package/dist/esm/lib/Environment.js +11 -0
- package/dist/esm/lib/I18n.js +67 -0
- package/dist/esm/lib/Language.js +24 -0
- package/dist/esm/lib/Migration.js +94 -0
- package/dist/esm/lib/Output.js +40 -0
- package/dist/esm/lib/Processes.js +54 -0
- package/dist/esm/lib/ProjectCreator.js +191 -0
- package/dist/esm/lib/Registry.js +152 -0
- package/dist/esm/lib/Settings.js +25 -0
- package/dist/esm/lib/Tar.js +145 -0
- package/dist/esm/lib/TemplateCatalog.js +195 -0
- package/dist/esm/lib/TemplateFeatures.js +141 -0
- package/dist/esm/lib/Versions.js +58 -0
- package/dist/esm/lib/native/CMake.js +357 -0
- package/dist/esm/lib/native/Gyp.js +398 -0
- package/dist/esm/lib/native/NativeProject.js +370 -0
- package/dist/esm/lib/native/TextEdits.js +68 -0
- package/dist/esm/lib/native/Toml.js +325 -0
- package/dist/esm/lib/workspace/Run.js +111 -0
- package/dist/esm/lib/workspace/Version.js +144 -0
- package/dist/esm/lib/workspace/Workspace.js +231 -0
- package/dist/esm/locales/zh-CN.json +194 -0
- package/dist/esm/locales/zh-TW.json +194 -0
- package/dist/esm/types/ProcessResult.js +1 -0
- package/package.json +32 -43
- package/CHANGELOG.md +0 -460
- package/dist/CLIApp.d.ts +0 -3
- package/dist/CLIApp.d.ts.map +0 -1
- package/dist/CLIApp.js +0 -45
- package/dist/config/Config.d.ts +0 -3
- package/dist/config/Config.d.ts.map +0 -1
- package/dist/config/Config.js +0 -63
- package/dist/config/SetupCLIEntrypoint.d.ts +0 -3
- package/dist/config/SetupCLIEntrypoint.d.ts.map +0 -1
- package/dist/config/SetupCLIEntrypoint.js +0 -31
- package/dist/controllers/CommandLineController.d.ts +0 -25
- package/dist/controllers/CommandLineController.d.ts.map +0 -1
- package/dist/controllers/CommandLineController.js +0 -78
- package/dist/lib/ConvertDTO2Inquirer.d.ts +0 -3
- package/dist/lib/ConvertDTO2Inquirer.d.ts.map +0 -1
- package/dist/lib/ConvertDTO2Inquirer.js +0 -61
- package/dist/lib/GetDataDirectory.d.ts +0 -2
- package/dist/lib/GetDataDirectory.d.ts.map +0 -1
- package/dist/lib/GetDataDirectory.js +0 -11
- package/dist/lib/GetLocalDataFilename.d.ts +0 -2
- package/dist/lib/GetLocalDataFilename.d.ts.map +0 -1
- package/dist/lib/GetLocalDataFilename.js +0 -12
- package/dist/lib/ListTemplateNames.d.ts +0 -2
- package/dist/lib/ListTemplateNames.d.ts.map +0 -1
- package/dist/lib/ListTemplateNames.js +0 -44
- package/dist/lib/SpecialChar.d.ts +0 -9
- package/dist/lib/SpecialChar.d.ts.map +0 -1
- package/dist/lib/SpecialChar.js +0 -11
- package/dist/lib/components/DeGitPuller.d.ts +0 -19
- package/dist/lib/components/DeGitPuller.d.ts.map +0 -1
- package/dist/lib/components/DeGitPuller.js +0 -65
- package/dist/lib/components/Spinner.d.ts +0 -23
- package/dist/lib/components/Spinner.d.ts.map +0 -1
- package/dist/lib/components/Spinner.js +0 -61
- package/dist/lib/providers/Creator.d.ts +0 -46
- package/dist/lib/providers/Creator.d.ts.map +0 -1
- package/dist/lib/providers/Creator.js +0 -179
- package/dist/lib/providers/Information.d.ts +0 -91
- package/dist/lib/providers/Information.d.ts.map +0 -1
- package/dist/lib/providers/Information.js +0 -225
- package/dist/lib/providers/OnlineLatestVersion.d.ts +0 -14
- package/dist/lib/providers/OnlineLatestVersion.d.ts.map +0 -1
- package/dist/lib/providers/OnlineLatestVersion.js +0 -47
- package/dist/lib/providers/TemplateManager.d.ts +0 -36
- package/dist/lib/providers/TemplateManager.d.ts.map +0 -1
- package/dist/lib/providers/TemplateManager.js +0 -164
- package/dist/options/CreateProjectOptions.d.ts +0 -15
- package/dist/options/CreateProjectOptions.d.ts.map +0 -1
- package/dist/options/CreateProjectOptions.js +0 -94
- package/dist/options/ListTemplatesOptions.d.ts +0 -5
- package/dist/options/ListTemplatesOptions.d.ts.map +0 -1
- package/tsconfig.json +0 -7
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class CreateProjectDTO extends DTO {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
Expect(DTO.String().required().pattern(/^([a-zA-Z0-9_-]+\.?)*[a-zA-Z0-9_-]+$/).description('The name of the application')),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], CreateProjectDTO.prototype, "name", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Expect(DTO.String().optional().pattern(/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/).description('The ID of the application (a package name), its name in lower case by default')),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], CreateProjectDTO.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Expect(DTO.String().optional().default('default').description('The template: the name of an official template (lakutata templates lists them), npm:<package>, github:<owner>/<repo> or a directory')),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], CreateProjectDTO.prototype, "template", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Expect(DTO.String().optional().default('.').description('The directory the project directory is created in')),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], CreateProjectDTO.prototype, "path", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
Expect(DTO.Boolean().optional().default(false).description('Create the project in the directory itself, which may exist and not be empty')),
|
|
32
|
+
__metadata("design:type", Boolean)
|
|
33
|
+
], CreateProjectDTO.prototype, "init", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
Expect(DTO.String().allow('').optional().default('').description('The description of the application')),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], CreateProjectDTO.prototype, "description", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Expect(DTO.String().allow('').optional().default('').description('The author of the application')),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CreateProjectDTO.prototype, "author", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
Expect(DTO.String().optional().default('UNLICENSED').description('The license of the application')),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CreateProjectDTO.prototype, "license", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
Expect(DTO.String().valid('npm', 'pnpm', 'yarn', 'none').optional().description('The package manager installing the dependencies, the one running the tool by default ("none" does not install them)')),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], CreateProjectDTO.prototype, "packageManager", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
Expect(DTO.String().optional().description('The optional features of the template enabled, separated by commas (lakutata templates lists them): i18n, installer')),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], CreateProjectDTO.prototype, "with", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
Expect(DTO.Boolean().optional().default(true).description('Initialize a git repository')),
|
|
56
|
+
__metadata("design:type", Boolean)
|
|
57
|
+
], CreateProjectDTO.prototype, "git", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
Expect(DTO.Boolean().optional().default(false).description('Create the project without confirmation')),
|
|
60
|
+
__metadata("design:type", Boolean)
|
|
61
|
+
], CreateProjectDTO.prototype, "yes", void 0);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class ExecutableDTO extends DTO {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
Expect(DTO.String().optional().description('The compiled entry of the application (the "main" of the package.json by default)')),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], ExecutableDTO.prototype, "entry", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Expect(DTO.String().optional().description('The directory of the executable (dist by default)')),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ExecutableDTO.prototype, "outdir", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Expect(DTO.Boolean().optional().default(true).description('Minify the bundle embedded in the executable')),
|
|
24
|
+
__metadata("design:type", Boolean)
|
|
25
|
+
], ExecutableDTO.prototype, "minify", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Expect(DTO.Array(DTO.String()).optional().description('The modules left out of the bundle (they are not in the executable: they are loaded from a node_modules next to it)')),
|
|
28
|
+
__metadata("design:type", Array)
|
|
29
|
+
], ExecutableDTO.prototype, "external", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
Expect(DTO.String().valid('node', 'bun').optional().default('node').description('The runtime embedded in the executable: node (the single executable applications of Node.js, by default) or bun (Bun, installed in the project or on the system)')),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ExecutableDTO.prototype, "runtime", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
Expect(DTO.String().valid('file', 'directory').optional().default('file').description('One file, its native addons and its resources embedded (file, by default), or a directory: the executable and its native addons and resources next to it (directory)')),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ExecutableDTO.prototype, "layout", void 0);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class I18nDTO extends DTO {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
Expect(DTO.String().valid('check', 'types', 'add').required().description('check: the problems of the messages of the languages; types: the declaration of the keys of the messages and of their arguments; add <locale>: the messages of a new language, made from the ones of the default language')),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], I18nDTO.prototype, "action", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Expect(DTO.String().optional().description('The language added (add): zh-CN, ja, pt-BR')),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], I18nDTO.prototype, "locale", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Expect(DTO.String().optional().default('locales').description('The directory of the messages: a file (zh-CN.json) or a directory (zh-CN/) by language; several separated by commas')),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], I18nDTO.prototype, "dir", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Expect(DTO.String().optional().default('en').description('The default language: the messages the other ones are checked against, the declaration is made of, a new language is made from')),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], I18nDTO.prototype, "default", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
Expect(DTO.String().optional().default('src/i18n.d.ts').description('The file of the declaration (types)')),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], I18nDTO.prototype, "out", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
Expect(DTO.String().optional().default('lakutata/com/i18n').description('The module the application imports the i18n from (types): lakutata/com/i18n, or @lakutata/i18n')),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], I18nDTO.prototype, "module", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Expect(DTO.Boolean().optional().default(false).description('The warnings fail the check too (check)')),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], I18nDTO.prototype, "strict", void 0);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class InstallerDTO extends DTO {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
Expect(DTO.Array(DTO.String()).optional().description('The installers made: deb, rpm, apk, archlinux, tar.gz on Linux, pkg, tar.gz on macOS, nsis, msi, zip on Windows (the lakutata.installer of the package.json by default)')),
|
|
16
|
+
__metadata("design:type", Array)
|
|
17
|
+
], InstallerDTO.prototype, "target", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Expect(DTO.String().optional().description('The directory of the installers (dist/installer by default)')),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], InstallerDTO.prototype, "outdir", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Expect(DTO.String().optional().description('The compiled entry of the application (the "main" of the package.json by default)')),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], InstallerDTO.prototype, "entry", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Expect(DTO.Boolean().optional().default(true).description('Minify the bundle embedded in the executable')),
|
|
28
|
+
__metadata("design:type", Boolean)
|
|
29
|
+
], InstallerDTO.prototype, "minify", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
Expect(DTO.Array(DTO.String()).optional().description('The modules left out of the bundle')),
|
|
32
|
+
__metadata("design:type", Array)
|
|
33
|
+
], InstallerDTO.prototype, "external", void 0);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,19 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const dto_1 = require("lakutata/decorator/dto");
|
|
15
|
-
class ListTemplatesOptions extends lakutata_1.DTO {
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class ListTemplatesDTO extends DTO {
|
|
16
13
|
}
|
|
17
|
-
exports.ListTemplatesOptions = ListTemplatesOptions;
|
|
18
14
|
__decorate([
|
|
19
|
-
(
|
|
20
|
-
.Boolean()
|
|
21
|
-
.strict(false)
|
|
22
|
-
.optional()
|
|
23
|
-
.default(false)
|
|
24
|
-
.description('update the local list from the remote synchronized template repository list (default: false)')),
|
|
15
|
+
Expect(DTO.Boolean().optional().default(false).description('Fetch the catalog of the templates again, even when it is cached')),
|
|
25
16
|
__metadata("design:type", Boolean)
|
|
26
|
-
],
|
|
17
|
+
], ListTemplatesDTO.prototype, "refresh", void 0);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class MigrationDTO extends DTO {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
Expect(DTO.String().valid('generate', 'create', 'run', 'revert', 'show').required().description('generate: the migrations of the changes of the entities; create <name>: an empty migration; run: the pending migrations; revert: the last migration run; show: the migrations run and pending')),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], MigrationDTO.prototype, "action", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Expect(DTO.String().pattern(/^[A-Za-z][A-Za-z0-9_-]*$/).optional().description('The name of the migration created (create)')),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], MigrationDTO.prototype, "name", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Expect(DTO.String().optional().default('src/migrations').description('The directory of the migrations, relative to the package (generate, create)')),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], MigrationDTO.prototype, "dir", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Expect(DTO.String().optional().default('dev').description('The script of the package building and starting the application (generate, run, revert, show)')),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], MigrationDTO.prototype, "script", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
Expect(DTO.String().optional().description('The package of the workspace of the application (the current directory by default)')),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], MigrationDTO.prototype, "package", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
Expect(DTO.String().optional().description('The database: the name of its Database component or provider (all by default; required to revert when the application has several)')),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], MigrationDTO.prototype, "database", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Expect(DTO.String().valid('all', 'none', 'each').optional().description('The transactions of the migrations run or reverted: all (one, by default), each (one per migration) or none')),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], MigrationDTO.prototype, "transaction", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
Expect(DTO.Boolean().optional().default(false).description('Mark the migrations as run or reverted without executing them')),
|
|
44
|
+
__metadata("design:type", Boolean)
|
|
45
|
+
], MigrationDTO.prototype, "fake", void 0);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class NativeDTO extends DTO {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
Expect(DTO.String().valid('link', 'include', 'define').required().description('link: a library; include: a directory of headers; define: a macro (NAME or NAME=value)')),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], NativeDTO.prototype, "action", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Expect(DTO.String().required().description('The library (a library of the system, a file of the package: .a .lib .so .dylib .dll), the directory, the macro')),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], NativeDTO.prototype, "value", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Expect(DTO.String().valid('mac', 'linux', 'win').optional().description('The platform of the change (the platform of the file of a library by default, every platform otherwise)')),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], NativeDTO.prototype, "platform", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Expect(DTO.Boolean().optional().default(false).description('The library is a package of pkg-config')),
|
|
28
|
+
__metadata("design:type", Boolean)
|
|
29
|
+
], NativeDTO.prototype, "pkgConfig", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
Expect(DTO.Boolean().optional().default(false).description('The library is a framework of macOS')),
|
|
32
|
+
__metadata("design:type", Boolean)
|
|
33
|
+
], NativeDTO.prototype, "framework", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
Expect(DTO.Boolean().optional().default(false).description('The library is a crate (Rust addons, cargo add)')),
|
|
36
|
+
__metadata("design:type", Boolean)
|
|
37
|
+
], NativeDTO.prototype, "crate", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Expect(DTO.String().optional().description('The target of the build file changed (its only one by default)')),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], NativeDTO.prototype, "target", void 0);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class RunScriptDTO extends DTO {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
Expect(DTO.String().required().description('The script run in the packages having it')),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], RunScriptDTO.prototype, "script", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Expect(DTO.Number().integer().min(1).optional().description('How many packages run at a time (the number of the processors by default)')),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], RunScriptDTO.prototype, "concurrency", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Expect(DTO.Boolean().optional().default(true).description('Stop at the first failure')),
|
|
24
|
+
__metadata("design:type", Boolean)
|
|
25
|
+
], RunScriptDTO.prototype, "bail", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Expect(DTO.Boolean().optional().default(false).description('Run all the packages at once, without waiting for their dependencies (the dev servers, the watchers)')),
|
|
28
|
+
__metadata("design:type", Boolean)
|
|
29
|
+
], RunScriptDTO.prototype, "parallel", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
Expect(DTO.Array(DTO.String()).optional().description('The packages run, by name ("*" wildcards)')),
|
|
32
|
+
__metadata("design:type", Array)
|
|
33
|
+
], RunScriptDTO.prototype, "scope", void 0);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DTO } from 'lakutata';
|
|
11
|
+
import { Expect } from 'lakutata/decorator/dto';
|
|
12
|
+
export class VersionDTO extends DTO {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
Expect(DTO.String().required().description('major, minor, patch, premajor, preminor, prepatch, prerelease, or a version')),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], VersionDTO.prototype, "bump", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Expect(DTO.String().optional().description('The identifier of the prereleases ("beta")')),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], VersionDTO.prototype, "preid", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Expect(DTO.Boolean().optional().default(false).description('Commit the changes and tag them "v<version>"')),
|
|
24
|
+
__metadata("design:type", Boolean)
|
|
25
|
+
], VersionDTO.prototype, "git", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Expect(DTO.Boolean().optional().default(false).description('Give the version without confirmation')),
|
|
28
|
+
__metadata("design:type", Boolean)
|
|
29
|
+
], VersionDTO.prototype, "yes", void 0);
|