create-nextjs-cms 0.5.53 → 0.5.55

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 (70) hide show
  1. package/dist/index.js +25 -1
  2. package/package.json +3 -3
  3. package/templates/default/package.json +2 -8
  4. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/LICENSE +0 -191
  5. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/README.md +0 -118
  6. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/install/build.js +0 -38
  7. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/install/check.js +0 -14
  8. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/channel.js +0 -177
  9. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/colour.js +0 -195
  10. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/composite.js +0 -212
  11. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/constructor.js +0 -499
  12. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/index.d.ts +0 -1971
  13. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/index.js +0 -16
  14. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/input.js +0 -809
  15. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/is.js +0 -143
  16. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/libvips.js +0 -207
  17. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/operation.js +0 -1016
  18. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/output.js +0 -1666
  19. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/resize.js +0 -595
  20. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/sharp.js +0 -121
  21. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/utility.js +0 -291
  22. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/package.json +0 -202
  23. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/binding.gyp +0 -298
  24. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/common.cc +0 -1130
  25. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/common.h +0 -402
  26. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/metadata.cc +0 -346
  27. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/metadata.h +0 -90
  28. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/operations.cc +0 -499
  29. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/operations.h +0 -137
  30. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/pipeline.cc +0 -1814
  31. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/pipeline.h +0 -408
  32. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/sharp.cc +0 -43
  33. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/stats.cc +0 -186
  34. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/stats.h +0 -62
  35. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/utilities.cc +0 -288
  36. package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/utilities.h +0 -22
  37. package/templates/default/apps/cms/node_modules/sharp/LICENSE +0 -191
  38. package/templates/default/apps/cms/node_modules/sharp/README.md +0 -118
  39. package/templates/default/apps/cms/node_modules/sharp/install/check.js +0 -41
  40. package/templates/default/apps/cms/node_modules/sharp/lib/channel.js +0 -174
  41. package/templates/default/apps/cms/node_modules/sharp/lib/colour.js +0 -180
  42. package/templates/default/apps/cms/node_modules/sharp/lib/composite.js +0 -210
  43. package/templates/default/apps/cms/node_modules/sharp/lib/constructor.js +0 -452
  44. package/templates/default/apps/cms/node_modules/sharp/lib/index.d.ts +0 -1754
  45. package/templates/default/apps/cms/node_modules/sharp/lib/index.js +0 -16
  46. package/templates/default/apps/cms/node_modules/sharp/lib/input.js +0 -658
  47. package/templates/default/apps/cms/node_modules/sharp/lib/is.js +0 -169
  48. package/templates/default/apps/cms/node_modules/sharp/lib/libvips.js +0 -203
  49. package/templates/default/apps/cms/node_modules/sharp/lib/operation.js +0 -958
  50. package/templates/default/apps/cms/node_modules/sharp/lib/output.js +0 -1587
  51. package/templates/default/apps/cms/node_modules/sharp/lib/resize.js +0 -587
  52. package/templates/default/apps/cms/node_modules/sharp/lib/sharp.js +0 -114
  53. package/templates/default/apps/cms/node_modules/sharp/lib/utility.js +0 -296
  54. package/templates/default/apps/cms/node_modules/sharp/package.json +0 -222
  55. package/templates/default/apps/cms/node_modules/sharp/src/binding.gyp +0 -280
  56. package/templates/default/apps/cms/node_modules/sharp/src/common.cc +0 -1091
  57. package/templates/default/apps/cms/node_modules/sharp/src/common.h +0 -393
  58. package/templates/default/apps/cms/node_modules/sharp/src/metadata.cc +0 -320
  59. package/templates/default/apps/cms/node_modules/sharp/src/metadata.h +0 -85
  60. package/templates/default/apps/cms/node_modules/sharp/src/operations.cc +0 -475
  61. package/templates/default/apps/cms/node_modules/sharp/src/operations.h +0 -125
  62. package/templates/default/apps/cms/node_modules/sharp/src/pipeline.cc +0 -1758
  63. package/templates/default/apps/cms/node_modules/sharp/src/pipeline.h +0 -393
  64. package/templates/default/apps/cms/node_modules/sharp/src/sharp.cc +0 -40
  65. package/templates/default/apps/cms/node_modules/sharp/src/stats.cc +0 -183
  66. package/templates/default/apps/cms/node_modules/sharp/src/stats.h +0 -59
  67. package/templates/default/apps/cms/node_modules/sharp/src/utilities.cc +0 -269
  68. package/templates/default/apps/cms/node_modules/sharp/src/utilities.h +0 -19
  69. package/templates/default/lib/cli.mjs +0 -4
  70. /package/templates/default/{lz.config.ts → cms.config.ts} +0 -0
@@ -1,169 +0,0 @@
1
- // Copyright 2013 Lovell Fuller and others.
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- 'use strict';
5
-
6
- /**
7
- * Is this value defined and not null?
8
- * @private
9
- */
10
- const defined = function (val) {
11
- return typeof val !== 'undefined' && val !== null;
12
- };
13
-
14
- /**
15
- * Is this value an object?
16
- * @private
17
- */
18
- const object = function (val) {
19
- return typeof val === 'object';
20
- };
21
-
22
- /**
23
- * Is this value a plain object?
24
- * @private
25
- */
26
- const plainObject = function (val) {
27
- return Object.prototype.toString.call(val) === '[object Object]';
28
- };
29
-
30
- /**
31
- * Is this value a function?
32
- * @private
33
- */
34
- const fn = function (val) {
35
- return typeof val === 'function';
36
- };
37
-
38
- /**
39
- * Is this value a boolean?
40
- * @private
41
- */
42
- const bool = function (val) {
43
- return typeof val === 'boolean';
44
- };
45
-
46
- /**
47
- * Is this value a Buffer object?
48
- * @private
49
- */
50
- const buffer = function (val) {
51
- return val instanceof Buffer;
52
- };
53
-
54
- /**
55
- * Is this value a typed array object?. E.g. Uint8Array or Uint8ClampedArray?
56
- * @private
57
- */
58
- const typedArray = function (val) {
59
- if (defined(val)) {
60
- switch (val.constructor) {
61
- case Uint8Array:
62
- case Uint8ClampedArray:
63
- case Int8Array:
64
- case Uint16Array:
65
- case Int16Array:
66
- case Uint32Array:
67
- case Int32Array:
68
- case Float32Array:
69
- case Float64Array:
70
- return true;
71
- }
72
- }
73
-
74
- return false;
75
- };
76
-
77
- /**
78
- * Is this value an ArrayBuffer object?
79
- * @private
80
- */
81
- const arrayBuffer = function (val) {
82
- return val instanceof ArrayBuffer;
83
- };
84
-
85
- /**
86
- * Is this value a non-empty string?
87
- * @private
88
- */
89
- const string = function (val) {
90
- return typeof val === 'string' && val.length > 0;
91
- };
92
-
93
- /**
94
- * Is this value a real number?
95
- * @private
96
- */
97
- const number = function (val) {
98
- return typeof val === 'number' && !Number.isNaN(val);
99
- };
100
-
101
- /**
102
- * Is this value an integer?
103
- * @private
104
- */
105
- const integer = function (val) {
106
- return Number.isInteger(val);
107
- };
108
-
109
- /**
110
- * Is this value within an inclusive given range?
111
- * @private
112
- */
113
- const inRange = function (val, min, max) {
114
- return val >= min && val <= max;
115
- };
116
-
117
- /**
118
- * Is this value within the elements of an array?
119
- * @private
120
- */
121
- const inArray = function (val, list) {
122
- return list.includes(val);
123
- };
124
-
125
- /**
126
- * Create an Error with a message relating to an invalid parameter.
127
- *
128
- * @param {string} name - parameter name.
129
- * @param {string} expected - description of the type/value/range expected.
130
- * @param {*} actual - the value received.
131
- * @returns {Error} Containing the formatted message.
132
- * @private
133
- */
134
- const invalidParameterError = function (name, expected, actual) {
135
- return new Error(
136
- `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
137
- );
138
- };
139
-
140
- /**
141
- * Ensures an Error from C++ contains a JS stack.
142
- *
143
- * @param {Error} native - Error with message from C++.
144
- * @param {Error} context - Error with stack from JS.
145
- * @returns {Error} Error with message and stack.
146
- * @private
147
- */
148
- const nativeError = function (native, context) {
149
- context.message = native.message;
150
- return context;
151
- };
152
-
153
- module.exports = {
154
- defined,
155
- object,
156
- plainObject,
157
- fn,
158
- bool,
159
- buffer,
160
- typedArray,
161
- arrayBuffer,
162
- string,
163
- number,
164
- integer,
165
- inRange,
166
- inArray,
167
- invalidParameterError,
168
- nativeError
169
- };
@@ -1,203 +0,0 @@
1
- // Copyright 2013 Lovell Fuller and others.
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- 'use strict';
5
-
6
- const { spawnSync } = require('node:child_process');
7
- const { createHash } = require('node:crypto');
8
- const semverCoerce = require('semver/functions/coerce');
9
- const semverGreaterThanOrEqualTo = require('semver/functions/gte');
10
- const semverSatisfies = require('semver/functions/satisfies');
11
- const detectLibc = require('detect-libc');
12
-
13
- const { config, engines, optionalDependencies } = require('../package.json');
14
-
15
- const minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || /* istanbul ignore next */
16
- config.libvips;
17
- const minimumLibvipsVersion = semverCoerce(minimumLibvipsVersionLabelled).version;
18
-
19
- const prebuiltPlatforms = [
20
- 'darwin-arm64', 'darwin-x64',
21
- 'linux-arm', 'linux-arm64', 'linux-s390x', 'linux-x64',
22
- 'linuxmusl-arm64', 'linuxmusl-x64',
23
- 'win32-ia32', 'win32-x64'
24
- ];
25
-
26
- const spawnSyncOptions = {
27
- encoding: 'utf8',
28
- shell: true
29
- };
30
-
31
- const log = (item) => {
32
- if (item instanceof Error) {
33
- console.error(`sharp: Installation error: ${item.message}`);
34
- } else {
35
- console.log(`sharp: ${item}`);
36
- }
37
- };
38
-
39
- /* istanbul ignore next */
40
- const runtimeLibc = () => detectLibc.isNonGlibcLinuxSync() ? detectLibc.familySync() : '';
41
-
42
- const runtimePlatformArch = () => `${process.platform}${runtimeLibc()}-${process.arch}`;
43
-
44
- /* istanbul ignore next */
45
- const buildPlatformArch = () => {
46
- if (isEmscripten()) {
47
- return 'wasm32';
48
- }
49
- /* eslint camelcase: ["error", { allow: ["^npm_config_"] }] */
50
- const { npm_config_arch, npm_config_platform, npm_config_libc } = process.env;
51
- const libc = typeof npm_config_libc === 'string' ? npm_config_libc : runtimeLibc();
52
- return `${npm_config_platform || process.platform}${libc}-${npm_config_arch || process.arch}`;
53
- };
54
-
55
- const buildSharpLibvipsIncludeDir = () => {
56
- try {
57
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
58
- } catch {
59
- try {
60
- return require('@img/sharp-libvips-dev/include');
61
- } catch {}
62
- }
63
- /* istanbul ignore next */
64
- return '';
65
- };
66
-
67
- const buildSharpLibvipsCPlusPlusDir = () => {
68
- try {
69
- return require('@img/sharp-libvips-dev/cplusplus');
70
- } catch {}
71
- /* istanbul ignore next */
72
- return '';
73
- };
74
-
75
- const buildSharpLibvipsLibDir = () => {
76
- try {
77
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
78
- } catch {
79
- try {
80
- return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
81
- } catch {}
82
- }
83
- /* istanbul ignore next */
84
- return '';
85
- };
86
-
87
- const isUnsupportedNodeRuntime = () => {
88
- /* istanbul ignore next */
89
- if (process.release?.name === 'node' && process.versions) {
90
- if (!semverSatisfies(process.versions.node, engines.node)) {
91
- return { found: process.versions.node, expected: engines.node };
92
- }
93
- }
94
- };
95
-
96
- /* istanbul ignore next */
97
- const isEmscripten = () => {
98
- const { CC } = process.env;
99
- return Boolean(CC && CC.endsWith('/emcc'));
100
- };
101
-
102
- const isRosetta = () => {
103
- /* istanbul ignore next */
104
- if (process.platform === 'darwin' && process.arch === 'x64') {
105
- const translated = spawnSync('sysctl sysctl.proc_translated', spawnSyncOptions).stdout;
106
- return (translated || '').trim() === 'sysctl.proc_translated: 1';
107
- }
108
- return false;
109
- };
110
-
111
- const sha512 = (s) => createHash('sha512').update(s).digest('hex');
112
-
113
- const yarnLocator = () => {
114
- try {
115
- const identHash = sha512(`imgsharp-libvips-${buildPlatformArch()}`);
116
- const npmVersion = semverCoerce(optionalDependencies[`@img/sharp-libvips-${buildPlatformArch()}`]).version;
117
- return sha512(`${identHash}npm:${npmVersion}`).slice(0, 10);
118
- } catch {}
119
- return '';
120
- };
121
-
122
- /* istanbul ignore next */
123
- const spawnRebuild = () =>
124
- spawnSync(`node-gyp rebuild --directory=src ${isEmscripten() ? '--nodedir=emscripten' : ''}`, {
125
- ...spawnSyncOptions,
126
- stdio: 'inherit'
127
- }).status;
128
-
129
- const globalLibvipsVersion = () => {
130
- if (process.platform !== 'win32') {
131
- const globalLibvipsVersion = spawnSync('pkg-config --modversion vips-cpp', {
132
- ...spawnSyncOptions,
133
- env: {
134
- ...process.env,
135
- PKG_CONFIG_PATH: pkgConfigPath()
136
- }
137
- }).stdout;
138
- /* istanbul ignore next */
139
- return (globalLibvipsVersion || '').trim();
140
- } else {
141
- return '';
142
- }
143
- };
144
-
145
- /* istanbul ignore next */
146
- const pkgConfigPath = () => {
147
- if (process.platform !== 'win32') {
148
- const brewPkgConfigPath = spawnSync(
149
- 'which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',
150
- spawnSyncOptions
151
- ).stdout || '';
152
- return [
153
- brewPkgConfigPath.trim(),
154
- process.env.PKG_CONFIG_PATH,
155
- '/usr/local/lib/pkgconfig',
156
- '/usr/lib/pkgconfig',
157
- '/usr/local/libdata/pkgconfig',
158
- '/usr/libdata/pkgconfig'
159
- ].filter(Boolean).join(':');
160
- } else {
161
- return '';
162
- }
163
- };
164
-
165
- const skipSearch = (status, reason, logger) => {
166
- if (logger) {
167
- logger(`Detected ${reason}, skipping search for globally-installed libvips`);
168
- }
169
- return status;
170
- };
171
-
172
- const useGlobalLibvips = (logger) => {
173
- if (Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS) === true) {
174
- return skipSearch(false, 'SHARP_IGNORE_GLOBAL_LIBVIPS', logger);
175
- }
176
- if (Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS) === true) {
177
- return skipSearch(true, 'SHARP_FORCE_GLOBAL_LIBVIPS', logger);
178
- }
179
- /* istanbul ignore next */
180
- if (isRosetta()) {
181
- return skipSearch(false, 'Rosetta', logger);
182
- }
183
- const globalVipsVersion = globalLibvipsVersion();
184
- return !!globalVipsVersion && /* istanbul ignore next */
185
- semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
186
- };
187
-
188
- module.exports = {
189
- minimumLibvipsVersion,
190
- prebuiltPlatforms,
191
- buildPlatformArch,
192
- buildSharpLibvipsIncludeDir,
193
- buildSharpLibvipsCPlusPlusDir,
194
- buildSharpLibvipsLibDir,
195
- isUnsupportedNodeRuntime,
196
- runtimePlatformArch,
197
- log,
198
- yarnLocator,
199
- spawnRebuild,
200
- globalLibvipsVersion,
201
- pkgConfigPath,
202
- useGlobalLibvips
203
- };