@sitecore-content-sdk/cli 2.0.0-canary.6 → 2.0.0-canary.7

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.
@@ -54,10 +54,12 @@ const path_1 = __importDefault(require("path"));
54
54
  const chalk_1 = __importDefault(require("chalk"));
55
55
  const child_process_1 = require("child_process");
56
56
  const tools = __importStar(require("@sitecore-content-sdk/content/tools"));
57
+ const serverTools = __importStar(require("@sitecore-content-sdk/content/node-tools"));
57
58
  const inquirer_1 = __importDefault(require("inquirer"));
58
59
  const generate_map_1 = require("./generate-map");
59
60
  const load_config_1 = __importDefault(require("../../../utils/load-config"));
60
- let { getComponentSpec, getComponentList, getComponentSpecUrl } = tools;
61
+ let { getComponentSpec, getComponentSpecUrl } = tools;
62
+ let { getComponentList } = serverTools;
61
63
  const unitMocks = (toolsModule) => {
62
64
  getComponentSpec = toolsModule.getComponentSpec;
63
65
  getComponentList = toolsModule.getComponentList;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.builder = builder;
7
7
  exports.args = args;
8
8
  exports.handler = handler;
9
- const tools_1 = require("@sitecore-content-sdk/content/tools");
9
+ const node_tools_1 = require("@sitecore-content-sdk/content/node-tools");
10
10
  const load_config_1 = __importDefault(require("../../../utils/load-config"));
11
11
  const config_1 = require("@sitecore-content-sdk/content/config");
12
12
  /**
@@ -67,5 +67,5 @@ dashes, or underscores. It can also contain slashes to indicate a subfolder`);
67
67
  const componentName = regExResult[2];
68
68
  const outputFolder = componentPath || 'src/components';
69
69
  const templateName = (_a = argv.templateName) !== null && _a !== void 0 ? _a : (argv.byoc ? config_1.ComponentTemplateType.BYOC : config_1.ComponentTemplateType.DEFAULT);
70
- (0, tools_1.scaffoldComponent)(outputFolder, componentName, templateName, cliConfig.scaffold.templates);
70
+ (0, node_tools_1.scaffoldComponent)(outputFolder, componentName, templateName, cliConfig.scaffold.templates);
71
71
  }
@@ -12,10 +12,12 @@ import path from 'path';
12
12
  import chalk from 'chalk';
13
13
  import { execSync } from 'child_process';
14
14
  import * as tools from '@sitecore-content-sdk/content/tools';
15
+ import * as serverTools from '@sitecore-content-sdk/content/node-tools';
15
16
  import inquirer from 'inquirer';
16
17
  import { handler as generateMapHandler } from './generate-map';
17
18
  import loadCliConfig from '../../../utils/load-config';
18
- let { getComponentSpec, getComponentList, getComponentSpecUrl } = tools;
19
+ let { getComponentSpec, getComponentSpecUrl } = tools;
20
+ let { getComponentList } = serverTools;
19
21
  export const unitMocks = (toolsModule) => {
20
22
  getComponentSpec = toolsModule.getComponentSpec;
21
23
  getComponentList = toolsModule.getComponentList;
@@ -1,4 +1,4 @@
1
- import { scaffoldComponent } from '@sitecore-content-sdk/content/tools';
1
+ import { scaffoldComponent } from '@sitecore-content-sdk/content/node-tools';
2
2
  import loadCliConfig from '../../../utils/load-config';
3
3
  import { ComponentTemplateType } from '@sitecore-content-sdk/content/config';
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/cli",
3
- "version": "2.0.0-canary.6",
3
+ "version": "2.0.0-canary.7",
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/content": "2.0.0-canary.6",
37
+ "@sitecore-content-sdk/content": "2.0.0-canary.7",
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": "99295b9c8b009a7998de97413332b5b285cea0f2",
74
+ "gitHead": "3e3ed0aad7edcc151c962710b7ffc999290435d7",
75
75
  "files": [
76
76
  "dist",
77
77
  "types"
@@ -1,6 +1,22 @@
1
1
  import { Argv } from 'yargs';
2
2
  import * as tools from '@sitecore-content-sdk/content/tools';
3
- export declare const unitMocks: (toolsModule: Pick<typeof tools, "getComponentSpec" | "getComponentList" | "getComponentSpecUrl">) => void;
3
+ declare let getComponentSpec: ({ componentId, edgeUrl, targetPath, token, }: {
4
+ edgeUrl?: string;
5
+ targetPath?: string;
6
+ componentId: string;
7
+ token: string;
8
+ }) => Promise<import("@sitecore-content-sdk/content/types/tools/codegen/component-generation").ComponentSpec>, getComponentSpecUrl: ({ componentId, edgeUrl, targetPath, token, }: {
9
+ edgeUrl?: string;
10
+ targetPath?: string;
11
+ componentId: string;
12
+ token: string;
13
+ }) => string;
14
+ declare let getComponentList: (paths: string[], exclude?: string[], includeVariants?: boolean) => tools.ComponentFile[];
15
+ export declare const unitMocks: (toolsModule: {
16
+ getComponentSpec: typeof getComponentSpec;
17
+ getComponentList: typeof getComponentList;
18
+ getComponentSpecUrl: typeof getComponentSpecUrl;
19
+ }) => void;
4
20
  type AddArgs = {
5
21
  /**
6
22
  * The unique identifier of the newly created component.
@@ -1 +1 @@
1
- {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../../src/scripts/project/component/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAK7B,OAAO,KAAK,KAAK,MAAM,qCAAqC,CAAC;AAO7D,eAAO,MAAM,SAAS,GACpB,aAAa,IAAI,CAAC,OAAO,KAAK,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,qBAAqB,CAAC,SAKjG,CAAC;AAEF,KAAK,OAAO,GAAG;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CA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