@nocobase/plugin-multi-app-manager 2.0.0-alpha.7 → 2.0.0-alpha.71

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 (161) hide show
  1. package/dist/client/00b71fff3c8c7167.js +10 -0
  2. package/dist/client/Migrate.d.ts +10 -0
  3. package/dist/client/index.d.ts +1 -0
  4. package/dist/client/index.js +1 -1
  5. package/dist/client/settings/schemas/applications.d.ts +63 -1
  6. package/dist/externalVersion.js +8 -7
  7. package/dist/locale/de-DE.json +19 -7
  8. package/dist/locale/en-US.json +21 -7
  9. package/dist/locale/es-ES.json +23 -6
  10. package/dist/locale/fr-FR.json +26 -0
  11. package/dist/locale/hu-HU.json +26 -0
  12. package/dist/locale/id-ID.json +26 -0
  13. package/dist/locale/it-IT.json +19 -7
  14. package/dist/locale/ja-JP.json +18 -6
  15. package/dist/locale/ko-KR.json +22 -7
  16. package/dist/locale/nl-NL.json +24 -9
  17. package/dist/locale/pt-BR.json +23 -6
  18. package/dist/locale/ru-RU.json +26 -0
  19. package/dist/locale/tr-TR.json +26 -0
  20. package/dist/locale/uk-UA.json +26 -0
  21. package/dist/locale/vi-VN.json +26 -0
  22. package/dist/locale/zh-CN.json +17 -15
  23. package/dist/locale/zh-TW.json +26 -0
  24. package/dist/node_modules/p-queue/dist/index.d.ts +101 -0
  25. package/dist/node_modules/p-queue/dist/index.js +1 -0
  26. package/dist/node_modules/p-queue/dist/lower-bound.d.ts +1 -0
  27. package/dist/node_modules/p-queue/dist/lower-bound.js +21 -0
  28. package/dist/node_modules/p-queue/dist/options.d.ts +64 -0
  29. package/dist/node_modules/p-queue/dist/options.js +2 -0
  30. package/dist/node_modules/p-queue/dist/priority-queue.d.ts +12 -0
  31. package/dist/node_modules/p-queue/dist/priority-queue.js +32 -0
  32. package/dist/node_modules/p-queue/dist/queue.d.ts +7 -0
  33. package/dist/node_modules/p-queue/dist/queue.js +2 -0
  34. package/dist/node_modules/p-queue/license +9 -0
  35. package/dist/node_modules/p-queue/node_modules/eventemitter3/index.d.ts +134 -0
  36. package/dist/node_modules/p-queue/node_modules/eventemitter3/index.js +336 -0
  37. package/dist/node_modules/p-queue/node_modules/eventemitter3/package.json +56 -0
  38. package/dist/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.js +340 -0
  39. package/dist/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.min.js +1 -0
  40. package/dist/node_modules/p-queue/package.json +1 -0
  41. package/dist/server/adapters/legacy-adapter.d.ts +43 -0
  42. package/dist/server/adapters/legacy-adapter.js +207 -0
  43. package/dist/server/server.d.ts +7 -6
  44. package/dist/server/server.js +110 -186
  45. package/package.json +5 -2
  46. package/dist/client/bd12299af6cdc73a.js +0 -10
  47. package/dist/node_modules/mariadb/LICENSE +0 -502
  48. package/dist/node_modules/mariadb/callback.js +0 -41
  49. package/dist/node_modules/mariadb/lib/cmd/batch-bulk.js +0 -278
  50. package/dist/node_modules/mariadb/lib/cmd/batch-rewrite.js +0 -372
  51. package/dist/node_modules/mariadb/lib/cmd/change-user.js +0 -149
  52. package/dist/node_modules/mariadb/lib/cmd/class/ok-packet.js +0 -17
  53. package/dist/node_modules/mariadb/lib/cmd/column-definition.js +0 -102
  54. package/dist/node_modules/mariadb/lib/cmd/command.js +0 -168
  55. package/dist/node_modules/mariadb/lib/cmd/common-binary-cmd.js +0 -327
  56. package/dist/node_modules/mariadb/lib/cmd/common-text-cmd.js +0 -427
  57. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/caching-sha2-password-auth.js +0 -168
  58. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/clear-password-auth.js +0 -23
  59. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/ed25519-password-auth.js +0 -761
  60. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/native-password-auth.js +0 -55
  61. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/pam-password-auth.js +0 -58
  62. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/plugin-auth.js +0 -19
  63. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/sha256-password-auth.js +0 -142
  64. package/dist/node_modules/mariadb/lib/cmd/handshake/client-capabilities.js +0 -74
  65. package/dist/node_modules/mariadb/lib/cmd/handshake/client-handshake-response.js +0 -126
  66. package/dist/node_modules/mariadb/lib/cmd/handshake/handshake.js +0 -292
  67. package/dist/node_modules/mariadb/lib/cmd/handshake/initial-handshake.js +0 -74
  68. package/dist/node_modules/mariadb/lib/cmd/handshake/ssl-request.js +0 -29
  69. package/dist/node_modules/mariadb/lib/cmd/ping.js +0 -52
  70. package/dist/node_modules/mariadb/lib/cmd/query.js +0 -255
  71. package/dist/node_modules/mariadb/lib/cmd/quit.js +0 -28
  72. package/dist/node_modules/mariadb/lib/cmd/reset.js +0 -54
  73. package/dist/node_modules/mariadb/lib/cmd/resultset.js +0 -607
  74. package/dist/node_modules/mariadb/lib/cmd/stream.js +0 -45
  75. package/dist/node_modules/mariadb/lib/config/connection-options.js +0 -258
  76. package/dist/node_modules/mariadb/lib/config/pool-cluster-options.js +0 -19
  77. package/dist/node_modules/mariadb/lib/config/pool-options.js +0 -47
  78. package/dist/node_modules/mariadb/lib/connection-callback.js +0 -160
  79. package/dist/node_modules/mariadb/lib/connection.js +0 -1460
  80. package/dist/node_modules/mariadb/lib/const/capabilities.js +0 -64
  81. package/dist/node_modules/mariadb/lib/const/collations.js +0 -473
  82. package/dist/node_modules/mariadb/lib/const/connection_status.js +0 -13
  83. package/dist/node_modules/mariadb/lib/const/error-code.js +0 -1282
  84. package/dist/node_modules/mariadb/lib/const/field-detail.js +0 -35
  85. package/dist/node_modules/mariadb/lib/const/field-type.js +0 -71
  86. package/dist/node_modules/mariadb/lib/const/server-status.js +0 -30
  87. package/dist/node_modules/mariadb/lib/const/state-change.js +0 -12
  88. package/dist/node_modules/mariadb/lib/filtered-pool-cluster.js +0 -81
  89. package/dist/node_modules/mariadb/lib/io/bulk-packet.js +0 -590
  90. package/dist/node_modules/mariadb/lib/io/compression-input-stream.js +0 -141
  91. package/dist/node_modules/mariadb/lib/io/compression-output-stream.js +0 -171
  92. package/dist/node_modules/mariadb/lib/io/packet-input-stream.js +0 -193
  93. package/dist/node_modules/mariadb/lib/io/packet-node-encoded.js +0 -36
  94. package/dist/node_modules/mariadb/lib/io/packet-node-iconv.js +0 -37
  95. package/dist/node_modules/mariadb/lib/io/packet-output-stream.js +0 -502
  96. package/dist/node_modules/mariadb/lib/io/packet.js +0 -515
  97. package/dist/node_modules/mariadb/lib/io/rewrite-packet.js +0 -481
  98. package/dist/node_modules/mariadb/lib/misc/connection-information.js +0 -96
  99. package/dist/node_modules/mariadb/lib/misc/errors.js +0 -123
  100. package/dist/node_modules/mariadb/lib/misc/parse.js +0 -1033
  101. package/dist/node_modules/mariadb/lib/misc/utils.js +0 -298
  102. package/dist/node_modules/mariadb/lib/pool-base.js +0 -611
  103. package/dist/node_modules/mariadb/lib/pool-callback.js +0 -202
  104. package/dist/node_modules/mariadb/lib/pool-cluster-callback.js +0 -66
  105. package/dist/node_modules/mariadb/lib/pool-cluster.js +0 -407
  106. package/dist/node_modules/mariadb/lib/pool-promise.js +0 -108
  107. package/dist/node_modules/mariadb/node_modules/@types/node/assert/strict.d.ts +0 -8
  108. package/dist/node_modules/mariadb/node_modules/@types/node/assert.d.ts +0 -912
  109. package/dist/node_modules/mariadb/node_modules/@types/node/async_hooks.d.ts +0 -501
  110. package/dist/node_modules/mariadb/node_modules/@types/node/buffer.d.ts +0 -2232
  111. package/dist/node_modules/mariadb/node_modules/@types/node/child_process.d.ts +0 -1366
  112. package/dist/node_modules/mariadb/node_modules/@types/node/cluster.d.ts +0 -414
  113. package/dist/node_modules/mariadb/node_modules/@types/node/console.d.ts +0 -412
  114. package/dist/node_modules/mariadb/node_modules/@types/node/constants.d.ts +0 -18
  115. package/dist/node_modules/mariadb/node_modules/@types/node/crypto.d.ts +0 -3338
  116. package/dist/node_modules/mariadb/node_modules/@types/node/dgram.d.ts +0 -545
  117. package/dist/node_modules/mariadb/node_modules/@types/node/diagnostics_channel.d.ts +0 -152
  118. package/dist/node_modules/mariadb/node_modules/@types/node/dns/promises.d.ts +0 -370
  119. package/dist/node_modules/mariadb/node_modules/@types/node/dns.d.ts +0 -659
  120. package/dist/node_modules/mariadb/node_modules/@types/node/domain.d.ts +0 -169
  121. package/dist/node_modules/mariadb/node_modules/@types/node/events.d.ts +0 -651
  122. package/dist/node_modules/mariadb/node_modules/@types/node/fs/promises.d.ts +0 -1091
  123. package/dist/node_modules/mariadb/node_modules/@types/node/fs.d.ts +0 -3869
  124. package/dist/node_modules/mariadb/node_modules/@types/node/globals.d.ts +0 -294
  125. package/dist/node_modules/mariadb/node_modules/@types/node/globals.global.d.ts +0 -1
  126. package/dist/node_modules/mariadb/node_modules/@types/node/http.d.ts +0 -1396
  127. package/dist/node_modules/mariadb/node_modules/@types/node/http2.d.ts +0 -2101
  128. package/dist/node_modules/mariadb/node_modules/@types/node/https.d.ts +0 -391
  129. package/dist/node_modules/mariadb/node_modules/@types/node/index.d.ts +0 -129
  130. package/dist/node_modules/mariadb/node_modules/@types/node/inspector.d.ts +0 -2744
  131. package/dist/node_modules/mariadb/node_modules/@types/node/module.d.ts +0 -114
  132. package/dist/node_modules/mariadb/node_modules/@types/node/net.d.ts +0 -791
  133. package/dist/node_modules/mariadb/node_modules/@types/node/os.d.ts +0 -455
  134. package/dist/node_modules/mariadb/node_modules/@types/node/package.json +0 -220
  135. package/dist/node_modules/mariadb/node_modules/@types/node/path.d.ts +0 -180
  136. package/dist/node_modules/mariadb/node_modules/@types/node/perf_hooks.d.ts +0 -557
  137. package/dist/node_modules/mariadb/node_modules/@types/node/process.d.ts +0 -1481
  138. package/dist/node_modules/mariadb/node_modules/@types/node/punycode.d.ts +0 -117
  139. package/dist/node_modules/mariadb/node_modules/@types/node/querystring.d.ts +0 -131
  140. package/dist/node_modules/mariadb/node_modules/@types/node/readline.d.ts +0 -650
  141. package/dist/node_modules/mariadb/node_modules/@types/node/repl.d.ts +0 -424
  142. package/dist/node_modules/mariadb/node_modules/@types/node/stream/consumers.d.ts +0 -24
  143. package/dist/node_modules/mariadb/node_modules/@types/node/stream/promises.d.ts +0 -42
  144. package/dist/node_modules/mariadb/node_modules/@types/node/stream/web.d.ts +0 -330
  145. package/dist/node_modules/mariadb/node_modules/@types/node/stream.d.ts +0 -1249
  146. package/dist/node_modules/mariadb/node_modules/@types/node/string_decoder.d.ts +0 -67
  147. package/dist/node_modules/mariadb/node_modules/@types/node/timers/promises.d.ts +0 -68
  148. package/dist/node_modules/mariadb/node_modules/@types/node/timers.d.ts +0 -94
  149. package/dist/node_modules/mariadb/node_modules/@types/node/tls.d.ts +0 -1020
  150. package/dist/node_modules/mariadb/node_modules/@types/node/trace_events.d.ts +0 -161
  151. package/dist/node_modules/mariadb/node_modules/@types/node/tty.d.ts +0 -204
  152. package/dist/node_modules/mariadb/node_modules/@types/node/url.d.ts +0 -891
  153. package/dist/node_modules/mariadb/node_modules/@types/node/util.d.ts +0 -1594
  154. package/dist/node_modules/mariadb/node_modules/@types/node/v8.d.ts +0 -378
  155. package/dist/node_modules/mariadb/node_modules/@types/node/vm.d.ts +0 -507
  156. package/dist/node_modules/mariadb/node_modules/@types/node/wasi.d.ts +0 -158
  157. package/dist/node_modules/mariadb/node_modules/@types/node/worker_threads.d.ts +0 -649
  158. package/dist/node_modules/mariadb/node_modules/@types/node/zlib.d.ts +0 -517
  159. package/dist/node_modules/mariadb/package.json +0 -1
  160. package/dist/node_modules/mariadb/promise.js +0 -34
  161. package/dist/node_modules/mariadb/types/index.d.ts +0 -870
@@ -1,11 +1,26 @@
1
1
  {
2
- "Multi-app manager": "Multi-app beheerder",
3
- "Applications": "Applicaties",
4
- "App display name": "App weergavenaam",
5
- "App ID": "App ID",
6
- "Pin to menu": "Vastmaken aan menu",
7
- "Custom domain": "Aangepast domein",
8
- "Manage applications": "Beheer applicaties",
9
- "Standalone deployment": "Zelfstandige implementatie",
10
- "Auto start": "Automatisch starten"
2
+ "An independent JWT secret ensures data and session isolation from other applications.": "An independent JWT secret ensures data and session isolation from other applications.",
3
+ "App ID": "App ID",
4
+ "App display name": "App weergavenaam",
5
+ "Applications": "Applicaties",
6
+ "Authentication options": "Authentication options",
7
+ "Auto start": "Automatisch starten",
8
+ "Automatically generate a JWT secret": "Automatically generate a JWT secret",
9
+ "Custom domain": "Aangepast domein",
10
+ "JWT secret": "JWT secret",
11
+ "Manage applications": "Beheer applicaties",
12
+ "Migrate data": "Migrate data",
13
+ "Migrate data to new multi-app": "Migrate data to new multi-app",
14
+ "Migrate successfully": "Migrate successfully",
15
+ "Multi-app is not enabled, please enable it first": "Multi-app is not enabled, please enable it first",
16
+ "Multi-app manager": "Multi-app beheerder",
17
+ "Multi-app manager (deprecated)": "Multi-app manager (deprecated)",
18
+ "Pin to menu": "Vastmaken aan menu",
19
+ "Please enter the port": "Please enter the port",
20
+ "Port": "Port",
21
+ "Standalone deployment": "Zelfstandige implementatie",
22
+ "Start mode": "Start mode",
23
+ "Start on first visit": "Start on first visit",
24
+ "Start with main application": "Start with main application",
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."
11
26
  }
@@ -1,9 +1,26 @@
1
1
  {
2
- "Multi-app manager": "Gerenciador de aplicativos múltiplos",
3
- "Applications": "Aplicativos",
4
- "App display name": "Nome de exibição do aplicativo",
2
+ "An independent JWT secret ensures data and session isolation from other applications.": "An independent JWT secret ensures data and session isolation from other applications.",
5
3
  "App ID": "ID do aplicativo",
6
- "Pin to menu": "Fixar no menu",
4
+ "App display name": "Nome de exibição do aplicativo",
5
+ "Applications": "Aplicativos",
6
+ "Authentication options": "Authentication options",
7
+ "Auto start": "Auto start",
8
+ "Automatically generate a JWT secret": "Automatically generate a JWT secret",
7
9
  "Custom domain": "Domínio personalizado",
8
- "Manage applications": "Gerenciar aplicativos"
9
- }
10
+ "JWT secret": "JWT secret",
11
+ "Manage applications": "Gerenciar aplicativos",
12
+ "Migrate data": "Migrate data",
13
+ "Migrate data to new multi-app": "Migrate data to new multi-app",
14
+ "Migrate successfully": "Migrate successfully",
15
+ "Multi-app is not enabled, please enable it first": "Multi-app is not enabled, please enable it first",
16
+ "Multi-app manager": "Gerenciador de aplicativos múltiplos",
17
+ "Multi-app manager (deprecated)": "Multi-app manager (deprecated)",
18
+ "Pin to menu": "Fixar no menu",
19
+ "Please enter the port": "Please enter the port",
20
+ "Port": "Port",
21
+ "Standalone deployment": "Standalone deployment",
22
+ "Start mode": "Start mode",
23
+ "Start on first visit": "Start on first visit",
24
+ "Start with main application": "Start with main application",
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."
26
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "An independent JWT secret ensures data and session isolation from other applications.": "An independent JWT secret ensures data and session isolation from other applications.",
3
+ "App ID": "ID приложения",
4
+ "App display name": "Отображаемое имя приложения",
5
+ "Applications": "Приложения",
6
+ "Authentication options": "Authentication options",
7
+ "Auto start": "Автозапуск",
8
+ "Automatically generate a JWT secret": "Automatically generate a JWT secret",
9
+ "Custom domain": "Пользовательский домен",
10
+ "JWT secret": "JWT secret",
11
+ "Manage applications": "Управление приложениями",
12
+ "Migrate data": "Migrate data",
13
+ "Migrate data to new multi-app": "Migrate data to new multi-app",
14
+ "Migrate successfully": "Migrate successfully",
15
+ "Multi-app is not enabled, please enable it first": "Multi-app is not enabled, please enable it first",
16
+ "Multi-app manager": "Менеджер многоприложений",
17
+ "Multi-app manager (deprecated)": "Multi-app manager (deprecated)",
18
+ "Pin to menu": "Закрепить в меню",
19
+ "Please enter the port": "Please enter the port",
20
+ "Port": "Port",
21
+ "Standalone deployment": "Автономное развертывание",
22
+ "Start mode": "Режим запуска",
23
+ "Start on first visit": "Запускать при первом посещении",
24
+ "Start with main application": "Запускать вместе с главным приложением",
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."
26
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "An independent JWT secret ensures data and session isolation from other applications.": "An independent JWT secret ensures data and session isolation from other applications.",
3
+ "App ID": "App ID",
4
+ "App display name": "App display name",
5
+ "Applications": "Applications",
6
+ "Authentication options": "Authentication options",
7
+ "Auto start": "Auto start",
8
+ "Automatically generate a JWT secret": "Automatically generate a JWT secret",
9
+ "Custom domain": "Custom domain",
10
+ "JWT secret": "JWT secret",
11
+ "Manage applications": "Manage applications",
12
+ "Migrate data": "Migrate data",
13
+ "Migrate data to new multi-app": "Migrate data to new multi-app",
14
+ "Migrate successfully": "Migrate successfully",
15
+ "Multi-app is not enabled, please enable it first": "Multi-app is not enabled, please enable it first",
16
+ "Multi-app manager": "Multi-app manager",
17
+ "Multi-app manager (deprecated)": "Multi-app manager (deprecated)",
18
+ "Pin to menu": "Pin to menu",
19
+ "Please enter the port": "Please enter the port",
20
+ "Port": "Port",
21
+ "Standalone deployment": "Standalone deployment",
22
+ "Start mode": "Start mode",
23
+ "Start on first visit": "Start on first visit",
24
+ "Start with main application": "Start with main application",
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."
26
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "An independent JWT secret ensures data and session isolation from other applications.": "An independent JWT secret ensures data and session isolation from other applications.",
3
+ "App ID": "App ID",
4
+ "App display name": "App display name",
5
+ "Applications": "Applications",
6
+ "Authentication options": "Authentication options",
7
+ "Auto start": "Auto start",
8
+ "Automatically generate a JWT secret": "Automatically generate a JWT secret",
9
+ "Custom domain": "Custom domain",
10
+ "JWT secret": "JWT secret",
11
+ "Manage applications": "Manage applications",
12
+ "Migrate data": "Migrate data",
13
+ "Migrate data to new multi-app": "Migrate data to new multi-app",
14
+ "Migrate successfully": "Migrate successfully",
15
+ "Multi-app is not enabled, please enable it first": "Multi-app is not enabled, please enable it first",
16
+ "Multi-app manager": "Multi-app manager",
17
+ "Multi-app manager (deprecated)": "Multi-app manager (deprecated)",
18
+ "Pin to menu": "Pin to menu",
19
+ "Please enter the port": "Please enter the port",
20
+ "Port": "Port",
21
+ "Standalone deployment": "Standalone deployment",
22
+ "Start mode": "Start mode",
23
+ "Start on first visit": "Start on first visit",
24
+ "Start with main application": "Start with main application",
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."
26
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "An independent JWT secret ensures data and session isolation from other applications.": "An independent JWT secret ensures data and session isolation from other applications.",
3
+ "App ID": "App ID",
4
+ "App display name": "App display name",
5
+ "Applications": "Applications",
6
+ "Authentication options": "Authentication options",
7
+ "Auto start": "Auto start",
8
+ "Automatically generate a JWT secret": "Automatically generate a JWT secret",
9
+ "Custom domain": "Custom domain",
10
+ "JWT secret": "JWT secret",
11
+ "Manage applications": "Manage applications",
12
+ "Migrate data": "Migrate data",
13
+ "Migrate data to new multi-app": "Migrate data to new multi-app",
14
+ "Migrate successfully": "Migrate successfully",
15
+ "Multi-app is not enabled, please enable it first": "Multi-app is not enabled, please enable it first",
16
+ "Multi-app manager": "Multi-app manager",
17
+ "Multi-app manager (deprecated)": "Multi-app manager (deprecated)",
18
+ "Pin to menu": "Pin to menu",
19
+ "Please enter the port": "Please enter the port",
20
+ "Port": "Port",
21
+ "Standalone deployment": "Standalone deployment",
22
+ "Start mode": "Start mode",
23
+ "Start on first visit": "Start on first visit",
24
+ "Start with main application": "Start with main application",
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."
26
+ }
@@ -1,25 +1,27 @@
1
1
  {
2
- "Multi-app manager (deprecated)": "多应用管理(已废弃)",
3
- "Applications": "应用",
4
- "App display name": "应用名称",
2
+ "An independent JWT secret ensures data and session isolation from other applications.": "独立的 JWT 密钥,保证与其他应用的数据与会话隔离。",
5
3
  "App ID": "应用标识",
6
- "Pin to menu": "在菜单上显示",
4
+ "App display name": "应用名称",
5
+ "Applications": "应用",
6
+ "Authentication options": "认证选项",
7
+ "Auto start": "自动启动",
8
+ "Automatically generate a JWT secret": "自动生成 JWT 密钥",
7
9
  "Custom domain": "自定义域名",
10
+ "JWT secret": "JWT 密钥",
8
11
  "Manage applications": "管理应用",
12
+ "Migrate data": "迁移数据",
13
+ "Migrate data to new multi-app": "迁移数据至新多应用",
14
+ "Migrate successfully": "迁移成功",
15
+ "Multi-app is not enabled, please enable it first": "多应用未启用,请先启用",
16
+ "Multi-app manager": "多应用管理",
17
+ "Multi-app manager (deprecated)": "多应用管理(已废弃)",
18
+ "Pin to menu": "在菜单上显示",
19
+ "Please enter the port": "请输入端口号",
20
+ "Port": "端口号",
9
21
  "Standalone deployment": "独立部署",
10
- "Auto start": "自动启动",
11
22
  "Start mode": "启动方式",
12
23
  "Start on first visit": "首次访问时启动",
13
24
  "Start with main application": "随主应用一同启动",
14
- "Authentication options": "认证选项",
15
- "JWT secret": "JWT 密钥",
16
- "Automatically generate a JWT secret": "自动生成 JWT 密钥",
17
- "An independent JWT secret ensures data and session isolation from other applications.": "独立的 JWT 密钥,保证与其他应用的数据与会话隔离。",
18
- "Migrate data": "迁移数据",
19
- "Migrate successfully": "迁移成功",
20
- "Port": "端口号",
21
25
  "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "迁移数据时,系统会基于该端口号自动为每个应用分配一个递增的端口号,您也可以在迁移后手动修改。",
22
- "Migrate data to new multi-app": "迁移数据至新多应用",
23
- "Multi-app is not enabled, please enable it first": "多应用未启用,请先启用",
24
- "Please enter the port": "请输入端口号"
26
+ "Migrate to app supervisor": "迁移到应用监管器"
25
27
  }
@@ -0,0 +1,26 @@
1
+ {
2
+ "An independent JWT secret ensures data and session isolation from other applications.": "An independent JWT secret ensures data and session isolation from other applications.",
3
+ "App ID": "App ID",
4
+ "App display name": "App display name",
5
+ "Applications": "Applications",
6
+ "Authentication options": "Authentication options",
7
+ "Auto start": "Auto start",
8
+ "Automatically generate a JWT secret": "Automatically generate a JWT secret",
9
+ "Custom domain": "Custom domain",
10
+ "JWT secret": "JWT secret",
11
+ "Manage applications": "Manage applications",
12
+ "Migrate data": "Migrate data",
13
+ "Migrate data to new multi-app": "Migrate data to new multi-app",
14
+ "Migrate successfully": "Migrate successfully",
15
+ "Multi-app is not enabled, please enable it first": "Multi-app is not enabled, please enable it first",
16
+ "Multi-app manager": "Multi-app manager",
17
+ "Multi-app manager (deprecated)": "Multi-app manager (deprecated)",
18
+ "Pin to menu": "Pin to menu",
19
+ "Please enter the port": "Please enter the port",
20
+ "Port": "Port",
21
+ "Standalone deployment": "Standalone deployment",
22
+ "Start mode": "Start mode",
23
+ "Start on first visit": "Start on first visit",
24
+ "Start with main application": "Start with main application",
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."
26
+ }
@@ -0,0 +1,101 @@
1
+ import EventEmitter = require('eventemitter3');
2
+ import { Queue, RunFunction } from './queue';
3
+ import PriorityQueue from './priority-queue';
4
+ import { QueueAddOptions, DefaultAddOptions, Options } from './options';
5
+ declare type Task<TaskResultType> = (() => PromiseLike<TaskResultType>) | (() => TaskResultType);
6
+ /**
7
+ Promise queue with concurrency control.
8
+ */
9
+ export default class PQueue<QueueType extends Queue<RunFunction, EnqueueOptionsType> = PriorityQueue, EnqueueOptionsType extends QueueAddOptions = DefaultAddOptions> extends EventEmitter<'active' | 'idle' | 'add' | 'next'> {
10
+ private readonly _carryoverConcurrencyCount;
11
+ private readonly _isIntervalIgnored;
12
+ private _intervalCount;
13
+ private readonly _intervalCap;
14
+ private readonly _interval;
15
+ private _intervalEnd;
16
+ private _intervalId?;
17
+ private _timeoutId?;
18
+ private _queue;
19
+ private readonly _queueClass;
20
+ private _pendingCount;
21
+ private _concurrency;
22
+ private _isPaused;
23
+ private _resolveEmpty;
24
+ private _resolveIdle;
25
+ private _timeout?;
26
+ private readonly _throwOnTimeout;
27
+ constructor(options?: Options<QueueType, EnqueueOptionsType>);
28
+ private get _doesIntervalAllowAnother();
29
+ private get _doesConcurrentAllowAnother();
30
+ private _next;
31
+ private _resolvePromises;
32
+ private _onResumeInterval;
33
+ private _isIntervalPaused;
34
+ private _tryToStartAnother;
35
+ private _initializeIntervalIfNeeded;
36
+ private _onInterval;
37
+ /**
38
+ Executes all queued functions until it reaches the limit.
39
+ */
40
+ private _processQueue;
41
+ get concurrency(): number;
42
+ set concurrency(newConcurrency: number);
43
+ /**
44
+ Adds a sync or async task to the queue. Always returns a promise.
45
+ */
46
+ add<TaskResultType>(fn: Task<TaskResultType>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultType>;
47
+ /**
48
+ Same as `.add()`, but accepts an array of sync or async functions.
49
+
50
+ @returns A promise that resolves when all functions are resolved.
51
+ */
52
+ addAll<TaskResultsType>(functions: ReadonlyArray<Task<TaskResultsType>>, options?: EnqueueOptionsType): Promise<TaskResultsType[]>;
53
+ /**
54
+ Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
55
+ */
56
+ start(): this;
57
+ /**
58
+ Put queue execution on hold.
59
+ */
60
+ pause(): void;
61
+ /**
62
+ Clear the queue.
63
+ */
64
+ clear(): void;
65
+ /**
66
+ Can be called multiple times. Useful if you for example add additional items at a later time.
67
+
68
+ @returns A promise that settles when the queue becomes empty.
69
+ */
70
+ onEmpty(): Promise<void>;
71
+ /**
72
+ The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
73
+
74
+ @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
75
+ */
76
+ onIdle(): Promise<void>;
77
+ /**
78
+ Size of the queue.
79
+ */
80
+ get size(): number;
81
+ /**
82
+ Size of the queue, filtered by the given options.
83
+
84
+ For example, this can be used to find the number of items remaining in the queue with a specific priority level.
85
+ */
86
+ sizeBy(options: Readonly<Partial<EnqueueOptionsType>>): number;
87
+ /**
88
+ Number of pending promises.
89
+ */
90
+ get pending(): number;
91
+ /**
92
+ Whether the queue is currently paused.
93
+ */
94
+ get isPaused(): boolean;
95
+ get timeout(): number | undefined;
96
+ /**
97
+ Set the timeout for future operations.
98
+ */
99
+ set timeout(milliseconds: number | undefined);
100
+ }
101
+ export { Queue, QueueAddOptions, DefaultAddOptions, Options };
@@ -0,0 +1 @@
1
+ (function(){"use strict";var e={330:function(e){e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},291:function(e,t){Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},492:function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});const r=n(291);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},924:function(e){var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i<s;i++){o[i]=r[i].fn}return o};EventEmitter.prototype.listenerCount=function listenerCount(e){var t=n?n+e:e,r=this._events[t];if(!r)return 0;if(r.fn)return 1;return r.length};EventEmitter.prototype.emit=function emit(e,t,r,i,s,o){var u=n?n+e:e;if(!this._events[u])return false;var a=this._events[u],l=arguments.length,c,h;if(a.fn){if(a.once)this.removeListener(e,a.fn,undefined,true);switch(l){case 1:return a.fn.call(a.context),true;case 2:return a.fn.call(a.context,t),true;case 3:return a.fn.call(a.context,t,r),true;case 4:return a.fn.call(a.context,t,r,i),true;case 5:return a.fn.call(a.context,t,r,i,s),true;case 6:return a.fn.call(a.context,t,r,i,s,o),true}for(h=1,c=new Array(l-1);h<l;h++){c[h-1]=arguments[h]}a.fn.apply(a.context,c)}else{var _=a.length,f;for(h=0;h<_;h++){if(a[h].once)this.removeListener(e,a[h].fn,undefined,true);switch(l){case 1:a[h].fn.call(a[h].context);break;case 2:a[h].fn.call(a[h].context,t);break;case 3:a[h].fn.call(a[h].context,t,r);break;case 4:a[h].fn.call(a[h].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(l-1);f<l;f++){c[f-1]=arguments[f]}a[h].fn.apply(a[h].context,c)}}}return true};EventEmitter.prototype.on=function on(e,t,n){return addListener(this,e,t,n,false)};EventEmitter.prototype.once=function once(e,t,n){return addListener(this,e,t,n,true)};EventEmitter.prototype.removeListener=function removeListener(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t){clearEvent(this,s);return this}var o=this._events[s];if(o.fn){if(o.fn===t&&(!i||o.once)&&(!r||o.context===r)){clearEvent(this,s)}}else{for(var u=0,a=[],l=o.length;u<l;u++){if(o[u].fn!==t||i&&!o[u].once||r&&o[u].context!==r){a.push(o[u])}}if(a.length)this._events[s]=a.length===1?a[0]:a;else clearEvent(this,s)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t;if(e){t=n?n+e:e;if(this._events[t])clearEvent(this,t)}else{this._events=new Events;this._eventsCount=0}return this};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.addListener=EventEmitter.prototype.on;EventEmitter.prefixed=n;EventEmitter.EventEmitter=EventEmitter;if(true){e.exports=EventEmitter}},424:function(e,t,n){const r=n(330);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};!function(){var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(924);const r=__nccwpck_require__(424);const i=__nccwpck_require__(492);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--;this._tryToStartAnother();this.emit("next")}_resolvePromises(){this._resolveEmpty();this._resolveEmpty=empty;if(this._pendingCount===0){this._resolveIdle();this._resolveIdle=empty;this.emit("idle")}}_onResumeInterval(){this._onInterval();this._initializeIntervalIfNeeded();this._timeoutId=undefined}_isIntervalPaused(){const e=Date.now();if(this._intervalId===undefined){const t=this._intervalEnd-e;if(t<0){this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}else{if(this._timeoutId===undefined){this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue}();module.exports=n})();
@@ -0,0 +1 @@
1
+ export default function lowerBound<T>(array: readonly T[], value: T, comparator: (a: T, b: T) => number): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound
4
+ // Used to compute insertion index to keep queue sorted after insertion
5
+ function lowerBound(array, value, comparator) {
6
+ let first = 0;
7
+ let count = array.length;
8
+ while (count > 0) {
9
+ const step = (count / 2) | 0;
10
+ let it = first + step;
11
+ if (comparator(array[it], value) <= 0) {
12
+ first = ++it;
13
+ count -= step + 1;
14
+ }
15
+ else {
16
+ count = step;
17
+ }
18
+ }
19
+ return first;
20
+ }
21
+ exports.default = lowerBound;
@@ -0,0 +1,64 @@
1
+ import { Queue, RunFunction } from './queue';
2
+ export interface QueueAddOptions {
3
+ readonly [key: string]: unknown;
4
+ }
5
+ export interface Options<QueueType extends Queue<RunFunction, QueueOptions>, QueueOptions extends QueueAddOptions> {
6
+ /**
7
+ Concurrency limit.
8
+
9
+ Minimum: `1`.
10
+
11
+ @default Infinity
12
+ */
13
+ readonly concurrency?: number;
14
+ /**
15
+ Whether queue tasks within concurrency limit, are auto-executed as soon as they're added.
16
+
17
+ @default true
18
+ */
19
+ readonly autoStart?: boolean;
20
+ /**
21
+ Class with a `enqueue` and `dequeue` method, and a `size` getter. See the [Custom QueueClass](https://github.com/sindresorhus/p-queue#custom-queueclass) section.
22
+ */
23
+ readonly queueClass?: new () => QueueType;
24
+ /**
25
+ The max number of runs in the given interval of time.
26
+
27
+ Minimum: `1`.
28
+
29
+ @default Infinity
30
+ */
31
+ readonly intervalCap?: number;
32
+ /**
33
+ The length of time in milliseconds before the interval count resets. Must be finite.
34
+
35
+ Minimum: `0`.
36
+
37
+ @default 0
38
+ */
39
+ readonly interval?: number;
40
+ /**
41
+ Whether the task must finish in the given interval or will be carried over into the next interval count.
42
+
43
+ @default false
44
+ */
45
+ readonly carryoverConcurrencyCount?: boolean;
46
+ /**
47
+ Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
48
+ */
49
+ timeout?: number;
50
+ /**
51
+ Whether or not a timeout is considered an exception.
52
+
53
+ @default false
54
+ */
55
+ throwOnTimeout?: boolean;
56
+ }
57
+ export interface DefaultAddOptions extends QueueAddOptions {
58
+ /**
59
+ Priority of operation. Operations with greater priority will be scheduled first.
60
+
61
+ @default 0
62
+ */
63
+ readonly priority?: number;
64
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { Queue, RunFunction } from './queue';
2
+ import { QueueAddOptions } from './options';
3
+ export interface PriorityQueueOptions extends QueueAddOptions {
4
+ priority?: number;
5
+ }
6
+ export default class PriorityQueue implements Queue<RunFunction, PriorityQueueOptions> {
7
+ private readonly _queue;
8
+ enqueue(run: RunFunction, options?: Partial<PriorityQueueOptions>): void;
9
+ dequeue(): RunFunction | undefined;
10
+ filter(options: Readonly<Partial<PriorityQueueOptions>>): RunFunction[];
11
+ get size(): number;
12
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lower_bound_1 = require("./lower-bound");
4
+ class PriorityQueue {
5
+ constructor() {
6
+ this._queue = [];
7
+ }
8
+ enqueue(run, options) {
9
+ options = Object.assign({ priority: 0 }, options);
10
+ const element = {
11
+ priority: options.priority,
12
+ run
13
+ };
14
+ if (this.size && this._queue[this.size - 1].priority >= options.priority) {
15
+ this._queue.push(element);
16
+ return;
17
+ }
18
+ const index = lower_bound_1.default(this._queue, element, (a, b) => b.priority - a.priority);
19
+ this._queue.splice(index, 0, element);
20
+ }
21
+ dequeue() {
22
+ const item = this._queue.shift();
23
+ return item === null || item === void 0 ? void 0 : item.run;
24
+ }
25
+ filter(options) {
26
+ return this._queue.filter((element) => element.priority === options.priority).map((element) => element.run);
27
+ }
28
+ get size() {
29
+ return this._queue.length;
30
+ }
31
+ }
32
+ exports.default = PriorityQueue;
@@ -0,0 +1,7 @@
1
+ export declare type RunFunction = () => Promise<unknown>;
2
+ export interface Queue<Element, Options> {
3
+ size: number;
4
+ filter: (options: Partial<Options>) => Element[];
5
+ dequeue: () => Element | undefined;
6
+ enqueue: (run: Element, options?: Partial<Options>) => void;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.