@contrail/cli 3.5.1-alpha.9da7ac5 → 3.5.1

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 (43) hide show
  1. package/README.md +1 -1
  2. package/node_modules/@contrail/loader/lib/color-processor.js +9 -23
  3. package/node_modules/@contrail/loader/lib/color-processor.spec.js +112 -62
  4. package/node_modules/@contrail/loader/lib/common/chunk-by-url-length.d.ts +1 -1
  5. package/node_modules/@contrail/loader/lib/common/chunk-by-url-length.js +2 -0
  6. package/node_modules/@contrail/loader/lib/common/chunk-by-url-length.spec.js +4 -0
  7. package/node_modules/@contrail/loader/lib/common/color-validation.d.ts +26 -0
  8. package/node_modules/@contrail/loader/lib/common/color-validation.js +163 -0
  9. package/node_modules/@contrail/loader/lib/common/color-validation.spec.d.ts +1 -0
  10. package/node_modules/@contrail/loader/lib/common/color-validation.spec.js +102 -0
  11. package/node_modules/@contrail/loader/lib/common/size-range-helpers.js +0 -1
  12. package/node_modules/@contrail/loader/lib/constants.d.ts +0 -3
  13. package/node_modules/@contrail/loader/lib/constants.js +1 -4
  14. package/node_modules/@contrail/loader/lib/entities-v2/colors-v2/color-processor-v2.js +9 -23
  15. package/node_modules/@contrail/loader/lib/entities-v2/colors-v2/color-processor-v2.spec.js +112 -62
  16. package/node_modules/@contrail/loader/lib/entities-v2/entities-helper.js +0 -1
  17. package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/assortment-processor.js +0 -1
  18. package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.js +8 -22
  19. package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.spec.js +43 -1
  20. package/node_modules/@contrail/loader/lib/pipeline/identifier-resolver.d.ts +5 -0
  21. package/node_modules/@contrail/loader/lib/pipeline/identifier-resolver.js +562 -0
  22. package/node_modules/@contrail/loader/lib/pipeline/identifier-resolver.spec.d.ts +1 -0
  23. package/node_modules/@contrail/loader/lib/pipeline/identifier-resolver.spec.js +231 -0
  24. package/node_modules/@contrail/loader/lib/pipeline/item-execute-helpers.js +77 -3
  25. package/node_modules/@contrail/loader/lib/pipeline/item-execute-helpers.spec.js +82 -0
  26. package/node_modules/@contrail/loader/lib/pipeline/preview.js +0 -5
  27. package/node_modules/@contrail/loader/lib/pipeline/preview.spec.js +2 -2
  28. package/node_modules/@contrail/loader/lib/pipeline/project-item-execute-helpers.js +1 -1
  29. package/node_modules/@contrail/loader/lib/pipeline/transform.js +18 -0
  30. package/node_modules/@contrail/loader/lib/pipeline/transform.spec.js +3 -2
  31. package/node_modules/@contrail/loader/lib/pipeline/types.d.ts +5 -2
  32. package/node_modules/@contrail/loader/lib/pipeline/types.js +2 -0
  33. package/node_modules/@contrail/loader/lib/pipeline/validate.js +184 -437
  34. package/node_modules/@contrail/loader/lib/pipeline/validate.spec.js +157 -53
  35. package/node_modules/@contrail/loader/package.json +3 -2
  36. package/node_modules/validate-color/LICENSE +21 -0
  37. package/node_modules/validate-color/README.md +265 -0
  38. package/node_modules/validate-color/lib/index.d.ts +10 -0
  39. package/node_modules/validate-color/lib/index.js +1 -0
  40. package/node_modules/validate-color/package.json +91 -0
  41. package/node_modules/validate-color/test/redos.js +29 -0
  42. package/oclif.manifest.json +1 -1
  43. package/package.json +2 -2
@@ -0,0 +1,29 @@
1
+ var validateColor = require('../lib/index');
2
+
3
+ function build_blank(n) {
4
+ // let ret = "rgb(0" // original
5
+ let ret = "rg"
6
+ for (let i = 0; i < n; i++) {
7
+ ret += " "
8
+ }
9
+ return ret + "!";
10
+ }
11
+
12
+ // 'rg !'
13
+ // 'rg !'
14
+
15
+ // * Simulating 'validateColor.validateHTMLColorRgb('rgb(0 0 0)')'
16
+
17
+ for(let i = 1; i <= 5000000; i++) {
18
+ const attackStr = build_blank(i)
19
+ if (i < 30) {
20
+ console.log('🚀 ~ file: redos.js:21 ~ attackStr', attackStr);
21
+ }
22
+ // if (i % 100 === 0) {
23
+ // const time = Date.now();
24
+ // const attackStr = build_blank(i)
25
+ // // validateColor.validateHTMLColorRgb(attackStr)
26
+ // const timeCost = Date.now() - time;
27
+ // console.log(`attackStr.length: ${attackStr.length}: ${timeCost} ms`)
28
+ // }
29
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.5.1-alpha.9da7ac5",
2
+ "version": "3.5.1",
3
3
  "commands": {
4
4
  "app:create": {
5
5
  "id": "app:create",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "3.5.1-alpha.9da7ac5",
3
+ "version": "3.5.1",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "bin": {
6
6
  "contrail-cli": "./bin/run",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@contrail/entity-types": "^1.6.1",
34
- "@contrail/loader": "^2.0.6",
34
+ "@contrail/loader": "^2.0.9",
35
35
  "@contrail/org-config-migration": "^1.1.13",
36
36
  "@contrail/sdk": "^1.5.13",
37
37
  "@contrail/types": "^3.1.5",