zenstack 0.2.12 → 0.3.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.
@@ -104,11 +104,13 @@ attribute @@deny(_ operation: String, _ condition: Boolean)
104
104
  * Indicates that the field is a password field and needs to be hashed before persistence.
105
105
  *
106
106
  * ZenStack uses `bcryptjs` library to hash password. You can use the `saltLength` parameter
107
- * to configure length of salt, or use parameter to provide an explicit salt. By default, 12-byte
108
- * long salt is used.
107
+ * to configure the cost of hashing, or use `salt` parameter to provide an explicit salt.
108
+ * By default, salt length of 12 is used.
109
109
  *
110
- * @saltLength: length of salt to use
111
- * @salt: salt to use
110
+ * @see https://www.npmjs.com/package/bcryptjs for details
111
+ *
112
+ * @saltLength: length of salt to use (cost factor for the hash function)
113
+ * @salt: salt to use (a pregenerated valid salt)
112
114
  */
113
115
  attribute @password(saltLength: Int?, salt: String?)
114
116
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publisher": "zenstack",
4
4
  "displayName": "ZenStack Language Tools",
5
5
  "description": "ZenStack is a toolkit that simplifies full-stack development",
6
- "version": "0.2.12",
6
+ "version": "0.3.0",
7
7
  "author": {
8
8
  "name": "ZenStack Team"
9
9
  },
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "main": "./bundle/extension.js",
66
66
  "dependencies": {
67
- "@zenstackhq/internal": "0.2.12",
67
+ "@zenstackhq/internal": "0.3.0",
68
68
  "change-case": "^4.1.2",
69
69
  "chevrotain": "^9.1.0",
70
70
  "colors": "^1.4.0",
@@ -96,6 +96,7 @@
96
96
  "eslint": "^8.27.0",
97
97
  "jest": "^29.2.1",
98
98
  "langium-cli": "^0.5.0",
99
+ "rimraf": "^3.0.2",
99
100
  "tmp": "^0.2.1",
100
101
  "ts-jest": "^29.0.3",
101
102
  "ts-node": "^10.9.1",
@@ -108,8 +109,9 @@
108
109
  "vscode:publish": "vsce publish --no-dependencies",
109
110
  "vscode:prepublish": "cp ../../README.md ./ && pnpm lint && pnpm build",
110
111
  "vscode:package": "vsce package --no-dependencies",
112
+ "clean": "rimraf bundle",
111
113
  "build": "pnpm langium:generate && tsc --noEmit && pnpm bundle && cp -r src/res/* bundle/res/",
112
- "bundle": "node build/bundle.js --minify",
114
+ "bundle": "npm run clean && node build/bundle.js --minify",
113
115
  "bundle-watch": "node build/bundle.js --watch",
114
116
  "ts:watch": "tsc --watch --noEmit",
115
117
  "tsc-alias:watch": "tsc-alias --watch",
@@ -104,11 +104,13 @@ attribute @@deny(_ operation: String, _ condition: Boolean)
104
104
  * Indicates that the field is a password field and needs to be hashed before persistence.
105
105
  *
106
106
  * ZenStack uses `bcryptjs` library to hash password. You can use the `saltLength` parameter
107
- * to configure length of salt, or use parameter to provide an explicit salt. By default, 12-byte
108
- * long salt is used.
107
+ * to configure the cost of hashing, or use `salt` parameter to provide an explicit salt.
108
+ * By default, salt length of 12 is used.
109
109
  *
110
- * @saltLength: length of salt to use
111
- * @salt: salt to use
110
+ * @see https://www.npmjs.com/package/bcryptjs for details
111
+ *
112
+ * @saltLength: length of salt to use (cost factor for the hash function)
113
+ * @salt: salt to use (a pregenerated valid salt)
112
114
  */
113
115
  attribute @password(saltLength: Int?, salt: String?)
114
116