contensis-cli 1.1.2-beta.10 → 1.1.2-beta.11
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/create.js +1 -1
- package/dist/commands/create.js.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/create.ts +1 -1
- package/src/version.ts +1 -1
package/dist/commands/create.js
CHANGED
|
@@ -28,7 +28,7 @@ const makeCreateCommand = () => {
|
|
|
28
28
|
const create = new import_commander.Command().command("create").description("create command").addHelpText("after", `
|
|
29
29
|
`).showHelpAfterError(true).exitOverride();
|
|
30
30
|
create.command("project").description("create a new project").argument("<projectId>", "the id of the project to create").argument("<name>", "the name of the project to create").argument("[description]", "optional description of the project").option(
|
|
31
|
-
"-l --language",
|
|
31
|
+
"-l --language <language>",
|
|
32
32
|
"the default language of the project to create",
|
|
33
33
|
"en-GB"
|
|
34
34
|
).option(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/commands/create.ts"],
|
|
4
|
-
"sourcesContent": ["import { Command } from 'commander';\nimport { Project } from 'contensis-core-api';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { shell } from '~/shell';\n\nexport const makeCreateCommand = () => {\n const create = new Command()\n .command('create')\n .description('create command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n create\n .command('project')\n .description('create a new project')\n .argument('<projectId>', 'the id of the project to create')\n .argument('<name>', 'the name of the project to create')\n .argument('[description]', 'optional description of the project')\n .option(\n '-l --language',\n 'the default language of the project to create',\n 'en-GB'\n )\n .option(\n '-langs --supported-languages <langs...>',\n 'space separated list of other supported languages'\n )\n .usage(\n 'projectId \"Project name\" [\"Description of project\"] --language en-GB --supported-languages es-ES de-DE nl-NL'\n )\n .addHelpText('after', `\\n`)\n .action(\n async (projectId: string, name: string, description = '', opts: any) => {\n const createProject: Project = {\n id: projectId,\n name,\n description,\n primaryLanguage: opts.language,\n supportedLanguages: opts.supportedLanguages || [],\n };\n\n const project = await cliCommand(\n ['create', 'project', projectId],\n opts\n ).CreateProject(createProject);\n if (project) await shell().restart();\n }\n );\n\n create\n .command('key')\n .description('create a new api key')\n .argument('<\"key name\">', 'the name of the key to create')\n .argument('[\"description\"]', 'provide a description for the key (optional)')\n .usage('<\"key name\"> [\"description\"] (both args in \"double quotes\")')\n .addHelpText(\n 'after',\n `\nExample call:\n > create key \"my new key\" \"Created key for demonstration\"\\n`\n )\n .action(async (name: string, description: string, opts: any) => {\n await cliCommand(['create', 'key', name], opts).CreateApiKey(\n name,\n description\n );\n });\n\n create\n .command('role')\n .description('create a new role')\n .argument('<\"Role name\">', 'the name of the role to create')\n .argument('[\"Role description\">', 'the description of the role')\n .option('--disabled', 'do not enable the created role', false)\n .addHelpText(\n 'after',\n `\nExample call:\n > create role \"My role\" \"This role is for testing\" --disabled \\n`\n )\n .action(async (roleName: string, description: string, opts) => {\n await cliCommand(['create', 'role', roleName], opts).CreateRole({\n name: roleName,\n description,\n enabled: !opts.disabled,\n assignments: { apiKeys: [], groups: [], users: [] },\n permissions: { contentTypes: [], entries: [] },\n });\n });\n\n return create;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { Command } from 'commander';\nimport { Project } from 'contensis-core-api';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { shell } from '~/shell';\n\nexport const makeCreateCommand = () => {\n const create = new Command()\n .command('create')\n .description('create command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n create\n .command('project')\n .description('create a new project')\n .argument('<projectId>', 'the id of the project to create')\n .argument('<name>', 'the name of the project to create')\n .argument('[description]', 'optional description of the project')\n .option(\n '-l --language <language>',\n 'the default language of the project to create',\n 'en-GB'\n )\n .option(\n '-langs --supported-languages <langs...>',\n 'space separated list of other supported languages'\n )\n .usage(\n 'projectId \"Project name\" [\"Description of project\"] --language en-GB --supported-languages es-ES de-DE nl-NL'\n )\n .addHelpText('after', `\\n`)\n .action(\n async (projectId: string, name: string, description = '', opts: any) => {\n const createProject: Project = {\n id: projectId,\n name,\n description,\n primaryLanguage: opts.language,\n supportedLanguages: opts.supportedLanguages || [],\n };\n\n const project = await cliCommand(\n ['create', 'project', projectId],\n opts\n ).CreateProject(createProject);\n if (project) await shell().restart();\n }\n );\n\n create\n .command('key')\n .description('create a new api key')\n .argument('<\"key name\">', 'the name of the key to create')\n .argument('[\"description\"]', 'provide a description for the key (optional)')\n .usage('<\"key name\"> [\"description\"] (both args in \"double quotes\")')\n .addHelpText(\n 'after',\n `\nExample call:\n > create key \"my new key\" \"Created key for demonstration\"\\n`\n )\n .action(async (name: string, description: string, opts: any) => {\n await cliCommand(['create', 'key', name], opts).CreateApiKey(\n name,\n description\n );\n });\n\n create\n .command('role')\n .description('create a new role')\n .argument('<\"Role name\">', 'the name of the role to create')\n .argument('[\"Role description\">', 'the description of the role')\n .option('--disabled', 'do not enable the created role', false)\n .addHelpText(\n 'after',\n `\nExample call:\n > create role \"My role\" \"This role is for testing\" --disabled \\n`\n )\n .action(async (roleName: string, description: string, opts) => {\n await cliCommand(['create', 'role', roleName], opts).CreateRole({\n name: roleName,\n description,\n enabled: !opts.disabled,\n assignments: { apiKeys: [], groups: [], users: [] },\n permissions: { contentTypes: [], entries: [] },\n });\n });\n\n return create;\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AAExB,iCAA2B;AAC3B,mBAAsB;AAEf,MAAM,oBAAoB,MAAM;AACrC,QAAM,SAAS,IAAI,yBAAQ,EACxB,QAAQ,QAAQ,EAChB,YAAY,gBAAgB,EAC5B,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,SACG,QAAQ,SAAS,EACjB,YAAY,sBAAsB,EAClC,SAAS,eAAe,iCAAiC,EACzD,S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A,SAAS,CAAC,KAAK;AAAA,MACf,aAAa,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,GAAG,OAAO,CAAC,EAAE;AAAA,MAClD,aAAa,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,EAAE;AAAA,IAC/C,CAAC;AAAA,EACH,CAAC;AAEH,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/version.js
CHANGED
|
@@ -21,7 +21,7 @@ __export(version_exports, {
|
|
|
21
21
|
LIB_VERSION: () => LIB_VERSION
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(version_exports);
|
|
24
|
-
const LIB_VERSION = "1.1.2-beta.
|
|
24
|
+
const LIB_VERSION = "1.1.2-beta.11";
|
|
25
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
26
|
0 && (module.exports = {
|
|
27
27
|
LIB_VERSION
|
package/dist/version.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/version.ts"],
|
|
4
|
-
"sourcesContent": ["export const LIB_VERSION = \"1.1.2-beta.
|
|
4
|
+
"sourcesContent": ["export const LIB_VERSION = \"1.1.2-beta.11\";\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contensis-cli",
|
|
3
|
-
"version": "1.1.2-beta.
|
|
3
|
+
"version": "1.1.2-beta.11",
|
|
4
4
|
"description": "A fully featured Contensis command line interface with a shell UI provides simple and intuitive ways to manage or profile your content in any NodeJS terminal.",
|
|
5
5
|
"repository": "https://github.com/contensis/cli",
|
|
6
6
|
"homepage": "https://github.com/contensis/cli/tree/main/packages/contensis-cli#readme",
|
package/src/commands/create.ts
CHANGED
|
@@ -18,7 +18,7 @@ export const makeCreateCommand = () => {
|
|
|
18
18
|
.argument('<name>', 'the name of the project to create')
|
|
19
19
|
.argument('[description]', 'optional description of the project')
|
|
20
20
|
.option(
|
|
21
|
-
'-l --language',
|
|
21
|
+
'-l --language <language>',
|
|
22
22
|
'the default language of the project to create',
|
|
23
23
|
'en-GB'
|
|
24
24
|
)
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "1.1.2-beta.
|
|
1
|
+
export const LIB_VERSION = "1.1.2-beta.11";
|