@linktr.ee/create-link-app 1.7.6 → 1.7.9

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/README.md CHANGED
@@ -89,7 +89,7 @@ USAGE
89
89
 
90
90
  FLAGS
91
91
  -p, --path=<value> Specify custom path to project directory
92
- --update Push update for existing Link App.
92
+ --update [Deprecated]
93
93
 
94
94
  DESCRIPTION
95
95
  Deploy your Link App and test it on Linktr.ee
@@ -101,7 +101,7 @@ Deploy.flags = {
101
101
  description: 'Specify custom path to project directory',
102
102
  }),
103
103
  update: core_1.Flags.boolean({
104
- description: 'Push update for existing Link App.',
104
+ description: '[Deprecated]',
105
105
  }),
106
106
  // Test local link-types service, with --endpoint http://localhost:8081
107
107
  endpoint: core_1.Flags.string({
@@ -5,15 +5,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const axios_1 = __importDefault(require("axios"));
7
7
  async function checkLinkAppExists(url, linkAppId, accessToken) {
8
- const linkAppCreateUrl = `${url}/${linkAppId}`;
9
- const response = await axios_1.default.get(linkAppCreateUrl, {
10
- headers: {
11
- Authorization: `Bearer ${accessToken}`,
12
- },
13
- });
14
- if (response.status !== 200) {
8
+ try {
9
+ const linkAppCreateUrl = `${url}/${linkAppId}`;
10
+ const response = await axios_1.default.get(linkAppCreateUrl, {
11
+ headers: {
12
+ Authorization: `Bearer ${accessToken}`,
13
+ },
14
+ });
15
+ if (response.status !== 200) {
16
+ return false;
17
+ }
18
+ return response.data?.linkTypeId === linkAppId;
19
+ }
20
+ catch (err) {
15
21
  return false;
16
22
  }
17
- return response.data?.linkTypeId === linkAppId;
18
23
  }
19
24
  exports.default = checkLinkAppExists;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.6",
2
+ "version": "1.7.9",
3
3
  "commands": {
4
4
  "build": {
5
5
  "id": "build",
@@ -96,7 +96,7 @@
96
96
  "update": {
97
97
  "name": "update",
98
98
  "type": "boolean",
99
- "description": "Push update for existing Link App.",
99
+ "description": "[Deprecated]",
100
100
  "allowNo": false
101
101
  },
102
102
  "endpoint": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/create-link-app",
3
- "version": "1.7.6",
3
+ "version": "1.7.9",
4
4
  "description": "Create a Link App on Linktr.ee.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Linktree",
@@ -5,6 +5,7 @@
5
5
  "The simple greeting link is an example link type which enables a user to to show a simple greeting on their linktr.ee profile.",
6
6
  "This example code acts as a base for experimenting with link type capabilities"
7
7
  ],
8
+ "manifest_version": "0.0.1",
8
9
  "version": "1.0.0",
9
10
  "supporting_links": {
10
11
  "terms_of_service": "https://example.com/terms-of-service",
File without changes