redput 1.4.0 → 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.
package/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2023.08.17, v1.5.0
2
+
3
+ feature:
4
+ - 4cebd14 redput: add support of Mobile Putout Editor
5
+
1
6
  2023.08.16, v1.4.0
2
7
 
3
8
  feature:
@@ -0,0 +1,8 @@
1
+ export const PUTOUT_EDITOR = 'https://putout.cloudcmd.io/#/gist/';
2
+ export const MOBILE_PUTOUT_EDITOR = 'https://putout.vercel.app/#/gist/';
3
+
4
+ export const parseLink = (link) => {
5
+ return link
6
+ .replace(PUTOUT_EDITOR, '')
7
+ .replace(MOBILE_PUTOUT_EDITOR, '');
8
+ };
package/lib/redput.js CHANGED
@@ -5,10 +5,8 @@ import {writePlugin} from './write/index.js';
5
5
 
6
6
  const SUCCESS = [null, 'Done'];
7
7
 
8
- const URL = 'https://putout.cloudcmd.io/#/gist/';
9
-
10
8
  export const redput = async (link, {token}) => {
11
- const gistLink = link.replace(URL, '');
9
+ const gistLink = parseLink(link);
12
10
  const [error, result] = await tryToCatch(readGist, gistLink, {
13
11
  token,
14
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {