@adonisjs/env 4.1.3-0 → 4.1.4-0

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.
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # The MIT License
2
2
 
3
- Copyright 2022 Harminder Virk, contributors
3
+ Copyright (c) 2023 AdonisJS Framework
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
package/build/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Env } from './src/env.js';
2
2
  export { EnvParser } from './src/parser.js';
3
3
  export { EnvLoader } from './src/loader.js';
4
+ export * as errors from './src/exceptions.js';
4
5
  export { EnvProcessor } from './src/processor.js';
5
- export { InvalidEnvVariablesException } from './src/exceptions/invalid_env_variables.js';
package/build/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Env } from './src/env.js';
2
2
  export { EnvParser } from './src/parser.js';
3
3
  export { EnvLoader } from './src/loader.js';
4
+ export * as errors from './src/exceptions.js';
4
5
  export { EnvProcessor } from './src/processor.js';
5
- export { InvalidEnvVariablesException } from './src/exceptions/invalid_env_variables.js';
@@ -0,0 +1 @@
1
+ export declare const E_INVALID_ENV_VARIABLES: new (args?: any, options?: ErrorOptions | undefined) => import("@poppinss/utils").Exception;
@@ -0,0 +1,2 @@
1
+ import { createError } from '@poppinss/utils';
2
+ export const E_INVALID_ENV_VARIABLES = createError('Validation failed for one or more environment variables', 'E_INVALID_ENV_VARIABLES');
@@ -1,10 +1,10 @@
1
- import { InvalidEnvVariablesException } from './exceptions/invalid_env_variables.js';
1
+ import { E_INVALID_ENV_VARIABLES } from './exceptions.js';
2
2
  export class EnvValidator {
3
3
  #schema;
4
4
  #error;
5
5
  constructor(schema) {
6
6
  this.#schema = schema;
7
- this.#error = new InvalidEnvVariablesException();
7
+ this.#error = new E_INVALID_ENV_VARIABLES();
8
8
  }
9
9
  validate(values) {
10
10
  const cause = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/env",
3
- "version": "4.1.3-0",
3
+ "version": "4.1.4-0",
4
4
  "description": "Environment variable manager for Node.js",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
@@ -41,7 +41,7 @@
41
41
  "@japa/runner": "^2.2.2",
42
42
  "@japa/spec-reporter": "^1.3.2",
43
43
  "@poppinss/dev-utils": "^2.0.3",
44
- "@swc/core": "^1.3.27",
44
+ "@swc/core": "^1.3.29",
45
45
  "@types/fs-extra": "^11.0.1",
46
46
  "@types/node": "^18.11.18",
47
47
  "c8": "^7.12.0",
@@ -60,7 +60,7 @@
60
60
  "typescript": "^4.9.4"
61
61
  },
62
62
  "dependencies": {
63
- "@poppinss/utils": "^6.4.0-0",
63
+ "@poppinss/utils": "^6.5.0-0",
64
64
  "@poppinss/validator-lite": "^1.0.2",
65
65
  "dotenv": "^16.0.3"
66
66
  },
@@ -1,6 +0,0 @@
1
- import { Exception } from '@poppinss/utils';
2
- export declare class InvalidEnvVariablesException extends Exception {
3
- static status: number;
4
- static code: string;
5
- static message: string;
6
- }
@@ -1,6 +0,0 @@
1
- import { Exception } from '@poppinss/utils';
2
- export class InvalidEnvVariablesException extends Exception {
3
- static status = 500;
4
- static code = 'E_INVALID_ENV_VARIABLES';
5
- static message = 'Validation failed for one or more environment variables';
6
- }