portosaurus 1.16.4 → 1.16.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "portosaurus",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "author": "soymadip",
5
5
  "license": "GPL-3.0-only",
6
6
  "description": "Complete portfolio cum personal website solution for your digital personality.",
@@ -21,6 +21,10 @@
21
21
  "blog"
22
22
  ],
23
23
  "type": "module",
24
+ "imports": {
25
+ "#config/*": "./src/config/*",
26
+ "#internal/*": "./src/internal/src/*"
27
+ },
24
28
  "bin": {
25
29
  "portosaurus": "bin/portosaurus.js"
26
30
  },
@@ -1,28 +1,20 @@
1
1
  import fs from "fs";
2
- import { createRequire } from "module";
2
+
3
3
  import path from "path";
4
4
  import { fileURLToPath } from "url";
5
5
 
6
- const require = createRequire(import.meta.url);
7
-
8
6
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
7
  const packagePath = path.resolve(__dirname, "../../");
10
8
  const internalUtils = path.resolve(packagePath, "src/internal/src/utils");
11
9
  const packageConfig = path.resolve(packagePath, "src/config");
12
10
  const packageCss = path.resolve(packagePath, "src/internal/src/css");
13
11
 
14
- const { catppuccinMocha, catppuccinLatte } = require(
15
- path.resolve(packageConfig, "prism.js"),
16
- );
17
- const { appVersion } = require("./appVersion.js");
18
- const { iconMap } = require(path.resolve(packageConfig, "iconMappings.js"));
19
- const { metaTags } = require(path.resolve(packageConfig, "metaTags.js"));
20
- const { useEnabled } = require(
21
- path.resolve(internalUtils, "filterEnabledItems.js"),
22
- );
23
- const { downloadImage } = require(
24
- path.resolve(internalUtils, "imageDownloader.js"),
25
- );
12
+ import { catppuccinMocha, catppuccinLatte } from "#config/prism.js";
13
+ import { appVersion } from "./appVersion.js";
14
+ import { iconMap } from "#config/iconMappings.js";
15
+ import { metaTags } from "#config/metaTags.js";
16
+ import { useEnabled } from "#internal/utils/filterEnabledItems.js";
17
+ import { downloadImage } from "#internal/utils/imageDownloader.js";
26
18
 
27
19
  /**
28
20
  * Resolves the site URL based on config value and environment.
@@ -299,10 +291,10 @@ export function createDocuConf(userConfig, projectRoot = process.cwd()) {
299
291
  }),
300
292
 
301
293
  plugins: [
302
- // require.resolve(`${internalUtils}/generateFavicon.js`),
303
- require.resolve(`${internalUtils}/generateRobotsTxt.js`),
294
+ // path.resolve(internalUtils, "generateFavicon.js"),
295
+ path.resolve(internalUtils, "generateRobotsTxt.js"),
304
296
  [
305
- require.resolve("@easyops-cn/docusaurus-search-local"),
297
+ "@easyops-cn/docusaurus-search-local",
306
298
  {
307
299
  hashed: true,
308
300
  indexDocs: true,