sb-mig 2.9.3 → 3.1.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 (53) hide show
  1. package/README.md +51 -27
  2. package/dist/index.js +52 -0
  3. package/package.json +40 -57
  4. package/CHANGELOG.md +0 -996
  5. package/bin/run +0 -5
  6. package/bin/run.cmd +0 -3
  7. package/lib/api/apiConfig.d.ts +0 -2
  8. package/lib/api/apiConfig.js +0 -9
  9. package/lib/api/componentPresets.d.ts +0 -1
  10. package/lib/api/componentPresets.js +0 -22
  11. package/lib/api/components.d.ts +0 -5
  12. package/lib/api/components.js +0 -71
  13. package/lib/api/datasources.d.ts +0 -24
  14. package/lib/api/datasources.js +0 -193
  15. package/lib/api/migrate.d.ts +0 -19
  16. package/lib/api/migrate.js +0 -220
  17. package/lib/api/mutateComponents.d.ts +0 -2
  18. package/lib/api/mutateComponents.js +0 -50
  19. package/lib/api/presets.d.ts +0 -4
  20. package/lib/api/presets.js +0 -59
  21. package/lib/api/resolvePresets.d.ts +0 -2
  22. package/lib/api/resolvePresets.js +0 -40
  23. package/lib/api/roles.d.ts +0 -14
  24. package/lib/api/roles.js +0 -133
  25. package/lib/api/spaces.d.ts +0 -2
  26. package/lib/api/spaces.js +0 -29
  27. package/lib/commands/backup.d.ts +0 -22
  28. package/lib/commands/backup.js +0 -217
  29. package/lib/commands/debug.d.ts +0 -9
  30. package/lib/commands/debug.js +0 -21
  31. package/lib/commands/sync.d.ts +0 -26
  32. package/lib/commands/sync.js +0 -93
  33. package/lib/config/StoryblokComponentsConfig.d.ts +0 -68
  34. package/lib/config/StoryblokComponentsConfig.js +0 -220
  35. package/lib/config/config.d.ts +0 -37
  36. package/lib/config/config.js +0 -36
  37. package/lib/core.d.ts +0 -16
  38. package/lib/core.js +0 -75
  39. package/lib/index.d.ts +0 -1
  40. package/lib/index.js +0 -5
  41. package/lib/types/storyblokTypes.d.ts +0 -171
  42. package/lib/types/storyblokTypes.js +0 -3
  43. package/lib/utils/discover.d.ts +0 -4
  44. package/lib/utils/discover.js +0 -96
  45. package/lib/utils/discover2.d.ts +0 -63
  46. package/lib/utils/discover2.js +0 -424
  47. package/lib/utils/files.d.ts +0 -6
  48. package/lib/utils/files.js +0 -54
  49. package/lib/utils/logger.d.ts +0 -11
  50. package/lib/utils/logger.js +0 -30
  51. package/lib/utils/others.d.ts +0 -1
  52. package/lib/utils/others.js +0 -5
  53. package/oclif.manifest.json +0 -1
@@ -1,93 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@oclif/command");
4
- const core_1 = require("../core");
5
- const config_1 = require("../config/config");
6
- const logger_1 = require("../utils/logger");
7
- const migrate_1 = require("../api/migrate");
8
- const datasources_1 = require("../api/datasources");
9
- const roles_1 = require("../api/roles");
10
- class Sync extends core_1.default {
11
- async run() {
12
- const { argv, args, flags } = this.parse(Sync);
13
- const components = argv.splice(1, argv.length);
14
- if (args.type === 'roles' && flags.all && flags.ext) {
15
- logger_1.default.log('Syncing all roles...');
16
- (0, roles_1.syncAllRoles)();
17
- }
18
- if (args.type === 'roles' && !flags.all && flags.ext) {
19
- const roles = components;
20
- logger_1.default.log('Syncing provided roles...');
21
- (0, roles_1.syncProvidedRoles)({ roles });
22
- }
23
- if (args.type === 'components' && flags.all && flags.ext) {
24
- logger_1.default.log(`Syncing all components with ${config_1.default.schemaFileExt} extension...`);
25
- (0, migrate_1.sync2AllComponents)({ presets: flags.presets });
26
- }
27
- if (args.type === 'components' && flags.all && !flags.ext) {
28
- logger_1.default.warning('### DEPRECATED method. Method of syncing files without .sb.js extension, will be removed in version 4.0.0 ###');
29
- logger_1.default.warning('Use sb-mig sync components --all --ext instead (you need to update your schema files to be named with .sb.js extension)');
30
- logger_1.default.log(`Syncing all components from ${config_1.default.componentDirectory} directory...`);
31
- (0, migrate_1.syncAllComponents)(Boolean(flags.ext), Boolean(flags.presets));
32
- }
33
- if (args.type === 'components' && !flags.all && flags.ext) {
34
- logger_1.default.log(`Syncing provided components with ${config_1.default.schemaFileExt} extension...`);
35
- if (components.length === 0) {
36
- logger_1.default.warning('You have to provide some components separated with empty space. For exmaple: \'row column card\'');
37
- }
38
- else {
39
- (0, migrate_1.syncProvidedComponents)({ components, presets: Boolean(flags.presets), packageName: flags.packageName });
40
- }
41
- }
42
- if (args.type === 'components' && !flags.all && !flags.ext && !flags.lock) {
43
- logger_1.default.warning('### DEPRECATED method. Method of syncing files without .sb.js extension, will be removed in version 4.0.0 ###');
44
- logger_1.default.warning('Use sb-mig sync components --ext instead (you need to update your schema files to be named with .sb.js extension)');
45
- logger_1.default.log('Syncing provided components...');
46
- if (components.length === 0) {
47
- logger_1.default.warning('You have to provide some components separated with empty space. For exmaple: \'row column card\'');
48
- }
49
- else {
50
- (0, migrate_1.syncComponents)(components, Boolean(flags.ext), Boolean(flags.presets), flags.packageName);
51
- }
52
- }
53
- if (args.type === 'datasources' && flags.all && !flags.ext) {
54
- this.error('Datasources are only synced while using --ext optioon. use sb-mig sync datasources --all --ext to sync all datasources with extension (default: .sb.datasources.js)');
55
- }
56
- if (args.type === 'datasources' && !flags.all && !flags.ext) {
57
- const datasources = components;
58
- this.error(`Datasources are only synced while using --ext optioon. use sb-mig sync datasources ${datasources.join(' ')} --ext to sync provided datasources with extension (default: .sb.datasources.js)`);
59
- }
60
- if (args.type === 'datasources' && flags.all && flags.ext) {
61
- logger_1.default.log('Syncing all datasources with extension...');
62
- (0, datasources_1.syncAllDatasources)();
63
- }
64
- if (args.type === 'datasources' && !flags.all && flags.ext) {
65
- const datasources = components;
66
- logger_1.default.log('Syncing provided datasources with extension...');
67
- (0, datasources_1.syncProvidedDatasources)({ datasources });
68
- }
69
- }
70
- }
71
- exports.default = Sync;
72
- Sync.description = 'Synchronize components, datasources or roles with Storyblok space.';
73
- Sync.examples = [
74
- '$ sb-mig sync components --all --ext',
75
- '$ sb-mig sync components @storyblok-components/text-block --ext --packageName',
76
- '$ sb-mig sync components @storyblok-components/text-block @storyblok-components/button --ext --packageName',
77
- '$ sb-mig sync components text-block button --ext',
78
- '$ sb-mig sync components text-block button',
79
- '$ sb-mig sync roles',
80
- ];
81
- Sync.flags = {
82
- help: command_1.flags.help({ char: 'h' }),
83
- all: command_1.flags.boolean({ char: 'a', description: 'Synchronize all components.' }),
84
- ext: command_1.flags.boolean({ char: 'e', description: "Synchronize with file extension. Default extension: '.sb.js'" }),
85
- packageName: command_1.flags.boolean({ char: 'n', description: 'Synchronize based on installed package name.' }),
86
- presets: command_1.flags.boolean({ char: 'p', description: 'Synchronize components with presets.' }),
87
- lock: command_1.flags.boolean({ char: 'l', description: 'Synchronize based on storyblok.components.lock.js file' }),
88
- };
89
- Sync.strict = false;
90
- Sync.args = [
91
- { name: 'type', description: 'What to synchronize', options: ['components', 'datasources', 'roles'], required: true },
92
- { name: 'list', description: 'Space separated list of component names. Example: card product-card row layout' },
93
- ];
@@ -1,68 +0,0 @@
1
- export interface IStoryblokComponentConfig {
2
- name: string;
3
- version: string;
4
- modified: boolean;
5
- location: string;
6
- locationPath: string;
7
- scope: string;
8
- isLinkedInComponentFile: boolean;
9
- isComponentStyleImported: boolean;
10
- links: {
11
- [name: string]: {
12
- [name: string]: string;
13
- };
14
- };
15
- }
16
- export interface IStoryblokComponentsConfig {
17
- [name: string]: IStoryblokComponentConfig;
18
- }
19
- export interface IInstalledComponents {
20
- scope: string | undefined;
21
- name: string | undefined;
22
- }
23
- export declare enum SWAP_TOKEN {
24
- componentImports = "componentImports",
25
- componentLists = "componentLists",
26
- styleImports = "styleImports"
27
- }
28
- interface CreateCrumb {
29
- to: string;
30
- token: SWAP_TOKEN;
31
- }
32
- export declare class StoryblokComponentsConfig {
33
- private componentImportsToken;
34
- private componentComponentsListToken;
35
- private componentStylesImportsToken;
36
- private data;
37
- private storyblokComponentsConfigUrl;
38
- constructor(data: IStoryblokComponentsConfig);
39
- updateComponentsConfigFile(): boolean;
40
- addComponentsToComponentsConfigFile({ installedComponents, local, }: {
41
- installedComponents: IInstalledComponents[];
42
- local: boolean;
43
- }): IStoryblokComponentsConfig;
44
- getAllData(): IStoryblokComponentsConfig;
45
- getSingleData(componentName: string): IStoryblokComponentConfig;
46
- setAllData(data: IStoryblokComponentsConfig): void;
47
- setSingleData(singleComponentData: IStoryblokComponentConfig): void;
48
- /**
49
- *
50
- * Based on storyblok.componnets.lock.js file,
51
- * return proper content of specific files
52
- * (storyblok-components.componentList.js and storyblok-componnets-styles.scss)
53
- */
54
- createCrumb({ to, token }: CreateCrumb): any;
55
- /**
56
- * This updates storyblok components file with imports and
57
- * exports of componentList part of the component, based on
58
- * storyblok.components.lock file links property
59
- */
60
- updateStoryblokComponentsFile(): void;
61
- /**
62
- * This updates storyblok components styles file with style imports
63
- * based on storyblok.components.lock file links property
64
- */
65
- updateStoryblokComponentStylesFile(): void;
66
- }
67
- declare const _default: StoryblokComponentsConfig;
68
- export default _default;
@@ -1,220 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StoryblokComponentsConfig = exports.SWAP_TOKEN = void 0;
4
- const path = require("path");
5
- const dotenv = require("dotenv");
6
- const fs_1 = require("fs");
7
- const camelcase = require("camelcase");
8
- const config_1 = require("./config");
9
- const discover2_1 = require("../utils/discover2");
10
- dotenv.config();
11
- var SWAP_TOKEN;
12
- (function (SWAP_TOKEN) {
13
- SWAP_TOKEN["componentImports"] = "componentImports";
14
- SWAP_TOKEN["componentLists"] = "componentLists";
15
- SWAP_TOKEN["styleImports"] = "styleImports";
16
- })(SWAP_TOKEN = exports.SWAP_TOKEN || (exports.SWAP_TOKEN = {}));
17
- class StoryblokComponentsConfig {
18
- constructor(data) {
19
- this.componentImportsToken = '// --- sb-mig scoped component imports ---';
20
- this.componentComponentsListToken = '// --- sb-mig scoped component list ---';
21
- this.componentStylesImportsToken = '// --- sb-mig scoped component styles imports ---';
22
- this.storyblokComponentsConfigUrl = path.resolve(process.cwd(), 'storyblok.components.lock.js');
23
- this.data = data;
24
- }
25
- updateComponentsConfigFile() {
26
- const content = `module.exports = ${JSON.stringify(this.data, undefined, 2)}`;
27
- fs_1.promises.writeFile(this.storyblokComponentsConfigUrl, content, {
28
- encoding: 'utf-8',
29
- })
30
- .then(result => {
31
- console.log('Done');
32
- console.log(result);
33
- return true;
34
- })
35
- .catch((err) => {
36
- console.log('error, wtf ?');
37
- console.log(err.message);
38
- return false;
39
- });
40
- return true;
41
- }
42
- addComponentsToComponentsConfigFile({ installedComponents, local, }) {
43
- return {
44
- ...this.data,
45
- ...installedComponents.reduce((prev, curr) => {
46
- if (!this.getSingleData(`${curr.scope}/${curr.name}`)) {
47
- const stylesFileAvailable = (0, discover2_1.discoverManyStyles)({
48
- fileNames: [curr.name],
49
- scope: discover2_1.SCOPE.all,
50
- type: discover2_1.LOOKUP_TYPE.fileName,
51
- }).length > 0;
52
- return {
53
- ...prev,
54
- [`${curr.scope}/${curr.name}`]: {
55
- name: `${curr.scope}/${curr.name}`,
56
- scope: curr.scope,
57
- location: local ? 'local' : 'node_modules',
58
- locationPath: local ?
59
- `${config_1.default.storyblokComponentsLocalDirectory}/${curr.name}` :
60
- `node_modules/${curr.scope}/${curr.name}`,
61
- links: {
62
- [config_1.default.storyblokComponentsListfile]: {
63
- '// --- sb-mig scoped component imports ---': local ?
64
- `import * as Scoped${camelcase(curr.name, { pascalCase: true })} from "./${curr.name}";` :
65
- `import * as Scoped${camelcase(curr.name, { pascalCase: true })} from "${curr.scope}/${curr.name}";`,
66
- '// --- sb-mig scoped component list ---': `Scoped${camelcase(curr.name, { pascalCase: true })}.ComponentList`,
67
- },
68
- [config_1.default.componentsStylesMatchFile]: {
69
- '// --- sb-mig scoped component styles imports ---': stylesFileAvailable ?
70
- local ?
71
- `@import './${curr.name}/${curr.name}.scss';` :
72
- `@import '${curr.scope}/${curr.name}/src/${curr.name}.scss';` :
73
- '',
74
- },
75
- },
76
- },
77
- };
78
- }
79
- }, {}),
80
- };
81
- }
82
- getAllData() {
83
- return this.data;
84
- }
85
- getSingleData(componentName) {
86
- return this.data[componentName];
87
- }
88
- setAllData(data) {
89
- this.data = {
90
- ...data,
91
- };
92
- }
93
- setSingleData(singleComponentData) {
94
- this.data[singleComponentData.name] = singleComponentData;
95
- }
96
- /**
97
- *
98
- * Based on storyblok.componnets.lock.js file,
99
- * return proper content of specific files
100
- * (storyblok-components.componentList.js and storyblok-componnets-styles.scss)
101
- */
102
- createCrumb({ to, token }) {
103
- const dataEntries = Object.entries(this.data);
104
- let temp;
105
- switch (token) {
106
- case SWAP_TOKEN.componentImports:
107
- temp = dataEntries
108
- .map(component => component[1].links)
109
- .map(component => component[to] !== undefined && component[to])
110
- .filter(elements => elements !== false)
111
- .reduce(
112
- // @ts-ignore
113
- (acc, curr) => {
114
- return [...acc, curr[this.componentImportsToken]];
115
- }, [this.componentImportsToken]);
116
- break;
117
- case SWAP_TOKEN.componentLists:
118
- temp = dataEntries
119
- .map(component => component[1].links)
120
- .map(component => component[to] !== undefined && component[to])
121
- .filter(elements => elements !== false)
122
- .reduce(
123
- // @ts-ignore
124
- (acc, curr) => {
125
- return [
126
- ...acc,
127
- curr[this.componentComponentsListToken],
128
- ];
129
- }, [this.componentComponentsListToken]);
130
- break;
131
- case SWAP_TOKEN.styleImports:
132
- temp = dataEntries
133
- .map(component => component[1].links)
134
- .map(component => component[to] !== undefined && component[to])
135
- .filter(elements => elements !== false)
136
- .reduce(
137
- // @ts-ignore
138
- (acc, curr) => {
139
- return [
140
- ...acc,
141
- curr[this.componentStylesImportsToken],
142
- ];
143
- }, [this.componentStylesImportsToken]);
144
- break;
145
- default:
146
- break;
147
- }
148
- return temp === null || temp === void 0 ? void 0 : temp.filter((element) => element);
149
- }
150
- /**
151
- * This updates storyblok components file with imports and
152
- * exports of componentList part of the component, based on
153
- * storyblok.components.lock file links property
154
- */
155
- updateStoryblokComponentsFile() {
156
- // one file
157
- const crumb1 = this.createCrumb({
158
- to: config_1.default.storyblokComponentsListfile,
159
- token: SWAP_TOKEN.componentImports,
160
- });
161
- const crumb2 = this.createCrumb({
162
- to: config_1.default.storyblokComponentsListfile,
163
- token: SWAP_TOKEN.componentLists,
164
- });
165
- let content = `${crumb1.join('\n')}\n`;
166
- content = `${content}\nexport default [
167
- ${crumb2.shift()}
168
- ${crumb2.map((partial) => `${partial},`).join('\n')}
169
- ]\n`;
170
- // update actual file
171
- fs_1.promises.writeFile(config_1.default.storyblokComponentsListfile, content, {
172
- encoding: 'utf-8',
173
- })
174
- .then(result => {
175
- console.log('Done');
176
- console.log(result);
177
- return true;
178
- })
179
- .catch((err) => {
180
- console.log('error, wtf ?');
181
- console.log(err.message);
182
- return false;
183
- });
184
- }
185
- /**
186
- * This updates storyblok components styles file with style imports
187
- * based on storyblok.components.lock file links property
188
- */
189
- updateStoryblokComponentStylesFile() {
190
- // one file
191
- const crumb1 = this.createCrumb({
192
- to: config_1.default.componentsStylesMatchFile,
193
- token: SWAP_TOKEN.styleImports,
194
- });
195
- const content = `${crumb1.join('\n')}\n`;
196
- // update actual file
197
- fs_1.promises.writeFile(config_1.default.componentsStylesMatchFile, content, {
198
- encoding: 'utf-8',
199
- })
200
- .then(result => {
201
- console.log('Done');
202
- console.log(result);
203
- return true;
204
- })
205
- .catch((err) => {
206
- console.log('error, wtf ?');
207
- console.log(err.message);
208
- return false;
209
- });
210
- }
211
- }
212
- exports.StoryblokComponentsConfig = StoryblokComponentsConfig;
213
- let fileContent;
214
- try {
215
- fileContent = require(path.resolve(process.cwd(), 'storyblok.components.lock.js'));
216
- }
217
- catch (err) {
218
- fileContent = {};
219
- }
220
- exports.default = new StoryblokComponentsConfig(fileContent);
@@ -1,37 +0,0 @@
1
- export interface IStoryblokConfig {
2
- componentsMatchFile: string;
3
- storyblokComponentsListfile: string;
4
- storyblokComponentsLocalDirectory: string;
5
- componentsStylesMatchFile: string;
6
- boilerplateUrl: string;
7
- sbmigWorkingDirectory: string;
8
- componentDirectory: string;
9
- datasourcesDirectory: string;
10
- componentsDirectories: string[];
11
- schemaFileExt: string;
12
- datasourceExt: string;
13
- rolesExt: string;
14
- storyblokApiUrl: string;
15
- oauthToken: string | undefined;
16
- spaceId: string | undefined;
17
- accessToken: string | undefined;
18
- }
19
- declare const _default: {
20
- componentsMatchFile: string;
21
- storyblokComponentsListfile: string;
22
- storyblokComponentsLocalDirectory: string;
23
- componentsStylesMatchFile: string;
24
- boilerplateUrl: string;
25
- sbmigWorkingDirectory: string;
26
- componentDirectory: string;
27
- datasourcesDirectory: string;
28
- componentsDirectories: string[];
29
- schemaFileExt: string;
30
- datasourceExt: string;
31
- rolesExt: string;
32
- storyblokApiUrl: string;
33
- oauthToken: string | undefined;
34
- spaceId: string | undefined;
35
- accessToken: string | undefined;
36
- };
37
- export default _default;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const path = require("path");
4
- const dotenv = require("dotenv");
5
- dotenv.config();
6
- let customConfig = {};
7
- try {
8
- customConfig = require(path.resolve(process.cwd(), 'storyblok.config'));
9
- }
10
- catch (error) {
11
- // default config will be used
12
- if (error.code !== 'MODULE_NOT_FOUND')
13
- throw error;
14
- }
15
- const defaultConfig = {
16
- componentsMatchFile: 'src/components/components.js',
17
- storyblokComponentsListfile: 'src/components/storyblok-components.componentList.js',
18
- storyblokComponentsLocalDirectory: 'src/@storyblok-components',
19
- componentsStylesMatchFile: 'src/@storyblok-components/_storyblok-components.scss',
20
- boilerplateUrl: 'git@github.com:storyblok-components/gatsby-storyblok-boilerplate.git',
21
- sbmigWorkingDirectory: 'sbmig',
22
- componentDirectory: 'storyblok',
23
- datasourcesDirectory: 'storyblok',
24
- componentsDirectories: ['src', 'storyblok'],
25
- schemaFileExt: 'sb.js',
26
- datasourceExt: 'sb.datasource.js',
27
- rolesExt: 'sb.roles.js',
28
- storyblokApiUrl: 'https://api.storyblok.com/v1',
29
- oauthToken: process.env.STORYBLOK_OAUTH_TOKEN,
30
- spaceId: process.env.STORYBLOK_SPACE_ID,
31
- accessToken: process.env.GATSBY_STORYBLOK_ACCESS_TOKEN || process.env.NEXT_STORYBLOK_ACCESS_TOKEN,
32
- };
33
- exports.default = {
34
- ...defaultConfig,
35
- ...customConfig,
36
- };
package/lib/core.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import Command from '@oclif/command';
2
- import { IStoryblokConfig } from './config/config';
3
- import { StoryblokComponentsConfig } from './config/StoryblokComponentsConfig';
4
- export default abstract class extends Command {
5
- storyblokConfig(): IStoryblokConfig;
6
- storyblokComponentsConfig(): StoryblokComponentsConfig;
7
- files(): {
8
- getCurrentDirectoryBase: () => string;
9
- isDirectoryExists: (path: string) => boolean;
10
- createDir: (dirPath: string) => Promise<void>;
11
- createJsonFile: (content: string, pathWithFilename: string) => Promise<void>;
12
- copyFolder: (src: string, dest: string) => Promise<unknown>;
13
- copyFile: (src: string, dest: string) => Promise<void>;
14
- };
15
- api(): any;
16
- }
package/lib/core.js DELETED
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@oclif/command");
4
- const config_1 = require("./config/config");
5
- const StoryblokComponentsConfig_1 = require("./config/StoryblokComponentsConfig");
6
- const files_1 = require("./utils/files");
7
- const discover_1 = require("./utils/discover");
8
- const components_1 = require("./api/components");
9
- const datasources_1 = require("./api/datasources");
10
- const componentPresets_1 = require("./api/componentPresets");
11
- const presets_1 = require("./api/presets");
12
- const migrate_1 = require("./api/migrate");
13
- const mutateComponents_1 = require("./api/mutateComponents");
14
- const spaces_1 = require("./api/spaces");
15
- class default_1 extends command_1.default {
16
- storyblokConfig() {
17
- return config_1.default;
18
- }
19
- storyblokComponentsConfig() {
20
- return StoryblokComponentsConfig_1.default;
21
- }
22
- files() {
23
- return {
24
- getCurrentDirectoryBase: files_1.getCurrentDirectoryBase,
25
- isDirectoryExists: files_1.isDirectoryExists,
26
- createDir: files_1.createDir,
27
- createJsonFile: files_1.createJsonFile,
28
- copyFolder: files_1.copyFolder,
29
- copyFile: files_1.copyFile,
30
- };
31
- }
32
- api() {
33
- return {
34
- discover: {
35
- findComponents: discover_1.findComponents,
36
- findComponentsWithExt: discover_1.findComponentsWithExt,
37
- findDatasources: discover_1.findDatasources,
38
- },
39
- datasources: {
40
- getAllDatasources: datasources_1.getAllDatasources,
41
- getDatasource: datasources_1.getDatasource,
42
- getDatasourceEntries: datasources_1.getDatasourceEntries,
43
- createDatasource: datasources_1.createDatasource,
44
- createDatasourceEntry: datasources_1.createDatasourceEntry,
45
- updateDatasourceEntry: datasources_1.updateDatasourceEntry,
46
- updateDatasource: datasources_1.updateDatasource,
47
- createDatasourceEntries: datasources_1.createDatasourceEntries,
48
- syncDatasources: datasources_1.syncDatasources,
49
- },
50
- components: {
51
- getAllComponents: components_1.getAllComponents,
52
- getComponent: components_1.getComponent,
53
- getComponentsGroup: components_1.getComponentsGroup,
54
- getAllComponentsGroups: components_1.getAllComponentsGroups,
55
- createComponentsGroup: components_1.createComponentsGroup,
56
- syncComponents: migrate_1.syncComponents,
57
- syncAllComponents: migrate_1.syncAllComponents,
58
- updateComponent: mutateComponents_1.updateComponent,
59
- createComponent: mutateComponents_1.createComponent,
60
- },
61
- presets: {
62
- getComponentPresets: componentPresets_1.getComponentPresets,
63
- getPreset: presets_1.getPreset,
64
- getAllPresets: presets_1.getAllPresets,
65
- createPreset: presets_1.createPreset,
66
- updatePreset: presets_1.updatePreset,
67
- },
68
- spaces: {
69
- createSpace: spaces_1.createSpace,
70
- getSpace: spaces_1.getSpace,
71
- },
72
- };
73
- }
74
- }
75
- exports.default = default_1;
package/lib/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { run } from "@oclif/command";
package/lib/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.run = void 0;
4
- var command_1 = require("@oclif/command");
5
- Object.defineProperty(exports, "run", { enumerable: true, get: function () { return command_1.run; } });