@nocobase/plugin-multi-portal 2.2.0-alpha.10

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 (217) hide show
  1. package/LICENSE.txt +107 -0
  2. package/README.md +14 -0
  3. package/client-v2.d.ts +2 -0
  4. package/client-v2.js +1 -0
  5. package/client.d.ts +2 -0
  6. package/client.js +1 -0
  7. package/dist/client/index.d.ts +9 -0
  8. package/dist/client/index.js +10 -0
  9. package/dist/client/locale.d.ts +10 -0
  10. package/dist/client/models/index.d.ts +11 -0
  11. package/dist/client/plugin.d.ts +13 -0
  12. package/dist/client-v2/354.ead3e96143164cd5.js +10 -0
  13. package/dist/client-v2/499.ef2ff0c022687485.js +10 -0
  14. package/dist/client-v2/778.23ba409a924ee34a.js +10 -0
  15. package/dist/client-v2/845.f2b0ce44ae4be707.js +10 -0
  16. package/dist/client-v2/entryActions/PortalEntryActionModel.d.ts +52 -0
  17. package/dist/client-v2/entryActions/portalEntryActionStore.d.ts +36 -0
  18. package/dist/client-v2/entryActions/registerPortalEntryActions.d.ts +10 -0
  19. package/dist/client-v2/entryActions/types.d.ts +41 -0
  20. package/dist/client-v2/entryActions/url.d.ts +10 -0
  21. package/dist/client-v2/index.d.ts +9 -0
  22. package/dist/client-v2/index.js +10 -0
  23. package/dist/client-v2/layoutRegistration.d.ts +38 -0
  24. package/dist/client-v2/locale.d.ts +13 -0
  25. package/dist/client-v2/models/MultiPortalBlockModel.d.ts +13 -0
  26. package/dist/client-v2/models/MultiPortalMobilePageModels.d.ts +34 -0
  27. package/dist/client-v2/pages/MultiPortalsPage.d.ts +80 -0
  28. package/dist/client-v2/permissions/MultiPortalPermissionsTab.d.ts +21 -0
  29. package/dist/client-v2/permissions/multiPortalPermissions.d.ts +12 -0
  30. package/dist/client-v2/plugin.d.ts +13 -0
  31. package/dist/client-v2/routeRepositoryScope.d.ts +11 -0
  32. package/dist/client-v2/routeUrl.d.ts +18 -0
  33. package/dist/externalVersion.js +25 -0
  34. package/dist/index.d.ts +10 -0
  35. package/dist/index.js +48 -0
  36. package/dist/locale/en-US.json +82 -0
  37. package/dist/locale/zh-CN.json +82 -0
  38. package/dist/node_modules/tar/dist/commonjs/create.d.ts +3 -0
  39. package/dist/node_modules/tar/dist/commonjs/create.js +82 -0
  40. package/dist/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
  41. package/dist/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
  42. package/dist/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
  43. package/dist/node_modules/tar/dist/commonjs/extract.js +88 -0
  44. package/dist/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
  45. package/dist/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
  46. package/dist/node_modules/tar/dist/commonjs/header.d.ts +53 -0
  47. package/dist/node_modules/tar/dist/commonjs/header.js +312 -0
  48. package/dist/node_modules/tar/dist/commonjs/index.d.ts +20 -0
  49. package/dist/node_modules/tar/dist/commonjs/index.js +64 -0
  50. package/dist/node_modules/tar/dist/commonjs/index.min.js +1 -0
  51. package/dist/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
  52. package/dist/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
  53. package/dist/node_modules/tar/dist/commonjs/list.d.ts +7 -0
  54. package/dist/node_modules/tar/dist/commonjs/list.js +145 -0
  55. package/dist/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
  56. package/dist/node_modules/tar/dist/commonjs/make-command.js +52 -0
  57. package/dist/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
  58. package/dist/node_modules/tar/dist/commonjs/mkdir.js +187 -0
  59. package/dist/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
  60. package/dist/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
  61. package/dist/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
  62. package/dist/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
  63. package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
  64. package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
  65. package/dist/node_modules/tar/dist/commonjs/options.d.ts +596 -0
  66. package/dist/node_modules/tar/dist/commonjs/options.js +66 -0
  67. package/dist/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
  68. package/dist/node_modules/tar/dist/commonjs/pack.js +545 -0
  69. package/dist/node_modules/tar/dist/commonjs/package.json +3 -0
  70. package/dist/node_modules/tar/dist/commonjs/parse.d.ts +85 -0
  71. package/dist/node_modules/tar/dist/commonjs/parse.js +610 -0
  72. package/dist/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
  73. package/dist/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
  74. package/dist/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
  75. package/dist/node_modules/tar/dist/commonjs/pax.js +158 -0
  76. package/dist/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
  77. package/dist/node_modules/tar/dist/commonjs/process-umask.js +7 -0
  78. package/dist/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
  79. package/dist/node_modules/tar/dist/commonjs/read-entry.js +136 -0
  80. package/dist/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
  81. package/dist/node_modules/tar/dist/commonjs/replace.js +227 -0
  82. package/dist/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
  83. package/dist/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
  84. package/dist/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
  85. package/dist/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
  86. package/dist/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
  87. package/dist/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
  88. package/dist/node_modules/tar/dist/commonjs/types.d.ts +7 -0
  89. package/dist/node_modules/tar/dist/commonjs/types.js +50 -0
  90. package/dist/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
  91. package/dist/node_modules/tar/dist/commonjs/unpack.js +932 -0
  92. package/dist/node_modules/tar/dist/commonjs/update.d.ts +2 -0
  93. package/dist/node_modules/tar/dist/commonjs/update.js +33 -0
  94. package/dist/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
  95. package/dist/node_modules/tar/dist/commonjs/warn-method.js +31 -0
  96. package/dist/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
  97. package/dist/node_modules/tar/dist/commonjs/winchars.js +14 -0
  98. package/dist/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
  99. package/dist/node_modules/tar/dist/commonjs/write-entry.js +698 -0
  100. package/dist/node_modules/tar/dist/esm/create.d.ts +3 -0
  101. package/dist/node_modules/tar/dist/esm/create.js +76 -0
  102. package/dist/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
  103. package/dist/node_modules/tar/dist/esm/cwd-error.js +14 -0
  104. package/dist/node_modules/tar/dist/esm/extract.d.ts +3 -0
  105. package/dist/node_modules/tar/dist/esm/extract.js +49 -0
  106. package/dist/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
  107. package/dist/node_modules/tar/dist/esm/get-write-flag.js +26 -0
  108. package/dist/node_modules/tar/dist/esm/header.d.ts +53 -0
  109. package/dist/node_modules/tar/dist/esm/header.js +275 -0
  110. package/dist/node_modules/tar/dist/esm/index.d.ts +20 -0
  111. package/dist/node_modules/tar/dist/esm/index.js +20 -0
  112. package/dist/node_modules/tar/dist/esm/index.min.js +4 -0
  113. package/dist/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
  114. package/dist/node_modules/tar/dist/esm/large-numbers.js +94 -0
  115. package/dist/node_modules/tar/dist/esm/list.d.ts +7 -0
  116. package/dist/node_modules/tar/dist/esm/list.js +105 -0
  117. package/dist/node_modules/tar/dist/esm/make-command.d.ts +49 -0
  118. package/dist/node_modules/tar/dist/esm/make-command.js +48 -0
  119. package/dist/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
  120. package/dist/node_modules/tar/dist/esm/mkdir.js +179 -0
  121. package/dist/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
  122. package/dist/node_modules/tar/dist/esm/mode-fix.js +25 -0
  123. package/dist/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
  124. package/dist/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
  125. package/dist/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
  126. package/dist/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
  127. package/dist/node_modules/tar/dist/esm/options.d.ts +596 -0
  128. package/dist/node_modules/tar/dist/esm/options.js +54 -0
  129. package/dist/node_modules/tar/dist/esm/pack.d.ts +105 -0
  130. package/dist/node_modules/tar/dist/esm/pack.js +503 -0
  131. package/dist/node_modules/tar/dist/esm/package.json +3 -0
  132. package/dist/node_modules/tar/dist/esm/parse.d.ts +85 -0
  133. package/dist/node_modules/tar/dist/esm/parse.js +606 -0
  134. package/dist/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
  135. package/dist/node_modules/tar/dist/esm/path-reservations.js +166 -0
  136. package/dist/node_modules/tar/dist/esm/pax.d.ts +26 -0
  137. package/dist/node_modules/tar/dist/esm/pax.js +154 -0
  138. package/dist/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
  139. package/dist/node_modules/tar/dist/esm/process-umask.js +3 -0
  140. package/dist/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
  141. package/dist/node_modules/tar/dist/esm/read-entry.js +132 -0
  142. package/dist/node_modules/tar/dist/esm/replace.d.ts +2 -0
  143. package/dist/node_modules/tar/dist/esm/replace.js +221 -0
  144. package/dist/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
  145. package/dist/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
  146. package/dist/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
  147. package/dist/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
  148. package/dist/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
  149. package/dist/node_modules/tar/dist/esm/symlink-error.js +15 -0
  150. package/dist/node_modules/tar/dist/esm/types.d.ts +7 -0
  151. package/dist/node_modules/tar/dist/esm/types.js +45 -0
  152. package/dist/node_modules/tar/dist/esm/unpack.d.ts +101 -0
  153. package/dist/node_modules/tar/dist/esm/unpack.js +891 -0
  154. package/dist/node_modules/tar/dist/esm/update.d.ts +2 -0
  155. package/dist/node_modules/tar/dist/esm/update.js +30 -0
  156. package/dist/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
  157. package/dist/node_modules/tar/dist/esm/warn-method.js +27 -0
  158. package/dist/node_modules/tar/dist/esm/winchars.d.ts +3 -0
  159. package/dist/node_modules/tar/dist/esm/winchars.js +9 -0
  160. package/dist/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
  161. package/dist/node_modules/tar/dist/esm/write-entry.js +656 -0
  162. package/dist/node_modules/tar/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
  163. package/dist/node_modules/tar/node_modules/chownr/dist/commonjs/index.js +93 -0
  164. package/dist/node_modules/tar/node_modules/chownr/dist/commonjs/package.json +3 -0
  165. package/dist/node_modules/tar/node_modules/chownr/dist/esm/index.d.ts +3 -0
  166. package/dist/node_modules/tar/node_modules/chownr/dist/esm/index.js +85 -0
  167. package/dist/node_modules/tar/node_modules/chownr/dist/esm/package.json +3 -0
  168. package/dist/node_modules/tar/node_modules/chownr/package.json +69 -0
  169. package/dist/node_modules/tar/node_modules/minipass/dist/commonjs/index.d.ts +549 -0
  170. package/dist/node_modules/tar/node_modules/minipass/dist/commonjs/index.js +1028 -0
  171. package/dist/node_modules/tar/node_modules/minipass/dist/commonjs/package.json +3 -0
  172. package/dist/node_modules/tar/node_modules/minipass/dist/esm/index.d.ts +549 -0
  173. package/dist/node_modules/tar/node_modules/minipass/dist/esm/index.js +1018 -0
  174. package/dist/node_modules/tar/node_modules/minipass/dist/esm/package.json +3 -0
  175. package/dist/node_modules/tar/node_modules/minipass/package.json +82 -0
  176. package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
  177. package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/constants.js +123 -0
  178. package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
  179. package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/index.js +416 -0
  180. package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/package.json +3 -0
  181. package/dist/node_modules/tar/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
  182. package/dist/node_modules/tar/node_modules/minizlib/dist/esm/constants.js +117 -0
  183. package/dist/node_modules/tar/node_modules/minizlib/dist/esm/index.d.ts +99 -0
  184. package/dist/node_modules/tar/node_modules/minizlib/dist/esm/index.js +363 -0
  185. package/dist/node_modules/tar/node_modules/minizlib/dist/esm/package.json +3 -0
  186. package/dist/node_modules/tar/node_modules/minizlib/package.json +80 -0
  187. package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
  188. package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/index.js +384 -0
  189. package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/package.json +3 -0
  190. package/dist/node_modules/tar/node_modules/yallist/dist/esm/index.d.ts +39 -0
  191. package/dist/node_modules/tar/node_modules/yallist/dist/esm/index.js +379 -0
  192. package/dist/node_modules/tar/node_modules/yallist/dist/esm/package.json +3 -0
  193. package/dist/node_modules/tar/node_modules/yallist/package.json +68 -0
  194. package/dist/node_modules/tar/package.json +1 -0
  195. package/dist/server/collections/desktopRoutes.d.ts +14 -0
  196. package/dist/server/collections/desktopRoutes.js +48 -0
  197. package/dist/server/collections/extendRoleField.d.ts +14 -0
  198. package/dist/server/collections/extendRoleField.js +51 -0
  199. package/dist/server/collections/multiPortals.d.ts +10 -0
  200. package/dist/server/collections/multiPortals.js +128 -0
  201. package/dist/server/collections/rolesMultiPortalDesktopRoutes.d.ts +10 -0
  202. package/dist/server/collections/rolesMultiPortalDesktopRoutes.js +76 -0
  203. package/dist/server/collections/rolesMultiPortalRoutePolicies.d.ts +10 -0
  204. package/dist/server/collections/rolesMultiPortalRoutePolicies.js +73 -0
  205. package/dist/server/collections/rolesMultiPortals.d.ts +10 -0
  206. package/dist/server/collections/rolesMultiPortals.js +68 -0
  207. package/dist/server/ensureDefaultRoleMultiPortalAccess.d.ts +11 -0
  208. package/dist/server/ensureDefaultRoleMultiPortalAccess.js +70 -0
  209. package/dist/server/index.d.ts +9 -0
  210. package/dist/server/index.js +42 -0
  211. package/dist/server/migrations/20260723105200-drop-ui-layout-foreign-key-constraint.d.ts +13 -0
  212. package/dist/server/migrations/20260723105200-drop-ui-layout-foreign-key-constraint.js +104 -0
  213. package/dist/server/plugin.d.ts +63 -0
  214. package/dist/server/plugin.js +2130 -0
  215. package/package.json +34 -0
  216. package/server.d.ts +2 -0
  217. package/server.js +1 -0
@@ -0,0 +1,379 @@
1
+ export class Yallist {
2
+ tail;
3
+ head;
4
+ length = 0;
5
+ static create(list = []) {
6
+ return new Yallist(list);
7
+ }
8
+ constructor(list = []) {
9
+ for (const item of list) {
10
+ this.push(item);
11
+ }
12
+ }
13
+ *[Symbol.iterator]() {
14
+ for (let walker = this.head; walker; walker = walker.next) {
15
+ yield walker.value;
16
+ }
17
+ }
18
+ removeNode(node) {
19
+ if (node.list !== this) {
20
+ throw new Error('removing node which does not belong to this list');
21
+ }
22
+ const next = node.next;
23
+ const prev = node.prev;
24
+ if (next) {
25
+ next.prev = prev;
26
+ }
27
+ if (prev) {
28
+ prev.next = next;
29
+ }
30
+ if (node === this.head) {
31
+ this.head = next;
32
+ }
33
+ if (node === this.tail) {
34
+ this.tail = prev;
35
+ }
36
+ this.length--;
37
+ node.next = undefined;
38
+ node.prev = undefined;
39
+ node.list = undefined;
40
+ return next;
41
+ }
42
+ unshiftNode(node) {
43
+ if (node === this.head) {
44
+ return;
45
+ }
46
+ if (node.list) {
47
+ node.list.removeNode(node);
48
+ }
49
+ const head = this.head;
50
+ node.list = this;
51
+ node.next = head;
52
+ if (head) {
53
+ head.prev = node;
54
+ }
55
+ this.head = node;
56
+ if (!this.tail) {
57
+ this.tail = node;
58
+ }
59
+ this.length++;
60
+ }
61
+ pushNode(node) {
62
+ if (node === this.tail) {
63
+ return;
64
+ }
65
+ if (node.list) {
66
+ node.list.removeNode(node);
67
+ }
68
+ const tail = this.tail;
69
+ node.list = this;
70
+ node.prev = tail;
71
+ if (tail) {
72
+ tail.next = node;
73
+ }
74
+ this.tail = node;
75
+ if (!this.head) {
76
+ this.head = node;
77
+ }
78
+ this.length++;
79
+ }
80
+ push(...args) {
81
+ for (let i = 0, l = args.length; i < l; i++) {
82
+ push(this, args[i]);
83
+ }
84
+ return this.length;
85
+ }
86
+ unshift(...args) {
87
+ for (var i = 0, l = args.length; i < l; i++) {
88
+ unshift(this, args[i]);
89
+ }
90
+ return this.length;
91
+ }
92
+ pop() {
93
+ if (!this.tail) {
94
+ return undefined;
95
+ }
96
+ const res = this.tail.value;
97
+ const t = this.tail;
98
+ this.tail = this.tail.prev;
99
+ if (this.tail) {
100
+ this.tail.next = undefined;
101
+ }
102
+ else {
103
+ this.head = undefined;
104
+ }
105
+ t.list = undefined;
106
+ this.length--;
107
+ return res;
108
+ }
109
+ shift() {
110
+ if (!this.head) {
111
+ return undefined;
112
+ }
113
+ const res = this.head.value;
114
+ const h = this.head;
115
+ this.head = this.head.next;
116
+ if (this.head) {
117
+ this.head.prev = undefined;
118
+ }
119
+ else {
120
+ this.tail = undefined;
121
+ }
122
+ h.list = undefined;
123
+ this.length--;
124
+ return res;
125
+ }
126
+ forEach(fn, thisp) {
127
+ thisp = thisp || this;
128
+ for (let walker = this.head, i = 0; !!walker; i++) {
129
+ fn.call(thisp, walker.value, i, this);
130
+ walker = walker.next;
131
+ }
132
+ }
133
+ forEachReverse(fn, thisp) {
134
+ thisp = thisp || this;
135
+ for (let walker = this.tail, i = this.length - 1; !!walker; i--) {
136
+ fn.call(thisp, walker.value, i, this);
137
+ walker = walker.prev;
138
+ }
139
+ }
140
+ get(n) {
141
+ let i = 0;
142
+ let walker = this.head;
143
+ for (; !!walker && i < n; i++) {
144
+ walker = walker.next;
145
+ }
146
+ if (i === n && !!walker) {
147
+ return walker.value;
148
+ }
149
+ }
150
+ getReverse(n) {
151
+ let i = 0;
152
+ let walker = this.tail;
153
+ for (; !!walker && i < n; i++) {
154
+ // abort out of the list early if we hit a cycle
155
+ walker = walker.prev;
156
+ }
157
+ if (i === n && !!walker) {
158
+ return walker.value;
159
+ }
160
+ }
161
+ map(fn, thisp) {
162
+ thisp = thisp || this;
163
+ const res = new Yallist();
164
+ for (let walker = this.head; !!walker;) {
165
+ res.push(fn.call(thisp, walker.value, this));
166
+ walker = walker.next;
167
+ }
168
+ return res;
169
+ }
170
+ mapReverse(fn, thisp) {
171
+ thisp = thisp || this;
172
+ var res = new Yallist();
173
+ for (let walker = this.tail; !!walker;) {
174
+ res.push(fn.call(thisp, walker.value, this));
175
+ walker = walker.prev;
176
+ }
177
+ return res;
178
+ }
179
+ reduce(fn, initial) {
180
+ let acc;
181
+ let walker = this.head;
182
+ if (arguments.length > 1) {
183
+ acc = initial;
184
+ }
185
+ else if (this.head) {
186
+ walker = this.head.next;
187
+ acc = this.head.value;
188
+ }
189
+ else {
190
+ throw new TypeError('Reduce of empty list with no initial value');
191
+ }
192
+ for (var i = 0; !!walker; i++) {
193
+ acc = fn(acc, walker.value, i);
194
+ walker = walker.next;
195
+ }
196
+ return acc;
197
+ }
198
+ reduceReverse(fn, initial) {
199
+ let acc;
200
+ let walker = this.tail;
201
+ if (arguments.length > 1) {
202
+ acc = initial;
203
+ }
204
+ else if (this.tail) {
205
+ walker = this.tail.prev;
206
+ acc = this.tail.value;
207
+ }
208
+ else {
209
+ throw new TypeError('Reduce of empty list with no initial value');
210
+ }
211
+ for (let i = this.length - 1; !!walker; i--) {
212
+ acc = fn(acc, walker.value, i);
213
+ walker = walker.prev;
214
+ }
215
+ return acc;
216
+ }
217
+ toArray() {
218
+ const arr = new Array(this.length);
219
+ for (let i = 0, walker = this.head; !!walker; i++) {
220
+ arr[i] = walker.value;
221
+ walker = walker.next;
222
+ }
223
+ return arr;
224
+ }
225
+ toArrayReverse() {
226
+ const arr = new Array(this.length);
227
+ for (let i = 0, walker = this.tail; !!walker; i++) {
228
+ arr[i] = walker.value;
229
+ walker = walker.prev;
230
+ }
231
+ return arr;
232
+ }
233
+ slice(from = 0, to = this.length) {
234
+ if (to < 0) {
235
+ to += this.length;
236
+ }
237
+ if (from < 0) {
238
+ from += this.length;
239
+ }
240
+ const ret = new Yallist();
241
+ if (to < from || to < 0) {
242
+ return ret;
243
+ }
244
+ if (from < 0) {
245
+ from = 0;
246
+ }
247
+ if (to > this.length) {
248
+ to = this.length;
249
+ }
250
+ let walker = this.head;
251
+ let i = 0;
252
+ for (i = 0; !!walker && i < from; i++) {
253
+ walker = walker.next;
254
+ }
255
+ for (; !!walker && i < to; i++, walker = walker.next) {
256
+ ret.push(walker.value);
257
+ }
258
+ return ret;
259
+ }
260
+ sliceReverse(from = 0, to = this.length) {
261
+ if (to < 0) {
262
+ to += this.length;
263
+ }
264
+ if (from < 0) {
265
+ from += this.length;
266
+ }
267
+ const ret = new Yallist();
268
+ if (to < from || to < 0) {
269
+ return ret;
270
+ }
271
+ if (from < 0) {
272
+ from = 0;
273
+ }
274
+ if (to > this.length) {
275
+ to = this.length;
276
+ }
277
+ let i = this.length;
278
+ let walker = this.tail;
279
+ for (; !!walker && i > to; i--) {
280
+ walker = walker.prev;
281
+ }
282
+ for (; !!walker && i > from; i--, walker = walker.prev) {
283
+ ret.push(walker.value);
284
+ }
285
+ return ret;
286
+ }
287
+ splice(start, deleteCount = 0, ...nodes) {
288
+ if (start > this.length) {
289
+ start = this.length - 1;
290
+ }
291
+ if (start < 0) {
292
+ start = this.length + start;
293
+ }
294
+ let walker = this.head;
295
+ for (let i = 0; !!walker && i < start; i++) {
296
+ walker = walker.next;
297
+ }
298
+ const ret = [];
299
+ for (let i = 0; !!walker && i < deleteCount; i++) {
300
+ ret.push(walker.value);
301
+ walker = this.removeNode(walker);
302
+ }
303
+ if (!walker) {
304
+ walker = this.tail;
305
+ }
306
+ else if (walker !== this.tail) {
307
+ walker = walker.prev;
308
+ }
309
+ for (const v of nodes) {
310
+ walker = insertAfter(this, walker, v);
311
+ }
312
+ return ret;
313
+ }
314
+ reverse() {
315
+ const head = this.head;
316
+ const tail = this.tail;
317
+ for (let walker = head; !!walker; walker = walker.prev) {
318
+ const p = walker.prev;
319
+ walker.prev = walker.next;
320
+ walker.next = p;
321
+ }
322
+ this.head = tail;
323
+ this.tail = head;
324
+ return this;
325
+ }
326
+ }
327
+ // insertAfter undefined means "make the node the new head of list"
328
+ function insertAfter(self, node, value) {
329
+ const prev = node;
330
+ const next = node ? node.next : self.head;
331
+ const inserted = new Node(value, prev, next, self);
332
+ if (inserted.next === undefined) {
333
+ self.tail = inserted;
334
+ }
335
+ if (inserted.prev === undefined) {
336
+ self.head = inserted;
337
+ }
338
+ self.length++;
339
+ return inserted;
340
+ }
341
+ function push(self, item) {
342
+ self.tail = new Node(item, self.tail, undefined, self);
343
+ if (!self.head) {
344
+ self.head = self.tail;
345
+ }
346
+ self.length++;
347
+ }
348
+ function unshift(self, item) {
349
+ self.head = new Node(item, undefined, self.head, self);
350
+ if (!self.tail) {
351
+ self.tail = self.head;
352
+ }
353
+ self.length++;
354
+ }
355
+ export class Node {
356
+ list;
357
+ next;
358
+ prev;
359
+ value;
360
+ constructor(value, prev, next, list) {
361
+ this.list = list;
362
+ this.value = value;
363
+ if (prev) {
364
+ prev.next = this;
365
+ this.prev = prev;
366
+ }
367
+ else {
368
+ this.prev = undefined;
369
+ }
370
+ if (next) {
371
+ next.prev = this;
372
+ this.next = next;
373
+ }
374
+ else {
375
+ this.next = undefined;
376
+ }
377
+ }
378
+ }
379
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "yallist",
3
+ "version": "5.0.0",
4
+ "description": "Yet Another Linked List",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "devDependencies": {
9
+ "prettier": "^3.2.5",
10
+ "tap": "^18.7.2",
11
+ "tshy": "^1.13.1",
12
+ "typedoc": "^0.25.13"
13
+ },
14
+ "scripts": {
15
+ "preversion": "npm test",
16
+ "postversion": "npm publish",
17
+ "prepublishOnly": "git push origin --follow-tags",
18
+ "prepare": "tshy",
19
+ "pretest": "npm run prepare",
20
+ "presnap": "npm run prepare",
21
+ "test": "tap",
22
+ "snap": "tap",
23
+ "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
24
+ "typedoc": "typedoc"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/isaacs/yallist.git"
29
+ },
30
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
31
+ "license": "BlueOak-1.0.0",
32
+ "tshy": {
33
+ "exports": {
34
+ "./package.json": "./package.json",
35
+ ".": "./src/index.ts"
36
+ }
37
+ },
38
+ "exports": {
39
+ "./package.json": "./package.json",
40
+ ".": {
41
+ "import": {
42
+ "types": "./dist/esm/index.d.ts",
43
+ "default": "./dist/esm/index.js"
44
+ },
45
+ "require": {
46
+ "types": "./dist/commonjs/index.d.ts",
47
+ "default": "./dist/commonjs/index.js"
48
+ }
49
+ }
50
+ },
51
+ "main": "./dist/commonjs/index.js",
52
+ "types": "./dist/commonjs/index.d.ts",
53
+ "type": "module",
54
+ "prettier": {
55
+ "semi": false,
56
+ "printWidth": 70,
57
+ "tabWidth": 2,
58
+ "useTabs": false,
59
+ "singleQuote": true,
60
+ "jsxSingleQuote": false,
61
+ "bracketSameLine": true,
62
+ "arrowParens": "avoid",
63
+ "endOfLine": "lf"
64
+ },
65
+ "engines": {
66
+ "node": ">=18"
67
+ }
68
+ }
@@ -0,0 +1 @@
1
+ {"author":"Isaac Z. Schlueter","name":"tar","description":"tar for node","version":"7.5.15","repository":{"type":"git","url":"https://github.com/isaacs/node-tar.git"},"scripts":{"genparse":"node scripts/generate-parse-fixtures.js","snap":"tap","test":"tap","pretest":"npm run prepare","presnap":"npm run prepare","prepare":"tshy && bash scripts/build.sh","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --log-level warn","typedoc":"typedoc --tsconfig .tshy/esm.json ./src/*.ts","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"dependencies":{"@isaacs/fs-minipass":"^4.0.0","chownr":"^3.0.0","minipass":"^7.1.2","minizlib":"^3.1.0","yallist":"^5.0.0"},"devDependencies":{"@types/node":"^25.5.0","chmodr":"^2.0.2","end-of-stream":"^1.4.3","esbuild":"^0.27.4","events-to-array":"^2.0.3","mutate-fs":"^2.1.1","nock":"^13.5.4","oxlint":"^1.57.0","oxlint-tsgolint":"^0.17.3","prettier":"^3.8.1","rimraf":"^6.1.2","tap":"^21.6.2","tshy":"^3.3.2","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","engines":{"node":">=18"},"files":["dist"],"tshy":{"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}},"./raw":"./src/index.ts","./c":"./src/create.ts","./create":"./src/create.ts","./replace":"./src/create.ts","./r":"./src/create.ts","./list":"./src/list.ts","./t":"./src/list.ts","./update":"./src/update.ts","./u":"./src/update.ts","./extract":"./src/extract.ts","./x":"./src/extract.ts","./pack":"./src/pack.ts","./unpack":"./src/unpack.ts","./parse":"./src/parse.ts","./read-entry":"./src/read-entry.ts","./write-entry":"./src/write-entry.ts","./header":"./src/header.ts","./pax":"./src/pax.ts","./types":"./src/types.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}},"./raw":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./c":{"import":{"types":"./dist/esm/create.d.ts","default":"./dist/esm/create.js"},"require":{"types":"./dist/commonjs/create.d.ts","default":"./dist/commonjs/create.js"}},"./create":{"import":{"types":"./dist/esm/create.d.ts","default":"./dist/esm/create.js"},"require":{"types":"./dist/commonjs/create.d.ts","default":"./dist/commonjs/create.js"}},"./replace":{"import":{"types":"./dist/esm/create.d.ts","default":"./dist/esm/create.js"},"require":{"types":"./dist/commonjs/create.d.ts","default":"./dist/commonjs/create.js"}},"./r":{"import":{"types":"./dist/esm/create.d.ts","default":"./dist/esm/create.js"},"require":{"types":"./dist/commonjs/create.d.ts","default":"./dist/commonjs/create.js"}},"./list":{"import":{"types":"./dist/esm/list.d.ts","default":"./dist/esm/list.js"},"require":{"types":"./dist/commonjs/list.d.ts","default":"./dist/commonjs/list.js"}},"./t":{"import":{"types":"./dist/esm/list.d.ts","default":"./dist/esm/list.js"},"require":{"types":"./dist/commonjs/list.d.ts","default":"./dist/commonjs/list.js"}},"./update":{"import":{"types":"./dist/esm/update.d.ts","default":"./dist/esm/update.js"},"require":{"types":"./dist/commonjs/update.d.ts","default":"./dist/commonjs/update.js"}},"./u":{"import":{"types":"./dist/esm/update.d.ts","default":"./dist/esm/update.js"},"require":{"types":"./dist/commonjs/update.d.ts","default":"./dist/commonjs/update.js"}},"./extract":{"import":{"types":"./dist/esm/extract.d.ts","default":"./dist/esm/extract.js"},"require":{"types":"./dist/commonjs/extract.d.ts","default":"./dist/commonjs/extract.js"}},"./x":{"import":{"types":"./dist/esm/extract.d.ts","default":"./dist/esm/extract.js"},"require":{"types":"./dist/commonjs/extract.d.ts","default":"./dist/commonjs/extract.js"}},"./pack":{"import":{"types":"./dist/esm/pack.d.ts","default":"./dist/esm/pack.js"},"require":{"types":"./dist/commonjs/pack.d.ts","default":"./dist/commonjs/pack.js"}},"./unpack":{"import":{"types":"./dist/esm/unpack.d.ts","default":"./dist/esm/unpack.js"},"require":{"types":"./dist/commonjs/unpack.d.ts","default":"./dist/commonjs/unpack.js"}},"./parse":{"import":{"types":"./dist/esm/parse.d.ts","default":"./dist/esm/parse.js"},"require":{"types":"./dist/commonjs/parse.d.ts","default":"./dist/commonjs/parse.js"}},"./read-entry":{"import":{"types":"./dist/esm/read-entry.d.ts","default":"./dist/esm/read-entry.js"},"require":{"types":"./dist/commonjs/read-entry.d.ts","default":"./dist/commonjs/read-entry.js"}},"./write-entry":{"import":{"types":"./dist/esm/write-entry.d.ts","default":"./dist/esm/write-entry.js"},"require":{"types":"./dist/commonjs/write-entry.d.ts","default":"./dist/commonjs/write-entry.js"}},"./header":{"import":{"types":"./dist/esm/header.d.ts","default":"./dist/esm/header.js"},"require":{"types":"./dist/commonjs/header.d.ts","default":"./dist/commonjs/header.js"}},"./pax":{"import":{"types":"./dist/esm/pax.d.ts","default":"./dist/esm/pax.js"},"require":{"types":"./dist/commonjs/pax.d.ts","default":"./dist/commonjs/pax.js"}},"./types":{"import":{"types":"./dist/esm/types.d.ts","default":"./dist/esm/types.js"},"require":{"types":"./dist/commonjs/types.d.ts","default":"./dist/commonjs/types.js"}}},"type":"module","main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.min.js","_lastModified":"2026-07-28T04:40:01.299Z"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ collectionOptions: import("@nocobase/database").CollectionOptions;
11
+ mergeOptions: import("deepmerge").Options;
12
+ extend: boolean;
13
+ };
14
+ export default _default;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var desktopRoutes_exports = {};
28
+ __export(desktopRoutes_exports, {
29
+ default: () => desktopRoutes_default
30
+ });
31
+ module.exports = __toCommonJS(desktopRoutes_exports);
32
+ var import_database = require("@nocobase/database");
33
+ var desktopRoutes_default = (0, import_database.extendCollection)({
34
+ name: "desktopRoutes",
35
+ fields: [
36
+ {
37
+ type: "belongsToMany",
38
+ name: "multiPortals",
39
+ target: "multiPortals",
40
+ through: "desktopRoutesMultiPortals",
41
+ sourceKey: "id",
42
+ targetKey: "uid",
43
+ foreignKey: "desktopRouteId",
44
+ otherKey: "multiPortalUid",
45
+ onDelete: "CASCADE"
46
+ }
47
+ ]
48
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ collectionOptions: import("@nocobase/database").CollectionOptions;
11
+ mergeOptions: import("deepmerge").Options;
12
+ extend: boolean;
13
+ };
14
+ export default _default;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var extendRoleField_exports = {};
28
+ __export(extendRoleField_exports, {
29
+ default: () => extendRoleField_default
30
+ });
31
+ module.exports = __toCommonJS(extendRoleField_exports);
32
+ var import_database = require("@nocobase/database");
33
+ var extendRoleField_default = (0, import_database.extendCollection)({
34
+ name: "roles",
35
+ fields: [
36
+ {
37
+ type: "boolean",
38
+ name: "allowNewMultiPortal"
39
+ },
40
+ {
41
+ type: "belongsToMany",
42
+ name: "multiPortals",
43
+ target: "multiPortals",
44
+ through: "rolesMultiPortals",
45
+ sourceKey: "name",
46
+ targetKey: "uid",
47
+ foreignKey: "roleName",
48
+ otherKey: "multiPortalUid"
49
+ }
50
+ ]
51
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: import("@nocobase/database").CollectionOptions;
10
+ export default _default;