create-gasket-app 7.3.9 → 7.3.11

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,7 +35,8 @@ async function loadPresets({ context }) {
35
35
  // Import the preset via the package file attrs, name and main
36
36
  // We can't specify the cwd for the import, so we need to use the full path
37
37
  // expects type:module & "main": "lib/fullpath.js"
38
- const mod = await import(`${modPath}/${name}/${pkgFile.main}`);
38
+ const entryPath = pkgFile.main ?? pkgFile.exports['.'].import ?? pkgFile.exports['.'].default;
39
+ const mod = await import(`${modPath}/${name}/${entryPath}`);
39
40
  return mod.default?.default || mod.default || mod;
40
41
  } catch (err) {
41
42
  throw new Error(`Failed to install preset ${name}${version}: ${err.message}`);
@@ -47,7 +48,8 @@ async function loadPresets({ context }) {
47
48
  try {
48
49
  await pkgManager.exec(pkgVerb, [localPresetPath]);
49
50
  const pkgFile = require(path.join(localPresetPath, 'package.json'));
50
- const mod = await import(`${modPath}/${pkgFile.name}/${pkgFile.main}`);
51
+ const entryPath = pkgFile.main ?? pkgFile.exports['.'].import ?? pkgFile.exports['.'].default;
52
+ const mod = await import(`${modPath}/${pkgFile.name}/${entryPath}`);
51
53
  return mod.default?.default || mod.default || mod;
52
54
  } catch (err) {
53
55
  throw new Error(`Failed to install local preset ${localPresetPath}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-gasket-app",
3
- "version": "7.3.9",
3
+ "version": "7.3.11",
4
4
  "description": "starter pack for creating a gasket app",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,16 +31,16 @@
31
31
  "mkdirp": "^1.0.4",
32
32
  "ora": "^3.4.0",
33
33
  "semver": "^7.7.1",
34
- "@gasket/plugin-docs": "7.3.6",
35
34
  "@gasket/core": "7.4.1",
35
+ "@gasket/plugin-command": "7.3.8",
36
+ "@gasket/plugin-docs": "7.3.8",
36
37
  "@gasket/plugin-docusaurus": "7.4.2",
37
- "@gasket/plugin-command": "7.3.6",
38
- "@gasket/plugin-dynamic-plugins": "7.3.5",
38
+ "@gasket/plugin-dynamic-plugins": "7.3.7",
39
+ "@gasket/plugin-git": "7.3.4",
39
40
  "@gasket/plugin-logger": "7.3.4",
41
+ "@gasket/plugin-metadata": "7.3.11",
40
42
  "@gasket/request": "7.3.5",
41
- "@gasket/plugin-metadata": "7.3.9",
42
- "@gasket/utils": "7.3.4",
43
- "@gasket/plugin-git": "7.3.4"
43
+ "@gasket/utils": "7.3.4"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@jest/globals": "^29.7.0",