tnp 21.0.295 → 21.0.296

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 (194) hide show
  1. package/VERIFIED-BUILD-DATA.jsonc +3 -3
  2. package/browser/fesm2022/tnp-browser.mjs +15 -11
  3. package/browser/fesm2022/tnp-browser.mjs.map +1 -1
  4. package/browser/package.json +1 -1
  5. package/browser/types/tnp-browser.d.ts +3 -2
  6. package/browser-prod/fesm2022/tnp-browser-prod.mjs +15 -11
  7. package/browser-prod/fesm2022/tnp-browser-prod.mjs.map +1 -1
  8. package/browser-prod/package.json +1 -1
  9. package/browser-prod/types/tnp-browser-prod.d.ts +3 -2
  10. package/browser-prod.split-namespaces.json +4 -0
  11. package/cli.js +1102 -535
  12. package/full-dts/build-info._auto-generated_.d.ts +1 -1
  13. package/full-dts/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.d.ts +7 -0
  14. package/full-dts/project/abstract/cloud-flare-projects/cloud-flare-project.d.ts +1 -1
  15. package/full-dts/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.d.ts +2 -0
  16. package/full-dts/project/abstract/sub-project.d.ts +1 -1
  17. package/full-dts/project/cli/cli-_GLOBAL_.d.ts +1 -0
  18. package/lib/build-info._auto-generated_.d.ts +1 -1
  19. package/lib/build-info._auto-generated_.js +1 -1
  20. package/lib/package.json +1 -1
  21. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.d.ts +6 -0
  22. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.js +83 -0
  23. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.js.map +1 -0
  24. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js +3 -66
  25. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js.map +1 -1
  26. package/lib/project/abstract/artifacts/artifacts-manager.js +1 -0
  27. package/lib/project/abstract/artifacts/artifacts-manager.js.map +1 -1
  28. package/lib/project/abstract/cloud-flare-projects/cloud-flare-custom-worker.js +7 -0
  29. package/lib/project/abstract/cloud-flare-projects/cloud-flare-custom-worker.js.map +1 -1
  30. package/lib/project/abstract/cloud-flare-projects/cloud-flare-project.d.ts +1 -1
  31. package/lib/project/abstract/cloud-flare-projects/cloud-flare-project.js +24 -3
  32. package/lib/project/abstract/cloud-flare-projects/cloud-flare-project.js.map +1 -1
  33. package/lib/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.d.ts +2 -0
  34. package/lib/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.js.map +1 -1
  35. package/lib/project/abstract/release-process/release-process.js +1 -0
  36. package/lib/project/abstract/release-process/release-process.js.map +1 -1
  37. package/lib/project/abstract/sub-project.d.ts +1 -1
  38. package/lib/project/abstract/sub-project.js +2 -2
  39. package/lib/project/abstract/sub-project.js.map +1 -1
  40. package/lib/project/cli/cli-SUB_PROJECT.js +12 -8
  41. package/lib/project/cli/cli-SUB_PROJECT.js.map +1 -1
  42. package/lib/project/cli/cli-_GLOBAL_.d.ts +1 -0
  43. package/lib/project/cli/cli-_GLOBAL_.js +72 -0
  44. package/lib/project/cli/cli-_GLOBAL_.js.map +1 -1
  45. package/lib/vscode-plugin/vscode-menu-items.js +14 -10
  46. package/lib/vscode-plugin/vscode-menu-items.js.map +1 -1
  47. package/lib-esm/lib/build-info._auto-generated_.d.ts +1 -1
  48. package/lib-esm/lib/build-info._auto-generated_.js +1 -1
  49. package/lib-esm/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.d.ts +6 -0
  50. package/lib-esm/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.js +80 -0
  51. package/lib-esm/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.js.map +1 -0
  52. package/lib-esm/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js +4 -67
  53. package/lib-esm/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js.map +1 -1
  54. package/lib-esm/lib/project/abstract/artifacts/artifacts-manager.js +1 -0
  55. package/lib-esm/lib/project/abstract/artifacts/artifacts-manager.js.map +1 -1
  56. package/lib-esm/lib/project/abstract/cloud-flare-projects/cloud-flare-custom-worker.js +7 -0
  57. package/lib-esm/lib/project/abstract/cloud-flare-projects/cloud-flare-custom-worker.js.map +1 -1
  58. package/lib-esm/lib/project/abstract/cloud-flare-projects/cloud-flare-project.d.ts +1 -1
  59. package/lib-esm/lib/project/abstract/cloud-flare-projects/cloud-flare-project.js +24 -3
  60. package/lib-esm/lib/project/abstract/cloud-flare-projects/cloud-flare-project.js.map +1 -1
  61. package/lib-esm/lib/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.d.ts +2 -0
  62. package/lib-esm/lib/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.js.map +1 -1
  63. package/lib-esm/lib/project/abstract/release-process/release-process.js +1 -0
  64. package/lib-esm/lib/project/abstract/release-process/release-process.js.map +1 -1
  65. package/lib-esm/lib/project/abstract/sub-project.d.ts +1 -1
  66. package/lib-esm/lib/project/abstract/sub-project.js +2 -2
  67. package/lib-esm/lib/project/abstract/sub-project.js.map +1 -1
  68. package/lib-esm/lib/project/cli/cli-SUB_PROJECT.js +12 -8
  69. package/lib-esm/lib/project/cli/cli-SUB_PROJECT.js.map +1 -1
  70. package/lib-esm/lib/project/cli/cli-_GLOBAL_.d.ts +1 -0
  71. package/lib-esm/lib/project/cli/cli-_GLOBAL_.js +72 -0
  72. package/lib-esm/lib/project/cli/cli-_GLOBAL_.js.map +1 -1
  73. package/lib-esm/lib/vscode-plugin/vscode-menu-items.js +14 -10
  74. package/lib-esm/lib/vscode-plugin/vscode-menu-items.js.map +1 -1
  75. package/lib-prod/build-info._auto-generated_.d.ts +1 -1
  76. package/lib-prod/build-info._auto-generated_.js +1 -1
  77. package/lib-prod/package.json +1 -1
  78. package/lib-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.d.ts +4 -0
  79. package/lib-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.js +79 -0
  80. package/lib-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.js.map +1 -0
  81. package/lib-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js +5 -68
  82. package/lib-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js.map +1 -1
  83. package/lib-prod/project/abstract/artifacts/artifacts-manager.js +1 -0
  84. package/lib-prod/project/abstract/artifacts/artifacts-manager.js.map +1 -1
  85. package/lib-prod/project/abstract/cloud-flare-projects/cloud-flare-custom-worker.js +7 -0
  86. package/lib-prod/project/abstract/cloud-flare-projects/cloud-flare-custom-worker.js.map +1 -1
  87. package/lib-prod/project/abstract/cloud-flare-projects/cloud-flare-project.d.ts +1 -1
  88. package/lib-prod/project/abstract/cloud-flare-projects/cloud-flare-project.js +24 -3
  89. package/lib-prod/project/abstract/cloud-flare-projects/cloud-flare-project.js.map +1 -1
  90. package/lib-prod/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.d.ts +2 -0
  91. package/lib-prod/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.js.map +1 -1
  92. package/lib-prod/project/abstract/release-process/release-process.js +1 -0
  93. package/lib-prod/project/abstract/release-process/release-process.js.map +1 -1
  94. package/lib-prod/project/abstract/sub-project.d.ts +1 -1
  95. package/lib-prod/project/abstract/sub-project.js +2 -2
  96. package/lib-prod/project/abstract/sub-project.js.map +1 -1
  97. package/lib-prod/project/abstract/taon-worker/deployments/deployments.controller.js.map +1 -1
  98. package/lib-prod/project/cli/cli-SUB_PROJECT.js +12 -8
  99. package/lib-prod/project/cli/cli-SUB_PROJECT.js.map +1 -1
  100. package/lib-prod/project/cli/cli-_GLOBAL_.d.ts +1 -0
  101. package/lib-prod/project/cli/cli-_GLOBAL_.js +74 -2
  102. package/lib-prod/project/cli/cli-_GLOBAL_.js.map +1 -1
  103. package/lib-prod/vscode-plugin/vscode-menu-items.js +14 -10
  104. package/lib-prod/vscode-plugin/vscode-menu-items.js.map +1 -1
  105. package/lib-prod.split-namespaces.json +4 -0
  106. package/package.json +1 -1
  107. package/ts-source/browser-code/build-info._auto-generated_.ts +1 -1
  108. package/ts-source/browser-code/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.ts +22 -0
  109. package/ts-source/browser-code/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.ts +1 -0
  110. package/ts-source/browser-code/project/abstract/cloud-flare-projects/cloud-flare-project.ts +2 -1
  111. package/ts-source/browser-code/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.ts +2 -0
  112. package/ts-source/browser-code/project/abstract/sub-project.ts +1 -1
  113. package/ts-source/browser-code/project/cli/cli-_GLOBAL_.ts +5 -2
  114. package/ts-source/browser-code/vscode-plugin/vscode-menu-items.ts +0 -10
  115. package/ts-source/browser-code-prod/build-info._auto-generated_.ts +1 -1
  116. package/ts-source/browser-code-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.split-namespaces.json +10 -0
  117. package/ts-source/browser-code-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.ts +20 -0
  118. package/ts-source/browser-code-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.ts +1 -0
  119. package/ts-source/browser-code-prod/project/abstract/artifacts/npm-lib-and-cli-tool/tools/taon-build-observer.ts +1 -1
  120. package/ts-source/browser-code-prod/project/abstract/cloud-flare-projects/cloud-flare-project.ts +2 -1
  121. package/ts-source/browser-code-prod/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.ts +2 -0
  122. package/ts-source/browser-code-prod/project/abstract/sub-project.ts +1 -1
  123. package/ts-source/browser-code-prod/project/abstract/taon-worker/deployments/deployments.controller.ts +1 -1
  124. package/ts-source/browser-code-prod/project/cli/cli-_GLOBAL_.ts +5 -2
  125. package/ts-source/browser-code-prod/vscode-plugin/vscode-menu-items.ts +0 -10
  126. package/ts-source/websql-code/build-info._auto-generated_.ts +1 -1
  127. package/ts-source/websql-code/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.ts +22 -0
  128. package/ts-source/websql-code/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.ts +1 -0
  129. package/ts-source/websql-code/project/abstract/cloud-flare-projects/cloud-flare-project.ts +2 -1
  130. package/ts-source/websql-code/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.ts +2 -0
  131. package/ts-source/websql-code/project/abstract/sub-project.ts +1 -1
  132. package/ts-source/websql-code/project/cli/cli-_GLOBAL_.ts +5 -2
  133. package/ts-source/websql-code/vscode-plugin/vscode-menu-items.ts +0 -10
  134. package/ts-source/websql-code-prod/build-info._auto-generated_.ts +1 -1
  135. package/ts-source/websql-code-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.split-namespaces.json +10 -0
  136. package/ts-source/websql-code-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.ts +20 -0
  137. package/ts-source/websql-code-prod/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.ts +1 -0
  138. package/ts-source/websql-code-prod/project/abstract/artifacts/npm-lib-and-cli-tool/tools/taon-build-observer.ts +1 -1
  139. package/ts-source/websql-code-prod/project/abstract/cloud-flare-projects/cloud-flare-project.ts +2 -1
  140. package/ts-source/websql-code-prod/project/abstract/cloud-flare-projects/cloud-flare-projects.utils.ts +2 -0
  141. package/ts-source/websql-code-prod/project/abstract/sub-project.ts +1 -1
  142. package/ts-source/websql-code-prod/project/abstract/taon-worker/deployments/deployments.controller.ts +1 -1
  143. package/ts-source/websql-code-prod/project/cli/cli-_GLOBAL_.ts +5 -2
  144. package/ts-source/websql-code-prod/vscode-plugin/vscode-menu-items.ts +0 -10
  145. package/websql/fesm2022/tnp-websql.mjs +15 -11
  146. package/websql/fesm2022/tnp-websql.mjs.map +1 -1
  147. package/websql/package.json +1 -1
  148. package/websql/types/tnp-websql.d.ts +3 -2
  149. package/websql-prod/fesm2022/tnp-websql-prod.mjs +15 -11
  150. package/websql-prod/fesm2022/tnp-websql-prod.mjs.map +1 -1
  151. package/websql-prod/package.json +1 -1
  152. package/websql-prod/types/tnp-websql-prod.d.ts +3 -2
  153. package/websql-prod.split-namespaces.json +4 -0
  154. package/browser-prod/types/tnp-browser-prod.d.ts.map +0 -1
  155. package/full-dts/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.d.ts +0 -53
  156. package/full-dts/project/abstract/taon-worker/secrets-keychain/secrets-keychain.repository copy.d.ts +0 -10
  157. package/full-dts/project/cli/cli-LANG copy.d.ts +0 -16
  158. package/full-dts/wrap-env.d.ts +0 -4
  159. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.d.ts +0 -52
  160. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.js +0 -306
  161. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.js.map +0 -1
  162. package/lib/project/abstract/taon-worker/deployments/deployments-api.service.d.ts +0 -5
  163. package/lib/project/abstract/taon-worker/dev-build/dev-build-api.service.d.ts +0 -5
  164. package/lib/project/abstract/taon-worker/dev-mode/dev-mode-api.service.d.ts +0 -4
  165. package/lib/project/abstract/taon-worker/isomorphic-packages/isomorphic-packages-api.service.d.ts +0 -4
  166. package/lib/project/abstract/taon-worker/secrets-keychain/secrets-keychain.api.service.d.ts +0 -8
  167. package/lib/project/abstract/taon-worker/secrets-keychain/secrets-keychain.repository copy.d.ts +0 -9
  168. package/lib/project/abstract/taon-worker/secrets-keychain/secrets-keychain.repository copy.js +0 -37
  169. package/lib/project/abstract/taon-worker/secrets-keychain/secrets-keychain.repository copy.js.map +0 -1
  170. package/lib/project/cli/cli-LANG copy.d.ts +0 -15
  171. package/lib/project/cli/cli-LANG copy.js +0 -46
  172. package/lib/project/cli/cli-LANG copy.js.map +0 -1
  173. package/lib/wrap-env.d.ts +0 -3
  174. package/lib/wrap-env.js +0 -10
  175. package/lib/wrap-env.js.map +0 -1
  176. package/lib-esm/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.d.ts +0 -52
  177. package/lib-esm/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.js +0 -302
  178. package/lib-esm/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.js.map +0 -1
  179. package/lib-esm/lib/project/abstract/taon-worker/secrets-keychain/secrets-keychain.repository copy.d.ts +0 -9
  180. package/lib-esm/lib/project/abstract/taon-worker/secrets-keychain/secrets-keychain.repository copy.js +0 -28
  181. package/lib-esm/lib/project/abstract/taon-worker/secrets-keychain/secrets-keychain.repository copy.js.map +0 -1
  182. package/lib-esm/lib/project/cli/cli-LANG copy.d.ts +0 -15
  183. package/lib-esm/lib/project/cli/cli-LANG copy.js +0 -42
  184. package/lib-esm/lib/project/cli/cli-LANG copy.js.map +0 -1
  185. package/lib-esm/lib/wrap-env.d.ts +0 -3
  186. package/lib-esm/lib/wrap-env.js +0 -7
  187. package/lib-esm/lib/wrap-env.js.map +0 -1
  188. package/lib-prod/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.d.ts +0 -38
  189. package/lib-prod/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.js +0 -295
  190. package/lib-prod/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/code-split-process.enum.js.map +0 -1
  191. package/lib-prod/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/utils-code-cut.test.d.ts +0 -1
  192. package/lib-prod/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/utils-code-cut.test.js +0 -75
  193. package/lib-prod/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/utils-code-cut.test.js.map +0 -1
  194. package/websql-prod/types/tnp-websql-prod.d.ts.map +0 -1
package/cli.js CHANGED
@@ -28832,6 +28832,17 @@ var require_utils = __commonJS({
28832
28832
  var setMaxIndex = function setMaxIndex2(obj, maxIndex) {
28833
28833
  overflowChannel.set(obj, maxIndex);
28834
28834
  };
28835
+ var conflictChannel = getSideChannel();
28836
+ var markConflict = function markConflict2(obj, maxIndex) {
28837
+ conflictChannel.set(obj, maxIndex);
28838
+ return obj;
28839
+ };
28840
+ var isConflict = function isConflict2(obj) {
28841
+ return conflictChannel.has(obj);
28842
+ };
28843
+ var getConflictIndex = function getConflictIndex2(obj) {
28844
+ return conflictChannel.get(obj);
28845
+ };
28835
28846
  var hexTable = (function() {
28836
28847
  var array = [];
28837
28848
  for (var i = 0; i < 256; ++i) {
@@ -28875,6 +28886,27 @@ var require_utils = __commonJS({
28875
28886
  obj[key] = value;
28876
28887
  }
28877
28888
  };
28889
+ var maxNumericIndex = function maxNumericIndex2(obj, min2) {
28890
+ var max2 = min2;
28891
+ var keys2 = Object.keys(obj);
28892
+ for (var i = 0; i < keys2.length; ++i) {
28893
+ var num = parseInt(keys2[i], 10);
28894
+ if (String(num) === keys2[i] && num > max2) {
28895
+ max2 = num;
28896
+ }
28897
+ }
28898
+ return max2;
28899
+ };
28900
+ var limitedPair = function limitedPair2(first2, second, options2) {
28901
+ var pair = [first2, second];
28902
+ if (options2 && typeof options2.arrayLimit === "number" && pair.length > options2.arrayLimit) {
28903
+ if (options2.throwOnLimitExceeded) {
28904
+ throw new RangeError("Array limit exceeded. Only " + options2.arrayLimit + " element" + (options2.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
28905
+ }
28906
+ return markOverflow(arrayToObject(pair, options2), 1);
28907
+ }
28908
+ return pair;
28909
+ };
28878
28910
  var merge = function merge2(target, source, options2) {
28879
28911
  if (!source) {
28880
28912
  return target;
@@ -28894,13 +28926,21 @@ var require_utils = __commonJS({
28894
28926
  var newIndex = getMaxIndex(target) + 1;
28895
28927
  target[newIndex] = source;
28896
28928
  setMaxIndex(target, newIndex);
28929
+ } else if (options2 && options2.strictMerge && isConflict(target)) {
28930
+ var nextConflict = getConflictIndex(target) + 1;
28931
+ if (options2.throwOnLimitExceeded && typeof options2.arrayLimit === "number" && nextConflict >= options2.arrayLimit) {
28932
+ throw new RangeError("Array limit exceeded. Only " + options2.arrayLimit + " element" + (options2.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
28933
+ }
28934
+ target[nextConflict] = source;
28935
+ markConflict(target, nextConflict);
28897
28936
  } else if (options2 && options2.strictMerge) {
28898
- return [target, source];
28937
+ var conflict = limitedPair(target, source, options2);
28938
+ return isArray(conflict) ? markConflict(conflict, 1) : conflict;
28899
28939
  } else if (options2 && (options2.plainObjects || options2.allowPrototypes) || !has3.call(Object.prototype, source)) {
28900
28940
  target[source] = true;
28901
28941
  }
28902
28942
  } else {
28903
- return [target, source];
28943
+ return limitedPair(target, source, options2);
28904
28944
  }
28905
28945
  return target;
28906
28946
  }
@@ -28926,6 +28966,9 @@ var require_utils = __commonJS({
28926
28966
  var mergeTarget = target;
28927
28967
  if (isArray(target) && !isArray(source)) {
28928
28968
  mergeTarget = arrayToObject(target, options2);
28969
+ if (isConflict(target)) {
28970
+ markConflict(mergeTarget, target.length - 1);
28971
+ }
28929
28972
  }
28930
28973
  if (isArray(target) && isArray(source)) {
28931
28974
  source.forEach(function(item, i) {
@@ -28956,7 +28999,7 @@ var require_utils = __commonJS({
28956
28999
  setProperty(acc, key, value);
28957
29000
  }
28958
29001
  if (isOverflow(source) && !isOverflow(acc)) {
28959
- markOverflow(acc, getMaxIndex(source));
29002
+ markOverflow(acc, maxNumericIndex(acc, getMaxIndex(source)));
28960
29003
  }
28961
29004
  if (isOverflow(acc)) {
28962
29005
  var keyNum = parseInt(key, 10);
@@ -28964,6 +29007,12 @@ var require_utils = __commonJS({
28964
29007
  setMaxIndex(acc, keyNum);
28965
29008
  }
28966
29009
  }
29010
+ if (isConflict(acc)) {
29011
+ var conflictKey = parseInt(key, 10);
29012
+ if (String(conflictKey) === key && conflictKey > getConflictIndex(acc)) {
29013
+ markConflict(acc, conflictKey);
29014
+ }
29015
+ }
28967
29016
  return acc;
28968
29017
  }, mergeTarget);
28969
29018
  };
@@ -28974,6 +29023,9 @@ var require_utils = __commonJS({
28974
29023
  }, target);
28975
29024
  };
28976
29025
  var decode = function(str, defaultDecoder, charset) {
29026
+ if (typeof str === "string" && str.indexOf("%") === -1) {
29027
+ return str.indexOf("+") === -1 ? str : str.replace(/\+/g, " ");
29028
+ }
28977
29029
  var strWithoutPlus = str.replace(/\+/g, " ");
28978
29030
  if (charset === "iso-8859-1") {
28979
29031
  return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
@@ -28984,6 +29036,52 @@ var require_utils = __commonJS({
28984
29036
  return strWithoutPlus;
28985
29037
  }
28986
29038
  };
29039
+ var hasToPrimitive = typeof Symbol === "function" && typeof Symbol.toPrimitive === "symbol";
29040
+ var arrayJoin = Array.prototype.join;
29041
+ var arrayToString = Array.prototype.toString;
29042
+ var objectToString = Object.prototype.toString;
29043
+ var toCoercible = function toCoercible2(value, joining) {
29044
+ if (!value || typeof value !== "object" && typeof value !== "function") {
29045
+ return value;
29046
+ }
29047
+ if (hasToPrimitive && value[Symbol.toPrimitive] != null) {
29048
+ return value;
29049
+ }
29050
+ if (isArray(value) && value.toString === arrayToString && value.join === arrayJoin) {
29051
+ var ancestors = joining || getSideChannel();
29052
+ if (ancestors.has(value)) {
29053
+ return "";
29054
+ }
29055
+ ancestors.set(value, true);
29056
+ var copy;
29057
+ for (var i = 0; i < value.length; i += 1) {
29058
+ var item = value[i];
29059
+ var coerced = toCoercible2(item, ancestors);
29060
+ if (!copy && coerced !== item) {
29061
+ copy = [];
29062
+ for (var j = 0; j < i; j += 1) {
29063
+ copy[j] = value[j];
29064
+ }
29065
+ }
29066
+ if (copy) {
29067
+ copy[i] = coerced;
29068
+ }
29069
+ }
29070
+ ancestors["delete"](value);
29071
+ return copy || value;
29072
+ }
29073
+ if (typeof value.toString === "function") {
29074
+ return value;
29075
+ }
29076
+ var valueOf = value.valueOf;
29077
+ if (typeof valueOf === "function") {
29078
+ var primitive = valueOf.call(value);
29079
+ if (!primitive || typeof primitive !== "object" && typeof primitive !== "function") {
29080
+ return String(primitive);
29081
+ }
29082
+ }
29083
+ return objectToString.call(value);
29084
+ };
28987
29085
  var limit = 1024;
28988
29086
  var encode = function encode2(str, defaultEncoder, charset, kind, format) {
28989
29087
  if (str.length === 0) {
@@ -28993,12 +29091,12 @@ var require_utils = __commonJS({
28993
29091
  if (typeof str === "symbol") {
28994
29092
  string = Symbol.prototype.toString.call(str);
28995
29093
  } else if (typeof str !== "string") {
28996
- string = String(str);
29094
+ string = String(toCoercible(str));
28997
29095
  }
28998
29096
  if (charset === "iso-8859-1") {
28999
29097
  return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
29000
29098
  return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
29001
- });
29099
+ }).replace(/\+/g, "%2B");
29002
29100
  }
29003
29101
  var out = "";
29004
29102
  for (var j = 0; j < string.length; j += limit) {
@@ -29110,7 +29208,8 @@ var require_utils = __commonJS({
29110
29208
  isRegExp,
29111
29209
  markOverflow,
29112
29210
  maybeMap,
29113
- merge
29211
+ merge,
29212
+ toCoercible
29114
29213
  };
29115
29214
  }
29116
29215
  });
@@ -29225,17 +29324,17 @@ var require_stringify = __commonJS({
29225
29324
  if (generateArrayPrefix === "comma" && isArray(obj)) {
29226
29325
  if (encodeValuesOnly && encoder) {
29227
29326
  obj = utils.maybeMap(obj, function(v) {
29228
- return v == null ? v : encoder(v);
29327
+ return v == null ? v : encoder(v, defaults.encoder, charset, "value", format);
29229
29328
  });
29230
29329
  }
29231
- objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
29330
+ objKeys = [{ value: obj.length > 0 ? utils.toCoercible(obj).join(",") || null : void 0 }];
29232
29331
  } else if (isArray(filter2)) {
29233
29332
  objKeys = filter2;
29234
29333
  } else {
29235
29334
  var keys2 = Object.keys(obj);
29236
29335
  objKeys = sort ? keys2.sort(sort) : keys2;
29237
29336
  }
29238
- var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
29337
+ var encodedPrefix = String(prefix);
29239
29338
  var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
29240
29339
  if (allowEmptyArrays && isArray(obj) && obj.length === 0 && Object.keys(obj).length === 0) {
29241
29340
  return adjustedPrefix + "[]";
@@ -29306,7 +29405,7 @@ var require_stringify = __commonJS({
29306
29405
  filter2 = opts.filter;
29307
29406
  }
29308
29407
  var arrayFormat;
29309
- if (opts.arrayFormat in arrayPrefixGenerators) {
29408
+ if (has3.call(arrayPrefixGenerators, opts.arrayFormat)) {
29310
29409
  arrayFormat = opts.arrayFormat;
29311
29410
  } else if ("indices" in opts) {
29312
29411
  arrayFormat = opts.indices ? "indices" : "repeat";
@@ -29416,9 +29515,53 @@ var require_stringify = __commonJS({
29416
29515
  var require_parse = __commonJS({
29417
29516
  "tnp/node_modules/qs/lib/parse.js"(exports2, module2) {
29418
29517
  "use strict";
29518
+ var getSideChannel = require_side_channel();
29419
29519
  var utils = require_utils();
29420
29520
  var has3 = Object.prototype.hasOwnProperty;
29421
29521
  var isArray = Array.isArray;
29522
+ var getPrototypeOf = Object.getPrototypeOf;
29523
+ var isPlainContainer = function isPlainContainer2(value) {
29524
+ if (!value || typeof value !== "object") {
29525
+ return false;
29526
+ }
29527
+ if (isArray(value)) {
29528
+ return true;
29529
+ }
29530
+ var proto = getPrototypeOf(value);
29531
+ return proto === Object.prototype || proto === null;
29532
+ };
29533
+ var emptyCopyOf = function emptyCopyOf2(value) {
29534
+ if (isArray(value)) {
29535
+ var arr = [];
29536
+ arr.length = value.length;
29537
+ return arr;
29538
+ }
29539
+ return getPrototypeOf(value) === null ? { __proto__: null } : {};
29540
+ };
29541
+ var copyInput = function copyInput2(input) {
29542
+ var copies = getSideChannel();
29543
+ var result2 = {};
29544
+ var queue = [{ source: input, target: result2 }];
29545
+ for (var i = 0; i < queue.length; ++i) {
29546
+ var source = queue[i].source;
29547
+ var target = queue[i].target;
29548
+ var keys2 = Object.keys(source);
29549
+ for (var j = 0; j < keys2.length; ++j) {
29550
+ var value = source[keys2[j]];
29551
+ if (isPlainContainer(value)) {
29552
+ if (!copies.has(value)) {
29553
+ var copy = emptyCopyOf(value);
29554
+ copies.set(value, copy);
29555
+ queue[queue.length] = { source: value, target: copy };
29556
+ }
29557
+ target[keys2[j]] = copies.get(value);
29558
+ } else {
29559
+ target[keys2[j]] = value;
29560
+ }
29561
+ }
29562
+ }
29563
+ return result2;
29564
+ };
29422
29565
  var defaults = {
29423
29566
  allowDots: false,
29424
29567
  allowEmptyArrays: false,
@@ -29505,6 +29648,7 @@ var require_parse = __commonJS({
29505
29648
  var part = parts[i];
29506
29649
  var bracketEqualsPos = part.indexOf("]=");
29507
29650
  var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
29651
+ var isEmptyBracketKey = pos > 1 && part.slice(pos - 2, pos) === "[]";
29508
29652
  var key;
29509
29653
  var val;
29510
29654
  if (pos === -1) {
@@ -29528,7 +29672,7 @@ var require_parse = __commonJS({
29528
29672
  if (val && options2.interpretNumericEntities && charset === "iso-8859-1") {
29529
29673
  val = interpretNumericEntities(String(val));
29530
29674
  }
29531
- if (part.indexOf("[]=") > -1) {
29675
+ if (isEmptyBracketKey) {
29532
29676
  val = isArray(val) ? [val] : val;
29533
29677
  }
29534
29678
  if (options2.comma && isArray(val) && val.length > options2.arrayLimit) {
@@ -29536,7 +29680,7 @@ var require_parse = __commonJS({
29536
29680
  }
29537
29681
  if (key !== null) {
29538
29682
  var existing = has3.call(obj, key);
29539
- if (existing && (options2.duplicates === "combine" || part.indexOf("[]=") > -1)) {
29683
+ if (existing && (options2.duplicates === "combine" || isEmptyBracketKey)) {
29540
29684
  obj[key] = utils.combine(
29541
29685
  obj[key],
29542
29686
  val,
@@ -29597,8 +29741,35 @@ var require_parse = __commonJS({
29597
29741
  }
29598
29742
  return leaf;
29599
29743
  };
29744
+ var topLevelDotsToBrackets = function topLevelDotsToBrackets2(key) {
29745
+ var result2 = "";
29746
+ var depth = 0;
29747
+ for (var i = 0; i < key.length; i += 1) {
29748
+ var cu = key.charCodeAt(i);
29749
+ if (cu === 91) {
29750
+ depth += 1;
29751
+ result2 += "[";
29752
+ } else if (cu === 93) {
29753
+ if (depth > 0) {
29754
+ depth -= 1;
29755
+ }
29756
+ result2 += "]";
29757
+ } else if (cu === 46 && depth === 0 && i + 1 < key.length && key.charCodeAt(i + 1) !== 46 && key.charCodeAt(i + 1) !== 91) {
29758
+ var start = i + 1;
29759
+ var j = start;
29760
+ while (j < key.length && key.charCodeAt(j) !== 46 && key.charCodeAt(j) !== 91) {
29761
+ j += 1;
29762
+ }
29763
+ result2 += "[" + key.slice(start, j) + "]";
29764
+ i = j - 1;
29765
+ } else {
29766
+ result2 += key.charAt(i);
29767
+ }
29768
+ }
29769
+ return result2;
29770
+ };
29600
29771
  var splitKeyIntoSegments = function splitKeyIntoSegments2(originalKey, options2) {
29601
- var key = options2.allowDots ? originalKey.replace(/\.([^.[]+)/g, "[$1]") : originalKey;
29772
+ var key = options2.allowDots ? topLevelDotsToBrackets(originalKey) : originalKey;
29602
29773
  if (options2.depth <= 0) {
29603
29774
  if (!options2.plainObjects && has3.call(Object.prototype, key)) {
29604
29775
  if (!options2.allowPrototypes) {
@@ -29724,7 +29895,7 @@ var require_parse = __commonJS({
29724
29895
  if (str === "" || str === null || typeof str === "undefined") {
29725
29896
  return options2.plainObjects ? { __proto__: null } : {};
29726
29897
  }
29727
- var tempObj = typeof str === "string" ? parseValues(str, options2) : str;
29898
+ var tempObj = typeof str === "string" ? parseValues(str, options2) : copyInput(str);
29728
29899
  var obj = options2.plainObjects ? { __proto__: null } : {};
29729
29900
  var keys2 = Object.keys(tempObj);
29730
29901
  for (var i = 0; i < keys2.length; ++i) {
@@ -209508,7 +209679,8 @@ var require_constants15 = __commonJS({
209508
209679
  "tnp/node_modules/taon/lib/constants.js"(exports2) {
209509
209680
  "use strict";
209510
209681
  Object.defineProperty(exports2, "__esModule", { value: true });
209511
- exports2.Replecables = exports2.apiPrefix = exports2.TaonBaseStorageRepositoryClassName = exports2.TaonBaseRepositoryClassName = exports2.CURRENT_HOST_URL = exports2.CURRENT_HOST_BACKEND_PORT = exports2.TAON_CONTEXT = exports2.TaonEntityKeysToOmitArr = void 0;
209682
+ exports2.Replecables = exports2.apiPrefix = exports2.TaonBaseStorageRepositoryClassName = exports2.TaonBaseRepositoryClassName = exports2.CURRENT_HOST_URL = exports2.CURRENT_HOST_BACKEND_PORT = exports2.TAON_CONTEXT = exports2.TaonEntityKeysToOmitArr = exports2.TAON_MIGRATION_META_TABLE_NAME = void 0;
209683
+ exports2.TAON_MIGRATION_META_TABLE_NAME = "TAON_MIGRATION_META";
209512
209684
  exports2.TaonEntityKeysToOmitArr = [
209513
209685
  "ctrl",
209514
209686
  "clone",
@@ -309786,6 +309958,7 @@ var require_DataSource = __commonJS({
309786
309958
  var DriverUtils_1 = require_DriverUtils();
309787
309959
  var InstanceChecker_1 = require_InstanceChecker();
309788
309960
  var constants_12 = require_constants16();
309961
+ var lib_13 = require_lib31();
309789
309962
  var DataSource = class {
309790
309963
  "@instanceof" = Symbol.for("DataSource");
309791
309964
  SelectQueryBuilder = SelectQueryBuilder_1.SelectQueryBuilder;
@@ -310190,6 +310363,9 @@ var require_DataSource = __commonJS({
310190
310363
  return this.entityMetadatas.find((metadata) => {
310191
310364
  if (metadata.target === target)
310192
310365
  return true;
310366
+ if (metadata.givenTableName === target[lib_13.CoreModels.ClassNameStaticProperty]) {
310367
+ return true;
310368
+ }
310193
310369
  if (InstanceChecker_1.InstanceChecker.isEntitySchema(target)) {
310194
310370
  return metadata.name === target.options.name;
310195
310371
  }
@@ -312963,130 +313139,6 @@ var require_cloudflare_express_fake_server = __commonJS({
312963
313139
  }
312964
313140
  });
312965
313141
 
312966
- // tnp/node_modules/taon/lib/models.js
312967
- var require_models2 = __commonJS({
312968
- "tnp/node_modules/taon/lib/models.js"(exports2) {
312969
- "use strict";
312970
- Object.defineProperty(exports2, "__esModule", { value: true });
312971
- exports2.Models = exports2.TaonTempRoutesFolder = exports2.TaonTempDatabasesFolder = exports2.BaseTaonClassesNames = exports2.TaonRestResponseWrapper = void 0;
312972
- var lib_13 = require_lib36();
312973
- var lib_22 = require_lib31();
312974
- var TaonRestResponseWrapper = class extends lib_13.RestResponseWrapper {
312975
- };
312976
- exports2.TaonRestResponseWrapper = TaonRestResponseWrapper;
312977
- exports2.BaseTaonClassesNames = [
312978
- "BaseCrudController",
312979
- "BaseController",
312980
- "BaseAbstractEntity",
312981
- "BaseEntity",
312982
- "BaseContext",
312983
- "BaseCustomRepository",
312984
- "BaseFileUploadMiddleware",
312985
- "BaseMiddleware",
312986
- "BaseClass",
312987
- "BaseInjector",
312988
- "BaseMigration",
312989
- "BaseProvider",
312990
- "BaseRepository",
312991
- "BaseSubscriberForEntity",
312992
- "BaseCliWorkerController",
312993
- "PortsController",
312994
- "PortsContext"
312995
- ];
312996
- exports2.TaonTempDatabasesFolder = "databases";
312997
- exports2.TaonTempRoutesFolder = "routes";
312998
- var Models;
312999
- (function(Models2) {
313000
- Models2.DatabasesFolder = exports2.TaonTempDatabasesFolder;
313001
- let ClassType;
313002
- (function(ClassType2) {
313003
- ClassType2["ENTITY"] = "ENTITY";
313004
- ClassType2["CONTROLLER"] = "CONTROLLER";
313005
- ClassType2["REPOSITORY"] = "REPOSITORY";
313006
- ClassType2["PROVIDER"] = "PROVIDER";
313007
- ClassType2["SUBSCRIBER"] = "SUBSCRIBER";
313008
- ClassType2["MIGRATION"] = "MIGRATION";
313009
- ClassType2["MIDDLEWARE"] = "MIDDLEWARE";
313010
- })(ClassType = Models2.ClassType || (Models2.ClassType = {}));
313011
- Models2.ClassTypeKey = {
313012
- [ClassType.ENTITY]: "entities",
313013
- [ClassType.CONTROLLER]: "controllers",
313014
- [ClassType.REPOSITORY]: "repositories",
313015
- [ClassType.PROVIDER]: "providers",
313016
- [ClassType.SUBSCRIBER]: "subscribers",
313017
- [ClassType.MIGRATION]: "migrations",
313018
- [ClassType.MIDDLEWARE]: "middlewares"
313019
- };
313020
- let DBRecreateMode;
313021
- (function(DBRecreateMode2) {
313022
- DBRecreateMode2["DROP_DB_MIGRATIONS"] = "DROP_DB__RUN_MIGRATIONS";
313023
- DBRecreateMode2["PRESERVE_DATA_MIGRATIONS"] = "PRESERVE_DATA__RUN_MIGRATIONS";
313024
- })(DBRecreateMode = Models2.DBRecreateMode || (Models2.DBRecreateMode = {}));
313025
- class DatabaseConfigTypeOrm {
313026
- /**
313027
- * database name
313028
- */
313029
- database;
313030
- /**
313031
- * only for file base db: sqlite, sqljs
313032
- */
313033
- location;
313034
- synchronize;
313035
- dropSchema;
313036
- type;
313037
- /**
313038
- * Persists db on disk/local-storage if serverless db
313039
- */
313040
- autoSave;
313041
- /**
313042
- * for websql db mode
313043
- * true by default
313044
- */
313045
- useLocalForage;
313046
- logging;
313047
- databasePort;
313048
- databaseHost;
313049
- databaseUsername;
313050
- databasePassword;
313051
- }
313052
- Models2.DatabaseConfigTypeOrm = DatabaseConfigTypeOrm;
313053
- class KVDatabaseConfig {
313054
- static from(databasePartialConfig) {
313055
- return lib_22._.merge(new KVDatabaseConfig(), databasePartialConfig);
313056
- }
313057
- }
313058
- Models2.KVDatabaseConfig = KVDatabaseConfig;
313059
- class DatabaseConfig extends DatabaseConfigTypeOrm {
313060
- /**
313061
- * Default value 'DROP_ALL'.
313062
- *
313063
- * Tell framework what is happening with db
313064
- * when context is starting.
313065
- */
313066
- recreateMode;
313067
- static from(databasePartialConfig) {
313068
- return lib_22._.merge(new DatabaseConfig(), databasePartialConfig);
313069
- }
313070
- get databaseConfigTypeORM() {
313071
- const result2 = lib_22._.cloneDeep(this);
313072
- if (result2.recreateMode) {
313073
- if (result2.recreateMode === "DROP_DB__RUN_MIGRATIONS") {
313074
- result2.synchronize = true;
313075
- result2.dropSchema = true;
313076
- } else if (result2.recreateMode === "PRESERVE_DATA__RUN_MIGRATIONS") {
313077
- result2.synchronize = false;
313078
- result2.dropSchema = false;
313079
- }
313080
- }
313081
- delete result2.recreateMode;
313082
- return result2;
313083
- }
313084
- }
313085
- Models2.DatabaseConfig = DatabaseConfig;
313086
- })(Models || (exports2.Models = Models = {}));
313087
- }
313088
- });
313089
-
313090
313142
  // tnp/node_modules/taon/lib/decorators/decorator-abstract-opt.js
313091
313143
  var require_decorator_abstract_opt = __commonJS({
313092
313144
  "tnp/node_modules/taon/lib/decorators/decorator-abstract-opt.js"(exports2) {
@@ -313564,28 +313616,153 @@ var require_class_helpers = __commonJS({
313564
313616
  }
313565
313617
  });
313566
313618
 
313619
+ // tnp/node_modules/taon/lib/models.js
313620
+ var require_models2 = __commonJS({
313621
+ "tnp/node_modules/taon/lib/models.js"(exports2) {
313622
+ "use strict";
313623
+ Object.defineProperty(exports2, "__esModule", { value: true });
313624
+ exports2.Models = exports2.TaonTempRoutesFolder = exports2.TaonTempDatabasesFolder = exports2.BaseTaonClassesNames = exports2.TaonRestResponseWrapper = void 0;
313625
+ var lib_13 = require_lib36();
313626
+ var lib_22 = require_lib31();
313627
+ var TaonRestResponseWrapper = class extends lib_13.RestResponseWrapper {
313628
+ };
313629
+ exports2.TaonRestResponseWrapper = TaonRestResponseWrapper;
313630
+ exports2.BaseTaonClassesNames = [
313631
+ "BaseCrudController",
313632
+ "BaseController",
313633
+ "BaseAbstractEntity",
313634
+ "BaseEntity",
313635
+ "BaseContext",
313636
+ "BaseCustomRepository",
313637
+ "BaseFileUploadMiddleware",
313638
+ "BaseMiddleware",
313639
+ "BaseClass",
313640
+ "BaseInjector",
313641
+ "BaseMigration",
313642
+ "BaseProvider",
313643
+ "BaseRepository",
313644
+ "BaseSubscriberForEntity",
313645
+ "BaseCliWorkerController",
313646
+ "PortsController",
313647
+ "PortsContext"
313648
+ ];
313649
+ exports2.TaonTempDatabasesFolder = "databases";
313650
+ exports2.TaonTempRoutesFolder = "routes";
313651
+ var Models;
313652
+ (function(Models2) {
313653
+ Models2.DatabasesFolder = exports2.TaonTempDatabasesFolder;
313654
+ let ClassType;
313655
+ (function(ClassType2) {
313656
+ ClassType2["ENTITY"] = "ENTITY";
313657
+ ClassType2["CONTROLLER"] = "CONTROLLER";
313658
+ ClassType2["REPOSITORY"] = "REPOSITORY";
313659
+ ClassType2["PROVIDER"] = "PROVIDER";
313660
+ ClassType2["SUBSCRIBER"] = "SUBSCRIBER";
313661
+ ClassType2["MIGRATION"] = "MIGRATION";
313662
+ ClassType2["MIDDLEWARE"] = "MIDDLEWARE";
313663
+ })(ClassType = Models2.ClassType || (Models2.ClassType = {}));
313664
+ Models2.ClassTypeKey = {
313665
+ [ClassType.ENTITY]: "entities",
313666
+ [ClassType.CONTROLLER]: "controllers",
313667
+ [ClassType.REPOSITORY]: "repositories",
313668
+ [ClassType.PROVIDER]: "providers",
313669
+ [ClassType.SUBSCRIBER]: "subscribers",
313670
+ [ClassType.MIGRATION]: "migrations",
313671
+ [ClassType.MIDDLEWARE]: "middlewares"
313672
+ };
313673
+ let DBRecreateMode;
313674
+ (function(DBRecreateMode2) {
313675
+ DBRecreateMode2["DROP_DB_MIGRATIONS"] = "DROP_DB__RUN_MIGRATIONS";
313676
+ DBRecreateMode2["PRESERVE_DATA_MIGRATIONS"] = "PRESERVE_DATA__RUN_MIGRATIONS";
313677
+ })(DBRecreateMode = Models2.DBRecreateMode || (Models2.DBRecreateMode = {}));
313678
+ class DatabaseConfigTypeOrm {
313679
+ /**
313680
+ * database name
313681
+ */
313682
+ database;
313683
+ /**
313684
+ * only for file base db: sqlite, sqljs
313685
+ */
313686
+ location;
313687
+ synchronize;
313688
+ dropSchema;
313689
+ type;
313690
+ /**
313691
+ * Persists db on disk/local-storage if serverless db
313692
+ */
313693
+ autoSave;
313694
+ /**
313695
+ * for websql db mode
313696
+ * true by default
313697
+ */
313698
+ useLocalForage;
313699
+ logging;
313700
+ databasePort;
313701
+ databaseHost;
313702
+ databaseUsername;
313703
+ databasePassword;
313704
+ }
313705
+ Models2.DatabaseConfigTypeOrm = DatabaseConfigTypeOrm;
313706
+ class KVDatabaseConfig {
313707
+ static from(databasePartialConfig) {
313708
+ return lib_22._.merge(new KVDatabaseConfig(), databasePartialConfig);
313709
+ }
313710
+ }
313711
+ Models2.KVDatabaseConfig = KVDatabaseConfig;
313712
+ class DatabaseConfig extends DatabaseConfigTypeOrm {
313713
+ /**
313714
+ * Default value 'DROP_ALL'.
313715
+ *
313716
+ * Tell framework what is happening with db
313717
+ * when context is starting.
313718
+ */
313719
+ recreateMode;
313720
+ static from(databasePartialConfig) {
313721
+ return lib_22._.merge(new DatabaseConfig(), databasePartialConfig);
313722
+ }
313723
+ get databaseConfigTypeORM() {
313724
+ const result2 = lib_22._.cloneDeep(this);
313725
+ if (result2.recreateMode) {
313726
+ if (result2.recreateMode === "DROP_DB__RUN_MIGRATIONS") {
313727
+ result2.synchronize = true;
313728
+ result2.dropSchema = true;
313729
+ } else if (result2.recreateMode === "PRESERVE_DATA__RUN_MIGRATIONS") {
313730
+ result2.synchronize = false;
313731
+ result2.dropSchema = false;
313732
+ }
313733
+ }
313734
+ delete result2.recreateMode;
313735
+ return result2;
313736
+ }
313737
+ }
313738
+ Models2.DatabaseConfig = DatabaseConfig;
313739
+ })(Models || (exports2.Models = Models = {}));
313740
+ }
313741
+ });
313742
+
313567
313743
  // tnp/node_modules/taon/lib/context-db-migrations.js
313568
313744
  var require_context_db_migrations = __commonJS({
313569
313745
  "tnp/node_modules/taon/lib/context-db-migrations.js"(exports2) {
313570
313746
  "use strict";
313571
313747
  Object.defineProperty(exports2, "__esModule", { value: true });
313572
313748
  exports2.ContextDbMigrations = void 0;
313573
- var lib_13 = require_lib31();
313574
- var models_1 = require_models2();
313749
+ var lib_13 = require_lib40();
313750
+ var lib_22 = require_lib31();
313751
+ var constants_12 = require_constants15();
313575
313752
  var class_helpers_1 = require_class_helpers();
313576
- var lib_22 = require_lib40();
313753
+ var models_1 = require_models2();
313577
313754
  var ContextDbMigrations = class {
313578
313755
  ctx;
313579
313756
  //#region fields
313580
313757
  //#region fields / migration table name
313581
- DEFAULT_MIGRATION_TABLE_NAME = "TAON_MIGRATION_META";
313758
+ DEFAULT_MIGRATION_TABLE_NAME = constants_12.TAON_MIGRATION_META_TABLE_NAME;
313582
313759
  //#endregion
313583
313760
  //#region fields / migration statuses
313584
313761
  MIGRATION_STATUS_COMPLETED = "completed";
313585
313762
  MIGRATION_STATUS_PENDING = "pending";
313586
313763
  //#endregion
313587
313764
  //#region fields / migration table schema
313588
- table = new lib_22.Table({
313765
+ table = new lib_13.Table({
313589
313766
  name: this.DEFAULT_MIGRATION_TABLE_NAME,
313590
313767
  columns: [
313591
313768
  {
@@ -313661,7 +313838,7 @@ var require_context_db_migrations = __commonJS({
313661
313838
  }
313662
313839
  try {
313663
313840
  await queryRunner.createTable(this.table);
313664
- await queryRunner.createIndex(this.DEFAULT_MIGRATION_TABLE_NAME, new lib_22.TableIndex({
313841
+ await queryRunner.createIndex(this.DEFAULT_MIGRATION_TABLE_NAME, new lib_13.TableIndex({
313665
313842
  name: "IDX_NAME",
313666
313843
  columnNames: ["name"]
313667
313844
  }));
@@ -313682,12 +313859,12 @@ var require_context_db_migrations = __commonJS({
313682
313859
  if (this.ctx.isRemoteHost || !this.ctx.connection) {
313683
313860
  return;
313684
313861
  }
313685
- if (!lib_13.UtilsMigrations.isValidTimestamp(timestamp)) {
313686
- lib_13.Helpers.throwError(`Invalid timestamp provided for migration revert: ${timestamp}`);
313862
+ if (!lib_22.UtilsMigrations.isValidTimestamp(timestamp)) {
313863
+ lib_22.Helpers.throwError(`Invalid timestamp provided for migration revert: ${timestamp}`);
313687
313864
  }
313688
313865
  const migrationsClassFns = this.ctx.getClassFunByArr(models_1.Models.ClassType.MIGRATION).reverse();
313689
313866
  const migrationClassesInstancesToRevert = migrationsClassFns.map((classFn) => {
313690
- const timestampFromClassName = Number(lib_13.UtilsMigrations.getTimestampFromClassName(class_helpers_1.ClassHelpers.getName(classFn)));
313867
+ const timestampFromClassName = Number(lib_22.UtilsMigrations.getTimestampFromClassName(class_helpers_1.ClassHelpers.getName(classFn)));
313691
313868
  if (timestampFromClassName <= timestamp) {
313692
313869
  return null;
313693
313870
  }
@@ -313969,7 +314146,7 @@ var require_entity_process = __commonJS({
313969
314146
  response;
313970
314147
  //#region fields
313971
314148
  /**
313972
- * Data to send
314149
+ * Data to send.
313973
314150
  */
313974
314151
  data;
313975
314152
  /**
@@ -313987,10 +314164,10 @@ var require_entity_process = __commonJS({
313987
314164
  async run(resultFromControllerMethod) {
313988
314165
  let advancedManipulation = false;
313989
314166
  if (lib_32._.isFunction(resultFromControllerMethod)) {
313990
- advancedManipulation = true;
313991
314167
  const resultFn = resultFromControllerMethod;
313992
314168
  await resultFn({
313993
314169
  circResponse: (circData) => {
314170
+ advancedManipulation = true;
313994
314171
  this.responseHandled = true;
313995
314172
  const { circs, data } = (0, entity_process_helpers_1.applayTransformFn)(circData);
313996
314173
  this.data = data;
@@ -313999,9 +314176,9 @@ var require_entity_process = __commonJS({
313999
314176
  }
314000
314177
  this.send(advancedManipulation);
314001
314178
  },
314002
- streamResponse: (stream) => {
314179
+ streamResponse: async (options2) => {
314003
314180
  this.responseHandled = true;
314004
- this.streamResponse(stream);
314181
+ await this.streamResponse(options2);
314005
314182
  }
314006
314183
  });
314007
314184
  return;
@@ -314014,15 +314191,97 @@ var require_entity_process = __commonJS({
314014
314191
  }
314015
314192
  //#endregion
314016
314193
  //#region stream response
314017
- streamResponse(stream) {
314018
- stream.on("error", (error2) => {
314194
+ async streamResponse(options2) {
314195
+ const { stream, statusCode = 200, contentType = "application/octet-stream", filename, disposition = filename ? "attachment" : void 0, contentLength, headers = {} } = options2;
314196
+ if (this.response.headersSent) {
314197
+ throw new Error("[taon] Cannot start stream response - response headers were already sent.");
314198
+ }
314199
+ this.response.status(statusCode);
314200
+ this.response.setHeader("Content-Type", contentType);
314201
+ if (!lib_32._.isNil(contentLength)) {
314202
+ this.response.setHeader("Content-Length", String(contentLength));
314203
+ }
314204
+ if (disposition) {
314205
+ const value = filename ? `${disposition}; filename="${this.escapeHeaderFilename(filename)}"` : disposition;
314206
+ this.response.setHeader("Content-Disposition", value);
314207
+ }
314208
+ for (const [headerName, headerValue] of Object.entries(headers)) {
314209
+ this.response.setHeader(headerName, headerValue);
314210
+ }
314211
+ const reader = stream.getReader();
314212
+ let clientDisconnected = false;
314213
+ let streamCompleted = false;
314214
+ const onResponseClose = () => {
314215
+ if (!streamCompleted) {
314216
+ clientDisconnected = true;
314217
+ void reader.cancel(new Error("[taon] HTTP client disconnected during stream response."));
314218
+ }
314219
+ };
314220
+ this.response.once("close", onResponseClose);
314221
+ try {
314222
+ while (true) {
314223
+ const { done, value } = await reader.read();
314224
+ if (done) {
314225
+ streamCompleted = true;
314226
+ break;
314227
+ }
314228
+ if (clientDisconnected || this.response.destroyed) {
314229
+ break;
314230
+ }
314231
+ if (!value || value.byteLength === 0) {
314232
+ continue;
314233
+ }
314234
+ const canContinue = this.response.write(Buffer.from(value));
314235
+ if (!canContinue) {
314236
+ await this.waitForDrainOrClose();
314237
+ }
314238
+ }
314239
+ if (streamCompleted && !clientDisconnected && !this.response.destroyed && !this.response.writableEnded) {
314240
+ this.response.end();
314241
+ }
314242
+ } catch (error2) {
314243
+ if (clientDisconnected || this.response.destroyed) {
314244
+ return;
314245
+ }
314019
314246
  if (!this.response.headersSent) {
314020
314247
  this.response.status(500).end();
314021
314248
  return;
314022
314249
  }
314023
- this.response.destroy(error2);
314250
+ this.response.destroy(error2 instanceof Error ? error2 : new Error(`[taon] Stream response failed: ${String(error2)}`));
314251
+ } finally {
314252
+ this.response.off("close", onResponseClose);
314253
+ try {
314254
+ reader.releaseLock();
314255
+ } catch {
314256
+ }
314257
+ }
314258
+ }
314259
+ waitForDrainOrClose() {
314260
+ return new Promise((resolve, reject2) => {
314261
+ const onDrain = () => {
314262
+ cleanup();
314263
+ resolve();
314264
+ };
314265
+ const onClose = () => {
314266
+ cleanup();
314267
+ resolve();
314268
+ };
314269
+ const onError = (error2) => {
314270
+ cleanup();
314271
+ reject2(error2);
314272
+ };
314273
+ const cleanup = () => {
314274
+ this.response.off("drain", onDrain);
314275
+ this.response.off("close", onClose);
314276
+ this.response.off("error", onError);
314277
+ };
314278
+ this.response.once("drain", onDrain);
314279
+ this.response.once("close", onClose);
314280
+ this.response.once("error", onError);
314024
314281
  });
314025
- stream.pipe(this.response);
314282
+ }
314283
+ escapeHeaderFilename(filename) {
314284
+ return filename.replace(/[\r\n]/g, "").replace(/\\/g, "_").replace(/"/g, "'");
314026
314285
  }
314027
314286
  //#endregion
314028
314287
  //#region set headers
@@ -317981,7 +318240,6 @@ var require_taon_helpers = __commonJS({
317981
318240
  "use strict";
317982
318241
  Object.defineProperty(exports2, "__esModule", { value: true });
317983
318242
  exports2.TaonHelpers = void 0;
317984
- var JSON52 = require_lib17();
317985
318243
  var lib_13 = require_lib31();
317986
318244
  var class_helpers_1 = require_class_helpers();
317987
318245
  var TaonHelpers;
@@ -318016,7 +318274,7 @@ var require_taon_helpers = __commonJS({
318016
318274
  return false;
318017
318275
  }
318018
318276
  try {
318019
- const t = JSON52.parse(param);
318277
+ const t = JSON.parse(param);
318020
318278
  return t;
318021
318279
  } catch (e) {
318022
318280
  return param;
@@ -344613,6 +344871,18 @@ var require_endpoint_context = __commonJS({
344613
344871
  this.onlyMigrationRun = initOptions.onlyMigrationRun;
344614
344872
  this.onlyMigrationRevertToTimestamp = initOptions.onlyMigrationRevertToTimestamp;
344615
344873
  this.config = this.configFn({});
344874
+ if (lib_122.UtilsOs.isRunningInCloudflareWorker() && !initOptions.initFromRecrusiveContextResovle) {
344875
+ const TAON_WORKER_INSTANCE_ID = crypto.randomUUID();
344876
+ console.log(`
344877
+
344878
+ [WORKER START] instance=${TAON_WORKER_INSTANCE_ID}
344879
+ frontendHost: ${this.config.frontendHost}
344880
+ frontendHostPortNumber: ${this.config.frontendHostPortNumber}
344881
+ host: ${this.config.host}
344882
+ hostPortNumber: ${this.config.hostPortNumber}
344883
+
344884
+ `);
344885
+ }
344616
344886
  this.useSession = lib_14._.isBoolean(this.config.useSession) ? this.config.useSession : true;
344617
344887
  if (lib_14._.isBoolean(this.cloneOptions.overrideUseSession)) {
344618
344888
  this.useSession = this.cloneOptions.overrideUseSession;
@@ -345940,7 +346210,11 @@ var require_endpoint_context = __commonJS({
345940
346210
  res.send(`Hello, world from context ${this.contextName}`);
345941
346211
  });
345942
346212
  app.use(bodyParser.urlencoded({ extended: true }));
345943
- app.use(bodyParser.json());
346213
+ app.use(bodyParser.json({
346214
+ verify: (req, _res, body) => {
346215
+ req.rawBody = body;
346216
+ }
346217
+ }));
345944
346218
  app.use(methodOverride());
345945
346219
  app.use(cookieParser());
345946
346220
  if (this.useSession) {
@@ -346092,15 +346366,41 @@ var require_endpoint_context = __commonJS({
346092
346366
  if (bodyParamsToProcess.length > 0) {
346093
346367
  const isUsingWholeBody = !lib_14._.isUndefined(bodyParamsToProcess.find((c) => !c.paramName));
346094
346368
  if (isUsingWholeBody && bodyParamsToProcess.length > 1) {
346095
- throw new Error(`You can use only ONE body param @Body() without name.`);
346369
+ const notEmpty = bodyParamsToProcess.filter((f) => !!f.paramName).map((c) => `@Body('${c.paramName}') ${c.paramName}`).join(", ");
346370
+ throw new Error(`
346371
+
346372
+ You are using more than ONE body param @Body() without name.
346373
+
346374
+ Or
346375
+
346376
+ your are overriding method with wrong params (like below)
346377
+
346378
+ class ParentClass {
346379
+ ...
346380
+ @${methodConfig.type?.toUpperCase()}()
346381
+ ${methodConfig.methodName}(@Body()) {
346382
+ // parent method
346383
+ }
346384
+ ...
346385
+ }
346386
+
346387
+ class ${classConfig.className} extends AnyParentClass {
346388
+ ...
346389
+ @${methodConfig.type?.toUpperCase()}()
346390
+ ${methodConfig.methodName}(${notEmpty}) { // ERROR
346391
+ // your overrided method
346392
+ }
346393
+ ...
346394
+ }
346395
+ `);
346096
346396
  }
346097
346397
  if (isUsingWholeBody) {
346098
346398
  try {
346099
- const mappinForEntityBody = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[symbols_1.Symbols.old.MAPPING_CONFIG_HEADER_BODY_PARAMS]));
346399
+ const mappinForEntityBody = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[symbols_1.Symbols.old.MAPPING_CONFIG_HEADER_BODY_PARAMS]) ?? "{}");
346100
346400
  tBody = (0, lib_32.encodeMapping)(tBody, mappinForEntityBody);
346101
346401
  if (req.headers[symbols_1.Symbols.old.CIRCURAL_OBJECTS_MAP_BODY_PARAM]) {
346102
346402
  try {
346103
- const circs = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[symbols_1.Symbols.old.CIRCURAL_OBJECTS_MAP_BODY_PARAM]));
346403
+ const circs = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[symbols_1.Symbols.old.CIRCURAL_OBJECTS_MAP_BODY_PARAM]) ?? "{}");
346104
346404
  tBody = lib_13.JSON10.applyCircularMapping(tBody, circs);
346105
346405
  } catch (e) {
346106
346406
  console.error(e);
@@ -346113,7 +346413,7 @@ var require_endpoint_context = __commonJS({
346113
346413
  for (const bodyParamToProcess of bodyParamsToProcess) {
346114
346414
  try {
346115
346415
  const paramName = bodyParamToProcess.paramName;
346116
- const mappingForEntityBodyForParam = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[`${symbols_1.Symbols.old.MAPPING_CONFIG_HEADER_BODY_PARAMS}${paramName.toLowerCase()}`]));
346416
+ const mappingForEntityBodyForParam = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[`${symbols_1.Symbols.old.MAPPING_CONFIG_HEADER_BODY_PARAMS}${paramName.toLowerCase()}`]) ?? "{}");
346117
346417
  tBody[paramName] = (0, lib_32.encodeMapping)(tBody[paramName], mappingForEntityBodyForParam);
346118
346418
  } catch (e) {
346119
346419
  console.error(e);
@@ -346129,11 +346429,11 @@ var require_endpoint_context = __commonJS({
346129
346429
  }
346130
346430
  if (isUsingWholeQueryParamBody) {
346131
346431
  try {
346132
- const entity = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[symbols_1.Symbols.old.MAPPING_CONFIG_HEADER_QUERY_PARAMS]));
346432
+ const entity = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[symbols_1.Symbols.old.MAPPING_CONFIG_HEADER_QUERY_PARAMS]) ?? "{}");
346133
346433
  tQuery = taon_helpers_1.TaonHelpers.parseJSONwithStringJSONs((0, lib_32.encodeMapping)(tQuery, entity));
346134
346434
  if (req.headers[symbols_1.Symbols.old.CIRCURAL_OBJECTS_MAP_QUERY_PARAM]) {
346135
346435
  try {
346136
- const circs = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[symbols_1.Symbols.old.CIRCURAL_OBJECTS_MAP_QUERY_PARAM]));
346436
+ const circs = JSON.parse(taon_helpers_1.TaonHelpers.firstStringOrElemFromArray(req.headers[symbols_1.Symbols.old.CIRCURAL_OBJECTS_MAP_QUERY_PARAM]) ?? "{}");
346137
346437
  tQuery = lib_13.JSON10.applyCircularMapping(tQuery, circs);
346138
346438
  } catch (e) {
346139
346439
  console.error(e);
@@ -356487,70 +356787,118 @@ var require_base_repository = __commonJS({
356487
356787
  return this.repo.insert(entity);
356488
356788
  }
356489
356789
  //#endregion
356490
- //#region crud operations / typeorm / update & build update
356491
- async update(item) {
356790
+ //#region crud operations / typeorm / update
356791
+ /**
356792
+ * Updates entity/entities partially.
356793
+ *
356794
+ * This follows native TypeORM update semantics:
356795
+ * - executes a direct UPDATE query
356796
+ * - does not handle cascades or relations
356797
+ * - does not reload or return the updated entity
356798
+ */
356799
+ update(criteria, partialEntity) {
356800
+ return this.repo.update(criteria, partialEntity);
356801
+ }
356802
+ //#endregion
356803
+ //#region crud operations / typeorm / update
356804
+ /**
356805
+ * Updates entity partially by id.
356806
+ *
356807
+ * Convenience wrapper around update().
356808
+ * Uses native TypeORM update semantics.
356809
+ */
356810
+ /**
356811
+ * Updates an entity by id and returns the updated entity.
356812
+ */
356813
+ async updateById(id, partialEntity, options2) {
356814
+ const entity = await this.repo.preload({
356815
+ id,
356816
+ ...partialEntity
356817
+ });
356818
+ if (!entity) {
356819
+ throw new Error(`Entity with id "${id}" not found.`);
356820
+ }
356821
+ await this.repo.save(entity);
356822
+ return this.repo.findOne({
356823
+ where: { id },
356824
+ relations: options2?.relations
356825
+ });
356826
+ }
356827
+ //#endregion
356828
+ //#region crud operations / shallow update
356829
+ shallowUpdateAllowedColumnTypes = [
356830
+ "simple-json",
356831
+ "simple-array",
356832
+ "json"
356833
+ ];
356834
+ /**
356835
+ * Taon helper for updating simple entity columns without relations.
356836
+ *
356837
+ * Object values are ignored unless the corresponding database column
356838
+ * explicitly supports them (for example JSON/simple-json/simple-array).
356839
+ *
356840
+ * The entity is reloaded and returned after the update.
356841
+ */
356842
+ async shallowUpdate(item) {
356492
356843
  const { id } = item;
356493
- return await this.updateById(id, item);
356844
+ return this.shallowUpdateById(id, item);
356494
356845
  }
356495
- allowedTypesToUpdate = ["simple-json", "simple-array", "json"];
356496
- async updateById(id, item) {
356497
- const allowedPropsToUpdate = [];
356846
+ /**
356847
+ * Taon helper for updating simple entity columns without relations.
356848
+ *
356849
+ * Only properties mapped to own database columns are considered.
356850
+ * Primary/index keys listed in INDEX_KEYS_NO_FOR_UPDATE are ignored.
356851
+ *
356852
+ * The entity is reloaded and returned after the update.
356853
+ */
356854
+ async shallowUpdateById(id, item) {
356855
+ const partialEntity = {};
356498
356856
  for (const key in item) {
356499
- const metadataColumn = this.repo.metadata.ownColumns.find((c) => c.propertyName === key);
356500
- if (lib_32._.isObject(item) && item.hasOwnProperty(key) && (typeof item[key] !== "object" || this.allowedTypesToUpdate.includes(metadataColumn?.type)) && !lib_32._.isUndefined(metadataColumn)) {
356501
- allowedPropsToUpdate.push(key);
356857
+ if (!Object.prototype.hasOwnProperty.call(item, key)) {
356858
+ continue;
356502
356859
  }
356503
- }
356504
- for (let i = 0; i < allowedPropsToUpdate.length; i++) {
356505
- const key = allowedPropsToUpdate[i];
356506
- if (!INDEX_KEYS_NO_FOR_UPDATE.includes(key.toLowerCase())) {
356507
- const toSet = item[key];
356508
- await this.repo.update({
356509
- id
356510
- }, {
356511
- [key]: toSet
356512
- });
356860
+ if (INDEX_KEYS_NO_FOR_UPDATE.includes(key.toLowerCase())) {
356861
+ continue;
356513
356862
  }
356863
+ const metadataColumn = this.repo.metadata.ownColumns.find((column) => column.propertyName === key);
356864
+ if (!metadataColumn) {
356865
+ continue;
356866
+ }
356867
+ const value = item[key];
356868
+ if (value !== null && typeof value === "object" && !this.shallowUpdateAllowedColumnTypes.includes(metadataColumn.type)) {
356869
+ continue;
356870
+ }
356871
+ partialEntity[key] = value;
356872
+ }
356873
+ if (Object.keys(partialEntity).length > 0) {
356874
+ await this.repo.update({ id }, partialEntity);
356514
356875
  }
356515
- let model = await this.repo.findOne({
356876
+ const model = await this.repo.findOne({
356516
356877
  where: { id }
356517
356878
  });
356518
356879
  return model;
356519
356880
  }
356520
- async bulkUpdate(items) {
356881
+ /**
356882
+ * Buld update the same items
356883
+ */
356884
+ async bulkUpdate(items, options2) {
356521
356885
  const models = [];
356522
356886
  for (let index = 0; index < items.length; index++) {
356523
356887
  const item = items[index];
356524
356888
  const { id } = item;
356525
- const model = await this.updateById(id, item);
356889
+ const model = await this.updateById(id, item, options2);
356526
356890
  models.push(model);
356527
356891
  }
356528
356892
  return { models };
356529
356893
  }
356530
- //#region tpeorm update version
356531
- // this version suck and will not return update entity
356532
- // /**
356533
- // * Updates entity partially. Entity can be found by a given conditions.
356534
- // * Unlike save method executes a primitive operation without cascades, relations and other operations included.
356535
- // * Executes fast and efficient UPDATE query.
356536
- // * Does not check if entity exist in the database.
356537
- // */
356538
- // update(
356539
- // criteria:
356540
- // | string
356541
- // | string[]
356542
- // | number
356543
- // | number[]
356544
- // | Date
356545
- // | Date[]
356546
- // | ObjectID
356547
- // | ObjectID[]
356548
- // | FindOptionsWhere<Entity>,
356549
- // partialEntity: QueryDeepPartialEntity<Entity>,
356550
- // ): Promise<UpdateResult> {
356551
- // return this.repo.update(criteria, partialEntity);
356552
- // }
356553
- //#endregion
356894
+ async bulkShallowUpdate(items) {
356895
+ const models = [];
356896
+ for (const item of items) {
356897
+ const model = await this.shallowUpdate(item);
356898
+ models.push(model);
356899
+ }
356900
+ return models;
356901
+ }
356554
356902
  //#endregion
356555
356903
  //#region crud operations / typeorm / upsert
356556
356904
  /**
@@ -357339,7 +357687,7 @@ var require_build_info_auto_generated = __commonJS({
357339
357687
  exports2.BUILD_BASE_HREF = "";
357340
357688
  exports2.PROJECT_NPM_NAME = "@taon-dev/i18n";
357341
357689
  exports2.CURRENT_PACKAGE_TAON_VERSION = "v21";
357342
- exports2.CURRENT_PACKAGE_VERSION = "21.0.53";
357690
+ exports2.CURRENT_PACKAGE_VERSION = "21.0.54";
357343
357691
  }
357344
357692
  });
357345
357693
 
@@ -388389,6 +388737,7 @@ var require_base_storage_backend = __commonJS({
388389
388737
  await this.storageUploadFromNodeTempFile(key, file, options2);
388390
388738
  }
388391
388739
  //#endregion
388740
+ //#region mehods / storage upload from node temp file
388392
388741
  async storageUploadFromNodeTempFile(key, file, options2) {
388393
388742
  const stream = lib_13.fse.createReadStream(file.tempKeyOrPath);
388394
388743
  try {
@@ -388397,6 +388746,8 @@ var require_base_storage_backend = __commonJS({
388397
388746
  await lib_13.fse.remove(file.tempKeyOrPath);
388398
388747
  }
388399
388748
  }
388749
+ //#endregion
388750
+ //#region mehods / storage uplaod from cloudflare temp file
388400
388751
  async storageUploadFromCloudflareTempFile(key, file, options2) {
388401
388752
  const tempStorage = lib_13.GlobalStorage.get("TAON_TEMP_STORAGE");
388402
388753
  const object2 = await tempStorage.get(file.tempKeyOrPath);
@@ -388409,6 +388760,7 @@ var require_base_storage_backend = __commonJS({
388409
388760
  await tempStorage.delete(file.tempKeyOrPath);
388410
388761
  }
388411
388762
  }
388763
+ //#endregion
388412
388764
  //#region methods / storage metadata
388413
388765
  async storageGetMetadata(key) {
388414
388766
  key = this.normalizeKey(key);
@@ -389397,28 +389749,44 @@ var require_base_crud_controller = __commonJS({
389397
389749
  }
389398
389750
  //#endregion
389399
389751
  //#region update by id
389400
- updateById(id, item) {
389752
+ updateById(id, item, options2) {
389401
389753
  return async () => {
389402
- const model = await this.db.updateById(id, item);
389754
+ const model = await this.db.updateById(id, item, options2);
389403
389755
  return model;
389404
389756
  };
389405
389757
  }
389406
389758
  //#endregion
389407
389759
  //#region patch by id
389408
- patchById(id, item) {
389760
+ patchById(id, item, options2) {
389761
+ return async () => {
389762
+ const model = await this.db.updateById(id, item, options2);
389763
+ return model;
389764
+ };
389765
+ }
389766
+ //#endregion
389767
+ //#region update by id
389768
+ shallowUpdateById(id, item) {
389769
+ return async () => {
389770
+ const model = await this.db.shallowUpdateById(id, item);
389771
+ return model;
389772
+ };
389773
+ }
389774
+ //#endregion
389775
+ //#region update by id
389776
+ shallowPatchById(id, item) {
389409
389777
  return async () => {
389410
- const model = await this.db.updateById(id, item);
389778
+ const model = await this.db.shallowUpdateById(id, item);
389411
389779
  return model;
389412
389780
  };
389413
389781
  }
389414
389782
  //#endregion
389415
389783
  //#region bulk update
389416
- bulkUpdate(items) {
389784
+ bulkShallowUpdate(items) {
389417
389785
  return async () => {
389418
389786
  if (!Array.isArray(items) || items?.length === 0) {
389419
389787
  return [];
389420
389788
  }
389421
- const { models } = await this.db.bulkUpdate(items);
389789
+ const models = await this.db.bulkShallowUpdate(items);
389422
389790
  return models;
389423
389791
  };
389424
389792
  }
@@ -389465,7 +389833,7 @@ var require_base_crud_controller = __commonJS({
389465
389833
  exports2.TaonBaseCrudController = TaonBaseCrudController;
389466
389834
  __decorate2([
389467
389835
  (0, http_methods_decorators_1.GET)(),
389468
- __param2(0, (0, http_params_decorators_1.Query)(`id`)),
389836
+ __param2(0, (0, http_params_decorators_1.Query)("id")),
389469
389837
  __param2(1, (0, http_params_decorators_1.Query)(`property`)),
389470
389838
  __param2(2, (0, http_params_decorators_1.Query)("alreadyLength")),
389471
389839
  __metadata2("design:type", Function),
@@ -389474,14 +389842,14 @@ var require_base_crud_controller = __commonJS({
389474
389842
  ], TaonBaseCrudController.prototype, "bufforedChanges", null);
389475
389843
  __decorate2([
389476
389844
  (0, http_methods_decorators_1.GET)(),
389477
- __param2(0, (0, http_params_decorators_1.Query)()),
389845
+ __param2(0, (0, http_params_decorators_1.Query)("queryJson")),
389478
389846
  __metadata2("design:type", Function),
389479
389847
  __metadata2("design:paramtypes", [Object]),
389480
389848
  __metadata2("design:returntype", Object)
389481
389849
  ], TaonBaseCrudController.prototype, "paginationQuery", null);
389482
389850
  __decorate2([
389483
389851
  (0, http_methods_decorators_1.POST)(),
389484
- __param2(0, (0, http_params_decorators_1.Body)()),
389852
+ __param2(0, (0, http_params_decorators_1.Body)("query")),
389485
389853
  __metadata2("design:type", Function),
389486
389854
  __metadata2("design:paramtypes", [Object]),
389487
389855
  __metadata2("design:returntype", Object)
@@ -389494,44 +389862,62 @@ var require_base_crud_controller = __commonJS({
389494
389862
  ], TaonBaseCrudController.prototype, "getAll", null);
389495
389863
  __decorate2([
389496
389864
  (0, http_methods_decorators_1.GET)(),
389497
- __param2(0, (0, http_params_decorators_1.Query)(`id`)),
389865
+ __param2(0, (0, http_params_decorators_1.Query)("id")),
389498
389866
  __metadata2("design:type", Function),
389499
389867
  __metadata2("design:paramtypes", [Object]),
389500
389868
  __metadata2("design:returntype", Object)
389501
389869
  ], TaonBaseCrudController.prototype, "getBy", null);
389502
389870
  __decorate2([
389503
389871
  (0, http_methods_decorators_1.PUT)(),
389504
- __param2(0, (0, http_params_decorators_1.Query)(`id`)),
389505
- __param2(1, (0, http_params_decorators_1.Body)()),
389872
+ __param2(0, (0, http_params_decorators_1.Query)("id")),
389873
+ __param2(1, (0, http_params_decorators_1.Body)("item")),
389874
+ __param2(2, (0, http_params_decorators_1.Body)("options")),
389506
389875
  __metadata2("design:type", Function),
389507
- __metadata2("design:paramtypes", [Object, Object]),
389876
+ __metadata2("design:paramtypes", [Object, Object, Object]),
389508
389877
  __metadata2("design:returntype", Object)
389509
389878
  ], TaonBaseCrudController.prototype, "updateById", null);
389510
389879
  __decorate2([
389511
389880
  (0, http_methods_decorators_1.PATCH)(),
389512
- __param2(0, (0, http_params_decorators_1.Query)(`id`)),
389513
- __param2(1, (0, http_params_decorators_1.Body)()),
389881
+ __param2(0, (0, http_params_decorators_1.Query)("id")),
389882
+ __param2(1, (0, http_params_decorators_1.Body)("item")),
389883
+ __param2(2, (0, http_params_decorators_1.Body)("options")),
389514
389884
  __metadata2("design:type", Function),
389515
- __metadata2("design:paramtypes", [Object, Object]),
389885
+ __metadata2("design:paramtypes", [Object, Object, Object]),
389516
389886
  __metadata2("design:returntype", Object)
389517
389887
  ], TaonBaseCrudController.prototype, "patchById", null);
389518
389888
  __decorate2([
389519
389889
  (0, http_methods_decorators_1.PUT)(),
389520
- __param2(0, (0, http_params_decorators_1.Body)()),
389890
+ __param2(0, (0, http_params_decorators_1.Query)("id")),
389891
+ __param2(1, (0, http_params_decorators_1.Body)("item")),
389892
+ __metadata2("design:type", Function),
389893
+ __metadata2("design:paramtypes", [Object, Object]),
389894
+ __metadata2("design:returntype", Object)
389895
+ ], TaonBaseCrudController.prototype, "shallowUpdateById", null);
389896
+ __decorate2([
389897
+ (0, http_methods_decorators_1.PUT)(),
389898
+ __param2(0, (0, http_params_decorators_1.Query)("id")),
389899
+ __param2(1, (0, http_params_decorators_1.Body)("item")),
389900
+ __metadata2("design:type", Function),
389901
+ __metadata2("design:paramtypes", [Object, Object]),
389902
+ __metadata2("design:returntype", Object)
389903
+ ], TaonBaseCrudController.prototype, "shallowPatchById", null);
389904
+ __decorate2([
389905
+ (0, http_methods_decorators_1.PUT)(),
389906
+ __param2(0, (0, http_params_decorators_1.Body)("items")),
389521
389907
  __metadata2("design:type", Function),
389522
389908
  __metadata2("design:paramtypes", [Array]),
389523
389909
  __metadata2("design:returntype", Object)
389524
- ], TaonBaseCrudController.prototype, "bulkUpdate", null);
389910
+ ], TaonBaseCrudController.prototype, "bulkShallowUpdate", null);
389525
389911
  __decorate2([
389526
389912
  (0, http_methods_decorators_1.DELETE)(),
389527
- __param2(0, (0, http_params_decorators_1.Query)(`id`)),
389913
+ __param2(0, (0, http_params_decorators_1.Query)("id")),
389528
389914
  __metadata2("design:type", Function),
389529
389915
  __metadata2("design:paramtypes", [Object]),
389530
389916
  __metadata2("design:returntype", Object)
389531
389917
  ], TaonBaseCrudController.prototype, "deleteById", null);
389532
389918
  __decorate2([
389533
389919
  (0, http_methods_decorators_1.DELETE)(),
389534
- __param2(0, (0, http_params_decorators_1.Query)(`ids`)),
389920
+ __param2(0, (0, http_params_decorators_1.Query)("ids")),
389535
389921
  __metadata2("design:type", Function),
389536
389922
  __metadata2("design:paramtypes", [Array]),
389537
389923
  __metadata2("design:returntype", Object)
@@ -389544,16 +389930,16 @@ var require_base_crud_controller = __commonJS({
389544
389930
  ], TaonBaseCrudController.prototype, "clearTable", null);
389545
389931
  __decorate2([
389546
389932
  (0, http_methods_decorators_1.POST)(),
389547
- __param2(0, (0, http_params_decorators_1.Body)()),
389933
+ __param2(0, (0, http_params_decorators_1.Body)("item")),
389548
389934
  __metadata2("design:type", Function),
389549
389935
  __metadata2("design:paramtypes", [Object]),
389550
389936
  __metadata2("design:returntype", Object)
389551
389937
  ], TaonBaseCrudController.prototype, "save", null);
389552
389938
  __decorate2([
389553
389939
  (0, http_methods_decorators_1.POST)(),
389554
- __param2(0, (0, http_params_decorators_1.Body)()),
389940
+ __param2(0, (0, http_params_decorators_1.Body)("items")),
389555
389941
  __metadata2("design:type", Function),
389556
- __metadata2("design:paramtypes", [Object]),
389942
+ __metadata2("design:paramtypes", [Array]),
389557
389943
  __metadata2("design:returntype", Object)
389558
389944
  ], TaonBaseCrudController.prototype, "bulkCreate", null);
389559
389945
  exports2.TaonBaseCrudController = TaonBaseCrudController = __decorate2([
@@ -390104,10 +390490,13 @@ var require_cloudflare_create_worker = __commonJS({
390104
390490
  headers: (0, cross_origin_1.corsHeaders)(cloudflareRequest)
390105
390491
  });
390106
390492
  }
390107
- const rawRequest = cloudflareRequest.clone();
390493
+ const requestForParsing = cloudflareRequest.clone();
390494
+ const requestForRawBody = cloudflareRequest.clone();
390108
390495
  let parsedBody;
390496
+ let rawBody;
390109
390497
  try {
390110
- parsedBody = await (0, parse_body_1.parseBody)(rawRequest);
390498
+ parsedBody = await (0, parse_body_1.parseBody)(requestForParsing);
390499
+ rawBody = new Uint8Array(await requestForRawBody.arrayBuffer());
390111
390500
  } catch (err) {
390112
390501
  return new Response(JSON.stringify({
390113
390502
  error: "Bad Request",
@@ -390155,6 +390544,7 @@ var require_cloudflare_create_worker = __commonJS({
390155
390544
  const value = cloudflareRequest.headers.get("x-forwarded-for") || "";
390156
390545
  return value.split(",").map((v) => v.trim()).filter(Boolean);
390157
390546
  })(),
390547
+ rawBody,
390158
390548
  raw: cloudflareRequest
390159
390549
  };
390160
390550
  if (fakeExpressRequest.body?._method) {
@@ -390659,7 +391049,7 @@ var require_build_info_auto_generated2 = __commonJS({
390659
391049
  exports2.BUILD_BASE_HREF = "";
390660
391050
  exports2.PROJECT_NPM_NAME = "tnp";
390661
391051
  exports2.CURRENT_PACKAGE_TAON_VERSION = "v21";
390662
- exports2.CURRENT_PACKAGE_VERSION = "21.0.295";
391052
+ exports2.CURRENT_PACKAGE_VERSION = "21.0.296";
390663
391053
  }
390664
391054
  });
390665
391055
 
@@ -400248,7 +400638,7 @@ var require_build_info_auto_generated3 = __commonJS({
400248
400638
  exports2.BUILD_BASE_HREF = "";
400249
400639
  exports2.PROJECT_NPM_NAME = "tnp-helpers";
400250
400640
  exports2.CURRENT_PACKAGE_TAON_VERSION = "v21";
400251
- exports2.CURRENT_PACKAGE_VERSION = "21.0.130";
400641
+ exports2.CURRENT_PACKAGE_VERSION = "21.0.131";
400252
400642
  }
400253
400643
  });
400254
400644
 
@@ -406403,7 +406793,7 @@ Please provide proper commit message for lastest changes in your project:
406403
406793
  const indexCurrent = options2.projectsToTravel.findIndex((c) => c.location === this.project.location);
406404
406794
  const indexStartFrom = options2.projectsToTravel.findIndex((c) => c.name === startFrom || c.nameForNpmPackage === startFrom);
406405
406795
  const shouldPullThisProject = !startFrom || indexCurrent >= indexStartFrom;
406406
- lib_13.Helpers.info(lib_22.chalk.bold(`Processing project ${coundProcessed.length}/${options2.projectsToTravel.length} [${this.project.name}${this.project.name !== this.project.nameForNpmPackage ? `(${this.project.nameForNpmPackage})` : ""}]`));
406796
+ lib_13.Helpers.info(lib_22.chalk.bold(`[Pull] Processing project ${coundProcessed.length}/${options2.projectsToTravel.length} [${this.project.name}${this.project.name !== this.project.nameForNpmPackage ? `(${this.project.nameForNpmPackage})` : ""}]`));
406407
406797
  if (shouldPullThisProject) {
406408
406798
  await this._beforePullProcessAction(setOrigin, skipCloneGitChildren);
406409
406799
  await this.setRemoteOriginType(setOrigin);
@@ -406520,67 +406910,76 @@ Please provide proper commit message for lastest changes in your project:
406520
406910
  }
406521
406911
  //#region methods & getters / push process
406522
406912
  async pushProcess(options2 = {}) {
406523
- let { force = false, typeofCommit, skipLint, forcePushNoQuestion, origin: origin2 = "origin", exitCallBack, askToConfirmPush, askToConfirmCommit, updateType, askToConfirmBranchChange, args = [], commitMessageRequired, overrideCommitMessage, setOrigin, currentOrigin, mergeUpdateCommits } = options2;
406524
- await this._beforePushProcessAction(setOrigin);
406525
- await this.setRemoteOriginType(setOrigin);
406526
- await this.project.linkedProjects.saveLocationToDB();
406527
- const commitData = await this._getCommitMessage(typeofCommit, args, commitMessageRequired, currentOrigin);
406528
- if (mergeUpdateCommits && this.project.git.stagedFiles.length > 0) {
406529
- lib_13.Helpers.logInfo(`Pushing detailed changes to project: ${this.project.genericName}`);
406530
- lib_13.Helpers.logInfo(`Modified files... `);
406531
- lib_13.Helpers.logInfo([...this.project.git.stagedFiles].map((f) => ` - ${lib_22.chalk.underline(f)}`).join("\n"));
406532
- while (true) {
406533
- const mergeAction = {
406534
- useUpdateCommit: {
406535
- name: `Use temporary update commit "${index_1.HelpersTaon.git.getACTION_MSG_RESET_GIT_HARD_COMMIT()}" and force push`
406536
- },
406537
- provideCommitMessage: {
406538
- name: "Provide commit message and force push"
406539
- },
406540
- resetRemoveChanges: {
406541
- name: "Reset/remove changes and force push"
406542
- },
406543
- openInVscode: {
406544
- name: "Open project in vscode"
406913
+ let { force = false, typeofCommit, skipLint, forcePushNoQuestion, origin: origin2 = "origin", exitCallBack, askToConfirmPush, askToConfirmCommit, updateType, askToConfirmBranchChange, args = [], commitMessageRequired, overrideCommitMessage, startFrom, setOrigin, currentOrigin, mergeUpdateCommits } = options2;
406914
+ options2.projectsToTravel = options2.projectsToTravel || [];
406915
+ const processedForPull = "processedForPush";
406916
+ this.project.cache[processedForPull] = true;
406917
+ const coundProcessed = options2.projectsToTravel.filter((f) => f.cache[processedForPull]);
406918
+ const indexCurrent = options2.projectsToTravel.findIndex((c) => c.location === this.project.location);
406919
+ const indexStartFrom = options2.projectsToTravel.findIndex((c) => c.name === startFrom || c.nameForNpmPackage === startFrom);
406920
+ const shouldPushThisProject = !startFrom || indexCurrent >= indexStartFrom;
406921
+ lib_13.Helpers.info(lib_22.chalk.bold(`[Push] Processing project ${coundProcessed.length}/${options2.projectsToTravel.length} [${this.project.name}${this.project.name !== this.project.nameForNpmPackage ? `(${this.project.nameForNpmPackage})` : ""}]`));
406922
+ if (shouldPushThisProject) {
406923
+ await this._beforePushProcessAction(setOrigin);
406924
+ await this.setRemoteOriginType(setOrigin);
406925
+ await this.project.linkedProjects.saveLocationToDB();
406926
+ const commitData = await this._getCommitMessage(typeofCommit, args, commitMessageRequired, currentOrigin);
406927
+ if (mergeUpdateCommits && this.project.git.stagedFiles.length > 0) {
406928
+ lib_13.Helpers.logInfo(`Pushing detailed changes to project: ${this.project.genericName}`);
406929
+ lib_13.Helpers.logInfo(`Modified files... `);
406930
+ lib_13.Helpers.logInfo([...this.project.git.stagedFiles].map((f) => ` - ${lib_22.chalk.underline(f)}`).join("\n"));
406931
+ while (true) {
406932
+ const mergeAction = {
406933
+ useUpdateCommit: {
406934
+ name: `Use temporary update commit "${index_1.HelpersTaon.git.getACTION_MSG_RESET_GIT_HARD_COMMIT()}" and force push`
406935
+ },
406936
+ provideCommitMessage: {
406937
+ name: "Provide commit message and force push"
406938
+ },
406939
+ resetRemoveChanges: {
406940
+ name: "Reset/remove changes and force push"
406941
+ },
406942
+ openInVscode: {
406943
+ name: "Open project in vscode"
406944
+ }
406945
+ };
406946
+ const action = force ? "useUpdateCommit" : await lib_32.UtilsTerminal.select({
406947
+ choices: mergeAction,
406948
+ question: "What to do ?"
406949
+ });
406950
+ if (action === "openInVscode") {
406951
+ await this.project.openInEditor();
406952
+ continue;
406545
406953
  }
406546
- };
406547
- const action = force ? "useUpdateCommit" : await lib_32.UtilsTerminal.select({
406548
- choices: mergeAction,
406549
- question: "What to do ?"
406550
- });
406551
- if (action === "openInVscode") {
406552
- await this.project.openInEditor();
406553
- continue;
406554
- }
406555
- if (action === "resetRemoveChanges") {
406556
- force = true;
406557
- forcePushNoQuestion = true;
406558
- this.project.git.resetHard();
406559
- break;
406560
- }
406561
- if (action === "useUpdateCommit") {
406562
- force = true;
406563
- forcePushNoQuestion = true;
406564
- overrideCommitMessage = index_1.HelpersTaon.git.getACTION_MSG_RESET_GIT_HARD_COMMIT();
406565
- }
406566
- if (action === "provideCommitMessage") {
406567
- force = true;
406568
- forcePushNoQuestion = true;
406569
- try {
406570
- overrideCommitMessage = await lib_32.UtilsTerminal.input({
406571
- question: `Please provide commit message for current changes:`,
406572
- defaultValue: "update"
406573
- });
406574
- } catch (error2) {
406954
+ if (action === "resetRemoveChanges") {
406955
+ force = true;
406956
+ forcePushNoQuestion = true;
406957
+ this.project.git.resetHard();
406958
+ break;
406959
+ }
406960
+ if (action === "useUpdateCommit") {
406961
+ force = true;
406962
+ forcePushNoQuestion = true;
406963
+ overrideCommitMessage = index_1.HelpersTaon.git.getACTION_MSG_RESET_GIT_HARD_COMMIT();
406964
+ }
406965
+ if (action === "provideCommitMessage") {
406966
+ force = true;
406967
+ forcePushNoQuestion = true;
406968
+ try {
406969
+ overrideCommitMessage = await lib_32.UtilsTerminal.input({
406970
+ question: `Please provide commit message for current changes:`,
406971
+ defaultValue: "update"
406972
+ });
406973
+ } catch (error2) {
406974
+ }
406975
+ }
406976
+ if (overrideCommitMessage) {
406977
+ break;
406575
406978
  }
406576
- }
406577
- if (overrideCommitMessage) {
406578
- break;
406579
406979
  }
406580
406980
  }
406581
- }
406582
- if (commitData.typeOfCommit === "feature" && commitData.jiraNumbers?.length === 1 && commitData.issuesFromOtherProjects?.length === 0) {
406583
- lib_13.Helpers.info(`
406981
+ if (commitData.typeOfCommit === "feature" && commitData.jiraNumbers?.length === 1 && commitData.issuesFromOtherProjects?.length === 0) {
406982
+ lib_13.Helpers.info(`
406584
406983
 
406585
406984
  You current feature branch "${this.project.git.currentBranchName}"
406586
406985
  doesn't have ${lib_22.chalk.bold("main-issue")} and ${lib_22.chalk.bold("sub-issue")} inlcueded.
@@ -406588,13 +406987,13 @@ Please provide proper commit message for lastest changes in your project:
406588
406987
  Proper example: feature/JIRANUM-<number-of-sub-issue>-JIRANUM-<number-of-main-issue>-commit-name
406589
406988
 
406590
406989
  `);
406591
- if (!await lib_13.Helpers.questionYesNo("Continue without sub-issue?")) {
406592
- process.exit(0);
406990
+ if (!await lib_13.Helpers.questionYesNo("Continue without sub-issue?")) {
406991
+ process.exit(0);
406992
+ }
406593
406993
  }
406594
- }
406595
- if (!this.automaticallyAddAllChangesWhenPushingToGit()) {
406596
- if (commitData.commitMessage?.split(":").map((p) => p.trim()).every((p) => p === this.project.git.currentBranchName)) {
406597
- lib_13.Helpers.error(`
406994
+ if (!this.automaticallyAddAllChangesWhenPushingToGit()) {
406995
+ if (commitData.commitMessage?.split(":").map((p) => p.trim()).every((p) => p === this.project.git.currentBranchName)) {
406996
+ lib_13.Helpers.error(`
406598
406997
 
406599
406998
  Please provide more specific commit message than branch name
406600
406999
  or maybe you forgot ?
@@ -406602,41 +407001,41 @@ Please provide proper commit message for lastest changes in your project:
406602
407001
  - JIRA ISSUE? (example JIRA-1234)
406603
407002
 
406604
407003
  `, false, true);
407004
+ }
406605
407005
  }
406606
- }
406607
- if (this.skipLintOnPush()) {
406608
- skipLint = true;
406609
- }
406610
- if (commitData.typeOfCommit === "release") {
406611
- skipLint = true;
406612
- }
406613
- const numberOfStagedFiles = this.project.git.stagedFiles.length;
406614
- if (numberOfStagedFiles === 0) {
406615
- lib_13.Helpers.warn(`No staged files...`);
406616
- skipLint = true;
406617
- }
406618
- if (!skipLint) {
406619
- while (true) {
406620
- try {
406621
- await this.project.lint(options2);
406622
- break;
406623
- } catch (error2) {
406624
- lib_13.Helpers.warn("Fix your code...");
406625
- if (!await index_1.HelpersTaon.consoleGui.question.yesNo("Try again lint before commit ?")) {
407006
+ if (this.skipLintOnPush()) {
407007
+ skipLint = true;
407008
+ }
407009
+ if (commitData.typeOfCommit === "release") {
407010
+ skipLint = true;
407011
+ }
407012
+ const numberOfStagedFiles = this.project.git.stagedFiles.length;
407013
+ if (numberOfStagedFiles === 0) {
407014
+ lib_13.Helpers.warn(`No staged files...`);
407015
+ skipLint = true;
407016
+ }
407017
+ if (!skipLint) {
407018
+ while (true) {
407019
+ try {
407020
+ await this.project.lint(options2);
406626
407021
  break;
407022
+ } catch (error2) {
407023
+ lib_13.Helpers.warn("Fix your code...");
407024
+ if (!await index_1.HelpersTaon.consoleGui.question.yesNo("Try again lint before commit ?")) {
407025
+ break;
407026
+ }
406627
407027
  }
406628
407028
  }
406629
407029
  }
406630
- }
406631
- if (this.project.useFeatureInBranchNameForTests() && commitData.typeOfCommit === "test") {
406632
- commitData.useFeatureBranchForTestBranch = true;
406633
- }
406634
- if (!commitData.isActionCommit) {
406635
- const commitMessageFromBranch = (await commit_data_1.CommitData.getFromBranch(commitData.branchName, {
406636
- currentOrigin,
406637
- jiraIssuesAreOutsideBrackets: this.project.git.jiraIssuesAreOutsideBrackets()
406638
- })).commitMessage;
406639
- lib_13.Helpers.info(`
407030
+ if (this.project.useFeatureInBranchNameForTests() && commitData.typeOfCommit === "test") {
407031
+ commitData.useFeatureBranchForTestBranch = true;
407032
+ }
407033
+ if (!commitData.isActionCommit) {
407034
+ const commitMessageFromBranch = (await commit_data_1.CommitData.getFromBranch(commitData.branchName, {
407035
+ currentOrigin,
407036
+ jiraIssuesAreOutsideBrackets: this.project.git.jiraIssuesAreOutsideBrackets()
407037
+ })).commitMessage;
407038
+ lib_13.Helpers.info(`
406640
407039
 
406641
407040
  PROJECT: ${this.project.genericName}
406642
407041
 
@@ -406646,8 +407045,8 @@ Please provide proper commit message for lastest changes in your project:
406646
407045
  (generated branches from metadata not allowed for this project)
406647
407046
 
406648
407047
  `}`);
406649
- if (!overrideCommitMessage && commitMessageFromBranch !== commitData.commitMessage) {
406650
- lib_13.Helpers.logWarn(`Commit from args and commit from branch are different
407048
+ if (!overrideCommitMessage && commitMessageFromBranch !== commitData.commitMessage) {
407049
+ lib_13.Helpers.logWarn(`Commit from args and commit from branch are different
406651
407050
  commit message from args: ${commitData.commitMessage}
406652
407051
  commit message from branch: ${commitMessageFromBranch}
406653
407052
 
@@ -406655,72 +407054,76 @@ Please provide proper commit message for lastest changes in your project:
406655
407054
  commit changes in one commit message
406656
407055
 
406657
407056
  `);
406658
- } else {
406659
- lib_13.Helpers.logInfo(lib_22.chalk.gray(`Commit from args and commit from branch are the same...`));
406660
- }
406661
- const lastCommitMessage = this.project.git.lastCommitMessage();
406662
- if (lastCommitMessage && [commitData.commitMessage, overrideCommitMessage].filter((f) => !!f).some((m) => m === lastCommitMessage)) {
406663
- if (await lib_13.Helpers.questionYesNo("Soft reset last commit with same message ?")) {
406664
- this.project.git.resetSoftHEAD(1);
407057
+ } else {
407058
+ lib_13.Helpers.logInfo(lib_22.chalk.gray(`Commit from args and commit from branch are the same...`));
407059
+ }
407060
+ const lastCommitMessage = this.project.git.lastCommitMessage();
407061
+ if (lastCommitMessage && [commitData.commitMessage, overrideCommitMessage].filter((f) => !!f).some((m) => m === lastCommitMessage)) {
407062
+ if (await lib_13.Helpers.questionYesNo("Soft reset last commit with same message ?")) {
407063
+ this.project.git.resetSoftHEAD(1);
407064
+ }
407065
+ }
407066
+ if (!await lib_13.Helpers.questionYesNo("Commit and push this ?")) {
407067
+ exitCallBack();
406665
407068
  }
406666
407069
  }
406667
- if (!await lib_13.Helpers.questionYesNo("Commit and push this ?")) {
406668
- exitCallBack();
407070
+ if (this.automaticallyAddAllChangesWhenPushingToGit()) {
407071
+ this.project.git.stageAllFiles();
406669
407072
  }
406670
- }
406671
- if (this.automaticallyAddAllChangesWhenPushingToGit()) {
406672
- this.project.git.stageAllFiles();
406673
- }
406674
- if (this.useGitBranchesAsMetadataForCommits() && !overrideCommitMessage) {
406675
- lib_13.Helpers.info("Checkingout branches (if needed)...");
406676
- if (this.project.git.currentBranchName?.trim() !== commitData.branchName) {
406677
- if (askToConfirmBranchChange) {
406678
- lib_13.Helpers.info(`Changing branch to: ${commitData.branchName}`);
406679
- if (!await lib_13.Helpers.questionYesNo("Confirm branch change ?")) {
406680
- exitCallBack();
407073
+ if (this.useGitBranchesAsMetadataForCommits() && !overrideCommitMessage) {
407074
+ lib_13.Helpers.info("Checkingout branches (if needed)...");
407075
+ if (this.project.git.currentBranchName?.trim() !== commitData.branchName) {
407076
+ if (askToConfirmBranchChange) {
407077
+ lib_13.Helpers.info(`Changing branch to: ${commitData.branchName}`);
407078
+ if (!await lib_13.Helpers.questionYesNo("Confirm branch change ?")) {
407079
+ exitCallBack();
407080
+ }
407081
+ }
407082
+ try {
407083
+ this.project.git.checkout(commitData.branchName, {
407084
+ createBranchIfNotExists: true
407085
+ });
407086
+ } catch (error2) {
407087
+ lib_13.Helpers.error("Please modyfiy you commit message or delete branch,");
406681
407088
  }
406682
407089
  }
406683
- try {
406684
- this.project.git.checkout(commitData.branchName, {
406685
- createBranchIfNotExists: true
406686
- });
406687
- } catch (error2) {
406688
- lib_13.Helpers.error("Please modyfiy you commit message or delete branch,");
407090
+ }
407091
+ if (askToConfirmCommit) {
407092
+ lib_13.Helpers.info(`Commit message: ${overrideCommitMessage ? overrideCommitMessage : commitData.commitMessage}`);
407093
+ if (!await lib_13.Helpers.questionYesNo("Confirm commit ?")) {
407094
+ exitCallBack();
406689
407095
  }
406690
407096
  }
406691
- }
406692
- if (askToConfirmCommit) {
406693
- lib_13.Helpers.info(`Commit message: ${overrideCommitMessage ? overrideCommitMessage : commitData.commitMessage}`);
406694
- if (!await lib_13.Helpers.questionYesNo("Confirm commit ?")) {
406695
- exitCallBack();
407097
+ try {
407098
+ this.project.git.commit(overrideCommitMessage ? overrideCommitMessage : commitData.commitMessage);
407099
+ } catch (error2) {
407100
+ lib_13.Helpers.warn(`Not commiting anything... `);
406696
407101
  }
406697
- }
406698
- try {
406699
- this.project.git.commit(overrideCommitMessage ? overrideCommitMessage : commitData.commitMessage);
406700
- } catch (error2) {
406701
- lib_13.Helpers.warn(`Not commiting anything... `);
406702
- }
406703
- if (askToConfirmPush) {
406704
- if (!await lib_13.Helpers.questionYesNo("Confirm push ?")) {
406705
- exitCallBack();
407102
+ if (askToConfirmPush) {
407103
+ if (!await lib_13.Helpers.questionYesNo("Confirm push ?")) {
407104
+ exitCallBack();
407105
+ }
406706
407106
  }
407107
+ await this.project.git.pushCurrentBranch({
407108
+ force,
407109
+ origin: origin2,
407110
+ forcePushNoQuestion,
407111
+ askToRetry: true
407112
+ });
406707
407113
  }
406708
- await this.project.git.pushCurrentBranch({
406709
- force,
406710
- origin: origin2,
406711
- forcePushNoQuestion,
406712
- askToRetry: true
406713
- });
406714
407114
  if (this.automaticallyAddAllChangesWhenPushingToGit() || updateType === "first-level" || updateType === "deep") {
406715
407115
  if (this.project.linkedProjects.getLinkedProjectsConfig().skipRecrusivePush) {
406716
407116
  lib_13.Helpers.warn(`Skipping recrusive (children) push for ${this.project.genericName}`);
406717
407117
  return;
406718
407118
  }
406719
407119
  const optForChildren = lib_32._.cloneDeep(options2);
407120
+ const projectsToVisit = options2.projectsToTravel || [];
407121
+ delete options2.projectsToTravel;
406720
407122
  if (updateType === "first-level") {
406721
407123
  optForChildren.updateType = "only-this";
406722
407124
  }
406723
407125
  for (const child of this.gitChildren) {
407126
+ optForChildren.projectsToTravel = projectsToVisit;
406724
407127
  if (mergeUpdateCommits) {
406725
407128
  await child.git.meltActionCommits();
406726
407129
  }
@@ -426816,6 +427219,7 @@ ${lastCommitMessage}
426816
427219
  return;
426817
427220
  }
426818
427221
  await this._preventPushPullFromNotCorrectBranch();
427222
+ const projectsToTravel = this._countChildren(options2?.updateType === "first-level");
426819
427223
  if (!options2.overrideCommitMessage && this.project.git.useBranchNameDirectlyAsCommitMessage()) {
426820
427224
  const jiraNumbers = commit_data_1.CommitData.extractAndOrderJiraNumbers(this.args.join(" "));
426821
427225
  lib_22.Helpers.info(`Using branch name directly as commit message.
@@ -426832,6 +427236,9 @@ ${lastCommitMessage}
426832
427236
  await this.project.git.pushProcess({
426833
427237
  ...options2,
426834
427238
  forcePushNoQuestion: options2.force,
427239
+ projectsToTravel,
427240
+ // @ts-ignore
427241
+ startFrom: this.params.startFrom,
426835
427242
  args: options2?.overrideCommitMessage ? (options2?.overrideCommitMessage || "").split(" ") : this.args,
426836
427243
  exitCallBack: () => {
426837
427244
  this._exit();
@@ -430794,6 +431201,61 @@ export * from './${folder}';
430794
431201
  }
430795
431202
  });
430796
431203
 
431204
+ // tnp/tmp-local-copyto-proj-dist/node_modules/tnp/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.js
431205
+ var require_artifact_angular_node_app_helpers = __commonJS({
431206
+ "tnp/tmp-local-copyto-proj-dist/node_modules/tnp/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app-helpers.js"(exports2) {
431207
+ "use strict";
431208
+ Object.defineProperty(exports2, "__esModule", { value: true });
431209
+ exports2.ArtifactsAngularNodeAppHelpers = void 0;
431210
+ var lib_13 = require_lib31();
431211
+ var constants_12 = require_constants20();
431212
+ var ArtifactsAngularNodeAppHelpers;
431213
+ (function(ArtifactsAngularNodeAppHelpers2) {
431214
+ ArtifactsAngularNodeAppHelpers2.updateReleasDotEnv = async (contextsNames, localReleaseOutputBasePath, project, releaseOptions) => {
431215
+ const useDomain = releaseOptions.website.useDomain;
431216
+ const domain = releaseOptions.website.domain;
431217
+ for (let i = 0; i < contextsNames.length; i++) {
431218
+ const contextRealIndex = i + 1;
431219
+ const contextName = contextsNames[i].contextName;
431220
+ const taskNameBackendReleasePort = `docker release ${domain} ${releaseOptions.release.releaseType} backend port for ${contextName} (n=${contextRealIndex})`;
431221
+ const portBackendRelease = await project.registerAndAssignPort(taskNameBackendReleasePort);
431222
+ const taskNameFrontendreleasePort = `docker release ${domain} ${releaseOptions.release.releaseType} frontend port for ${contextName} (n=${contextRealIndex})`;
431223
+ const portFrontendRelease = await project.registerAndAssignPort(taskNameFrontendreleasePort);
431224
+ const domainForContextFE = useDomain ? domain : `http://localhost:${portFrontendRelease}`;
431225
+ const domainForContextBE = useDomain ? domain : `http://localhost:${portBackendRelease}`;
431226
+ lib_13.UtilsDotFile.setValuesKeysFromObject([localReleaseOutputBasePath, constants_12.dotEnvFile], {
431227
+ [`HOST_BACKEND_PORT_${contextRealIndex}`]: portBackendRelease,
431228
+ [`HOST_URL_${contextRealIndex}`]: domainForContextBE,
431229
+ [`FRONTEND_NORMAL_APP_PORT_${contextRealIndex}`]: portFrontendRelease,
431230
+ [`FRONTEND_HOST_URL_${contextRealIndex}`]: domainForContextFE,
431231
+ ...i === 0 ? {
431232
+ [`HOST_BACKEND_PORT`]: portBackendRelease,
431233
+ [`HOST_URL`]: domainForContextBE,
431234
+ [`FRONTEND_NORMAL_APP_PORT`]: portFrontendRelease,
431235
+ [`FRONTEND_HOST_URL`]: domainForContextFE
431236
+ } : {}
431237
+ });
431238
+ lib_13.UtilsDotFile.setCommentToKeyInDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], `HOST_BACKEND_PORT_${contextRealIndex}`, `${lib_13.CoreModels.tagForTaskName}="${taskNameBackendReleasePort}"`);
431239
+ if (i === 0) {
431240
+ lib_13.UtilsDotFile.setCommentToKeyInDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], `HOST_BACKEND_PORT`, `${lib_13.CoreModels.tagForTaskName}="${taskNameBackendReleasePort}"`);
431241
+ }
431242
+ lib_13.UtilsDotFile.setCommentToKeyInDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], `FRONTEND_NORMAL_APP_PORT_${contextRealIndex}`, `${lib_13.CoreModels.tagForTaskName}="${taskNameFrontendreleasePort}"`);
431243
+ }
431244
+ if (!useDomain) {
431245
+ lib_13.UtilsDotFile.addCommentAtTheBeginningOfDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], `HINT! IF YOU NEED DOMAIN USE userDomain=true in env.ts`);
431246
+ }
431247
+ if (!releaseOptions.build.cloudflare) {
431248
+ lib_13.UtilsDotFile.setValueToDotFile([localReleaseOutputBasePath, ".env"], "COMPOSE_PROJECT_NAME", ("TaonDeployment__" + lib_13._.camelCase(releaseOptions.website.domain) + `__v${lib_13._.kebabCase(project.packageJson.version)}__release-type-${releaseOptions.release.releaseType}--env--${!releaseOptions.release.envName || releaseOptions.release.envName === "__" ? "default" : releaseOptions.release.envName}${releaseOptions.release.envNumber || ""}`).toLowerCase());
431249
+ }
431250
+ if (!releaseOptions.build.cloudflare) {
431251
+ lib_13.UtilsDotFile.setValueToDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], "BUILD_DATE", `${(0, lib_13.dateformat)(/* @__PURE__ */ new Date(), "dd-mm-yyyy_HH:MM:ss")}`);
431252
+ lib_13.UtilsDotFile.setValueToDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], "NODE_ENV", `production`);
431253
+ }
431254
+ };
431255
+ })(ArtifactsAngularNodeAppHelpers || (exports2.ArtifactsAngularNodeAppHelpers = ArtifactsAngularNodeAppHelpers = {}));
431256
+ }
431257
+ });
431258
+
430797
431259
  // tnp/tmp-local-copyto-proj-dist/node_modules/tnp/lib/project/abstract/cloud-flare-projects/cloud-flare-project.js
430798
431260
  var require_cloud_flare_project = __commonJS({
430799
431261
  "tnp/tmp-local-copyto-proj-dist/node_modules/tnp/lib/project/abstract/cloud-flare-projects/cloud-flare-project.js"(exports2) {
@@ -430804,6 +431266,7 @@ var require_cloud_flare_project = __commonJS({
430804
431266
  var lib_22 = require_lib31();
430805
431267
  var lib_32 = require_lib47();
430806
431268
  var constants_12 = require_constants20();
431269
+ var artifact_angular_node_app_helpers_1 = require_artifact_angular_node_app_helpers();
430807
431270
  var cloud_flare_projects_utils_1 = require_cloud_flare_projects_utils();
430808
431271
  var CloudFlareSubProject = class {
430809
431272
  absLocationPath;
@@ -430970,7 +431433,7 @@ var require_cloud_flare_project = __commonJS({
430970
431433
  }
430971
431434
  await cloud_flare_projects_utils_1.CloudFlarePorjectsUtils.loginCliCloudFlare();
430972
431435
  await this.addKVDb();
430973
- await this.deployment();
431436
+ await this.deployment(opt.releaseOptions);
430974
431437
  const secretsData = this.apiSecretsKeyData();
430975
431438
  if (secretsData.length > 0) {
430976
431439
  if (await lib_22.UtilsTerminal.confirm({
@@ -431004,7 +431467,7 @@ var require_cloud_flare_project = __commonJS({
431004
431467
  }
431005
431468
  //#endregion
431006
431469
  //#region deplyment to cloud flare
431007
- async deployment() {
431470
+ async deployment(releaseOptions) {
431008
431471
  await this.init();
431009
431472
  await cloud_flare_projects_utils_1.CloudFlarePorjectsUtils.loginCliCloudFlare();
431010
431473
  lib_22.Helpers.taskStarted(`STARTING DEPLOYMENT OF WORKER ${this.cwdWorker}`);
@@ -431019,12 +431482,32 @@ var require_cloud_flare_project = __commonJS({
431019
431482
  });
431020
431483
  const masterKey = (await ctrl.getMasterPassword(this.taonParentProject.location).request()).body.text;
431021
431484
  lib_22.UtilsFilesFoldersSync.writeFile([this.cwdWorker, ".env"], `${lib_22.UtilsSecretEnv.MASTER_PASS_KEY}="${masterKey}"`);
431485
+ const contextsNames = this.taonParentProject.framework.getAllDetectedTaonContexts({
431486
+ skipLibFolder: true
431487
+ });
431488
+ releaseOptions.build.cloudflare = true;
431489
+ if (!releaseOptions.website.useDomain) {
431490
+ releaseOptions.website.useDomain = true;
431491
+ releaseOptions.website.domain = this.workerUrl;
431492
+ }
431493
+ await artifact_angular_node_app_helpers_1.ArtifactsAngularNodeAppHelpers.updateReleasDotEnv(contextsNames, this.cwdWorker, this.taonParentProject, releaseOptions);
431022
431494
  const data = await lib_22.UtilsExecProc.spawnAsync(`npm-run wrangler deploy --secrets-file .env`, {
431023
431495
  cwd: this.cwdWorker
431024
431496
  }).getOutput();
431025
431497
  const accountName = cloud_flare_projects_utils_1.CloudFlarePorjectsUtils.extractWorkersDevInfo(data.stdout + data.stderr);
431026
431498
  lib_22.Helpers.removeFileIfExists([this.cwdWorker, ".env"]);
431027
- lib_22.Helpers.taskDone(`DONE DEPLOYMENT on acccount name "${accountName}"`);
431499
+ lib_22.Helpers.taskDone(`
431500
+
431501
+ DONE DEPLOYMENT on acccount name "${accountName}"
431502
+
431503
+
431504
+ YOU WEBSITE IS AVAILABLE HERE:
431505
+
431506
+ ${this.workerUrl}
431507
+
431508
+
431509
+
431510
+ `);
431028
431511
  this.taonParentProject.taonJson.setCloudFlareAccountSubdomain(accountName);
431029
431512
  break;
431030
431513
  } catch (error2) {
@@ -431244,6 +431727,7 @@ var require_cloud_flare_custom_worker = __commonJS({
431244
431727
  });
431245
431728
  }
431246
431729
  //#endregion
431730
+ //#region API / get files for branding worker
431247
431731
  getFilesForBrandingWorker() {
431248
431732
  const filesForBranding = [
431249
431733
  ...super.getFilesForBrandingWorker(),
@@ -431392,7 +431876,7 @@ var require_build_info_auto_generated4 = __commonJS({
431392
431876
  exports2.BUILD_BASE_HREF = "";
431393
431877
  exports2.PROJECT_NPM_NAME = "@taon-dev/api-workers";
431394
431878
  exports2.CURRENT_PACKAGE_TAON_VERSION = "v21";
431395
- exports2.CURRENT_PACKAGE_VERSION = "21.0.20";
431879
+ exports2.CURRENT_PACKAGE_VERSION = "21.0.22";
431396
431880
  }
431397
431881
  });
431398
431882
 
@@ -432266,7 +432750,7 @@ var require_build_info_auto_generated5 = __commonJS({
432266
432750
  exports2.BUILD_BASE_HREF = "";
432267
432751
  exports2.PROJECT_NPM_NAME = "@taon-dev/cloud";
432268
432752
  exports2.CURRENT_PACKAGE_TAON_VERSION = "v21";
432269
- exports2.CURRENT_PACKAGE_VERSION = "21.0.239";
432753
+ exports2.CURRENT_PACKAGE_VERSION = "21.0.242";
432270
432754
  }
432271
432755
  });
432272
432756
 
@@ -433091,7 +433575,7 @@ var require_processes_repository = __commonJS({
433091
433575
  throw new Error(`No process with id ${processId}`);
433092
433576
  }
433093
433577
  await callback(proc);
433094
- await this.update(proc);
433578
+ await this.shallowUpdate(proc);
433095
433579
  this.ctx.realtimeServer.triggerEntityPropertyChanges(proc, "outputLast40lines");
433096
433580
  }
433097
433581
  };
@@ -438600,6 +439084,7 @@ var require_artifact_angular_node_app = __commonJS({
438600
439084
  var production_build_1 = require_production_build();
438601
439085
  var base_artifact_1 = require_base_artifact();
438602
439086
  var inside_struct_electron_1 = require_inside_struct_electron();
439087
+ var artifact_angular_node_app_helpers_1 = require_artifact_angular_node_app_helpers();
438603
439088
  var app_hosts_recreate_helper_1 = require_app_hosts_recreate_helper();
438604
439089
  var basename_manager_1 = require_basename_manager();
438605
439090
  var inside_struct_app_1 = require_inside_struct_app();
@@ -439050,41 +439535,7 @@ var require_artifact_angular_node_app = __commonJS({
439050
439535
  const contextsNames = this.project.framework.getAllDetectedTaonContexts({
439051
439536
  skipLibFolder: true
439052
439537
  });
439053
- const useDomain = releaseOptions.website.useDomain;
439054
- const domain = releaseOptions.website.domain;
439055
- for (let i = 0; i < contextsNames.length; i++) {
439056
- const contextRealIndex = i + 1;
439057
- const contextName = contextsNames[i].contextName;
439058
- const taskNameBackendReleasePort = `docker release ${domain} ${releaseOptions.release.releaseType} backend port for ${contextName} (n=${contextRealIndex})`;
439059
- const portBackendRelease = await this.project.registerAndAssignPort(taskNameBackendReleasePort);
439060
- const taskNameFrontendreleasePort = `docker release ${domain} ${releaseOptions.release.releaseType} frontend port for ${contextName} (n=${contextRealIndex})`;
439061
- const portFrontendRelease = await this.project.registerAndAssignPort(taskNameFrontendreleasePort);
439062
- const domainForContextFE = useDomain ? domain : `http://localhost:${portFrontendRelease}`;
439063
- const domainForContextBE = useDomain ? domain : `http://localhost:${portBackendRelease}`;
439064
- lib_52.UtilsDotFile.setValuesKeysFromObject([localReleaseOutputBasePath, constants_12.dotEnvFile], {
439065
- [`HOST_BACKEND_PORT_${contextRealIndex}`]: portBackendRelease,
439066
- [`HOST_URL_${contextRealIndex}`]: domainForContextBE,
439067
- [`FRONTEND_NORMAL_APP_PORT_${contextRealIndex}`]: portFrontendRelease,
439068
- [`FRONTEND_HOST_URL_${contextRealIndex}`]: domainForContextFE,
439069
- ...i === 0 ? {
439070
- [`HOST_BACKEND_PORT`]: portBackendRelease,
439071
- [`HOST_URL`]: domainForContextBE,
439072
- [`FRONTEND_NORMAL_APP_PORT`]: portFrontendRelease,
439073
- [`FRONTEND_HOST_URL`]: domainForContextFE
439074
- } : {}
439075
- });
439076
- lib_52.UtilsDotFile.setCommentToKeyInDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], `HOST_BACKEND_PORT_${contextRealIndex}`, `${lib_32.CoreModels.tagForTaskName}="${taskNameBackendReleasePort}"`);
439077
- if (i === 0) {
439078
- lib_52.UtilsDotFile.setCommentToKeyInDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], `HOST_BACKEND_PORT`, `${lib_32.CoreModels.tagForTaskName}="${taskNameBackendReleasePort}"`);
439079
- }
439080
- lib_52.UtilsDotFile.setCommentToKeyInDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], `FRONTEND_NORMAL_APP_PORT_${contextRealIndex}`, `${lib_32.CoreModels.tagForTaskName}="${taskNameFrontendreleasePort}"`);
439081
- }
439082
- if (!useDomain) {
439083
- lib_52.UtilsDotFile.addCommentAtTheBeginningOfDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], `HINT! IF YOU NEED DOMAIN USE userDomain=true in env.ts`);
439084
- }
439085
- lib_52.UtilsDotFile.setValueToDotFile([localReleaseOutputBasePath, ".env"], "COMPOSE_PROJECT_NAME", ("TaonDeployment__" + lib_32._.camelCase(releaseOptions.website.domain) + `__v${lib_32._.kebabCase(this.project.packageJson.version)}__release-type-${releaseOptions.release.releaseType}--env--${!releaseOptions.release.envName || releaseOptions.release.envName === "__" ? "default" : releaseOptions.release.envName}${releaseOptions.release.envNumber || ""}`).toLowerCase());
439086
- lib_52.UtilsDotFile.setValueToDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], "BUILD_DATE", `${(0, lib_32.dateformat)(/* @__PURE__ */ new Date(), "dd-mm-yyyy_HH:MM:ss")}`);
439087
- lib_52.UtilsDotFile.setValueToDotFile([localReleaseOutputBasePath, constants_12.dotEnvFile], "NODE_ENV", `production`);
439538
+ await artifact_angular_node_app_helpers_1.ArtifactsAngularNodeAppHelpers.updateReleasDotEnv(contextsNames, localReleaseOutputBasePath, this.project, releaseOptions);
439088
439539
  const allValuesDotEnv = lib_52.UtilsDotFile.getValuesKeysAsJsonObject([
439089
439540
  localReleaseOutputBasePath,
439090
439541
  constants_12.dotEnvFile
@@ -439238,7 +439689,7 @@ ${dockerComposeYmlFileContent}
439238
439689
  message: "Press any key to start deployment to cloudflare"
439239
439690
  });
439240
439691
  }
439241
- await worker.deployment();
439692
+ await worker.deployment(releaseOptions);
439242
439693
  }
439243
439694
  //#endregion
439244
439695
  //#region deploy to cloud
@@ -448192,131 +448643,141 @@ var require_index_cjs4 = __commonJS({
448192
448643
  if (tight) markTightParagraphs(state, listTokIdx);
448193
448644
  return true;
448194
448645
  }
448646
+ var MAX_LABEL_LENGTH = 999;
448647
+ function countCodePoints(str) {
448648
+ let length = str.length;
448649
+ for (let i = 0; i < str.length - 1; i++) {
448650
+ const high = str.charCodeAt(i);
448651
+ if (high < 55296 || high > 56319) continue;
448652
+ const low = str.charCodeAt(i + 1);
448653
+ if (low >= 56320 && low <= 57343) {
448654
+ length--;
448655
+ i++;
448656
+ }
448657
+ }
448658
+ return length;
448659
+ }
448660
+ function lineEnd(state, line2) {
448661
+ return Math.min(state.eMarks[line2] + 1, state.src.length);
448662
+ }
448663
+ function getNextLinePos(state, nextLine) {
448664
+ const endLine = state.lineMax;
448665
+ if (nextLine >= endLine || state.isEmpty(nextLine)) return -1;
448666
+ let isContinuation = false;
448667
+ if (state.sCount[nextLine] - state.blkIndent > 3) isContinuation = true;
448668
+ if (state.sCount[nextLine] < 0) isContinuation = true;
448669
+ if (!isContinuation) {
448670
+ const terminatorRules = state.md.block.ruler.getRules("reference");
448671
+ const oldParentType = state.parentType;
448672
+ state.parentType = "reference";
448673
+ let terminate = false;
448674
+ for (let i = 0, l2 = terminatorRules.length; i < l2; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {
448675
+ terminate = true;
448676
+ break;
448677
+ }
448678
+ state.parentType = oldParentType;
448679
+ if (terminate) return -1;
448680
+ }
448681
+ return state.bMarks[nextLine] + state.tShift[nextLine];
448682
+ }
448195
448683
  function reference(state, startLine, _endLine, silent) {
448684
+ const src = state.src;
448196
448685
  let pos = state.bMarks[startLine] + state.tShift[startLine];
448197
- let max2 = state.eMarks[startLine];
448198
448686
  let nextLine = startLine + 1;
448199
448687
  if (state.sCount[startLine] - state.blkIndent >= 4) return false;
448200
- if (state.src.charCodeAt(pos) !== 91) return false;
448201
- function getNextLine(nextLine2) {
448202
- const endLine = state.lineMax;
448203
- if (nextLine2 >= endLine || state.isEmpty(nextLine2)) return null;
448204
- let isContinuation = false;
448205
- if (state.sCount[nextLine2] - state.blkIndent > 3) isContinuation = true;
448206
- if (state.sCount[nextLine2] < 0) isContinuation = true;
448207
- if (!isContinuation) {
448208
- const terminatorRules = state.md.block.ruler.getRules("reference");
448209
- const oldParentType = state.parentType;
448210
- state.parentType = "reference";
448211
- let terminate = false;
448212
- for (let i = 0, l2 = terminatorRules.length; i < l2; i++) if (terminatorRules[i](state, nextLine2, endLine, true)) {
448213
- terminate = true;
448214
- break;
448215
- }
448216
- state.parentType = oldParentType;
448217
- if (terminate) return null;
448218
- }
448219
- const pos2 = state.bMarks[nextLine2] + state.tShift[nextLine2];
448220
- const max3 = state.eMarks[nextLine2];
448221
- return state.src.slice(pos2, max3 + 1);
448222
- }
448223
- let str = state.src.slice(pos, max2 + 1);
448224
- max2 = str.length;
448688
+ if (src.charCodeAt(pos) !== 91) return false;
448689
+ let max2 = lineEnd(state, startLine);
448690
+ let rawLabel = "";
448225
448691
  let labelEnd = -1;
448226
- for (pos = 1; pos < max2; pos++) {
448227
- const ch = str.charCodeAt(pos);
448692
+ let segmentStart = ++pos;
448693
+ while (pos < max2) {
448694
+ if (rawLabel.length + pos - segmentStart > MAX_LABEL_LENGTH * 2) return false;
448695
+ let ch = src.charCodeAt(pos);
448228
448696
  if (ch === 91) return false;
448229
- else if (ch === 93) {
448697
+ if (ch === 93) {
448230
448698
  labelEnd = pos;
448231
448699
  break;
448232
- } else if (ch === 10) {
448233
- const lineContent = getNextLine(nextLine);
448234
- if (lineContent !== null) {
448235
- str += lineContent;
448236
- max2 = str.length;
448237
- nextLine++;
448238
- }
448239
- } else if (ch === 92) {
448240
- pos++;
448241
- if (pos < max2 && str.charCodeAt(pos) === 10) {
448242
- const lineContent = getNextLine(nextLine);
448243
- if (lineContent !== null) {
448244
- str += lineContent;
448245
- max2 = str.length;
448246
- nextLine++;
448247
- }
448248
- }
448249
448700
  }
448701
+ if (ch === 92) ch = src.charCodeAt(++pos);
448702
+ if (ch === 10 && pos < max2) {
448703
+ const nextPos = getNextLinePos(state, nextLine);
448704
+ if (nextPos < 0) return false;
448705
+ rawLabel += src.slice(segmentStart, max2);
448706
+ pos = segmentStart = nextPos;
448707
+ max2 = lineEnd(state, nextLine++);
448708
+ continue;
448709
+ }
448710
+ pos++;
448250
448711
  }
448251
- if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 58) return false;
448252
- for (pos = labelEnd + 2; pos < max2; pos++) {
448253
- const ch = str.charCodeAt(pos);
448712
+ if (labelEnd < 0 || src.charCodeAt(labelEnd + 1) !== 58) return false;
448713
+ rawLabel += src.slice(segmentStart, labelEnd);
448714
+ if (rawLabel.length > MAX_LABEL_LENGTH && countCodePoints(rawLabel) > MAX_LABEL_LENGTH) return false;
448715
+ pos = labelEnd + 2;
448716
+ while (pos < max2) {
448717
+ const ch = src.charCodeAt(pos);
448254
448718
  if (ch === 10) {
448255
- const lineContent = getNextLine(nextLine);
448256
- if (lineContent !== null) {
448257
- str += lineContent;
448258
- max2 = str.length;
448259
- nextLine++;
448260
- }
448261
- } else if (isSpace(ch)) {
448262
- } else break;
448263
- }
448264
- const destRes = state.md.helpers.parseLinkDestination(str, pos, max2);
448719
+ const nextPos = getNextLinePos(state, nextLine);
448720
+ if (nextPos < 0) break;
448721
+ pos = nextPos;
448722
+ max2 = lineEnd(state, nextLine++);
448723
+ } else if (isSpace(ch)) pos++;
448724
+ else break;
448725
+ }
448726
+ const destRes = state.md.helpers.parseLinkDestination(src, pos, max2);
448265
448727
  if (!destRes.ok) return false;
448266
448728
  const href = state.md.normalizeLink(destRes.str);
448267
448729
  if (!state.md.validateLink(href)) return false;
448268
448730
  pos = destRes.pos;
448269
448731
  const destEndPos = pos;
448732
+ const destEndMax = max2;
448270
448733
  const destEndLineNo = nextLine;
448271
- const start = pos;
448272
- for (; pos < max2; pos++) {
448273
- const ch = str.charCodeAt(pos);
448734
+ while (pos < max2) {
448735
+ const ch = src.charCodeAt(pos);
448274
448736
  if (ch === 10) {
448275
- const lineContent = getNextLine(nextLine);
448276
- if (lineContent !== null) {
448277
- str += lineContent;
448278
- max2 = str.length;
448279
- nextLine++;
448280
- }
448281
- } else if (isSpace(ch)) {
448282
- } else break;
448283
- }
448284
- let titleRes = state.md.helpers.parseLinkTitle(str, pos, max2);
448737
+ const nextPos = getNextLinePos(state, nextLine);
448738
+ if (nextPos < 0) break;
448739
+ pos = nextPos;
448740
+ max2 = lineEnd(state, nextLine++);
448741
+ } else if (isSpace(ch)) pos++;
448742
+ else break;
448743
+ }
448744
+ const titleStart = pos;
448745
+ let titleRes = state.md.helpers.parseLinkTitle(src, pos, max2);
448285
448746
  while (titleRes.can_continue) {
448286
- const lineContent = getNextLine(nextLine);
448287
- if (lineContent === null) break;
448288
- str += lineContent;
448289
- pos = max2;
448290
- max2 = str.length;
448291
- nextLine++;
448292
- titleRes = state.md.helpers.parseLinkTitle(str, pos, max2, titleRes);
448747
+ const nextPos = getNextLinePos(state, nextLine);
448748
+ if (nextPos < 0) break;
448749
+ pos = nextPos;
448750
+ max2 = lineEnd(state, nextLine++);
448751
+ titleRes = state.md.helpers.parseLinkTitle(src, pos, max2, titleRes);
448293
448752
  }
448294
448753
  let title;
448295
- if (pos < max2 && start !== pos && titleRes.ok) {
448754
+ if (titleStart !== destEndPos && titleRes.ok) {
448296
448755
  title = titleRes.str;
448297
448756
  pos = titleRes.pos;
448298
448757
  } else {
448299
448758
  title = "";
448300
448759
  pos = destEndPos;
448760
+ max2 = destEndMax;
448301
448761
  nextLine = destEndLineNo;
448302
448762
  }
448303
448763
  while (pos < max2) {
448304
- if (!isSpace(str.charCodeAt(pos))) break;
448764
+ if (!isSpace(src.charCodeAt(pos))) break;
448305
448765
  pos++;
448306
448766
  }
448307
- if (pos < max2 && str.charCodeAt(pos) !== 10) {
448767
+ if (pos < max2 && src.charCodeAt(pos) !== 10) {
448308
448768
  if (title) {
448309
448769
  title = "";
448310
448770
  pos = destEndPos;
448771
+ max2 = destEndMax;
448311
448772
  nextLine = destEndLineNo;
448312
448773
  while (pos < max2) {
448313
- if (!isSpace(str.charCodeAt(pos))) break;
448774
+ if (!isSpace(src.charCodeAt(pos))) break;
448314
448775
  pos++;
448315
448776
  }
448316
448777
  }
448317
448778
  }
448318
- if (pos < max2 && str.charCodeAt(pos) !== 10) return false;
448319
- const label = normalizeReference(str.slice(1, labelEnd));
448779
+ if (pos < max2 && src.charCodeAt(pos) !== 10) return false;
448780
+ const label = normalizeReference(rawLabel);
448320
448781
  if (!label) return false;
448321
448782
  if (silent) return true;
448322
448783
  if (typeof state.env.references === "undefined") state.env.references = {};
@@ -448391,7 +448852,6 @@ var require_index_cjs4 = __commonJS({
448391
448852
  "track",
448392
448853
  "ul"
448393
448854
  ];
448394
- var HTML_TAG_RE = /* @__PURE__ */ new RegExp(`^(?:<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`);
448395
448855
  var HTML_OPEN_CLOSE_TAG_RE = /* @__PURE__ */ new RegExp(`^(?:<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>)`);
448396
448856
  var HTML_SEQUENCES = [
448397
448857
  [
@@ -448696,6 +449156,7 @@ var require_index_cjs4 = __commonJS({
448696
449156
  this._prev_delimiters = [];
448697
449157
  this.backticks = {};
448698
449158
  this.backticksScanned = false;
449159
+ this.skipHtmlSpecial = false;
448699
449160
  this.linkLevel = 0;
448700
449161
  }
448701
449162
  StateInline.prototype.pushPending = function() {
@@ -449300,22 +449761,53 @@ var require_index_cjs4 = __commonJS({
449300
449761
  const lc = ch | 32;
449301
449762
  return lc >= 97 && lc <= 122;
449302
449763
  }
449764
+ function scanSpecial(state, pos) {
449765
+ const src = state.src;
449766
+ let start;
449767
+ let terminator;
449768
+ if (src.startsWith("<!--", pos)) {
449769
+ if (src.startsWith(">", pos + 4)) return pos + 5;
449770
+ if (src.startsWith("->", pos + 4)) return pos + 6;
449771
+ start = pos + 4;
449772
+ terminator = "-->";
449773
+ } else if (src.startsWith("<![CDATA[", pos)) {
449774
+ start = pos + 9;
449775
+ terminator = "]]>";
449776
+ } else if (src.charCodeAt(pos + 1) === 63) {
449777
+ start = pos + 2;
449778
+ terminator = "?>";
449779
+ } else if (isLetter(src.charCodeAt(pos + 2))) {
449780
+ start = pos + 3;
449781
+ terminator = ">";
449782
+ } else return -1;
449783
+ if (state.skipHtmlSpecial) return -1;
449784
+ const end = src.indexOf(terminator, start);
449785
+ if (end < 0) {
449786
+ state.skipHtmlSpecial = true;
449787
+ return -1;
449788
+ }
449789
+ return end + terminator.length;
449790
+ }
449303
449791
  function html_inline(state, silent) {
449304
449792
  if (!state.md.options.html) return false;
449305
449793
  const max2 = state.posMax;
449306
449794
  const pos = state.pos;
449307
449795
  if (state.src.charCodeAt(pos) !== 60 || pos + 2 >= max2) return false;
449796
+ let end;
449308
449797
  const ch = state.src.charCodeAt(pos + 1);
449309
- if (ch !== 33 && ch !== 63 && ch !== 47 && !isLetter(ch)) return false;
449310
- const match = state.src.slice(pos).match(HTML_TAG_RE);
449311
- if (!match) return false;
449798
+ if (ch === 33 || ch === 63) end = scanSpecial(state, pos);
449799
+ else if (ch === 47 || isLetter(ch)) {
449800
+ const match = state.src.slice(pos).match(HTML_OPEN_CLOSE_TAG_RE);
449801
+ end = match ? pos + match[0].length : -1;
449802
+ } else return false;
449803
+ if (end < 0) return false;
449312
449804
  if (!silent) {
449313
449805
  const token = state.push("html_inline", "", 0);
449314
- token.content = match[0];
449806
+ token.content = state.src.slice(pos, end);
449315
449807
  if (isLinkOpen(token.content)) state.linkLevel++;
449316
449808
  if (isLinkClose(token.content)) state.linkLevel--;
449317
449809
  }
449318
- state.pos += match[0].length;
449810
+ state.pos = end;
449319
449811
  return true;
449320
449812
  }
449321
449813
  var DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;
@@ -451852,6 +452344,7 @@ ${missingDependencies.map((d) => `- ${lib_32.chalk.bold(d)}`).join("\n")}`, fals
451852
452344
  if (allCustomWorkers.length === 0 && item.releaseType === options_1.ReleaseType.MANUAL_CLOUDFLARE) {
451853
452345
  await this.project.subProject.addAndConfigure({
451854
452346
  skipDeployment: true,
452347
+ releaseOptions,
451855
452348
  projectType: constants_12.TempalteSubprojectType.TAON_CUSTOM_CLOUDFLARE_WORKER,
451856
452349
  projectEnvironmentNameWithNumber: item.envName ? `${item.envName}${item.envNumber ?? ""}` : void 0
451857
452350
  });
@@ -461103,6 +461596,7 @@ ${lib_22.chalk.bold.green("Local release")} => use current git repo for storing
461103
461596
  if (allCustomWorkers.length === 0) {
461104
461597
  await this.project.subProject.addAndConfigure({
461105
461598
  skipDeployment: true,
461599
+ releaseOptions: envOptions,
461106
461600
  projectType: constants_12.TempalteSubprojectType.TAON_CUSTOM_CLOUDFLARE_WORKER
461107
461601
  });
461108
461602
  }
@@ -462109,10 +462603,10 @@ var require_sub_project = __commonJS({
462109
462603
  }
462110
462604
  //#endregion
462111
462605
  //#region PUBLIC API / deploy worker
462112
- async deployWorker() {
462606
+ async deployWorker(envOptions) {
462113
462607
  while (true) {
462114
462608
  const chosenProject = await this.selectAnyProject();
462115
- await chosenProject.deployment();
462609
+ await chosenProject.deployment(envOptions);
462116
462610
  const again = await lib_32.UtilsTerminal.confirm({
462117
462611
  message: `Would you like to deploy any project again ?`,
462118
462612
  defaultValue: true
@@ -463898,16 +464392,20 @@ var require_vscode_menu_items = __commonJS({
463898
464392
  // ),
463899
464393
  //#endregion
463900
464394
  //#region items with actions / clear
463901
- new ProjectItem(`$ ${FRAMEWORK_NAME} clear`, vscode.TreeItemCollapsibleState.None, {
463902
- iconPath: null,
463903
- project: CURRENT_PROJECT,
463904
- triggerActionOnClick: (project) => {
463905
- runInTerminal(`${FRAMEWORK_NAME} clear`);
463906
- if (project?.location) {
463907
- focustFirstElement();
463908
- }
463909
- }
463910
- }),
464395
+ // new ProjectItem(
464396
+ // `$ ${FRAMEWORK_NAME} clear`,
464397
+ // vscode.TreeItemCollapsibleState.None,
464398
+ // {
464399
+ // iconPath: null,
464400
+ // project: CURRENT_PROJECT,
464401
+ // triggerActionOnClick: project => {
464402
+ // runInTerminal(`${FRAMEWORK_NAME} clear`);
464403
+ // if (project?.location) {
464404
+ // focustFirstElement();
464405
+ // }
464406
+ // },
464407
+ // },
464408
+ // ),
463911
464409
  //#endregion
463912
464410
  //#region items with actions / melt
463913
464411
  // new ProjectItem(
@@ -482128,6 +482626,7 @@ ${error2 instanceof Error ? error2.stack || error2.message : String(error2)}`, f
482128
482626
  //#endregion
482129
482627
  // }
482130
482628
  //#endregion
482629
+ //#region git
482131
482630
  async git() {
482132
482631
  lib_72.UtilsTerminal.clearConsole();
482133
482632
  let children = this.project.children;
@@ -482168,11 +482667,75 @@ ${error2 instanceof Error ? error2.stack || error2.message : String(error2)}`, f
482168
482667
  }
482169
482668
  this._exit();
482170
482669
  }
482670
+ //#endregion
482671
+ //#region envs
482171
482672
  envs() {
482172
482673
  const environments = this.project.releaseProcess.getEnvNamesByArtifact(this.firstArg);
482173
482674
  console.log({ environments });
482174
482675
  this._exit(0);
482175
482676
  }
482677
+ //#endregion
482678
+ //#region install
482679
+ async install() {
482680
+ const coreContainer = this.project.framework.coreContainer;
482681
+ coreContainer.taonJson.saveToDisk("before install");
482682
+ const allPackages = this.project.nodeModules.getAllPackagesNames({
482683
+ followSymlinks: false
482684
+ });
482685
+ const deps = coreContainer.packageJson.dependencies;
482686
+ const depsKeys = Object.keys(deps);
482687
+ const notInstalled = depsKeys.filter((key) => !coreContainer.nodeModules.hasPackageInstalled(key));
482688
+ if (!notInstalled.length) {
482689
+ lib_112.Helpers.info(`All dependencies are installed.`);
482690
+ this._exit();
482691
+ }
482692
+ for (const key of notInstalled) {
482693
+ console.log(`Package not installed: ${key}`);
482694
+ const tempCatalogForInstallation = this.project.pathFor([
482695
+ `tmp-temp-npm-install`,
482696
+ (/* @__PURE__ */ new Date()).getTime().toString()
482697
+ ]);
482698
+ lib_112.Helpers.remove(tempCatalogForInstallation);
482699
+ lib_112.Helpers.mkdirp(tempCatalogForInstallation);
482700
+ lib_112.Helpers.run(`npm init -y`, {
482701
+ cwd: tempCatalogForInstallation
482702
+ }).sync();
482703
+ lib_112.Helpers.run(`npm install ${key}`, {
482704
+ cwd: tempCatalogForInstallation
482705
+ }).sync();
482706
+ const conflictingFiles = [];
482707
+ const projFromTemp = this.ins.From(tempCatalogForInstallation);
482708
+ const allPackagesFromTemp = projFromTemp.nodeModules.getAllPackagesNames({
482709
+ followSymlinks: false
482710
+ });
482711
+ for (const nodeModulesKey of allPackagesFromTemp) {
482712
+ if (allPackages.includes(nodeModulesKey)) {
482713
+ conflictingFiles.push(nodeModulesKey);
482714
+ }
482715
+ console.log(`Found new package in node_modules: ${nodeModulesKey}`);
482716
+ }
482717
+ if (conflictingFiles.length > 0) {
482718
+ lib_112.Helpers.error(`Conflicting packages found: ${conflictingFiles.join(", ")}`, false, true);
482719
+ } else {
482720
+ const toCopy = lib_52.Utils.uniqArray([
482721
+ this.project.framework.coreContainer,
482722
+ project_1.Project.ins.homeDirCoreContainer(this.project.framework.frameworkVersion),
482723
+ ...this.project.taonJson.isUsingOwnNodeModulesInsteadCoreContainer ? [this.project] : []
482724
+ ], "location").map((c) => this.ins.From(c.location));
482725
+ for (const npmPackageName of allPackagesFromTemp) {
482726
+ for (const coreContainer2 of toCopy) {
482727
+ lib_112.Helpers.info(`Copying ${lib_52.chalk.bold(`${npmPackageName}`)} to project: ${coreContainer2.location} `);
482728
+ lib_22.UtilsFilesFoldersSync.copy(projFromTemp.nodeModules.pathFor(npmPackageName), coreContainer2.nodeModules.pathFor(npmPackageName), {
482729
+ recursive: true,
482730
+ overwrite: true
482731
+ });
482732
+ }
482733
+ }
482734
+ lib_112.Helpers.taskDone(`Finished copying packages from temporary installation.`);
482735
+ }
482736
+ }
482737
+ this._exit();
482738
+ }
482176
482739
  };
482177
482740
  exports2.$Global = $Global;
482178
482741
  __decorate2([
@@ -484804,25 +485367,29 @@ var require_cli_SUB_PROJECT = __commonJS({
484804
485367
  if (overrideSelect) {
484805
485368
  overrideSelect = void 0;
484806
485369
  }
485370
+ const releaseOptions = this.params.clone({
485371
+ build: {
485372
+ ...this.params.build,
485373
+ cloudflare: true
485374
+ }
485375
+ });
484807
485376
  if (select === "info") {
484808
485377
  await this.project.subProject.getInfo();
484809
485378
  } else if (select === "addDeploy") {
484810
- await this.project.subProject.addAndConfigure();
485379
+ await this.project.subProject.addAndConfigure({
485380
+ releaseOptions
485381
+ });
484811
485382
  await this.project.init();
484812
485383
  } else if (select === "add") {
484813
485384
  await this.project.subProject.addAndConfigure({
484814
- skipDeployment: true
485385
+ skipDeployment: true,
485386
+ releaseOptions
484815
485387
  });
484816
485388
  await this.project.init();
484817
485389
  } else if (select === "dev") {
484818
485390
  await this.project.subProject.startInDevMode({
484819
485391
  projectName: this.secondArg ? lib_13.path.basename(this.secondArg?.trim()) : void 0,
484820
- envOptions: this.params.clone({
484821
- build: {
484822
- ...this.params.build,
484823
- cloudflare: true
484824
- }
484825
- })
485392
+ envOptions: releaseOptions
484826
485393
  });
484827
485394
  } else if (select === "teststripe") {
484828
485395
  await this.project.subProject.testStripeProjectWithExampleData();
@@ -484831,7 +485398,7 @@ var require_cli_SUB_PROJECT = __commonJS({
484831
485398
  } else if (select === "secrets") {
484832
485399
  await this.project.subProject.setWorkerSecrets();
484833
485400
  } else if (select === "deploy") {
484834
- await this.project.subProject.deployWorker();
485401
+ await this.project.subProject.deployWorker(releaseOptions);
484835
485402
  } else if (select === "initall") {
484836
485403
  await this.project.subProject.repo.initAll();
484837
485404
  } else if (select === "login") {