@sitecore-content-sdk/content 2.0.0-canary.1 → 2.0.0-canary.10

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.
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchGeneratedComponentFromCache = exports.DesignLibraryPreviewError = exports.sendErrorEvent = exports.createComponentInstance = exports.addStyleElement = exports.getImportMapInfo = exports.getDesignLibraryImportMapEvent = exports.getDesignLibraryComponentPropsEvent = exports.getDesignLibraryComponentPreviewErrorEvent = exports.addServerComponentPreviewHandler = exports.addComponentPreviewHandler = void 0;
3
+ exports.fetchGeneratedComponentFromCache = exports.DesignLibraryPreviewError = exports.sendErrorEvent = exports.createComponentInstance = exports.addStyleElement = exports.getImportMapInfo = exports.getDesignLibraryImportMapEvent = exports.getDesignLibraryComponentPropsEvent = exports.getDesignLibraryErrorEvent = exports.addServerComponentPreviewHandler = exports.addComponentPreviewHandler = void 0;
4
4
  var preview_1 = require("./preview");
5
5
  Object.defineProperty(exports, "addComponentPreviewHandler", { enumerable: true, get: function () { return preview_1.addComponentPreviewHandler; } });
6
6
  Object.defineProperty(exports, "addServerComponentPreviewHandler", { enumerable: true, get: function () { return preview_1.addServerComponentPreviewHandler; } });
7
- Object.defineProperty(exports, "getDesignLibraryComponentPreviewErrorEvent", { enumerable: true, get: function () { return preview_1.getDesignLibraryComponentPreviewErrorEvent; } });
7
+ Object.defineProperty(exports, "getDesignLibraryErrorEvent", { enumerable: true, get: function () { return preview_1.getDesignLibraryErrorEvent; } });
8
8
  Object.defineProperty(exports, "getDesignLibraryComponentPropsEvent", { enumerable: true, get: function () { return preview_1.getDesignLibraryComponentPropsEvent; } });
9
9
  Object.defineProperty(exports, "getDesignLibraryImportMapEvent", { enumerable: true, get: function () { return preview_1.getDesignLibraryImportMapEvent; } });
10
10
  Object.defineProperty(exports, "getImportMapInfo", { enumerable: true, get: function () { return preview_1.getImportMapInfo; } });
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.sendErrorEvent = exports.createComponentInstance = exports.addServerComponentPreviewHandler = exports.addComponentPreviewHandler = exports.DesignLibraryPreviewError = void 0;
7
7
  exports.buildComponentDependencies = buildComponentDependencies;
8
8
  exports.addStyleElement = addStyleElement;
9
- exports.getDesignLibraryComponentPreviewErrorEvent = getDesignLibraryComponentPreviewErrorEvent;
9
+ exports.getDesignLibraryErrorEvent = getDesignLibraryErrorEvent;
10
10
  exports.getDesignLibraryComponentPropsEvent = getDesignLibraryComponentPropsEvent;
11
11
  exports.getDesignLibraryImportMapEvent = getDesignLibraryImportMapEvent;
12
12
  exports.getImportMapInfo = getImportMapInfo;
@@ -29,9 +29,13 @@ const DESIGN_LIBRARY_COMPONENT_PROPS_EVENT_NAME = 'component:generation:componen
29
29
  */
30
30
  const DESIGN_LIBRARY_COMPONENT_PREVIEW_EVENT_NAME = 'component:generation:component-preview';
31
31
  /**
32
- * Event to send component error to design library
32
+ * Event to send component preview error to design library
33
33
  */
34
34
  const DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME = 'component:generation:component-preview-error';
35
+ /**
36
+ * Event to send general component preview error to design library
37
+ */
38
+ const DESIGN_LIBRARY_ERROR_EVENT_NAME = 'component:generation:error';
35
39
  /**
36
40
  * Enumeration of error types for the design library preview.
37
41
  * @internal
@@ -46,6 +50,18 @@ var DesignLibraryPreviewError;
46
50
  * Error occurred during component and event handlers initialization.
47
51
  */
48
52
  DesignLibraryPreviewError["RenderInit"] = "render-init";
53
+ /**
54
+ * The import map is missing
55
+ */
56
+ DesignLibraryPreviewError["ImportMapMissing"] = "import-map-missing";
57
+ /**
58
+ * Error during loading of the import map
59
+ */
60
+ DesignLibraryPreviewError["ImportMapLoad"] = "import-map-load-error";
61
+ /**
62
+ * Error during fetching the generated component data from secured endpoint
63
+ */
64
+ DesignLibraryPreviewError["GeneratedComponentFetch"] = "generated-component-fetch-error";
49
65
  })(DesignLibraryPreviewError || (exports.DesignLibraryPreviewError = DesignLibraryPreviewError = {}));
50
66
  /**
51
67
  * Builds the component dependencies from the component imports and the import map.
@@ -192,18 +208,27 @@ const createComponentInstance = (importMap, generatedComponentData) => {
192
208
  };
193
209
  exports.createComponentInstance = createComponentInstance;
194
210
  /**
195
- * Generates a DesignLibraryComponentPreviewErrorEvent with the given uid and error.
211
+ * Generates a DesignLibraryErrorEvent depending on the type of error with the given uid and error.
196
212
  * @param {string} uid - The unique identifier for the event.
197
213
  * @param {unknown} error - The error to be sent.
198
214
  * @param {DesignLibraryPreviewError} type - The type of error.
199
- * @returns An object representing the DesignLibraryComponentPreviewErrorEvent.
215
+ * @returns An object representing the DesignLibraryErrorEvent.
200
216
  * @internal
201
217
  */
202
- function getDesignLibraryComponentPreviewErrorEvent(uid, error, type) {
203
- return {
204
- name: DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME,
205
- message: { uid, error, type },
206
- };
218
+ function getDesignLibraryErrorEvent(uid, error, type) {
219
+ switch (type) {
220
+ case DesignLibraryPreviewError.Render:
221
+ case DesignLibraryPreviewError.RenderInit:
222
+ return {
223
+ name: DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME,
224
+ message: { uid, error, type },
225
+ };
226
+ default:
227
+ return {
228
+ name: DESIGN_LIBRARY_ERROR_EVENT_NAME,
229
+ message: { uid, error, type },
230
+ };
231
+ }
207
232
  }
208
233
  /**
209
234
  * Generates a DesignLibraryComponentPropsEvent with the given uid, fields and parameters.
@@ -266,14 +291,14 @@ function isImportEntryInfoArray(data) {
266
291
  typeof data[0].exports[0] === 'string');
267
292
  }
268
293
  /**
269
- * Sends a component preview error event to the design library
294
+ * Sends a design library error event to the design library
270
295
  * @param {string} uid - The unique identifier of the component that's being edited.
271
296
  * @param {unknown} error - The error object or message to be sent.
272
297
  * @param {DesignLibraryPreviewError} type - The type of error, as defined in DesignLibraryPreviewError.
273
298
  * @internal
274
299
  */
275
300
  const sendErrorEvent = (uid, error, type) => {
276
- const errorEvent = getDesignLibraryComponentPreviewErrorEvent(uid, error, type);
301
+ const errorEvent = getDesignLibraryErrorEvent(uid, error, type);
277
302
  console.error('Component Library: sending error event', errorEvent);
278
303
  if (typeof window !== 'undefined') {
279
304
  const target = window.parent && window.parent !== window ? window.parent : window;
@@ -301,5 +326,6 @@ async function fetchGeneratedComponentFromCache(id, token, edgeUrl = SITECORE_ED
301
326
  if (componentDataResponse.status !== 200) {
302
327
  throw new Error(`Failed to fetch generated component data from cache for id: ${id}. Response Status: ${componentDataResponse.status}, Response Status Text: ${componentDataResponse.statusText}`);
303
328
  }
304
- return componentDataResponse.data;
329
+ const generatedComponentData = JSON.parse(componentDataResponse.data.content);
330
+ return generatedComponentData;
305
331
  }
@@ -7,7 +7,7 @@ exports.unitMocks = exports.extractFiles = void 0;
7
7
  /* eslint-disable jsdoc/require-jsdoc */
8
8
  const chalk_1 = __importDefault(require("chalk"));
9
9
  const utils_1 = require("./utils");
10
- const tools_1 = require("@sitecore-content-sdk/core/tools");
10
+ const node_tools_1 = require("@sitecore-content-sdk/core/node-tools");
11
11
  const core_1 = require("@sitecore-content-sdk/core");
12
12
  const path_1 = __importDefault(require("path"));
13
13
  const fs_1 = __importDefault(require("fs"));
@@ -54,7 +54,7 @@ function _extractFiles(args = {}) {
54
54
  try {
55
55
  // Use Edge Platform mesh endpoint - staging is ready, prod QA in progress
56
56
  const targetUrl = scConfig.api.edge.edgeUrl;
57
- const { accessToken } = await tools_1.auth.clientCredentialsFlow(authParams);
57
+ const { accessToken } = await node_tools_1.auth.clientCredentialsFlow(authParams);
58
58
  if (!accessToken) {
59
59
  console.error(chalk_1.default.red('Failed to get access token, aborting code extraction'));
60
60
  return;
@@ -252,19 +252,11 @@ const prepImportMaps = async (paths, separateMaps) => {
252
252
  ? componentPath
253
253
  : path_1.default.resolve(appPath, componentPath);
254
254
  // read the start of the file that may be 'use client'
255
- const firstLine = await new Promise((resolve) => {
256
- let readBuffer = '';
257
- const stream = fs_1.default.createReadStream(fullPath, { end: 12 });
258
- stream
259
- .on('data', async (chunk) => {
260
- readBuffer += chunk.toString();
261
- })
262
- .on('close', () => resolve(readBuffer))
263
- .on('error', () => resolve(''));
264
- });
265
- if (!firstLine)
255
+ const fileContent = await fs_1.default.promises.readFile(fullPath, 'utf8');
256
+ if (!fileContent)
266
257
  continue;
267
- if (firstLine.match(/['"]use client['"]/)) {
258
+ // check if 'use client' directive is present, ignoring any comments or whitespace before it
259
+ if (fileContent.match(/^(?:\s|\/\/[^\n]*\n|\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/)*['"]use client['"]/)) {
268
260
  clientPaths.push(fullPath);
269
261
  }
270
262
  else {
@@ -7,7 +7,7 @@ exports.generateSites = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const chalk_1 = __importDefault(require("chalk"));
9
9
  const fs_1 = __importDefault(require("fs"));
10
- const tools_1 = require("@sitecore-content-sdk/core/tools");
10
+ const node_tools_1 = require("@sitecore-content-sdk/core/node-tools");
11
11
  const site_1 = require("../site");
12
12
  const client_1 = require("../client");
13
13
  const debug_1 = __importDefault(require("../debug"));
@@ -51,7 +51,7 @@ const generateSites = ({ destinationPath } = {}) => {
51
51
  language: scConfig.defaultLanguage,
52
52
  };
53
53
  sites.unshift(defaultSite);
54
- (0, tools_1.ensurePathExists)(sitesFilePath);
54
+ (0, node_tools_1.ensurePathExists)(sitesFilePath);
55
55
  fs_1.default.writeFileSync(sitesFilePath, JSON.stringify(sites, null, 2), { encoding: 'utf8' });
56
56
  };
57
57
  };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getComponentList = exports.defaultImportMapTemplate = exports.writeImportMap = exports.extractFiles = exports.scaffoldComponent = exports.generateSites = void 0;
4
+ var generateSites_1 = require("./generateSites");
5
+ Object.defineProperty(exports, "generateSites", { enumerable: true, get: function () { return generateSites_1.generateSites; } });
6
+ var scaffold_1 = require("./scaffold");
7
+ Object.defineProperty(exports, "scaffoldComponent", { enumerable: true, get: function () { return scaffold_1.scaffoldComponent; } });
8
+ var extract_files_1 = require("./codegen/extract-files");
9
+ Object.defineProperty(exports, "extractFiles", { enumerable: true, get: function () { return extract_files_1.extractFiles; } });
10
+ var import_map_1 = require("./codegen/import-map");
11
+ Object.defineProperty(exports, "writeImportMap", { enumerable: true, get: function () { return import_map_1.writeImportMap; } });
12
+ Object.defineProperty(exports, "defaultImportMapTemplate", { enumerable: true, get: function () { return import_map_1.defaultMapTemplate; } });
13
+ var templating_1 = require("./templating");
14
+ Object.defineProperty(exports, "getComponentList", { enumerable: true, get: function () { return templating_1.getComponentList; } });
@@ -1,30 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getComponentSpecUrl = exports.getComponentSpec = exports.defaultImportMapTemplate = exports.writeImportMap = exports.extractFiles = exports.scaffoldComponent = exports.generateSites = void 0;
18
- var generateSites_1 = require("./generateSites");
19
- Object.defineProperty(exports, "generateSites", { enumerable: true, get: function () { return generateSites_1.generateSites; } });
20
- var scaffold_1 = require("./scaffold");
21
- Object.defineProperty(exports, "scaffoldComponent", { enumerable: true, get: function () { return scaffold_1.scaffoldComponent; } });
22
- var extract_files_1 = require("./codegen/extract-files");
23
- Object.defineProperty(exports, "extractFiles", { enumerable: true, get: function () { return extract_files_1.extractFiles; } });
24
- var import_map_1 = require("./codegen/import-map");
25
- Object.defineProperty(exports, "writeImportMap", { enumerable: true, get: function () { return import_map_1.writeImportMap; } });
26
- Object.defineProperty(exports, "defaultImportMapTemplate", { enumerable: true, get: function () { return import_map_1.defaultMapTemplate; } });
3
+ exports.filterComponentsByType = exports.getComponentSpecUrl = exports.getComponentSpec = void 0;
27
4
  var component_generation_1 = require("./codegen/component-generation");
28
5
  Object.defineProperty(exports, "getComponentSpec", { enumerable: true, get: function () { return component_generation_1.getComponentSpec; } });
29
6
  Object.defineProperty(exports, "getComponentSpecUrl", { enumerable: true, get: function () { return component_generation_1.getComponentSpecUrl; } });
30
- __exportStar(require("./templating"), exports);
7
+ var templating_1 = require("./templating");
8
+ Object.defineProperty(exports, "filterComponentsByType", { enumerable: true, get: function () { return templating_1.filterComponentsByType; } });
@@ -1 +1 @@
1
- export { addComponentPreviewHandler, addServerComponentPreviewHandler, getDesignLibraryComponentPreviewErrorEvent, getDesignLibraryComponentPropsEvent, getDesignLibraryImportMapEvent, getImportMapInfo, addStyleElement, createComponentInstance, sendErrorEvent, DesignLibraryPreviewError, fetchGeneratedComponentFromCache, } from './preview';
1
+ export { addComponentPreviewHandler, addServerComponentPreviewHandler, getDesignLibraryErrorEvent, getDesignLibraryComponentPropsEvent, getDesignLibraryImportMapEvent, getImportMapInfo, addStyleElement, createComponentInstance, sendErrorEvent, DesignLibraryPreviewError, fetchGeneratedComponentFromCache, } from './preview';
@@ -15,9 +15,13 @@ const DESIGN_LIBRARY_COMPONENT_PROPS_EVENT_NAME = 'component:generation:componen
15
15
  */
16
16
  const DESIGN_LIBRARY_COMPONENT_PREVIEW_EVENT_NAME = 'component:generation:component-preview';
17
17
  /**
18
- * Event to send component error to design library
18
+ * Event to send component preview error to design library
19
19
  */
20
20
  const DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME = 'component:generation:component-preview-error';
21
+ /**
22
+ * Event to send general component preview error to design library
23
+ */
24
+ const DESIGN_LIBRARY_ERROR_EVENT_NAME = 'component:generation:error';
21
25
  /**
22
26
  * Enumeration of error types for the design library preview.
23
27
  * @internal
@@ -32,6 +36,18 @@ export var DesignLibraryPreviewError;
32
36
  * Error occurred during component and event handlers initialization.
33
37
  */
34
38
  DesignLibraryPreviewError["RenderInit"] = "render-init";
39
+ /**
40
+ * The import map is missing
41
+ */
42
+ DesignLibraryPreviewError["ImportMapMissing"] = "import-map-missing";
43
+ /**
44
+ * Error during loading of the import map
45
+ */
46
+ DesignLibraryPreviewError["ImportMapLoad"] = "import-map-load-error";
47
+ /**
48
+ * Error during fetching the generated component data from secured endpoint
49
+ */
50
+ DesignLibraryPreviewError["GeneratedComponentFetch"] = "generated-component-fetch-error";
35
51
  })(DesignLibraryPreviewError || (DesignLibraryPreviewError = {}));
36
52
  /**
37
53
  * Builds the component dependencies from the component imports and the import map.
@@ -175,18 +191,27 @@ export const createComponentInstance = (importMap, generatedComponentData) => {
175
191
  return exports.Component;
176
192
  };
177
193
  /**
178
- * Generates a DesignLibraryComponentPreviewErrorEvent with the given uid and error.
194
+ * Generates a DesignLibraryErrorEvent depending on the type of error with the given uid and error.
179
195
  * @param {string} uid - The unique identifier for the event.
180
196
  * @param {unknown} error - The error to be sent.
181
197
  * @param {DesignLibraryPreviewError} type - The type of error.
182
- * @returns An object representing the DesignLibraryComponentPreviewErrorEvent.
198
+ * @returns An object representing the DesignLibraryErrorEvent.
183
199
  * @internal
184
200
  */
185
- export function getDesignLibraryComponentPreviewErrorEvent(uid, error, type) {
186
- return {
187
- name: DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME,
188
- message: { uid, error, type },
189
- };
201
+ export function getDesignLibraryErrorEvent(uid, error, type) {
202
+ switch (type) {
203
+ case DesignLibraryPreviewError.Render:
204
+ case DesignLibraryPreviewError.RenderInit:
205
+ return {
206
+ name: DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME,
207
+ message: { uid, error, type },
208
+ };
209
+ default:
210
+ return {
211
+ name: DESIGN_LIBRARY_ERROR_EVENT_NAME,
212
+ message: { uid, error, type },
213
+ };
214
+ }
190
215
  }
191
216
  /**
192
217
  * Generates a DesignLibraryComponentPropsEvent with the given uid, fields and parameters.
@@ -249,14 +274,14 @@ export function isImportEntryInfoArray(data) {
249
274
  typeof data[0].exports[0] === 'string');
250
275
  }
251
276
  /**
252
- * Sends a component preview error event to the design library
277
+ * Sends a design library error event to the design library
253
278
  * @param {string} uid - The unique identifier of the component that's being edited.
254
279
  * @param {unknown} error - The error object or message to be sent.
255
280
  * @param {DesignLibraryPreviewError} type - The type of error, as defined in DesignLibraryPreviewError.
256
281
  * @internal
257
282
  */
258
283
  export const sendErrorEvent = (uid, error, type) => {
259
- const errorEvent = getDesignLibraryComponentPreviewErrorEvent(uid, error, type);
284
+ const errorEvent = getDesignLibraryErrorEvent(uid, error, type);
260
285
  console.error('Component Library: sending error event', errorEvent);
261
286
  if (typeof window !== 'undefined') {
262
287
  const target = window.parent && window.parent !== window ? window.parent : window;
@@ -283,5 +308,6 @@ export async function fetchGeneratedComponentFromCache(id, token, edgeUrl = SITE
283
308
  if (componentDataResponse.status !== 200) {
284
309
  throw new Error(`Failed to fetch generated component data from cache for id: ${id}. Response Status: ${componentDataResponse.status}, Response Status Text: ${componentDataResponse.statusText}`);
285
310
  }
286
- return componentDataResponse.data;
311
+ const generatedComponentData = JSON.parse(componentDataResponse.data.content);
312
+ return generatedComponentData;
287
313
  }
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable jsdoc/require-jsdoc */
2
2
  import chalk from 'chalk';
3
3
  import { ExtractedFileType, resolveComponentImportFiles, sendCode, validateDeployContext, readNamedExports, } from './utils';
4
- import { auth } from '@sitecore-content-sdk/core/tools';
4
+ import { auth } from '@sitecore-content-sdk/core/node-tools';
5
5
  import { debug } from '@sitecore-content-sdk/core';
6
6
  import path from 'path';
7
7
  import fs from 'fs';
@@ -210,19 +210,11 @@ const prepImportMaps = async (paths, separateMaps) => {
210
210
  ? componentPath
211
211
  : path.resolve(appPath, componentPath);
212
212
  // read the start of the file that may be 'use client'
213
- const firstLine = await new Promise((resolve) => {
214
- let readBuffer = '';
215
- const stream = fs.createReadStream(fullPath, { end: 12 });
216
- stream
217
- .on('data', async (chunk) => {
218
- readBuffer += chunk.toString();
219
- })
220
- .on('close', () => resolve(readBuffer))
221
- .on('error', () => resolve(''));
222
- });
223
- if (!firstLine)
213
+ const fileContent = await fs.promises.readFile(fullPath, 'utf8');
214
+ if (!fileContent)
224
215
  continue;
225
- if (firstLine.match(/['"]use client['"]/)) {
216
+ // check if 'use client' directive is present, ignoring any comments or whitespace before it
217
+ if (fileContent.match(/^(?:\s|\/\/[^\n]*\n|\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/)*['"]use client['"]/)) {
226
218
  clientPaths.push(fullPath);
227
219
  }
228
220
  else {
@@ -1,7 +1,7 @@
1
1
  import path from 'path';
2
2
  import chalk from 'chalk';
3
3
  import fs from 'fs';
4
- import { ensurePathExists } from '@sitecore-content-sdk/core/tools';
4
+ import { ensurePathExists } from '@sitecore-content-sdk/core/node-tools';
5
5
  import { SiteInfoService } from '../site';
6
6
  import { createGraphQLClientFactory } from '../client';
7
7
  import debug from '../debug';
@@ -0,0 +1,5 @@
1
+ export { generateSites } from './generateSites';
2
+ export { scaffoldComponent } from './scaffold';
3
+ export { extractFiles } from './codegen/extract-files';
4
+ export { writeImportMap, defaultMapTemplate as defaultImportMapTemplate, } from './codegen/import-map';
5
+ export { getComponentList } from './templating';
@@ -1,6 +1,2 @@
1
- export { generateSites } from './generateSites';
2
- export { scaffoldComponent } from './scaffold';
3
- export { extractFiles } from './codegen/extract-files';
4
- export { writeImportMap, defaultMapTemplate as defaultImportMapTemplate, } from './codegen/import-map';
5
1
  export { getComponentSpec, getComponentSpecUrl } from './codegen/component-generation';
6
- export * from './templating';
2
+ export { filterComponentsByType, } from './templating';
@@ -0,0 +1 @@
1
+ export * from './types/tools/index-node';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/content",
3
- "version": "2.0.0-canary.1",
3
+ "version": "2.0.0-canary.10",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -15,7 +15,7 @@
15
15
  "test": "mocha \"./src/**/*.test.ts\"",
16
16
  "prepublishOnly": "npm run build",
17
17
  "coverage": "nyc npm test",
18
- "generate-docs": "npx typedoc --plugin typedoc-plugin-markdown --outputFileStrategy Members --parametersFormat table --readme none --out ../../ref-docs/content --entryPoints src/index.ts --entryPoints src/config/index.ts --entryPoints src/config-cli/index.ts --entryPoints src/client/index.ts --entryPoints src/i18n/index.ts --entryPoints src/layout/index.ts --entryPoints src/media/index.ts --entryPoints src/personalize/index.ts --entryPoints src/site/index.ts --entryPoints src/editing/index.ts --entryPoints src/tools/index.ts --entryPoints src/codegen/index.ts --githubPages false",
18
+ "generate-docs": "npx typedoc --plugin typedoc-plugin-markdown --outputFileStrategy Members --parametersFormat table --readme none --out ../../ref-docs/content --entryPoints src/index.ts --entryPoints src/config/index.ts --entryPoints src/config-cli/index.ts --entryPoints src/client/index.ts --entryPoints src/i18n/index.ts --entryPoints src/layout/index.ts --entryPoints src/media/index.ts --entryPoints src/personalize/index.ts --entryPoints src/site/index.ts --entryPoints src/editing/index.ts --entryPoints src/tools/index.ts --entryPoints src/tools/index-node.ts --entryPoints src/codegen/index.ts --githubPages false",
19
19
  "api-extractor": "npm run build && api-extractor run --local --verbose",
20
20
  "api-extractor:verify": "api-extractor run"
21
21
  },
@@ -77,7 +77,7 @@
77
77
  "@sitecore-cloudsdk/events": "^0.5.1"
78
78
  },
79
79
  "dependencies": {
80
- "@sitecore-content-sdk/core": "2.0.0-canary.1",
80
+ "@sitecore-content-sdk/core": "2.0.0-canary.10",
81
81
  "chalk": "^4.1.2",
82
82
  "debug": "^4.4.0",
83
83
  "glob": "^11.0.2",
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "description": "",
88
88
  "types": "types/index.d.ts",
89
- "gitHead": "b457ff6e0b17787c66803a15b50da0d3ad6e4200",
89
+ "gitHead": "6246e4787e22778e64c90bcd9292a9988b3552a8",
90
90
  "files": [
91
91
  "dist",
92
92
  "types",
@@ -152,6 +152,11 @@
152
152
  "import": "./dist/esm/tools/index.js",
153
153
  "require": "./dist/cjs/tools/index.js",
154
154
  "types": "./types/tools/index.d.ts"
155
+ },
156
+ "./node-tools": {
157
+ "import": "./dist/esm/tools/index-node.js",
158
+ "require": "./dist/cjs/tools/index-node.js",
159
+ "types": "./types/tools/index-node.d.ts"
155
160
  }
156
161
  }
157
162
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sitecore-client.d.ts","sourceRoot":"","sources":["../../src/client/sitecore-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,YAAY,EACZ,aAAa,EAGd,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAGL,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EAIvB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAwB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,cAAc,EACd,s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AC,QAAQ,EAAE,MAAM,GAAG,aAAa;IAO3D,SAAS,CAAC,qBAAqB,IAAI,kBAAkB;IAQrD;;;;;OAKG;IACH;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,iBAAiB;IAU3E,OAAO,CAAC,WAAW;IA4CnB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,kBAAkB;CAK3B"}
@@ -1,2 +1,2 @@
1
- export { addComponentPreviewHandler, addServerComponentPreviewHandler, getDesignLibraryComponentPreviewErrorEvent, getDesignLibraryComponentPropsEvent, getDesignLibraryImportMapEvent, getImportMapInfo, addStyleElement, createComponentInstance, sendErrorEvent, DesignLibraryPreviewError, ImportEntry, ImportEntryInfo, GeneratedComponentData, ComponentPreviewEventArgs, ServerComponentPreviewEventArgs, fetchGeneratedComponentFromCache, } from './preview';
1
+ export { addComponentPreviewHandler, addServerComponentPreviewHandler, getDesignLibraryErrorEvent, getDesignLibraryComponentPropsEvent, getDesignLibraryImportMapEvent, getImportMapInfo, addStyleElement, createComponentInstance, sendErrorEvent, DesignLibraryPreviewError, ImportEntry, ImportEntryInfo, GeneratedComponentData, ComponentPreviewEventArgs, ServerComponentPreviewEventArgs, fetchGeneratedComponentFromCache, } from './preview';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editing/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,0CAA0C,EAC1C,mCAAmC,EACnC,8BAA8B,EAC9B,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editing/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,0BAA0B,EAC1B,mCAAmC,EACnC,8BAA8B,EAC9B,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,WAAW,CAAC"}
@@ -13,9 +13,13 @@ declare const DESIGN_LIBRARY_COMPONENT_PROPS_EVENT_NAME = "component:generation:
13
13
  */
14
14
  declare const DESIGN_LIBRARY_COMPONENT_PREVIEW_EVENT_NAME = "component:generation:component-preview";
15
15
  /**
16
- * Event to send component error to design library
16
+ * Event to send component preview error to design library
17
17
  */
18
18
  declare const DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME = "component:generation:component-preview-error";
19
+ /**
20
+ * Event to send general component preview error to design library
21
+ */
22
+ declare const DESIGN_LIBRARY_ERROR_EVENT_NAME = "component:generation:error";
19
23
  /**
20
24
  * Represents an import map entry.
21
25
  * @public
@@ -127,6 +131,7 @@ export interface ServerComponentPreviewEventArgs extends DesignLibraryEvent {
127
131
  }
128
132
  /**
129
133
  * Represents an event indicating the import map to be sent to design library
134
+ * @internal
130
135
  */
131
136
  export interface DesignLibraryImportMapEvent extends DesignLibraryEvent {
132
137
  name: typeof DESIGN_LIBRARY_IMPORT_MAP_EVENT_NAME;
@@ -140,6 +145,7 @@ export interface DesignLibraryImportMapEvent extends DesignLibraryEvent {
140
145
  }
141
146
  /**
142
147
  * Represents an event indicating the component props to be sent to design library
148
+ * @internal
143
149
  */
144
150
  export interface DesignLibraryComponentPropsEvent extends DesignLibraryEvent {
145
151
  name: typeof DESIGN_LIBRARY_COMPONENT_PROPS_EVENT_NAME;
@@ -151,13 +157,27 @@ export interface DesignLibraryComponentPropsEvent extends DesignLibraryEvent {
151
157
  }
152
158
  /**
153
159
  * Represents an event indicating the preview error to be sent to design library.
160
+ * Sending this type of event will trigger attempt regenerate the component by design library and resend the preview event.
161
+ * @internal
154
162
  */
155
163
  export interface DesignLibraryComponentPreviewErrorEvent extends DesignLibraryEvent {
156
164
  name: typeof DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME;
157
165
  message: {
158
166
  uid: string;
159
167
  error: unknown;
160
- type: DesignLibraryPreviewError;
168
+ type: DesignLibraryPreviewError.Render | DesignLibraryPreviewError.RenderInit;
169
+ };
170
+ }
171
+ /**
172
+ * Represents an event indicating a general error to be sent to design library.
173
+ * @internal
174
+ */
175
+ export interface DesignLibraryErrorEvent extends DesignLibraryEvent {
176
+ name: typeof DESIGN_LIBRARY_ERROR_EVENT_NAME;
177
+ message: {
178
+ uid: string;
179
+ error: unknown;
180
+ type: Omit<DesignLibraryPreviewError, DesignLibraryPreviewError.Render | DesignLibraryPreviewError.RenderInit>;
161
181
  };
162
182
  }
163
183
  /**
@@ -172,7 +192,19 @@ export declare enum DesignLibraryPreviewError {
172
192
  /**
173
193
  * Error occurred during component and event handlers initialization.
174
194
  */
175
- RenderInit = "render-init"
195
+ RenderInit = "render-init",
196
+ /**
197
+ * The import map is missing
198
+ */
199
+ ImportMapMissing = "import-map-missing",
200
+ /**
201
+ * Error during loading of the import map
202
+ */
203
+ ImportMapLoad = "import-map-load-error",
204
+ /**
205
+ * Error during fetching the generated component data from secured endpoint
206
+ */
207
+ GeneratedComponentFetch = "generated-component-fetch-error"
176
208
  }
177
209
  /**
178
210
  * Builds the component dependencies from the component imports and the import map.
@@ -230,14 +262,14 @@ export declare function addStyleElement(stylesContent: string): void;
230
262
  */
231
263
  export declare const createComponentInstance: (importMap: ImportEntry[], generatedComponentData: GeneratedComponentData) => unknown;
232
264
  /**
233
- * Generates a DesignLibraryComponentPreviewErrorEvent with the given uid and error.
265
+ * Generates a DesignLibraryErrorEvent depending on the type of error with the given uid and error.
234
266
  * @param {string} uid - The unique identifier for the event.
235
267
  * @param {unknown} error - The error to be sent.
236
268
  * @param {DesignLibraryPreviewError} type - The type of error.
237
- * @returns An object representing the DesignLibraryComponentPreviewErrorEvent.
269
+ * @returns An object representing the DesignLibraryErrorEvent.
238
270
  * @internal
239
271
  */
240
- export declare function getDesignLibraryComponentPreviewErrorEvent(uid: string, error: unknown, type: DesignLibraryPreviewError): DesignLibraryComponentPreviewErrorEvent;
272
+ export declare function getDesignLibraryErrorEvent(uid: string, error: unknown, type: DesignLibraryPreviewError): DesignLibraryErrorEvent | DesignLibraryComponentPreviewErrorEvent;
241
273
  /**
242
274
  * Generates a DesignLibraryComponentPropsEvent with the given uid, fields and parameters.
243
275
  * @param {string} uid - The unique identifier for the event.
@@ -268,7 +300,7 @@ export declare function getImportMapInfo(importMap: ImportEntry[]): ImportEntryI
268
300
  */
269
301
  export declare function isImportEntryInfoArray(data: unknown): data is ImportEntryInfo[];
270
302
  /**
271
- * Sends a component preview error event to the design library
303
+ * Sends a design library error event to the design library
272
304
  * @param {string} uid - The unique identifier of the component that's being edited.
273
305
  * @param {unknown} error - The error object or message to be sent.
274
306
  * @param {DesignLibraryPreviewError} type - The type of error, as defined in DesignLibraryPreviewError.
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/editing/codegen/preview.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAiB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,oCAAoC,oCAAoC,CAAC;AAE/E;;GAEG;AACH,QAAA,MAAM,yCAAyC,yCAAyC,CAAC;AAEzF;;GAEG;AACH,QAAA,MAAM,2CAA2C,2CAA2C,CAAC;AAE7F;;GAEG;AAC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,cAAc,CAAA;CAAE,kBAwCzD,CAAC;AAGF,iBAAS,mBAAmB,CAC1B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC5C,SAAS,SAAS,EAClB,0BAA0B,GAAE,MAA+B,UAuF5D"}
@@ -0,0 +1,6 @@
1
+ export { generateSites, GenerateSitesConfig } from './generateSites';
2
+ export { scaffoldComponent } from './scaffold';
3
+ export { extractFiles } from './codegen/extract-files';
4
+ export { writeImportMap, WriteImportMapArgs, WriteImportMapArgsInternal, defaultMapTemplate as defaultImportMapTemplate, ModuleExports, } from './codegen/import-map';
5
+ export { getComponentList } from './templating';
6
+ //# sourceMappingURL=index-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/tools/index-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,IAAI,wBAAwB,EAC9C,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
@@ -1,8 +1,4 @@
1
- export { generateSites, GenerateSitesConfig } from './generateSites';
2
- export { scaffoldComponent } from './scaffold';
3
1
  export { GenerateMapFunction, GenerateMapArgs } from './generate-map';
4
- export { extractFiles } from './codegen/extract-files';
5
- export { writeImportMap, WriteImportMapArgs, WriteImportMapArgsInternal, defaultMapTemplate as defaultImportMapTemplate, ModuleExports, } from './codegen/import-map';
6
2
  export { getComponentSpec, getComponentSpecUrl } from './codegen/component-generation';
7
- export * from './templating';
3
+ export { ComponentFile, ComponentImport, ComponentFileWithType, ComponentType, RouterType, filterComponentsByType, ComponentMapEntry, ComponentMapTemplate, EnhancedComponentMapTemplate, } from './templating';
8
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,IAAI,wBAAwB,EAC9C,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACvF,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EACL,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,cAAc,CAAC"}