@squiz/dx-common-lib 1.2.1-alpha.101 → 1.2.1-alpha.102

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 (88) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/lib/assertions/index.d.ts +7 -0
  3. package/lib/assertions/index.js +26 -0
  4. package/lib/assertions/index.js.map +1 -0
  5. package/lib/error/BadRequestError.d.ts +4 -0
  6. package/lib/error/BadRequestError.js +11 -0
  7. package/lib/error/BadRequestError.js.map +1 -0
  8. package/lib/error/ErrorWithHttpStatusCode.d.ts +5 -0
  9. package/lib/error/ErrorWithHttpStatusCode.js +12 -0
  10. package/lib/error/ErrorWithHttpStatusCode.js.map +1 -0
  11. package/lib/error/InternalServerError.d.ts +4 -0
  12. package/lib/error/InternalServerError.js +11 -0
  13. package/lib/error/InternalServerError.js.map +1 -0
  14. package/lib/error/MethodNotImplementedError.d.ts +4 -0
  15. package/lib/error/MethodNotImplementedError.js +11 -0
  16. package/lib/error/MethodNotImplementedError.js.map +1 -0
  17. package/lib/error/ResourceNotFoundError.d.ts +4 -0
  18. package/lib/error/ResourceNotFoundError.js +11 -0
  19. package/lib/error/ResourceNotFoundError.js.map +1 -0
  20. package/lib/error/TimeoutError.d.ts +4 -0
  21. package/lib/error/TimeoutError.js +11 -0
  22. package/lib/error/TimeoutError.js.map +1 -0
  23. package/lib/error/index.d.ts +6 -0
  24. package/lib/error/index.js +23 -0
  25. package/lib/error/index.js.map +1 -0
  26. package/lib/index.d.ts +4 -7
  27. package/lib/index.js +4 -9
  28. package/lib/index.js.map +1 -1
  29. package/lib/util/getNodeEnv.d.ts +1 -0
  30. package/lib/util/getNodeEnv.js +14 -0
  31. package/lib/util/getNodeEnv.js.map +1 -0
  32. package/lib/util/getNodeEnv.spec.d.ts +1 -0
  33. package/lib/util/getNodeEnv.spec.js +22 -0
  34. package/lib/util/getNodeEnv.spec.js.map +1 -0
  35. package/lib/util/index.d.ts +5 -0
  36. package/lib/util/index.js +14 -0
  37. package/lib/util/index.js.map +1 -0
  38. package/lib/util/isPathTryingToAccessOutsideOfRoot.d.ts +1 -0
  39. package/lib/util/isPathTryingToAccessOutsideOfRoot.js +14 -0
  40. package/lib/util/isPathTryingToAccessOutsideOfRoot.js.map +1 -0
  41. package/lib/util/isPathTryingToAccessOutsideOfRoot.spec.d.ts +1 -0
  42. package/lib/util/isPathTryingToAccessOutsideOfRoot.spec.js +25 -0
  43. package/lib/util/isPathTryingToAccessOutsideOfRoot.spec.js.map +1 -0
  44. package/lib/util/joinAbsoluteUrlPath.d.ts +1 -0
  45. package/lib/util/joinAbsoluteUrlPath.js +26 -0
  46. package/lib/util/joinAbsoluteUrlPath.js.map +1 -0
  47. package/lib/util/joinAbsoluteUrlPath.spec.d.ts +1 -0
  48. package/lib/util/joinAbsoluteUrlPath.spec.js +43 -0
  49. package/lib/util/joinAbsoluteUrlPath.spec.js.map +1 -0
  50. package/lib/util/never.d.ts +1 -0
  51. package/lib/util/never.js +9 -0
  52. package/lib/util/never.js.map +1 -0
  53. package/lib/util/parseEnvVarForVar.d.ts +1 -0
  54. package/lib/util/parseEnvVarForVar.js +15 -0
  55. package/lib/util/parseEnvVarForVar.js.map +1 -0
  56. package/lib/util/parseEnvVarForVar.spec.d.ts +1 -0
  57. package/lib/util/parseEnvVarForVar.spec.js +20 -0
  58. package/lib/util/parseEnvVarForVar.spec.js.map +1 -0
  59. package/lib/zip/zipDirectory.d.ts +1 -0
  60. package/lib/zip/zipDirectory.js +32 -0
  61. package/lib/zip/zipDirectory.js.map +1 -0
  62. package/lib/zip/zipDirectory.spec.d.ts +1 -0
  63. package/lib/zip/zipDirectory.spec.js +25 -0
  64. package/lib/zip/zipDirectory.spec.js.map +1 -0
  65. package/package.json +8 -4
  66. package/src/assertions/index.ts +10 -0
  67. package/src/error/BadRequestError.ts +7 -0
  68. package/src/error/ErrorWithHttpStatusCode.ts +5 -0
  69. package/src/error/InternalServerError.ts +7 -0
  70. package/src/error/MethodNotImplementedError.ts +7 -0
  71. package/src/error/ResourceNotFoundError.ts +7 -0
  72. package/src/error/TimeoutError.ts +7 -0
  73. package/src/error/index.ts +6 -0
  74. package/src/index.ts +4 -9
  75. package/src/util/getNodeEnv.spec.ts +25 -0
  76. package/src/util/getNodeEnv.ts +11 -0
  77. package/src/util/index.ts +5 -0
  78. package/src/util/isPathTryingToAccessOutsideOfRoot.spec.ts +25 -0
  79. package/src/util/isPathTryingToAccessOutsideOfRoot.ts +8 -0
  80. package/src/util/joinAbsoluteUrlPath.spec.ts +62 -0
  81. package/src/util/joinAbsoluteUrlPath.ts +22 -0
  82. package/src/util/never.ts +4 -0
  83. package/src/util/parseEnvVarForVar.spec.ts +22 -0
  84. package/src/util/parseEnvVarForVar.ts +12 -0
  85. package/src/zip/zipDirectory.spec.ts +24 -0
  86. package/src/zip/zipDirectory.ts +31 -0
  87. package/tsconfig.tsbuildinfo +1 -1
  88. package/jest.integration.config.ts +0 -26
@@ -1,26 +0,0 @@
1
- import type { Config } from 'jest';
2
- import { config as dotEnvConfig } from 'dotenv';
3
-
4
- dotEnvConfig();
5
-
6
- process.env.NODE_ENV = 'development';
7
-
8
- // Sync object
9
- const config: Config = {
10
- preset: 'ts-jest',
11
- testEnvironment: 'node',
12
- testPathIgnorePatterns: ['<rootDir>/lib/', '<rootDir>/cdk.out/', 'test.ts'],
13
- maxWorkers: '80%',
14
- detectOpenHandles: true,
15
-
16
- testRegex: '.*\\.integration\\.spec\\.ts$',
17
-
18
- globals: {
19
- BUILD_VERSION: 'undefined',
20
- BUILD_BRANCH: 'undefined',
21
- },
22
-
23
- testTimeout: 30_000,
24
- };
25
-
26
- export default config;