@sitecore-content-sdk/cli 1.3.0-canary.2 → 1.3.0-canary.21

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 (49) hide show
  1. package/README.md +5 -5
  2. package/dist/cjs/bin/sitecore-tools.js +77 -77
  3. package/dist/cjs/cli.js +69 -69
  4. package/dist/cjs/scripts/index.js +40 -40
  5. package/dist/cjs/scripts/project/build.js +42 -42
  6. package/dist/cjs/scripts/project/component/add.js +236 -184
  7. package/dist/cjs/scripts/project/component/generate-map.js +68 -68
  8. package/dist/cjs/scripts/project/component/index.js +57 -57
  9. package/dist/cjs/scripts/project/component/scaffold.js +66 -66
  10. package/dist/cjs/scripts/project/index.js +56 -56
  11. package/dist/cjs/utils/load-config.js +42 -42
  12. package/dist/cjs/utils/process-env.js +70 -70
  13. package/dist/cjs/utils/watch-items.js +18 -18
  14. package/dist/esm/cli.js +63 -63
  15. package/dist/esm/scripts/index.js +4 -4
  16. package/dist/esm/scripts/project/build.js +35 -35
  17. package/dist/esm/scripts/project/component/add.js +193 -141
  18. package/dist/esm/scripts/project/component/generate-map.js +60 -60
  19. package/dist/esm/scripts/project/component/index.js +21 -21
  20. package/dist/esm/scripts/project/component/scaffold.js +58 -58
  21. package/dist/esm/scripts/project/index.js +20 -20
  22. package/dist/esm/utils/load-config.js +36 -36
  23. package/dist/esm/utils/process-env.js +31 -31
  24. package/dist/esm/utils/watch-items.js +12 -12
  25. package/package.json +3 -3
  26. package/types/bin/sitecore-tools.d.ts +3 -2
  27. package/types/bin/sitecore-tools.d.ts.map +1 -0
  28. package/types/cli.d.ts +14 -13
  29. package/types/cli.d.ts.map +1 -0
  30. package/types/scripts/index.d.ts +3 -2
  31. package/types/scripts/index.d.ts.map +1 -0
  32. package/types/scripts/project/build.d.ts +25 -24
  33. package/types/scripts/project/build.d.ts.map +1 -0
  34. package/types/scripts/project/component/add.d.ts +59 -58
  35. package/types/scripts/project/component/add.d.ts.map +1 -0
  36. package/types/scripts/project/component/generate-map.d.ts +33 -32
  37. package/types/scripts/project/component/generate-map.d.ts.map +1 -0
  38. package/types/scripts/project/component/index.d.ts +6 -5
  39. package/types/scripts/project/component/index.d.ts.map +1 -0
  40. package/types/scripts/project/component/scaffold.d.ts +45 -44
  41. package/types/scripts/project/component/scaffold.d.ts.map +1 -0
  42. package/types/scripts/project/index.d.ts +6 -5
  43. package/types/scripts/project/index.d.ts.map +1 -0
  44. package/types/utils/load-config.d.ts +9 -8
  45. package/types/utils/load-config.d.ts.map +1 -0
  46. package/types/utils/process-env.d.ts +9 -8
  47. package/types/utils/process-env.d.ts.map +1 -0
  48. package/types/utils/watch-items.d.ts +7 -6
  49. package/types/utils/watch-items.d.ts.map +1 -0
@@ -1,60 +1,60 @@
1
- import { watchItems } from '../../../utils/watch-items';
2
- import loadCliConfig from '../../../utils/load-config';
3
- /**
4
- * @param {Argv} yargs
5
- */
6
- export function builder(yargs) {
7
- return yargs.command('generate-map', 'Generates component map based on provided paths', args, handler);
8
- }
9
- /**
10
- * @param {Argv} yargs
11
- */
12
- export function args(yargs) {
13
- return yargs
14
- .option('watch', {
15
- requiresArg: false,
16
- type: 'boolean',
17
- describe: 'If true, watches for changes in the specified paths and updates the component map accordingly.',
18
- default: false,
19
- })
20
- .option('config', {
21
- requiresArg: false,
22
- type: 'string',
23
- describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
24
- });
25
- }
26
- /**
27
- * Handler for the `generate-map` command.
28
- * @param {GenerateMapCliArgs} argv Cli arguments for the command
29
- */
30
- export function handler(argv) {
31
- const cliConfig = loadCliConfig(argv.config);
32
- if (!cliConfig.componentMap) {
33
- console.error('The `sitecore.cli.config` file is missing a `componentMap` configuration. Please add it to use this command.');
34
- return;
35
- }
36
- const componentMapGenerator = cliConfig.componentMap.generator;
37
- const { paths, destination, componentImports, exclude, clientComponentMap, includeVariants } = cliConfig.componentMap;
38
- if (argv.watch) {
39
- console.log(`Watching for component changes to component builder sources in:\n ${paths.join('\n')}`);
40
- watchItems(paths, componentMapGenerator.bind(null, {
41
- paths,
42
- destination,
43
- componentImports,
44
- exclude,
45
- clientComponentMap,
46
- includeVariants,
47
- }));
48
- }
49
- else {
50
- console.log(`Generating component map for:\n ${paths.join('\n')}`);
51
- componentMapGenerator({
52
- paths,
53
- destination,
54
- componentImports,
55
- exclude,
56
- clientComponentMap,
57
- includeVariants,
58
- });
59
- }
60
- }
1
+ import { watchItems } from '../../../utils/watch-items';
2
+ import loadCliConfig from '../../../utils/load-config';
3
+ /**
4
+ * @param {Argv} yargs
5
+ */
6
+ export function builder(yargs) {
7
+ return yargs.command('generate-map', 'Generates component map based on provided paths', args, handler);
8
+ }
9
+ /**
10
+ * @param {Argv} yargs
11
+ */
12
+ export function args(yargs) {
13
+ return yargs
14
+ .option('watch', {
15
+ requiresArg: false,
16
+ type: 'boolean',
17
+ describe: 'If true, watches for changes in the specified paths and updates the component map accordingly.',
18
+ default: false,
19
+ })
20
+ .option('config', {
21
+ requiresArg: false,
22
+ type: 'string',
23
+ describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
24
+ });
25
+ }
26
+ /**
27
+ * Handler for the `generate-map` command.
28
+ * @param {GenerateMapCliArgs} argv Cli arguments for the command
29
+ */
30
+ export function handler(argv) {
31
+ const cliConfig = loadCliConfig(argv.config);
32
+ if (!cliConfig.componentMap) {
33
+ console.error('The `sitecore.cli.config` file is missing a `componentMap` configuration. Please add it to use this command.');
34
+ return;
35
+ }
36
+ const componentMapGenerator = cliConfig.componentMap.generator;
37
+ const { paths, destination, componentImports, exclude, clientComponentMap, includeVariants } = cliConfig.componentMap;
38
+ if (argv.watch) {
39
+ console.log(`Watching for component changes to component builder sources in:\n ${paths.join('\n')}`);
40
+ watchItems(paths, componentMapGenerator.bind(null, {
41
+ paths,
42
+ destination,
43
+ componentImports,
44
+ exclude,
45
+ clientComponentMap,
46
+ includeVariants,
47
+ }));
48
+ }
49
+ else {
50
+ console.log(`Generating component map for:\n ${paths.join('\n')}`);
51
+ componentMapGenerator({
52
+ paths,
53
+ destination,
54
+ componentImports,
55
+ exclude,
56
+ clientComponentMap,
57
+ includeVariants,
58
+ });
59
+ }
60
+ }
@@ -1,21 +1,21 @@
1
- import * as scaffold from './scaffold';
2
- import * as generateMap from './generate-map';
3
- /**
4
- * @param {Argv} yargs
5
- */
6
- export function builder(yargs) {
7
- return yargs.command({
8
- command: 'component',
9
- describe: 'Performs component level operations',
10
- builder: (_yargs) => {
11
- _yargs = _yargs
12
- .command([scaffold, generateMap])
13
- .strict()
14
- .demandCommand(1, 'You need to specify a command to run');
15
- _yargs = scaffold.builder(_yargs);
16
- _yargs = generateMap.builder(_yargs);
17
- return _yargs;
18
- },
19
- handler: () => { },
20
- });
21
- }
1
+ import * as scaffold from './scaffold';
2
+ import * as generateMap from './generate-map';
3
+ /**
4
+ * @param {Argv} yargs
5
+ */
6
+ export function builder(yargs) {
7
+ return yargs.command({
8
+ command: 'component',
9
+ describe: 'Performs component level operations',
10
+ builder: (_yargs) => {
11
+ _yargs = _yargs
12
+ .command([scaffold, generateMap])
13
+ .strict()
14
+ .demandCommand(1, 'You need to specify a command to run');
15
+ _yargs = scaffold.builder(_yargs);
16
+ _yargs = generateMap.builder(_yargs);
17
+ return _yargs;
18
+ },
19
+ handler: () => { },
20
+ });
21
+ }
@@ -1,60 +1,60 @@
1
- import { scaffoldComponent } from '@sitecore-content-sdk/core/tools';
2
- import loadCliConfig from '../../../utils/load-config';
3
- import { ComponentTemplateType } from '@sitecore-content-sdk/core/config';
4
- /**
5
- * @param {Argv} yargs
6
- */
7
- export function builder(yargs) {
8
- return yargs.command('scaffold <componentName>', 'Scaffolds a new component', args, handler);
9
- }
10
- /**
11
- * @param {Argv} yargs
12
- */
13
- export function args(yargs) {
14
- return yargs
15
- .positional('componentName', {
16
- requiresArg: true,
17
- positional: true,
18
- type: 'string',
1
+ import { scaffoldComponent } from '@sitecore-content-sdk/core/tools';
2
+ import loadCliConfig from '../../../utils/load-config';
3
+ import { ComponentTemplateType } from '@sitecore-content-sdk/core/config';
4
+ /**
5
+ * @param {Argv} yargs
6
+ */
7
+ export function builder(yargs) {
8
+ return yargs.command('scaffold <componentName>', 'Scaffolds a new component', args, handler);
9
+ }
10
+ /**
11
+ * @param {Argv} yargs
12
+ */
13
+ export function args(yargs) {
14
+ return yargs
15
+ .positional('componentName', {
16
+ requiresArg: true,
17
+ positional: true,
18
+ type: 'string',
19
19
  describe: `Name of the component to scaffold. Component name should start with an uppercase letter and contain only letters, numbers,
20
- dashes, or underscores. It can also contain slashes to indicate a subfolder. Example: MyComponent or MyFolder/MyComponent. If no subfolder is specified, the component will be created under 'src/components'.`,
21
- })
22
- .option('config', {
23
- requiresArg: false,
24
- type: 'string',
25
- describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
26
- })
27
- .option('templateName', {
28
- requiresArg: false,
29
- type: 'string',
30
- describe: 'Name of the template that will be used to scaffold the component. Can be configured in the cli.config.',
31
- })
32
- .option('byoc', {
33
- requiresArg: false,
34
- type: 'boolean',
35
- describe: 'If true, scaffolds a byoc component.',
36
- default: false,
37
- });
38
- }
39
- /**
40
- * Handler for the scaffold command.
41
- * @param {ScaffoldArgs} argv - The arguments passed to the command.
42
- */
43
- export function handler(argv) {
44
- var _a;
45
- if (!argv.componentName) {
46
- throw new Error('Component name is required. Usage: sitecore-tools scaffold <ComponentName>');
47
- }
48
- const nameParamFormat = new RegExp(/^((?:[\w\-]+\/)*)([A-Z][\w-]+)$/);
49
- const regExResult = nameParamFormat.exec(argv.componentName);
50
- if (regExResult === null) {
20
+ dashes, or underscores. It can also contain slashes to indicate a subfolder. Example: MyComponent or MyFolder/MyComponent. If no subfolder is specified, the component will be created under 'src/components'.`,
21
+ })
22
+ .option('config', {
23
+ requiresArg: false,
24
+ type: 'string',
25
+ describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
26
+ })
27
+ .option('templateName', {
28
+ requiresArg: false,
29
+ type: 'string',
30
+ describe: 'Name of the template that will be used to scaffold the component. Can be configured in the cli.config.',
31
+ })
32
+ .option('byoc', {
33
+ requiresArg: false,
34
+ type: 'boolean',
35
+ describe: 'If true, scaffolds a byoc component.',
36
+ default: false,
37
+ });
38
+ }
39
+ /**
40
+ * Handler for the scaffold command.
41
+ * @param {ScaffoldArgs} argv - The arguments passed to the command.
42
+ */
43
+ export function handler(argv) {
44
+ var _a;
45
+ if (!argv.componentName) {
46
+ throw new Error('Component name is required. Usage: sitecore-tools scaffold <ComponentName>');
47
+ }
48
+ const nameParamFormat = new RegExp(/^((?:[\w\-]+\/)*)([A-Z][\w-]+)$/);
49
+ const regExResult = nameParamFormat.exec(argv.componentName);
50
+ if (regExResult === null) {
51
51
  throw new Error(`Component name should start with an uppercase letter and contain only letters, numbers,
52
- dashes, or underscores. It can also contain slashes to indicate a subfolder`);
53
- }
54
- const cliConfig = loadCliConfig(argv.config);
55
- const componentPath = regExResult[1];
56
- const componentName = regExResult[2];
57
- const outputFolder = componentPath || 'src/components';
58
- const templateName = (_a = argv.templateName) !== null && _a !== void 0 ? _a : (argv.byoc ? ComponentTemplateType.BYOC : ComponentTemplateType.DEFAULT);
59
- scaffoldComponent(outputFolder, componentName, templateName, cliConfig.scaffold.templates);
60
- }
52
+ dashes, or underscores. It can also contain slashes to indicate a subfolder`);
53
+ }
54
+ const cliConfig = loadCliConfig(argv.config);
55
+ const componentPath = regExResult[1];
56
+ const componentName = regExResult[2];
57
+ const outputFolder = componentPath || 'src/components';
58
+ const templateName = (_a = argv.templateName) !== null && _a !== void 0 ? _a : (argv.byoc ? ComponentTemplateType.BYOC : ComponentTemplateType.DEFAULT);
59
+ scaffoldComponent(outputFolder, componentName, templateName, cliConfig.scaffold.templates);
60
+ }
@@ -1,20 +1,20 @@
1
- import * as build from './build';
2
- import * as component from './component';
3
- /**
4
- * @param {Argv} yargs
5
- */
6
- export function builder(yargs) {
7
- return yargs.command({
8
- command: 'project',
9
- describe: 'Performs project level operations',
10
- builder: (_yargs) => {
11
- _yargs = _yargs
12
- .command([build, component])
13
- .strict()
14
- .demandCommand(1, 'You need to specify a command to run');
15
- _yargs = component.builder(_yargs);
16
- return _yargs;
17
- },
18
- handler: () => { },
19
- });
20
- }
1
+ import * as build from './build';
2
+ import * as component from './component';
3
+ /**
4
+ * @param {Argv} yargs
5
+ */
6
+ export function builder(yargs) {
7
+ return yargs.command({
8
+ command: 'project',
9
+ describe: 'Performs project level operations',
10
+ builder: (_yargs) => {
11
+ _yargs = _yargs
12
+ .command([build, component])
13
+ .strict()
14
+ .demandCommand(1, 'You need to specify a command to run');
15
+ _yargs = component.builder(_yargs);
16
+ return _yargs;
17
+ },
18
+ handler: () => { },
19
+ });
20
+ }
@@ -1,36 +1,36 @@
1
- import path from 'path';
2
- import fs from 'fs';
3
- import processEnv from './process-env';
4
- const tsx = require('tsx/cjs/api');
5
- /**
6
- * Loads Sitecore Content SDK CLI configuration from the specified file.
7
- * @param {string} [configFile] - The path to the configuration file.
8
- * @returns {SitecoreCliConfig} The default export from the configuration file.
9
- * @throws Will throw an error if the configuration file does not exist or does not have a default export.
10
- */
11
- export default function loadCliConfig(configFile) {
12
- // If no config file is provided, try to load the default config file.
13
- if (!configFile) {
14
- configFile = './sitecore.cli.config.ts';
15
- if (!fs.existsSync(path.resolve(process.cwd(), configFile))) {
16
- configFile = './sitecore.cli.config.js';
17
- }
18
- }
19
- else {
20
- // configuration file/filepath has been provided
21
- // the env variables have been already loaded from the current working directory, however the current command may be running outside of a context of a project
22
- // if so try loading the env vars from the directory of the provided config file
23
- const configFileDirectory = path.dirname(path.resolve(process.cwd(), configFile));
24
- if (process.cwd() !== configFileDirectory) {
25
- processEnv(configFileDirectory);
26
- }
27
- }
28
- let cliConfig;
29
- try {
30
- cliConfig = tsx.require(path.resolve(process.cwd(), configFile), __filename);
31
- }
32
- catch (e) {
33
- throw `Error while trying to load the cli configuration from ${configFile}. Error message: ${e.message}`;
34
- }
35
- return cliConfig.default;
36
- }
1
+ import path from 'path';
2
+ import fs from 'fs';
3
+ import processEnv from './process-env';
4
+ const tsx = require('tsx/cjs/api');
5
+ /**
6
+ * Loads Sitecore Content SDK CLI configuration from the specified file.
7
+ * @param {string} [configFile] - The path to the configuration file.
8
+ * @returns {SitecoreCliConfig} The default export from the configuration file.
9
+ * @throws Will throw an error if the configuration file does not exist or does not have a default export.
10
+ */
11
+ export default function loadCliConfig(configFile) {
12
+ // If no config file is provided, try to load the default config file.
13
+ if (!configFile) {
14
+ configFile = './sitecore.cli.config.ts';
15
+ if (!fs.existsSync(path.resolve(process.cwd(), configFile))) {
16
+ configFile = './sitecore.cli.config.js';
17
+ }
18
+ }
19
+ else {
20
+ // configuration file/filepath has been provided
21
+ // the env variables have been already loaded from the current working directory, however the current command may be running outside of a context of a project
22
+ // if so try loading the env vars from the directory of the provided config file
23
+ const configFileDirectory = path.dirname(path.resolve(process.cwd(), configFile));
24
+ if (process.cwd() !== configFileDirectory) {
25
+ processEnv(configFileDirectory);
26
+ }
27
+ }
28
+ let cliConfig;
29
+ try {
30
+ cliConfig = tsx.require(path.resolve(process.cwd(), configFile), __filename);
31
+ }
32
+ catch (e) {
33
+ throw `Error while trying to load the cli configuration from ${configFile}. Error message: ${e.message}`;
34
+ }
35
+ return cliConfig.default;
36
+ }
@@ -1,31 +1,31 @@
1
- import path from 'path';
2
- import * as dotenv from 'dotenv';
3
- import dotenvExpand from 'dotenv-expand';
4
- import { SITECORE_CLI_MODE_ENV_VAR } from '@sitecore-content-sdk/core/config-cli';
5
- /**
6
- * Loads and processes environment variables from `.env` files in the specified directory.
7
- * It supports multiple `.env` files, including
8
- * environment-specific files (e.g., `.env.development`, `.env.production`) and local overrides
9
- * (e.g., `.env.local`, `.env.development.local`).
10
- * @param {string} dir - The directory to search for `.env` files.
11
- */
12
- export default function processEnv(dir) {
13
- // replicate Next.js handling/behavior, but without a default NODE_ENV
14
- // https://github.com/vercel/next.js/blob/v10.0.5/packages/next-env/index.ts#L80-L90
15
- const mode = process.env.NODE_ENV;
16
- const dotenvFiles = [
17
- mode && `.env.${mode}.local`,
18
- // Don't include `.env.local` for `test` environment
19
- // since normally you expect tests to produce the same
20
- // results for everyone
21
- mode !== 'test' && '.env.local',
22
- mode && `.env.${mode}`,
23
- '.env',
24
- ].filter(Boolean);
25
- // Set the environment variable to indicate that the application is running in CLI mode
26
- process.env[SITECORE_CLI_MODE_ENV_VAR] = 'true';
27
- // inspired by https://github.com/entropitor/dotenv-cli/blob/v4.0.0/cli.js#L53-L55
28
- dotenvFiles.forEach(function (env) {
29
- dotenvExpand.expand(dotenv.config({ path: path.resolve(dir, env) }));
30
- });
31
- }
1
+ import path from 'path';
2
+ import * as dotenv from 'dotenv';
3
+ import dotenvExpand from 'dotenv-expand';
4
+ import { SITECORE_CLI_MODE_ENV_VAR } from '@sitecore-content-sdk/core/config-cli';
5
+ /**
6
+ * Loads and processes environment variables from `.env` files in the specified directory.
7
+ * It supports multiple `.env` files, including
8
+ * environment-specific files (e.g., `.env.development`, `.env.production`) and local overrides
9
+ * (e.g., `.env.local`, `.env.development.local`).
10
+ * @param {string} dir - The directory to search for `.env` files.
11
+ */
12
+ export default function processEnv(dir) {
13
+ // replicate Next.js handling/behavior, but without a default NODE_ENV
14
+ // https://github.com/vercel/next.js/blob/v10.0.5/packages/next-env/index.ts#L80-L90
15
+ const mode = process.env.NODE_ENV;
16
+ const dotenvFiles = [
17
+ mode && `.env.${mode}.local`,
18
+ // Don't include `.env.local` for `test` environment
19
+ // since normally you expect tests to produce the same
20
+ // results for everyone
21
+ mode !== 'test' && '.env.local',
22
+ mode && `.env.${mode}`,
23
+ '.env',
24
+ ].filter(Boolean);
25
+ // Set the environment variable to indicate that the application is running in CLI mode
26
+ process.env[SITECORE_CLI_MODE_ENV_VAR] = 'true';
27
+ // inspired by https://github.com/entropitor/dotenv-cli/blob/v4.0.0/cli.js#L53-L55
28
+ dotenvFiles.forEach(function (env) {
29
+ dotenvExpand.expand(dotenv.config({ path: path.resolve(dir, env) }));
30
+ });
31
+ }
@@ -1,12 +1,12 @@
1
- import chokidar from 'chokidar';
2
- /**
3
- * Run watch mode, watching on @var paths
4
- * @param {string[]} paths paths to watch by chokidar
5
- * @param {Function<void>} cb callback to run on file change
6
- */
7
- export function watchItems(paths, cb) {
8
- chokidar
9
- .watch(paths, { ignoreInitial: true, awaitWriteFinish: true })
10
- .on('add', cb)
11
- .on('unlink', cb);
12
- }
1
+ import chokidar from 'chokidar';
2
+ /**
3
+ * Run watch mode, watching on @var paths
4
+ * @param {string[]} paths paths to watch by chokidar
5
+ * @param {Function<void>} cb callback to run on file change
6
+ */
7
+ export function watchItems(paths, cb) {
8
+ chokidar
9
+ .watch(paths, { ignoreInitial: true, awaitWriteFinish: true })
10
+ .on('add', cb)
11
+ .on('unlink', cb);
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/cli",
3
- "version": "1.3.0-canary.2",
3
+ "version": "1.3.0-canary.21",
4
4
  "description": "Sitecore Content SDK CLI",
5
5
  "main": "dist/cjs/cli.js",
6
6
  "module": "dist/esm/cli.js",
@@ -34,7 +34,7 @@
34
34
  "url": "https://github.com/sitecore/content-sdk/issues"
35
35
  },
36
36
  "dependencies": {
37
- "@sitecore-content-sdk/core": "1.3.0-canary.2",
37
+ "@sitecore-content-sdk/core": "1.3.0-canary.21",
38
38
  "chokidar": "^4.0.3",
39
39
  "dotenv": "^16.5.0",
40
40
  "dotenv-expand": "^12.0.2",
@@ -71,7 +71,7 @@
71
71
  "ts-node": "^10.9.1",
72
72
  "typescript": "~5.8.3"
73
73
  },
74
- "gitHead": "8daa222f701d12815256314f861d9b79ada1fc1b",
74
+ "gitHead": "05b609278f4583775665257f6398c175e04ecd15",
75
75
  "files": [
76
76
  "dist",
77
77
  "types"
@@ -1,2 +1,3 @@
1
- #!/usr/bin/env node
2
- export {};
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=sitecore-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sitecore-tools.d.ts","sourceRoot":"","sources":["../../src/bin/sitecore-tools.ts"],"names":[],"mappings":""}
package/types/cli.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- import { CommandModule } from 'yargs';
2
- /**
3
- * Initializes and configures the CLI application using yargs.
4
- * This function registers commands, sets up argument parsing, and handles command execution.
5
- * @param {object} commands - An object containing command modules to be registered with yargs.
6
- * Each key in the object represents a command name, and the value is a `CommandModule` object
7
- * that defines the command's behavior, arguments, and options.
8
- */
9
- export default function cli(commands?: {
10
- [key: string]: CommandModule & {
11
- disableStrictArgs?: boolean;
12
- };
13
- }): Promise<void>;
1
+ import { CommandModule } from 'yargs';
2
+ /**
3
+ * Initializes and configures the CLI application using yargs.
4
+ * This function registers commands, sets up argument parsing, and handles command execution.
5
+ * @param {object} commands - An object containing command modules to be registered with yargs.
6
+ * Each key in the object represents a command name, and the value is a `CommandModule` object
7
+ * that defines the command's behavior, arguments, and options.
8
+ */
9
+ export default function cli(commands?: {
10
+ [key: string]: CommandModule & {
11
+ disableStrictArgs?: boolean;
12
+ };
13
+ }): Promise<void>;
14
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAc,EAAQ,aAAa,EAAE,MAAM,OAAO,CAAC;AASnD;;;;;;GAMG;AACH,wBAA8B,GAAG,CAAC,QAAQ,CAAC,EAAE;IAC3C,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG;QAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAChE,iBA2CA"}
@@ -1,2 +1,3 @@
1
- import * as project from './project';
2
- export { project };
1
+ import * as project from './project';
2
+ export { project };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1,24 +1,25 @@
1
- export declare const command = "build";
2
- export declare const describe = "Performs build time automation";
3
- export declare const builder: {
4
- config: {
5
- requiresArg: boolean;
6
- type: string;
7
- describe: string;
8
- };
9
- };
10
- /**
11
- * The arguments for the build command.
12
- */
13
- export type BuildArgs = {
14
- /**
15
- * Path to the `sitecore.cli.config` file.
16
- * Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats.
17
- */
18
- config?: string;
19
- };
20
- /**
21
- * Handler for the build command.
22
- * @param {BuildArgs} argv - The arguments passed to the command.
23
- */
24
- export declare function handler(argv: BuildArgs): Promise<void>;
1
+ export declare const command = "build";
2
+ export declare const describe = "Performs build time automation";
3
+ export declare const builder: {
4
+ config: {
5
+ requiresArg: boolean;
6
+ type: string;
7
+ describe: string;
8
+ };
9
+ };
10
+ /**
11
+ * The arguments for the build command.
12
+ */
13
+ export type BuildArgs = {
14
+ /**
15
+ * Path to the `sitecore.cli.config` file.
16
+ * Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats.
17
+ */
18
+ config?: string;
19
+ };
20
+ /**
21
+ * Handler for the build command.
22
+ * @param {BuildArgs} argv - The arguments passed to the command.
23
+ */
24
+ export declare function handler(argv: BuildArgs): Promise<void>;
25
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/scripts/project/build.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AAEzD,eAAO,MAAM,OAAO;;;;;;CAOnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,SAAS,iBAW5C"}