docula 0.3.1 → 0.3.2

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.
Files changed (94) hide show
  1. package/README.md +1 -1
  2. package/package.json +14 -13
  3. package/dist/config.d.ts +0 -21
  4. package/dist/config.d.ts.map +0 -1
  5. package/dist/config.js +0 -78
  6. package/dist/config.js.map +0 -1
  7. package/dist/docula-plugin.d.ts +0 -9
  8. package/dist/docula-plugin.d.ts.map +0 -1
  9. package/dist/docula-plugin.js +0 -2
  10. package/dist/docula-plugin.js.map +0 -1
  11. package/dist/docula.d.ts +0 -22
  12. package/dist/docula.d.ts.map +0 -1
  13. package/dist/docula.js +0 -190
  14. package/dist/docula.js.map +0 -1
  15. package/dist/eleventy/filters.d.ts +0 -2
  16. package/dist/eleventy/filters.d.ts.map +0 -1
  17. package/dist/eleventy/filters.js +0 -10
  18. package/dist/eleventy/filters.js.map +0 -1
  19. package/dist/eleventy/global-data.d.ts +0 -3
  20. package/dist/eleventy/global-data.d.ts.map +0 -1
  21. package/dist/eleventy/global-data.js +0 -2
  22. package/dist/eleventy/global-data.js.map +0 -1
  23. package/dist/eleventy/shortcodes.d.ts +0 -4
  24. package/dist/eleventy/shortcodes.d.ts.map +0 -1
  25. package/dist/eleventy/shortcodes.js +0 -18
  26. package/dist/eleventy/shortcodes.js.map +0 -1
  27. package/dist/eleventy.d.ts +0 -24
  28. package/dist/eleventy.d.ts.map +0 -1
  29. package/dist/eleventy.js +0 -80
  30. package/dist/eleventy.js.map +0 -1
  31. package/dist/index.d.ts +0 -9
  32. package/dist/index.d.ts.map +0 -1
  33. package/dist/index.js +0 -53
  34. package/dist/index.js.map +0 -1
  35. package/dist/logger.d.ts +0 -4
  36. package/dist/logger.d.ts.map +0 -1
  37. package/dist/logger.js +0 -20
  38. package/dist/logger.js.map +0 -1
  39. package/dist/plugins/algolia.d.ts +0 -21
  40. package/dist/plugins/algolia.d.ts.map +0 -1
  41. package/dist/plugins/algolia.js +0 -53
  42. package/dist/plugins/algolia.js.map +0 -1
  43. package/dist/plugins/github.d.ts +0 -16
  44. package/dist/plugins/github.d.ts.map +0 -1
  45. package/dist/plugins/github.js +0 -68
  46. package/dist/plugins/github.js.map +0 -1
  47. package/dist/plugins/index.d.ts +0 -18
  48. package/dist/plugins/index.d.ts.map +0 -1
  49. package/dist/plugins/index.js +0 -16
  50. package/dist/plugins/index.js.map +0 -1
  51. package/dist/plugins/npm.d.ts +0 -14
  52. package/dist/plugins/npm.d.ts.map +0 -1
  53. package/dist/plugins/npm.js +0 -36
  54. package/dist/plugins/npm.js.map +0 -1
  55. package/dist/plugins/pagefind.d.ts +0 -10
  56. package/dist/plugins/pagefind.d.ts.map +0 -1
  57. package/dist/plugins/pagefind.js +0 -22
  58. package/dist/plugins/pagefind.js.map +0 -1
  59. package/dist/plugins/robots.d.ts +0 -14
  60. package/dist/plugins/robots.d.ts.map +0 -1
  61. package/dist/plugins/robots.js +0 -34
  62. package/dist/plugins/robots.js.map +0 -1
  63. package/dist/plugins/sitemap.d.ts +0 -11
  64. package/dist/plugins/sitemap.d.ts.map +0 -1
  65. package/dist/plugins/sitemap.js +0 -26
  66. package/dist/plugins/sitemap.js.map +0 -1
  67. package/dist/schemas.d.ts +0 -21
  68. package/dist/schemas.d.ts.map +0 -1
  69. package/dist/schemas.js +0 -25
  70. package/dist/schemas.js.map +0 -1
  71. package/dist/tools/__mocks__/inquirer-prompt.d.ts +0 -20
  72. package/dist/tools/__mocks__/inquirer-prompt.d.ts.map +0 -1
  73. package/dist/tools/__mocks__/inquirer-prompt.js +0 -19
  74. package/dist/tools/__mocks__/inquirer-prompt.js.map +0 -1
  75. package/dist/tools/__mocks__/path.d.ts +0 -5
  76. package/dist/tools/__mocks__/path.d.ts.map +0 -1
  77. package/dist/tools/__mocks__/path.js +0 -7
  78. package/dist/tools/__mocks__/path.js.map +0 -1
  79. package/dist/tools/inquirer-prompt.d.ts +0 -11
  80. package/dist/tools/inquirer-prompt.d.ts.map +0 -1
  81. package/dist/tools/inquirer-prompt.js +0 -139
  82. package/dist/tools/inquirer-prompt.js.map +0 -1
  83. package/dist/tools/path.d.ts +0 -4
  84. package/dist/tools/path.d.ts.map +0 -1
  85. package/dist/tools/path.js +0 -6
  86. package/dist/tools/path.js.map +0 -1
  87. package/dist/tools/tools.d.ts +0 -3
  88. package/dist/tools/tools.d.ts.map +0 -1
  89. package/dist/tools/tools.js +0 -10
  90. package/dist/tools/tools.js.map +0 -1
  91. package/dist/types/config.d.ts +0 -8
  92. package/dist/types/config.d.ts.map +0 -1
  93. package/dist/types/config.js +0 -2
  94. package/dist/types/config.js.map +0 -1
@@ -1,19 +0,0 @@
1
- export const getGithubInfo = jest.fn(() => ({
2
- author: 'jaredwray',
3
- repo: 'docula',
4
- }));
5
- export const validateUrl = jest.fn(() => true);
6
- export const getSiteUrl = jest.fn(() => 'https://www.example.com');
7
- export const getUserPlugins = jest.fn(() => ({
8
- plugins: ['robots.txt', 'npm'],
9
- }));
10
- export const setPlugins = jest.fn(() => ({
11
- siteUrl: 'https://www.example.com',
12
- searchEngine: 'pagefind',
13
- plugins: ['github'],
14
- github: {
15
- author: 'jaredwray',
16
- repo: 'docula',
17
- },
18
- }));
19
- //# sourceMappingURL=inquirer-prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inquirer-prompt.js","sourceRoot":"","sources":["../../../src/tools/__mocks__/inquirer-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IAC3C,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,QAAQ;CACd,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC,CAAC;AAEnE,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5C,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC;CAC9B,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IACxC,OAAO,EAAE,yBAAyB;IAClC,YAAY,EAAE,UAAU;IACxB,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,MAAM,EAAE;QACP,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,QAAQ;KACd;CACD,CAAC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- /// <reference types="jest" />
2
- export declare const getFileName: jest.Mock<string, [], any>;
3
- export declare const getConfigPath: jest.Mock<string, [], any>;
4
- export declare const getSitePath: jest.Mock<string, [], any>;
5
- //# sourceMappingURL=path.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/tools/__mocks__/path.ts"],"names":[],"mappings":";AACA,eAAO,MAAM,WAAW,4BAA2B,CAAC;AAEpD,eAAO,MAAM,aAAa,4BAA+D,CAAC;AAE1F,eAAO,MAAM,WAAW,4BAAmD,CAAC"}
@@ -1,7 +0,0 @@
1
- // eslint-disable-next-line unicorn/prefer-module
2
- export const getFileName = jest.fn(() => __dirname);
3
- // eslint-disable-next-line n/prefer-global/process
4
- export const getConfigPath = jest.fn(() => `${process.cwd()}/test/data/site/config.json`);
5
- // eslint-disable-next-line n/prefer-global/process
6
- export const getSitePath = jest.fn(() => `${process.cwd()}/test/data/site`);
7
- //# sourceMappingURL=path.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/tools/__mocks__/path.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AACpD,mDAAmD;AACnD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,6BAA6B,CAAC,CAAC;AAC1F,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- export declare const getGithubInfo: () => Promise<Record<string, string>>;
2
- export declare const validateUrl: (value: string) => boolean | string;
3
- export declare const getSiteUrl: () => Promise<string>;
4
- export declare const getUserPlugins: () => Promise<string[]>;
5
- export declare const getSearchEngine: () => Promise<'algolia' | 'pagefind'>;
6
- export declare const getAlgoliaInfo: () => Promise<Record<string, string>>;
7
- export declare const getSiteType: () => Promise<'landing' | 'multipage'>;
8
- export declare const buildLandingPage: () => Promise<Record<string, unknown>>;
9
- export declare const buildMultipageSite: () => Promise<Record<string, unknown>>;
10
- export declare const setPlugins: () => Promise<Record<string, unknown>>;
11
- //# sourceMappingURL=inquirer-prompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inquirer-prompt.d.ts","sourceRoot":"","sources":["../../src/tools/inquirer-prompt.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,QAAa,QAAQ,OAAO,MAAM,EAAE,MAAM,CAAC,CAUnE,CAAC;AAEH,eAAO,MAAM,WAAW,UAAW,MAAM,KAAG,OAAO,GAAG,MAOrD,CAAC;AAEF,eAAO,MAAM,UAAU,QAAa,QAAQ,MAAM,CAUjD,CAAC;AAEF,eAAO,MAAM,cAAc,QAAa,QAAQ,MAAM,EAAE,CAqBvD,CAAC;AAEF,eAAO,MAAM,eAAe,QAAa,QAAQ,SAAS,GAAG,UAAU,CActE,CAAC;AAEF,eAAO,MAAM,cAAc,QAAa,QAAQ,OAAO,MAAM,EAAE,MAAM,CAAC,CAgBpE,CAAC;AAEH,eAAO,MAAM,WAAW,QAAa,QAAQ,SAAS,GAAG,WAAW,CAcnE,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,CAcxE,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAAa,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,CAsB1E,CAAC;AAEF,eAAO,MAAM,UAAU,QAAa,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,CAKlE,CAAC"}
@@ -1,139 +0,0 @@
1
- import inquirer from 'inquirer';
2
- import { urlRegex } from './tools.js';
3
- export const getGithubInfo = async () => inquirer.prompt([
4
- {
5
- type: 'input',
6
- name: 'author',
7
- message: 'What is your GitHub username?',
8
- }, {
9
- type: 'input',
10
- name: 'repo',
11
- message: 'What is your GitHub repository\'s name?',
12
- },
13
- ]);
14
- export const validateUrl = (value) => {
15
- const trimmed = value.trim();
16
- if (trimmed.length > 0 && urlRegex.test(trimmed)) {
17
- return true;
18
- }
19
- return 'Please enter a complete URL.';
20
- };
21
- export const getSiteUrl = async () => {
22
- const siteAnswer = await inquirer.prompt([
23
- {
24
- type: 'input',
25
- name: 'url',
26
- message: 'What is the URL of your site?',
27
- validate: validateUrl,
28
- },
29
- ]);
30
- return siteAnswer.url;
31
- };
32
- export const getUserPlugins = async () => {
33
- const userPlugins = await inquirer.prompt([
34
- {
35
- type: 'checkbox',
36
- name: 'plugins',
37
- message: 'Select the plugins you want to use',
38
- choices: [
39
- {
40
- name: 'github',
41
- value: 'github',
42
- }, {
43
- name: 'robots.txt',
44
- value: 'robots',
45
- }, {
46
- name: 'sitemap.xml',
47
- value: 'sitemap',
48
- },
49
- ],
50
- },
51
- ]);
52
- return userPlugins.plugins;
53
- };
54
- export const getSearchEngine = async () => {
55
- const searchEngine = await inquirer.prompt([
56
- {
57
- type: 'list',
58
- name: 'engine',
59
- message: 'Which search engine do you want to use?',
60
- choices: ['Algolia', 'Pagefind'],
61
- default: 'Pagefind',
62
- filter(value) {
63
- return value.toLowerCase();
64
- },
65
- },
66
- ]);
67
- return searchEngine.engine;
68
- };
69
- export const getAlgoliaInfo = async () => inquirer.prompt([
70
- {
71
- type: 'input',
72
- name: 'appId',
73
- message: 'What is your Algolia application ID?',
74
- },
75
- {
76
- type: 'input',
77
- name: 'apiKey',
78
- message: 'What is your Algolia API key?',
79
- },
80
- {
81
- type: 'input',
82
- name: 'indexName',
83
- message: 'What is your Algolia index name?',
84
- },
85
- ]);
86
- export const getSiteType = async () => {
87
- const siteType = await inquirer.prompt([
88
- {
89
- type: 'list',
90
- name: 'type',
91
- message: 'What type of site do you want to build?',
92
- choices: ['Landing', 'Multi page'],
93
- default: 'Multi page',
94
- filter(value) {
95
- return value.toLowerCase();
96
- },
97
- },
98
- ]);
99
- return siteType.type;
100
- };
101
- export const buildLandingPage = async () => {
102
- let githubInfo;
103
- const siteUrl = await getSiteUrl();
104
- const plugins = await getUserPlugins();
105
- if (plugins.includes('github')) {
106
- githubInfo = await getGithubInfo();
107
- }
108
- return {
109
- siteUrl,
110
- plugins,
111
- ...(githubInfo && { github: githubInfo }),
112
- };
113
- };
114
- export const buildMultipageSite = async () => {
115
- let githubInfo;
116
- let algoliaInfo;
117
- const siteUrl = await getSiteUrl();
118
- const searchEngine = await getSearchEngine();
119
- const plugins = await getUserPlugins();
120
- if (searchEngine === 'algolia') {
121
- algoliaInfo = await getAlgoliaInfo();
122
- }
123
- if (plugins.includes('github')) {
124
- githubInfo = await getGithubInfo();
125
- }
126
- return {
127
- siteUrl,
128
- searchEngine,
129
- plugins: [...plugins, searchEngine],
130
- ...(githubInfo && { github: githubInfo }),
131
- ...(algoliaInfo && { algolia: algoliaInfo }),
132
- };
133
- };
134
- export const setPlugins = async () => {
135
- const siteType = await getSiteType();
136
- const config = await (siteType.includes('landing') ? buildLandingPage() : buildMultipageSite());
137
- return { siteType, ...config };
138
- };
139
- //# sourceMappingURL=inquirer-prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inquirer-prompt.js","sourceRoot":"","sources":["../../src/tools/inquirer-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,IAAqC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;IACzF;QACC,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,+BAA+B;KACxC,EAAE;QACF,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,yCAAyC;KAClD;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAoB,EAAE;IAC9D,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;QACjD,OAAO,IAAI,CAAC;KACZ;IAED,OAAO,8BAA8B,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,IAAqB,EAAE;IACrD,MAAM,UAAU,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QACxC;YACC,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,+BAA+B;YACxC,QAAQ,EAAE,WAAW;SACrB;KACD,CAAC,CAAC;IACH,OAAO,UAAU,CAAC,GAAG,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,IAAuB,EAAE;IAC3D,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QACzC;YACC,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,SAAS;YAC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G,CAAC,UAAU,IAAI,EAAC,MAAM,EAAE,UAAU,EAAC,CAAC;QACvC,GAAG,CAAC,WAAW,IAAI,EAAC,OAAO,EAAE,WAAW,EAAC,CAAC;KAC1C,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,IAAsC,EAAE;IACtE,MAAM,QAAQ,GAAG,MAAM,WAAW,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAEhG,OAAO,EAAC,QAAQ,EAAE,GAAG,MAAM,EAAC,CAAC;AAC9B,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const getFileName: () => string;
2
- export declare const getSitePath: () => string;
3
- export declare const getConfigPath: () => string;
4
- //# sourceMappingURL=path.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/tools/path.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,cAAuC,CAAC;AAEhE,eAAO,MAAM,WAAW,cAAgC,CAAC;AACzD,eAAO,MAAM,aAAa,cAAuC,CAAC"}
@@ -1,6 +0,0 @@
1
- import { fileURLToPath } from 'node:url';
2
- export const getFileName = () => fileURLToPath(import.meta.url);
3
- // eslint-disable-next-line n/prefer-global/process
4
- export const getSitePath = () => `${process.cwd()}/site`;
5
- export const getConfigPath = () => `${getSitePath()}/config.json`;
6
- //# sourceMappingURL=path.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/tools/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChE,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,GAAG,WAAW,EAAE,cAAc,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const reportError: (error: unknown) => void;
2
- export declare const urlRegex: RegExp;
3
- //# sourceMappingURL=tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/tools/tools.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,UAAW,OAAO,KAAG,IAO5C,CAAC;AAEF,eAAO,MAAM,QAAQ,QAA6E,CAAC"}
@@ -1,10 +0,0 @@
1
- import logger from '../logger.js';
2
- export const reportError = (error) => {
3
- let message = String(error);
4
- if (error instanceof Error) {
5
- message = error.message;
6
- }
7
- logger.error(message);
8
- };
9
- export const urlRegex = /^(http(s)?:\/\/.)[-\w@:%.+~#=]{2,256}\.[a-z]{2,6}\b([-\w@:%+.~#?&/=]*)$/g;
10
- //# sourceMappingURL=tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/tools/tools.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAQ,EAAE;IACnD,IAAI,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,KAAK,YAAY,KAAK,EAAE;QAC3B,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;KACxB;IAED,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,0EAA0E,CAAC"}
@@ -1,8 +0,0 @@
1
- import type DoculaPlugins from '../plugins/index.js';
2
- import { type PluginConfig, type PluginInstance } from '../plugins/index.js';
3
- export { type PluginConfig, type PluginInstance } from '../plugins/index.js';
4
- export type PluginName = keyof typeof DoculaPlugins;
5
- export type PluginInstances = Record<string, PluginInstance>;
6
- export type Plugins = PluginName[];
7
- export type PluginConfigs = Record<PluginName, PluginConfig>;
8
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAE3E,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,aAAa,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE7D,MAAM,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAEnC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":""}