@live-change/url-service 0.2.46 → 0.2.47

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/index.js +6 -8
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -70,9 +70,7 @@ async function generateUrl(props, emit) {
70
70
  const suffix = props.suffix || ''
71
71
  const randomCharacters = props.charset ? charsets[props.charset] : charsets.all
72
72
  let randomPathLength = props.length || defaultRandomPathLength
73
- const group = props.group
74
73
  let maxLength = props.maxLength || 125
75
- maxLength -= group.length
76
74
  const sufixLength = 15
77
75
  let path = ''
78
76
  let random = false
@@ -164,7 +162,7 @@ async function generateUrl(props, emit) {
164
162
  if(existingCanonical) {
165
163
  emit({
166
164
  type: 'targetOwnedRedirectCreated',
167
- redirect: url,
165
+ redirect: app.generateUid(),
168
166
  identifiers: {
169
167
  targetType: props.targetType,
170
168
  target: props.target,
@@ -220,7 +218,7 @@ definition.trigger({
220
218
  type: Number
221
219
  },
222
220
  redirect: {
223
- type: String
221
+ type: Boolean
224
222
  },
225
223
  charset: {
226
224
  type: String
@@ -263,7 +261,7 @@ definition.action({
263
261
  type: Number
264
262
  },
265
263
  redirect: {
266
- type: String
264
+ type: Boolean
267
265
  },
268
266
  charset: {
269
267
  type: String
@@ -307,7 +305,7 @@ definition.action({
307
305
  validation: ['nonEmpty']
308
306
  },
309
307
  redirect: {
310
- type: String
308
+ type: Boolean
311
309
  }
312
310
  },
313
311
  accessControl: {
@@ -329,8 +327,8 @@ definition.action({
329
327
  if(redirect) {
330
328
  url = app.generateUid()
331
329
  emit({
332
- type: 'targetOwnedCanonicalCreated',
333
- redirect: url,
330
+ type: 'targetOwnedRedirectCreated',
331
+ redirect: app.generateUid(),
334
332
  identifiers: {
335
333
  targetType, target,
336
334
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/url-service",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,12 +21,12 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "0.6.11",
25
- "@live-change/relations-plugin": "0.6.11",
24
+ "@live-change/framework": "0.6.12",
25
+ "@live-change/relations-plugin": "0.6.12",
26
26
  "lru-cache": "^7.12.0",
27
27
  "pluralize": "8.0.0",
28
28
  "progress-stream": "^2.0.0",
29
29
  "prosemirror-model": "^1.18.1"
30
30
  },
31
- "gitHead": "c0476d27291d8300dcba46b8bdbb51c5b271e455"
31
+ "gitHead": "710dc205163bf09d6b9469822101e9dfc11b74cb"
32
32
  }