create-manifest 1.1.3 → 1.1.4
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/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.js +4 -3
- package/oclif.manifest.json +35 -2
- package/package.json +5 -3
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
|
-
export
|
|
2
|
+
export default class CreateManifest extends Command {
|
|
3
|
+
static description: string;
|
|
3
4
|
static args: {
|
|
4
5
|
firstArg: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
5
6
|
};
|
package/dist/commands/index.js
CHANGED
|
@@ -16,7 +16,8 @@ import { getLatestPackageVersion } from '../utils/GetLatestPackageVersion.js';
|
|
|
16
16
|
import { getBackendFileContent } from '../utils/GetBackendFileContent.js';
|
|
17
17
|
import { input } from '@inquirer/prompts';
|
|
18
18
|
const exec = promisify(execCp);
|
|
19
|
-
export class
|
|
19
|
+
export default class CreateManifest extends Command {
|
|
20
|
+
static description = 'Create a new Manifest project with the default files and folders.';
|
|
20
21
|
static args = {
|
|
21
22
|
firstArg: Args.string({
|
|
22
23
|
name: 'name',
|
|
@@ -51,7 +52,7 @@ export class MyCommand extends Command {
|
|
|
51
52
|
*/
|
|
52
53
|
async run() {
|
|
53
54
|
// * 1 Create a folder named after the first argument or ask for it.
|
|
54
|
-
const { argv } = await this.parse(
|
|
55
|
+
const { argv } = await this.parse(CreateManifest);
|
|
55
56
|
let projectName = argv[0];
|
|
56
57
|
if (!projectName) {
|
|
57
58
|
projectName = await input({
|
|
@@ -89,7 +90,7 @@ export class MyCommand extends Command {
|
|
|
89
90
|
// Path where the new file should be created
|
|
90
91
|
const newFilePath = path.join(manifestFolderPath, initialFileName);
|
|
91
92
|
// Get the content of the file either remote or local.
|
|
92
|
-
const { flags } = await this.parse(
|
|
93
|
+
const { flags } = await this.parse(CreateManifest);
|
|
93
94
|
const remoteBackendFile = flags.backendFile;
|
|
94
95
|
const content = await getBackendFileContent(path.join(assetFolderPath, initialFileName), remoteBackendFile);
|
|
95
96
|
// Write the content to the new file
|
package/oclif.manifest.json
CHANGED
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commands": {
|
|
3
|
-
|
|
2
|
+
"commands": {
|
|
3
|
+
"Symbol(SINGLE_COMMAND_CLI)": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {
|
|
6
|
+
"firstArg": {
|
|
7
|
+
"description": "The name for the new workspace and the initial project. It will be used for the root directory.",
|
|
8
|
+
"name": "firstArg"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"description": "Create a new Manifest project with the default files and folders.",
|
|
12
|
+
"flags": {
|
|
13
|
+
"backendFile": {
|
|
14
|
+
"name": "backendFile",
|
|
15
|
+
"summary": "The remote file to use as a template for the backend.yml file. If not provided, the default file will be used.",
|
|
16
|
+
"hasDynamicHelp": false,
|
|
17
|
+
"multiple": false,
|
|
18
|
+
"type": "option"
|
|
19
|
+
},
|
|
20
|
+
"cursor": {
|
|
21
|
+
"name": "cursor",
|
|
22
|
+
"allowNo": false,
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"hasDynamicHelp": false,
|
|
27
|
+
"hiddenAliases": [],
|
|
28
|
+
"id": "Symbol(SINGLE_COMMAND_CLI)",
|
|
29
|
+
"pluginAlias": "create-manifest",
|
|
30
|
+
"pluginName": "create-manifest",
|
|
31
|
+
"pluginType": "core",
|
|
32
|
+
"strict": true,
|
|
33
|
+
"enableJsonFlag": false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"version": "1.1.4"
|
|
4
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-manifest",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"author": "Manifest",
|
|
5
5
|
"description": "Create a new Manifest backend",
|
|
6
6
|
"homepage": "https://manifest.build",
|
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
"oclif": {
|
|
21
21
|
"bin": "create-manifest",
|
|
22
22
|
"dirname": "create-manifest",
|
|
23
|
-
"
|
|
24
|
-
|
|
23
|
+
"commands": {
|
|
24
|
+
"strategy": "single",
|
|
25
|
+
"target": "./dist/commands/index.js"
|
|
26
|
+
}
|
|
25
27
|
},
|
|
26
28
|
"plugins": [
|
|
27
29
|
"@oclif/plugin-help",
|