directus-template-cli 0.7.0-beta.1 → 0.7.0-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/bin/dev.js +6 -0
- package/bin/run.js +5 -0
- package/dist/commands/apply.d.ts +17 -17
- package/dist/commands/apply.js +165 -173
- package/dist/commands/base.d.ts +15 -0
- package/dist/commands/base.js +45 -0
- package/dist/commands/extract.d.ts +16 -7
- package/dist/commands/extract.js +81 -73
- package/dist/commands/init.d.ts +21 -15
- package/dist/commands/init.js +209 -155
- package/dist/flags/common.d.ts +8 -7
- package/dist/flags/common.js +13 -11
- package/dist/index.js +1 -5
- package/dist/lib/constants.d.ts +7 -5
- package/dist/lib/constants.js +17 -14
- package/dist/lib/extract/extract-access.js +11 -15
- package/dist/lib/extract/extract-assets.js +20 -25
- package/dist/lib/extract/extract-collections.js +12 -16
- package/dist/lib/extract/extract-content.js +14 -19
- package/dist/lib/extract/extract-dashboards.js +22 -28
- package/dist/lib/extract/extract-extensions.js +12 -16
- package/dist/lib/extract/extract-fields.js +13 -17
- package/dist/lib/extract/extract-files.js +15 -19
- package/dist/lib/extract/extract-flows.js +22 -28
- package/dist/lib/extract/extract-folders.js +15 -19
- package/dist/lib/extract/extract-permissions.js +12 -16
- package/dist/lib/extract/extract-policies.js +12 -16
- package/dist/lib/extract/extract-presets.js +12 -16
- package/dist/lib/extract/extract-relations.js +14 -18
- package/dist/lib/extract/extract-roles.js +15 -19
- package/dist/lib/extract/extract-schema.js +17 -21
- package/dist/lib/extract/extract-settings.js +12 -16
- package/dist/lib/extract/extract-translations.js +12 -16
- package/dist/lib/extract/extract-users.js +15 -19
- package/dist/lib/extract/index.js +47 -51
- package/dist/lib/init/config.d.ts +1 -1
- package/dist/lib/init/config.js +4 -7
- package/dist/lib/init/index.d.ts +10 -9
- package/dist/lib/init/index.js +129 -85
- package/dist/lib/init/types.js +1 -2
- package/dist/lib/load/apply-flags.js +17 -23
- package/dist/lib/load/index.d.ts +1 -12
- package/dist/lib/load/index.js +40 -44
- package/dist/lib/load/load-access.js +15 -20
- package/dist/lib/load/load-collections.js +27 -32
- package/dist/lib/load/load-dashboards.js +19 -25
- package/dist/lib/load/load-data.js +43 -49
- package/dist/lib/load/load-extensions.js +30 -38
- package/dist/lib/load/load-files.js +20 -24
- package/dist/lib/load/load-flows.js +23 -29
- package/dist/lib/load/load-folders.js +16 -20
- package/dist/lib/load/load-permissions.js +13 -17
- package/dist/lib/load/load-policies.js +14 -18
- package/dist/lib/load/load-presets.js +14 -18
- package/dist/lib/load/load-relations.d.ts +2 -0
- package/dist/lib/load/load-relations.js +16 -18
- package/dist/lib/load/load-roles.js +19 -23
- package/dist/lib/load/load-settings.js +18 -21
- package/dist/lib/load/load-translations.js +14 -18
- package/dist/lib/load/load-users.js +21 -25
- package/dist/lib/load/update-required-fields.js +13 -17
- package/dist/lib/sdk.d.ts +1 -2
- package/dist/lib/sdk.js +27 -27
- package/dist/lib/types/extension.js +1 -2
- package/dist/lib/types.d.ts +18 -0
- package/dist/lib/types.js +1 -0
- package/dist/lib/utils/animated-bunny.d.ts +2 -0
- package/dist/lib/utils/animated-bunny.js +62 -0
- package/dist/lib/utils/auth.d.ts +8 -6
- package/dist/lib/utils/auth.js +48 -39
- package/dist/lib/utils/catch-error.js +8 -11
- package/dist/lib/utils/check-template.js +4 -8
- package/dist/lib/utils/chunk-array.js +1 -5
- package/dist/lib/utils/ensure-dir.js +7 -12
- package/dist/lib/utils/filter-fields.js +1 -4
- package/dist/lib/utils/get-role-ids.d.ts +1 -1
- package/dist/lib/utils/get-role-ids.js +7 -12
- package/dist/lib/utils/get-template.js +33 -37
- package/dist/lib/utils/logger.js +11 -13
- package/dist/lib/utils/open-url.js +5 -8
- package/dist/lib/utils/parse-github-url.d.ts +10 -5
- package/dist/lib/utils/parse-github-url.js +80 -45
- package/dist/lib/utils/path.js +6 -10
- package/dist/lib/utils/protected-domains.js +1 -4
- package/dist/lib/utils/read-file.js +8 -12
- package/dist/lib/utils/read-templates.js +9 -15
- package/dist/lib/utils/sanitize-flags.d.ts +3 -0
- package/dist/lib/utils/sanitize-flags.js +4 -0
- package/dist/lib/utils/system-fields.js +19 -22
- package/dist/lib/utils/template-config.d.ts +16 -0
- package/dist/lib/utils/template-config.js +34 -0
- package/dist/lib/utils/template-defaults.d.ts +1 -1
- package/dist/lib/utils/template-defaults.js +5 -14
- package/dist/lib/utils/transform-github-url.js +1 -5
- package/dist/lib/utils/validate-url.js +3 -6
- package/dist/lib/utils/wait.js +1 -5
- package/dist/lib/utils/write-to-file.js +8 -11
- package/dist/services/docker.js +82 -29
- package/dist/services/github.d.ts +1 -1
- package/dist/services/github.js +53 -22
- package/dist/services/posthog.d.ts +37 -0
- package/dist/services/posthog.js +104 -0
- package/oclif.manifest.json +32 -13
- package/package.json +41 -31
- package/bin/dev +0 -17
- package/bin/run +0 -5
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const sdk_2 = require("../sdk");
|
|
8
|
-
const catch_error_1 = tslib_1.__importDefault(require("../utils/catch-error"));
|
|
9
|
-
const write_to_file_1 = tslib_1.__importDefault(require("../utils/write-to-file"));
|
|
1
|
+
import { readFields, readRelations } from '@directus/sdk';
|
|
2
|
+
import { ux } from '@oclif/core';
|
|
3
|
+
import { DIRECTUS_PINK } from '../constants.js';
|
|
4
|
+
import { api } from '../sdk.js';
|
|
5
|
+
import catchError from '../utils/catch-error.js';
|
|
6
|
+
import writeToFile from '../utils/write-to-file.js';
|
|
10
7
|
/**
|
|
11
8
|
* Extract relations from the Directus instance
|
|
12
9
|
*/
|
|
13
|
-
async function extractRelations(dir) {
|
|
14
|
-
|
|
10
|
+
export default async function extractRelations(dir) {
|
|
11
|
+
ux.action.start(ux.colorize(DIRECTUS_PINK, 'Extracting relations'));
|
|
15
12
|
try {
|
|
16
|
-
const response = await
|
|
13
|
+
const response = await api.client.request(readRelations());
|
|
17
14
|
// Fetching fields to filter out system fields while retaining custom fields on system collections
|
|
18
|
-
const fields = await
|
|
19
|
-
const customFields = fields.filter((i) =>
|
|
15
|
+
const fields = await api.client.request(readFields());
|
|
16
|
+
const customFields = fields.filter((i) => !i.meta?.system);
|
|
20
17
|
const relations = response
|
|
21
18
|
// Filter out relations where the collection starts with 'directus_' && the field is not within the customFields array
|
|
22
19
|
.filter((i) => !i.collection.startsWith('directus_', 0)
|
|
@@ -25,11 +22,10 @@ async function extractRelations(dir) {
|
|
|
25
22
|
delete i.meta.id;
|
|
26
23
|
return i;
|
|
27
24
|
});
|
|
28
|
-
await (
|
|
25
|
+
await writeToFile('relations', relations, dir);
|
|
29
26
|
}
|
|
30
27
|
catch (error) {
|
|
31
|
-
(
|
|
28
|
+
catchError(error);
|
|
32
29
|
}
|
|
33
|
-
|
|
30
|
+
ux.action.stop();
|
|
34
31
|
}
|
|
35
|
-
exports.default = extractRelations;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const filter_fields_1 = tslib_1.__importDefault(require("../utils/filter-fields"));
|
|
10
|
-
const system_fields_1 = require("../utils/system-fields");
|
|
11
|
-
const write_to_file_1 = tslib_1.__importDefault(require("../utils/write-to-file"));
|
|
1
|
+
import { readRoles } from '@directus/sdk';
|
|
2
|
+
import { ux } from '@oclif/core';
|
|
3
|
+
import { DIRECTUS_PINK } from '../constants.js';
|
|
4
|
+
import { api } from '../sdk.js';
|
|
5
|
+
import catchError from '../utils/catch-error.js';
|
|
6
|
+
import filterFields from '../utils/filter-fields.js';
|
|
7
|
+
import { directusRoleFields } from '../utils/system-fields.js';
|
|
8
|
+
import writeToFile from '../utils/write-to-file.js';
|
|
12
9
|
/**
|
|
13
10
|
* Extract roles from the API
|
|
14
11
|
*/
|
|
15
|
-
async function extractRoles(dir) {
|
|
16
|
-
|
|
12
|
+
export default async function extractRoles(dir) {
|
|
13
|
+
ux.action.start(ux.colorize(DIRECTUS_PINK, 'Extracting roles'));
|
|
17
14
|
try {
|
|
18
|
-
const response = await
|
|
19
|
-
const roles = (
|
|
20
|
-
await (
|
|
15
|
+
const response = await api.client.request(readRoles({ limit: -1 }));
|
|
16
|
+
const roles = filterFields(response, directusRoleFields);
|
|
17
|
+
await writeToFile('roles', roles, dir);
|
|
21
18
|
}
|
|
22
19
|
catch (error) {
|
|
23
|
-
(
|
|
20
|
+
catchError(error);
|
|
24
21
|
}
|
|
25
|
-
|
|
22
|
+
ux.action.stop();
|
|
26
23
|
}
|
|
27
|
-
exports.default = extractRoles;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const write_to_file_1 = tslib_1.__importDefault(require("../utils/write-to-file"));
|
|
12
|
-
async function extractSchema(dir) {
|
|
13
|
-
core_1.ux.action.start(core_1.ux.colorize(constants_1.DIRECTUS_PINK, 'Extracting schema snapshot'));
|
|
1
|
+
import { schemaSnapshot } from '@directus/sdk';
|
|
2
|
+
import { ux } from '@oclif/core';
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'pathe';
|
|
5
|
+
import { DIRECTUS_PINK } from '../constants.js';
|
|
6
|
+
import { api } from '../sdk.js';
|
|
7
|
+
import catchError from '../utils/catch-error.js';
|
|
8
|
+
import writeToFile from '../utils/write-to-file.js';
|
|
9
|
+
export default async function extractSchema(dir) {
|
|
10
|
+
ux.action.start(ux.colorize(DIRECTUS_PINK, 'Extracting schema snapshot'));
|
|
14
11
|
try {
|
|
15
|
-
const schemaDir =
|
|
16
|
-
if (!
|
|
17
|
-
|
|
12
|
+
const schemaDir = path.join(dir, 'schema');
|
|
13
|
+
if (!fs.existsSync(schemaDir)) {
|
|
14
|
+
fs.mkdirSync(schemaDir, { recursive: true });
|
|
18
15
|
}
|
|
19
|
-
const schema = await
|
|
20
|
-
await (
|
|
16
|
+
const schema = await api.client.request(schemaSnapshot());
|
|
17
|
+
await writeToFile('schema/snapshot', schema, dir);
|
|
21
18
|
}
|
|
22
19
|
catch (error) {
|
|
23
|
-
(
|
|
20
|
+
catchError(error);
|
|
24
21
|
}
|
|
25
|
-
|
|
22
|
+
ux.action.stop();
|
|
26
23
|
}
|
|
27
|
-
exports.default = extractSchema;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const sdk_2 = require("../sdk");
|
|
8
|
-
const catch_error_1 = tslib_1.__importDefault(require("../utils/catch-error"));
|
|
9
|
-
const write_to_file_1 = tslib_1.__importDefault(require("../utils/write-to-file"));
|
|
1
|
+
import { readSettings } from '@directus/sdk';
|
|
2
|
+
import { ux } from '@oclif/core';
|
|
3
|
+
import { DIRECTUS_PINK } from '../constants.js';
|
|
4
|
+
import { api } from '../sdk.js';
|
|
5
|
+
import catchError from '../utils/catch-error.js';
|
|
6
|
+
import writeToFile from '../utils/write-to-file.js';
|
|
10
7
|
/**
|
|
11
8
|
* Extract settings from the Directus instance
|
|
12
9
|
*/
|
|
13
|
-
async function extractSettings(dir) {
|
|
14
|
-
|
|
10
|
+
export default async function extractSettings(dir) {
|
|
11
|
+
ux.action.start(ux.colorize(DIRECTUS_PINK, 'Extracting settings'));
|
|
15
12
|
try {
|
|
16
|
-
const settings = await
|
|
17
|
-
await (
|
|
13
|
+
const settings = await api.client.request(readSettings({ limit: -1 }));
|
|
14
|
+
await writeToFile('settings', settings, dir);
|
|
18
15
|
}
|
|
19
16
|
catch (error) {
|
|
20
|
-
(
|
|
17
|
+
catchError(error);
|
|
21
18
|
}
|
|
22
|
-
|
|
19
|
+
ux.action.stop();
|
|
23
20
|
}
|
|
24
|
-
exports.default = extractSettings;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const sdk_2 = require("../sdk");
|
|
8
|
-
const catch_error_1 = tslib_1.__importDefault(require("../utils/catch-error"));
|
|
9
|
-
const write_to_file_1 = tslib_1.__importDefault(require("../utils/write-to-file"));
|
|
1
|
+
import { readTranslations } from '@directus/sdk';
|
|
2
|
+
import { ux } from '@oclif/core';
|
|
3
|
+
import { DIRECTUS_PINK } from '../constants.js';
|
|
4
|
+
import { api } from '../sdk.js';
|
|
5
|
+
import catchError from '../utils/catch-error.js';
|
|
6
|
+
import writeToFile from '../utils/write-to-file.js';
|
|
10
7
|
/**
|
|
11
8
|
* Extract translations from the Directus instance
|
|
12
9
|
*/
|
|
13
|
-
async function extractTranslations(dir) {
|
|
14
|
-
|
|
10
|
+
export default async function extractTranslations(dir) {
|
|
11
|
+
ux.action.start(ux.colorize(DIRECTUS_PINK, 'Extracting translations'));
|
|
15
12
|
try {
|
|
16
|
-
const translations = await
|
|
17
|
-
await (
|
|
13
|
+
const translations = await api.client.request(readTranslations({ limit: -1 }));
|
|
14
|
+
await writeToFile('translations', translations, dir);
|
|
18
15
|
}
|
|
19
16
|
catch (error) {
|
|
20
|
-
(
|
|
17
|
+
catchError(error);
|
|
21
18
|
}
|
|
22
|
-
|
|
19
|
+
ux.action.stop();
|
|
23
20
|
}
|
|
24
|
-
exports.default = extractTranslations;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const filter_fields_1 = tslib_1.__importDefault(require("../utils/filter-fields"));
|
|
10
|
-
const system_fields_1 = require("../utils/system-fields");
|
|
11
|
-
const write_to_file_1 = tslib_1.__importDefault(require("../utils/write-to-file"));
|
|
1
|
+
import { readUsers } from '@directus/sdk';
|
|
2
|
+
import { ux } from '@oclif/core';
|
|
3
|
+
import { DIRECTUS_PINK } from '../constants.js';
|
|
4
|
+
import { api } from '../sdk.js';
|
|
5
|
+
import catchError from '../utils/catch-error.js';
|
|
6
|
+
import filterFields from '../utils/filter-fields.js';
|
|
7
|
+
import { directusUserFields } from '../utils/system-fields.js';
|
|
8
|
+
import writeToFile from '../utils/write-to-file.js';
|
|
12
9
|
/**
|
|
13
10
|
* Extract users from the Directus instance
|
|
14
11
|
*/
|
|
15
|
-
async function extractUsers(dir) {
|
|
16
|
-
|
|
12
|
+
export default async function extractUsers(dir) {
|
|
13
|
+
ux.action.start(ux.colorize(DIRECTUS_PINK, 'Extracting users'));
|
|
17
14
|
try {
|
|
18
|
-
const response = await
|
|
19
|
-
const users = (
|
|
20
|
-
await (
|
|
15
|
+
const response = await api.client.request(readUsers({ limit: -1 }));
|
|
16
|
+
const users = filterFields(response, directusUserFields);
|
|
17
|
+
await writeToFile('users', users, dir);
|
|
21
18
|
}
|
|
22
19
|
catch (error) {
|
|
23
|
-
(
|
|
20
|
+
catchError(error);
|
|
24
21
|
}
|
|
25
|
-
|
|
22
|
+
ux.action.stop();
|
|
26
23
|
}
|
|
27
|
-
exports.default = extractUsers;
|
|
@@ -1,56 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const extract_translations_1 = tslib_1.__importDefault(require("./extract-translations"));
|
|
24
|
-
const extract_users_1 = tslib_1.__importDefault(require("./extract-users"));
|
|
25
|
-
async function extract(dir) {
|
|
1
|
+
import { ux } from '@oclif/core';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import extractAccess from './extract-access.js';
|
|
4
|
+
import { downloadAllFiles } from './extract-assets.js';
|
|
5
|
+
import extractCollections from './extract-collections.js';
|
|
6
|
+
import { extractContent } from './extract-content.js';
|
|
7
|
+
import { extractDashboards, extractPanels } from './extract-dashboards.js';
|
|
8
|
+
import extractExtensions from './extract-extensions.js';
|
|
9
|
+
import extractFields from './extract-fields.js';
|
|
10
|
+
import extractFiles from './extract-files.js';
|
|
11
|
+
import { extractFlows, extractOperations } from './extract-flows.js';
|
|
12
|
+
import extractFolders from './extract-folders.js';
|
|
13
|
+
import extractPermissions from './extract-permissions.js';
|
|
14
|
+
import extractPolicies from './extract-policies.js';
|
|
15
|
+
import extractPresets from './extract-presets.js';
|
|
16
|
+
import extractRelations from './extract-relations.js';
|
|
17
|
+
import extractRoles from './extract-roles.js';
|
|
18
|
+
import extractSchema from './extract-schema.js';
|
|
19
|
+
import extractSettings from './extract-settings.js';
|
|
20
|
+
import extractTranslations from './extract-translations.js';
|
|
21
|
+
import extractUsers from './extract-users.js';
|
|
22
|
+
export default async function extract(dir) {
|
|
26
23
|
// Get the destination directory for the actual files
|
|
27
|
-
const destination = dir
|
|
24
|
+
const destination = `${dir}/src`;
|
|
28
25
|
// Check if directory exists, if not, then create it.
|
|
29
|
-
if (!
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
if (!fs.existsSync(destination)) {
|
|
27
|
+
ux.stdout(`Attempting to create directory at: ${destination}`);
|
|
28
|
+
fs.mkdirSync(destination, { recursive: true });
|
|
32
29
|
}
|
|
33
|
-
await (
|
|
34
|
-
await (
|
|
35
|
-
await (
|
|
36
|
-
await (
|
|
37
|
-
await (
|
|
38
|
-
await (
|
|
39
|
-
await (
|
|
40
|
-
await (
|
|
41
|
-
await (
|
|
42
|
-
await (
|
|
43
|
-
await (
|
|
44
|
-
await (
|
|
45
|
-
await (
|
|
46
|
-
await
|
|
47
|
-
await
|
|
48
|
-
await
|
|
49
|
-
await
|
|
50
|
-
await (
|
|
51
|
-
await (
|
|
52
|
-
await
|
|
53
|
-
await
|
|
30
|
+
await extractSchema(destination);
|
|
31
|
+
await extractCollections(destination);
|
|
32
|
+
await extractFields(destination);
|
|
33
|
+
await extractRelations(destination);
|
|
34
|
+
await extractFolders(destination);
|
|
35
|
+
await extractFiles(destination);
|
|
36
|
+
await extractUsers(destination);
|
|
37
|
+
await extractRoles(destination);
|
|
38
|
+
await extractPermissions(destination);
|
|
39
|
+
await extractPolicies(destination);
|
|
40
|
+
await extractAccess(destination);
|
|
41
|
+
await extractPresets(destination);
|
|
42
|
+
await extractTranslations(destination);
|
|
43
|
+
await extractFlows(destination);
|
|
44
|
+
await extractOperations(destination);
|
|
45
|
+
await extractDashboards(destination);
|
|
46
|
+
await extractPanels(destination);
|
|
47
|
+
await extractSettings(destination);
|
|
48
|
+
await extractExtensions(destination);
|
|
49
|
+
await extractContent(destination);
|
|
50
|
+
await downloadAllFiles(destination);
|
|
54
51
|
return {};
|
|
55
52
|
}
|
|
56
|
-
exports.default = extract;
|
package/dist/lib/init/config.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DOCKER_CONFIG = exports.DIRECTUS_CONFIG = void 0;
|
|
4
|
-
exports.DIRECTUS_CONFIG = {
|
|
1
|
+
export const DIRECTUS_CONFIG = {
|
|
5
2
|
adminEmail: 'admin@example.com',
|
|
6
3
|
adminPassword: 'd1r3ctu5',
|
|
7
4
|
port: 8055,
|
|
8
5
|
url: 'http://localhost',
|
|
9
6
|
};
|
|
10
|
-
|
|
7
|
+
export const DOCKER_CONFIG = {
|
|
11
8
|
composeFile: 'docker-compose.yml',
|
|
12
|
-
healthCheckEndpoint: '/server/
|
|
13
|
-
interval:
|
|
9
|
+
healthCheckEndpoint: '/server/info',
|
|
10
|
+
interval: 3000,
|
|
14
11
|
maxAttempts: 30,
|
|
15
12
|
};
|
package/dist/lib/init/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { type DownloadTemplateResult } from 'giget';
|
|
2
|
+
import type { InitFlags } from '../../commands/init.js';
|
|
3
|
+
export declare function init({ dir, flags }: {
|
|
4
|
+
dir: string;
|
|
5
|
+
flags: InitFlags;
|
|
6
|
+
}): Promise<{
|
|
7
|
+
directusDir: string;
|
|
8
|
+
frontendDir: string;
|
|
9
|
+
template: DownloadTemplateResult;
|
|
10
|
+
}>;
|