@tryghost/mg-substack 1.3.3 → 1.5.0

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 (2) hide show
  1. package/lib/process.js +6 -6
  2. package/package.json +3 -4
package/lib/process.js CHANGED
@@ -1,14 +1,9 @@
1
1
  import {promises as fs} from 'node:fs';
2
2
  import {join, basename} from 'node:path';
3
3
  import url from 'node:url';
4
- import {domUtils, stringUtils} from '@tryghost/mg-utils';
4
+ import {domUtils, stringUtils, cardUtils} from '@tryghost/mg-utils';
5
5
  import errors from '@tryghost/errors';
6
6
  import SimpleDom from 'simple-dom';
7
- import imageCard from '@tryghost/kg-default-cards/lib/cards/image.js';
8
- import audioCard from '@tryghost/kg-default-cards/lib/cards/audio.js';
9
- import galleryCard from '@tryghost/kg-default-cards/lib/cards/gallery.js';
10
- import bookmarkCard from '@tryghost/kg-default-cards/lib/cards/bookmark.js';
11
- import fileCard from '@tryghost/kg-default-cards/lib/cards/file.js';
12
7
  import {decode} from 'html-entities';
13
8
  import {parseSrcset} from 'srcset';
14
9
  import {_base as debugFactory} from '@tryghost/debug';
@@ -20,6 +15,11 @@ const {startCase} = stringUtils;
20
15
 
21
16
  const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);
22
17
  const debug = debugFactory('migrate:substack:process');
18
+ const imageCard = cardUtils.getCard('image');
19
+ const audioCard = cardUtils.getCard('audio');
20
+ const galleryCard = cardUtils.getCard('gallery');
21
+ const bookmarkCard = cardUtils.getCard('bookmark');
22
+ const fileCard = cardUtils.getCard('file');
23
23
 
24
24
  const getFiles = async (filePath) => {
25
25
  let filenames = await fs.readdir(filePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-substack",
3
- "version": "1.3.3",
3
+ "version": "1.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/TryGhost/migrate.git",
@@ -23,14 +23,13 @@
23
23
  "dependencies": {
24
24
  "@tryghost/debug": "2.0.3",
25
25
  "@tryghost/errors": "3.0.3",
26
- "@tryghost/kg-default-cards": "10.2.10",
27
26
  "@tryghost/string": "0.3.1",
28
27
  "he": "1.2.0",
29
28
  "html-entities": "2.6.0",
30
29
  "simple-dom": "1.4.0",
31
30
  "srcset": "5.0.3",
32
- "@tryghost/mg-fs-utils": "0.23.3",
33
- "@tryghost/mg-utils": "0.8.3"
31
+ "@tryghost/mg-fs-utils": "0.25.0",
32
+ "@tryghost/mg-utils": "0.10.0"
34
33
  },
35
34
  "scripts": {
36
35
  "dev": "echo \"Implement me!\"",