@adonisjs/encryption
Advanced tools
Comparing version 5.1.2-2 to 5.1.2-3
@@ -1,1 +0,21 @@ | ||
export { EncryptionFactory } from './encryption.js'; | ||
import { E as Encryption } from '../encryption-cb1ec59b.js'; | ||
import { EncryptionOptions } from '../src/types.js'; | ||
import '@poppinss/utils'; | ||
/** | ||
* Encryption factory is used to generate encryption class instances for | ||
* testing | ||
*/ | ||
declare class EncryptionFactory { | ||
#private; | ||
/** | ||
* Merge encryption factory options | ||
*/ | ||
merge(options: Partial<EncryptionOptions>): this; | ||
/** | ||
* Create instance of encryption class | ||
*/ | ||
create(): Encryption; | ||
} | ||
export { EncryptionFactory }; |
@@ -1,9 +0,26 @@ | ||
/* | ||
* @adonisjs/encryption | ||
* | ||
* (c) AdonisJS | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
export { EncryptionFactory } from './encryption.js'; | ||
import { | ||
Encryption | ||
} from "../chunk-N5VJCADW.js"; | ||
// factories/encryption.ts | ||
var EncryptionFactory = class { | ||
#options = { | ||
secret: "averylongrandomsecretkey" | ||
}; | ||
/** | ||
* Merge encryption factory options | ||
*/ | ||
merge(options) { | ||
Object.assign(this.#options, options); | ||
return this; | ||
} | ||
/** | ||
* Create instance of encryption class | ||
*/ | ||
create() { | ||
return new Encryption(this.#options); | ||
} | ||
}; | ||
export { | ||
EncryptionFactory | ||
}; |
@@ -1,2 +0,17 @@ | ||
export * as errors from './src/exceptions.js'; | ||
export { Encryption } from './src/encryption.js'; | ||
import * as _poppinss_utils from '@poppinss/utils'; | ||
export { E as Encryption } from './encryption-cb1ec59b.js'; | ||
import './src/types.js'; | ||
declare const E_INSECURE_APP_KEY: new (args?: any, options?: ErrorOptions | undefined) => _poppinss_utils.Exception; | ||
declare const E_MISSING_APP_KEY: new (args?: any, options?: ErrorOptions | undefined) => _poppinss_utils.Exception; | ||
declare const errors_E_INSECURE_APP_KEY: typeof E_INSECURE_APP_KEY; | ||
declare const errors_E_MISSING_APP_KEY: typeof E_MISSING_APP_KEY; | ||
declare namespace errors { | ||
export { | ||
errors_E_INSECURE_APP_KEY as E_INSECURE_APP_KEY, | ||
errors_E_MISSING_APP_KEY as E_MISSING_APP_KEY, | ||
}; | ||
} | ||
export { errors }; |
@@ -1,10 +0,8 @@ | ||
/* | ||
* @adonisjs/encryption | ||
* | ||
* (c) AdonisJS | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
export * as errors from './src/exceptions.js'; | ||
export { Encryption } from './src/encryption.js'; | ||
import { | ||
Encryption, | ||
errors_exports | ||
} from "./chunk-N5VJCADW.js"; | ||
export { | ||
Encryption, | ||
errors_exports as errors | ||
}; |
/** | ||
* Config accepted by the encryption | ||
*/ | ||
export type EncryptionOptions = { | ||
type EncryptionOptions = { | ||
algorithm?: 'aes-256-cbc'; | ||
secret: string; | ||
}; | ||
export { EncryptionOptions }; |
{ | ||
"name": "@adonisjs/encryption", | ||
"version": "5.1.2-2", | ||
"version": "5.1.2-3", | ||
"description": "Encryption provider for AdonisJs", | ||
@@ -8,6 +8,3 @@ "main": "build/index.js", | ||
"files": [ | ||
"build/src", | ||
"build/factories", | ||
"build/index.d.ts", | ||
"build/index.js" | ||
"build" | ||
], | ||
@@ -27,3 +24,3 @@ "exports": { | ||
"typecheck": "tsc --noEmit", | ||
"compile": "npm run lint && npm run clean && tsc", | ||
"compile": "npm run lint && npm run clean && tsup-node", | ||
"build": "npm run compile", | ||
@@ -44,23 +41,24 @@ "release": "np", | ||
"devDependencies": { | ||
"@adonisjs/eslint-config": "^1.1.7", | ||
"@adonisjs/prettier-config": "^1.1.7", | ||
"@adonisjs/tsconfig": "^1.1.7", | ||
"@commitlint/cli": "^17.6.6", | ||
"@commitlint/config-conventional": "^17.6.6", | ||
"@japa/assert": "^2.0.0-1", | ||
"@japa/runner": "^3.0.0-3", | ||
"@swc/core": "^1.3.67", | ||
"@types/node": "^20.3.3", | ||
"c8": "^8.0.0", | ||
"del-cli": "^5.0.0", | ||
"eslint": "^8.44.0", | ||
"@adonisjs/eslint-config": "^1.1.8", | ||
"@adonisjs/prettier-config": "^1.1.8", | ||
"@adonisjs/tsconfig": "^1.1.8", | ||
"@commitlint/cli": "^17.8.0", | ||
"@commitlint/config-conventional": "^17.8.0", | ||
"@japa/assert": "^2.0.0", | ||
"@japa/runner": "^3.0.2", | ||
"@swc/core": "1.3.82", | ||
"@types/node": "^20.8.6", | ||
"c8": "^8.0.1", | ||
"del-cli": "^5.1.0", | ||
"eslint": "^8.51.0", | ||
"github-label-sync": "^2.3.1", | ||
"husky": "^8.0.3", | ||
"np": "^8.0.4", | ||
"prettier": "^2.8.8", | ||
"prettier": "^3.0.3", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.1.6" | ||
"tsup": "^7.2.0", | ||
"typescript": "^5.2.2" | ||
}, | ||
"dependencies": { | ||
"@poppinss/utils": "^6.5.0-3" | ||
"@poppinss/utils": "^6.5.0" | ||
}, | ||
@@ -102,3 +100,15 @@ "repository": { | ||
}, | ||
"prettier": "@adonisjs/prettier-config" | ||
"prettier": "@adonisjs/prettier-config", | ||
"tsup": { | ||
"entry": [ | ||
"./index.ts", | ||
"./src/types.ts", | ||
"./factories/main.ts" | ||
], | ||
"outDir": "./build", | ||
"clean": true, | ||
"format": "esm", | ||
"dts": true, | ||
"target": "esnext" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
16527
19
11
368
Updated@poppinss/utils@^6.5.0