zenstack 0.3.17 → 0.3.19

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.
@@ -0,0 +1,22 @@
1
+ // based on: https://github.com/prisma/docs/blob/c72eb087fcf57f3c00d153f86c549ef28b3d0f44/src/components/customMdx/prism/prism-prisma.js
2
+
3
+ (function (Prism) {
4
+ Prism.languages.zmodel = Prism.languages.extend('clike', {
5
+ keyword:
6
+ /\b(?:datasource|enum|generator|model|attribute|function|null|this)\b/,
7
+ 'type-class-name': /(\b()\s+)[\w.\\]+/,
8
+ });
9
+
10
+ Prism.languages.javascript['class-name'][0].pattern =
11
+ /(\b(?:model|datasource|enum|generator)\s+)[\w.\\]+/;
12
+
13
+ Prism.languages.insertBefore('zmodel', 'function', {
14
+ annotation: {
15
+ pattern: /(^|[^.])@+\w+/,
16
+ lookbehind: true,
17
+ alias: 'punctuation',
18
+ },
19
+ });
20
+
21
+ Prism.languages.json5 = Prism.languages.js;
22
+ })(Prism);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publisher": "zenstack",
4
4
  "displayName": "ZenStack Language Tools",
5
5
  "description": "A toolkit for modeling data and access policies in full-stack development with Next.js and Typescript",
6
- "version": "0.3.17",
6
+ "version": "0.3.19",
7
7
  "author": {
8
8
  "name": "ZenStack Team"
9
9
  },
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "main": "./bundle/extension.js",
67
67
  "dependencies": {
68
- "@zenstackhq/runtime": "0.3.17",
68
+ "@zenstackhq/runtime": "0.3.19",
69
69
  "async-exit-hook": "^2.0.1",
70
70
  "change-case": "^4.1.2",
71
71
  "chevrotain": "^9.1.0",
@@ -27,11 +27,6 @@ export default class NextAuthGenerator implements Generator {
27
27
  try {
28
28
  execSync('npm ls next-auth');
29
29
  } catch (err) {
30
- console.warn(
31
- colors.yellow(
32
- 'Next-auth module is not installed, skipping generating adapter.'
33
- )
34
- );
35
30
  return;
36
31
  }
37
32
 
@@ -0,0 +1,22 @@
1
+ // based on: https://github.com/prisma/docs/blob/c72eb087fcf57f3c00d153f86c549ef28b3d0f44/src/components/customMdx/prism/prism-prisma.js
2
+
3
+ (function (Prism) {
4
+ Prism.languages.zmodel = Prism.languages.extend('clike', {
5
+ keyword:
6
+ /\b(?:datasource|enum|generator|model|attribute|function|null|this)\b/,
7
+ 'type-class-name': /(\b()\s+)[\w.\\]+/,
8
+ });
9
+
10
+ Prism.languages.javascript['class-name'][0].pattern =
11
+ /(\b(?:model|datasource|enum|generator)\s+)[\w.\\]+/;
12
+
13
+ Prism.languages.insertBefore('zmodel', 'function', {
14
+ annotation: {
15
+ pattern: /(^|[^.])@+\w+/,
16
+ lookbehind: true,
17
+ alias: 'punctuation',
18
+ },
19
+ });
20
+
21
+ Prism.languages.json5 = Prism.languages.js;
22
+ })(Prism);