@sitecore-content-sdk/nextjs 0.2.0-beta.19 → 0.2.0-beta.20
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.
|
@@ -35,8 +35,8 @@ const extractFiles = (args) => {
|
|
|
35
35
|
core_1.debug.common('Skipping code extraction, not in deploy context');
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
if (
|
|
39
|
-
|
|
38
|
+
if (args.scConfig.disableCodeGeneration) {
|
|
39
|
+
core_1.debug.common('Skipping code extraction, code generation has been disabled');
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
console.log(chalk_1.default.green('Code extraction started'));
|
|
@@ -45,7 +45,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.sendCode = exports.resolveComponentImportFiles = exports.validateDeployContext = exports.
|
|
48
|
+
exports.sendCode = exports.resolveComponentImportFiles = exports.validateDeployContext = exports.ExtractedFileType = void 0;
|
|
49
49
|
const chalk_1 = __importDefault(require("chalk"));
|
|
50
50
|
const path_1 = __importDefault(require("path"));
|
|
51
51
|
const fs_1 = __importDefault(require("fs"));
|
|
@@ -60,18 +60,6 @@ var ExtractedFileType;
|
|
|
60
60
|
ExtractedFileType["Json"] = "json";
|
|
61
61
|
ExtractedFileType["PackageJson"] = "package.json";
|
|
62
62
|
})(ExtractedFileType || (exports.ExtractedFileType = ExtractedFileType = {}));
|
|
63
|
-
/**
|
|
64
|
-
* Validates consent for code extraction procedures
|
|
65
|
-
* @returns {boolean} - true if consent is given, false otherwise
|
|
66
|
-
*/
|
|
67
|
-
const validateConsent = () => {
|
|
68
|
-
var _a;
|
|
69
|
-
if (((_a = process.env.EXTRACT_CONSENT) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== 'true') {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
return true;
|
|
73
|
-
};
|
|
74
|
-
exports.validateConsent = validateConsent;
|
|
75
63
|
/**
|
|
76
64
|
* Validates if the current operation is done in Vercel, Netlify or XMCloud
|
|
77
65
|
* deploy context
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import chalk from 'chalk';
|
|
11
|
-
import { ExtractedFileType, resolveComponentImportFiles, sendCode,
|
|
11
|
+
import { ExtractedFileType, resolveComponentImportFiles, sendCode, validateDeployContext, } from './utils';
|
|
12
12
|
import { auth } from '@sitecore-content-sdk/core/tools';
|
|
13
13
|
import { debug } from '@sitecore-content-sdk/core';
|
|
14
14
|
import path from 'path';
|
|
@@ -29,8 +29,8 @@ export const extractFiles = (args) => {
|
|
|
29
29
|
debug.common('Skipping code extraction, not in deploy context');
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
if (
|
|
33
|
-
|
|
32
|
+
if (args.scConfig.disableCodeGeneration) {
|
|
33
|
+
debug.common('Skipping code extraction, code generation has been disabled');
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
console.log(chalk.green('Code extraction started'));
|
|
@@ -21,17 +21,6 @@ export var ExtractedFileType;
|
|
|
21
21
|
ExtractedFileType["Json"] = "json";
|
|
22
22
|
ExtractedFileType["PackageJson"] = "package.json";
|
|
23
23
|
})(ExtractedFileType || (ExtractedFileType = {}));
|
|
24
|
-
/**
|
|
25
|
-
* Validates consent for code extraction procedures
|
|
26
|
-
* @returns {boolean} - true if consent is given, false otherwise
|
|
27
|
-
*/
|
|
28
|
-
export const validateConsent = () => {
|
|
29
|
-
var _a;
|
|
30
|
-
if (((_a = process.env.EXTRACT_CONSENT) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== 'true') {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
return true;
|
|
34
|
-
};
|
|
35
24
|
/**
|
|
36
25
|
* Validates if the current operation is done in Vercel, Netlify or XMCloud
|
|
37
26
|
* deploy context
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/nextjs",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.20",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -79,15 +79,15 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@babel/parser": "^7.27.2",
|
|
82
|
-
"@sitecore-content-sdk/core": "0.2.0-beta.
|
|
83
|
-
"@sitecore-content-sdk/react": "0.2.0-beta.
|
|
82
|
+
"@sitecore-content-sdk/core": "0.2.0-beta.20",
|
|
83
|
+
"@sitecore-content-sdk/react": "0.2.0-beta.20",
|
|
84
84
|
"recast": "^0.23.11",
|
|
85
85
|
"regex-parser": "^2.3.1",
|
|
86
86
|
"sync-disk-cache": "^2.1.0"
|
|
87
87
|
},
|
|
88
88
|
"description": "",
|
|
89
89
|
"types": "types/index.d.ts",
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "c02da7b6c3347c5e08b16829871985bbea5aebee",
|
|
91
91
|
"files": [
|
|
92
92
|
"dist",
|
|
93
93
|
"types",
|
|
@@ -14,11 +14,6 @@ export declare enum ExtractedFileType {
|
|
|
14
14
|
Json = "json",
|
|
15
15
|
PackageJson = "package.json"
|
|
16
16
|
}
|
|
17
|
-
/**
|
|
18
|
-
* Validates consent for code extraction procedures
|
|
19
|
-
* @returns {boolean} - true if consent is given, false otherwise
|
|
20
|
-
*/
|
|
21
|
-
export declare const validateConsent: () => boolean;
|
|
22
17
|
/**
|
|
23
18
|
* Validates if the current operation is done in Vercel, Netlify or XMCloud
|
|
24
19
|
* deploy context
|