@nest-boot/row-level-security 7.2.1 → 7.2.2

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 @@
1
+ export declare function isPostgresKeywordRequiringQuote(identifier: string): boolean;
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isPostgresKeywordRequiringQuote = isPostgresKeywordRequiringQuote;
4
+ // PostgreSQL keywords where quote_ident(keyword) emits a quoted identifier.
5
+ // Sourced from pg_get_keywords() entries with catcode <> 'U'.
6
+ const postgresKeywordsRequiringQuote = new Set([
7
+ "all",
8
+ "analyse",
9
+ "analyze",
10
+ "and",
11
+ "any",
12
+ "array",
13
+ "as",
14
+ "asc",
15
+ "asymmetric",
16
+ "authorization",
17
+ "between",
18
+ "bigint",
19
+ "binary",
20
+ "bit",
21
+ "boolean",
22
+ "both",
23
+ "case",
24
+ "cast",
25
+ "char",
26
+ "character",
27
+ "check",
28
+ "coalesce",
29
+ "collate",
30
+ "collation",
31
+ "column",
32
+ "concurrently",
33
+ "constraint",
34
+ "create",
35
+ "cross",
36
+ "current_catalog",
37
+ "current_date",
38
+ "current_role",
39
+ "current_schema",
40
+ "current_time",
41
+ "current_timestamp",
42
+ "current_user",
43
+ "dec",
44
+ "decimal",
45
+ "default",
46
+ "deferrable",
47
+ "desc",
48
+ "distinct",
49
+ "do",
50
+ "else",
51
+ "end",
52
+ "except",
53
+ "exists",
54
+ "extract",
55
+ "false",
56
+ "fetch",
57
+ "float",
58
+ "for",
59
+ "foreign",
60
+ "freeze",
61
+ "from",
62
+ "full",
63
+ "grant",
64
+ "greatest",
65
+ "group",
66
+ "grouping",
67
+ "having",
68
+ "ilike",
69
+ "in",
70
+ "initially",
71
+ "inner",
72
+ "inout",
73
+ "int",
74
+ "integer",
75
+ "intersect",
76
+ "interval",
77
+ "into",
78
+ "is",
79
+ "isnull",
80
+ "join",
81
+ "json",
82
+ "json_array",
83
+ "json_arrayagg",
84
+ "json_exists",
85
+ "json_object",
86
+ "json_objectagg",
87
+ "json_query",
88
+ "json_scalar",
89
+ "json_serialize",
90
+ "json_table",
91
+ "json_value",
92
+ "lateral",
93
+ "leading",
94
+ "least",
95
+ "left",
96
+ "like",
97
+ "limit",
98
+ "localtime",
99
+ "localtimestamp",
100
+ "merge_action",
101
+ "national",
102
+ "natural",
103
+ "nchar",
104
+ "none",
105
+ "normalize",
106
+ "not",
107
+ "notnull",
108
+ "null",
109
+ "nullif",
110
+ "numeric",
111
+ "offset",
112
+ "on",
113
+ "only",
114
+ "or",
115
+ "order",
116
+ "out",
117
+ "outer",
118
+ "overlaps",
119
+ "overlay",
120
+ "placing",
121
+ "position",
122
+ "precision",
123
+ "primary",
124
+ "real",
125
+ "references",
126
+ "returning",
127
+ "right",
128
+ "row",
129
+ "select",
130
+ "session_user",
131
+ "setof",
132
+ "similar",
133
+ "smallint",
134
+ "some",
135
+ "substring",
136
+ "symmetric",
137
+ "system_user",
138
+ "table",
139
+ "tablesample",
140
+ "then",
141
+ "time",
142
+ "timestamp",
143
+ "to",
144
+ "trailing",
145
+ "treat",
146
+ "trim",
147
+ "true",
148
+ "union",
149
+ "unique",
150
+ "user",
151
+ "using",
152
+ "values",
153
+ "varchar",
154
+ "variadic",
155
+ "verbose",
156
+ "when",
157
+ "where",
158
+ "window",
159
+ "with",
160
+ "xmlattributes",
161
+ "xmlconcat",
162
+ "xmlelement",
163
+ "xmlexists",
164
+ "xmlforest",
165
+ "xmlnamespaces",
166
+ "xmlparse",
167
+ "xmlpi",
168
+ "xmlroot",
169
+ "xmlserialize",
170
+ "xmltable",
171
+ ]);
172
+ function isPostgresKeywordRequiringQuote(identifier) {
173
+ return postgresKeywordsRequiringQuote.has(identifier.toLowerCase());
174
+ }
175
+ //# sourceMappingURL=is-postgres-keyword-requiring-quote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-postgres-keyword-requiring-quote.js","sourceRoot":"","sources":["../../src/utils/is-postgres-keyword-requiring-quote.ts"],"names":[],"mappings":";;AAyKA,0EAEC;AA3KD,4EAA4E;AAC5E,8DAA8D;AAC9D,MAAM,8BAA8B,GAAG,IAAI,GAAG,CAAC;IAC7C,KAAK;IACL,SAAS;IACT,SAAS;IACT,KAAK;IACL,KAAK;IACL,OAAO;IACP,IAAI;IACJ,KAAK;IACL,YAAY;IACZ,eAAe;IACf,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,SAAS;IACT,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,WAAW;IACX,OAAO;IACP,UAAU;IACV,SAAS;IACT,WAAW;IACX,QAAQ;IACR,cAAc;IACd,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,iBAAiB;IACjB,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,mBAAmB;IACnB,cAAc;IACd,KAAK;IACL,SAAS;IACT,SAAS;IACT,YAAY;IACZ,MAAM;IACN,UAAU;IACV,IAAI;IACJ,MAAM;IACN,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,OAAO;IACP,OAAO;IACP,OAAO;IACP,KAAK;IACL,SAAS;IACT,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IACP,UAAU;IACV,QAAQ;IACR,OAAO;IACP,IAAI;IACJ,WAAW;IACX,OAAO;IACP,OAAO;IACP,KAAK;IACL,SAAS;IACT,WAAW;IACX,UAAU;IACV,MAAM;IACN,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,YAAY;IACZ,eAAe;IACf,aAAa;IACb,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,WAAW;IACX,gBAAgB;IAChB,cAAc;IACd,UAAU;IACV,SAAS;IACT,OAAO;IACP,MAAM;IACN,WAAW;IACX,KAAK;IACL,SAAS;IACT,MAAM;IACN,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,IAAI;IACJ,OAAO;IACP,KAAK;IACL,OAAO;IACP,UAAU;IACV,SAAS;IACT,SAAS;IACT,UAAU;IACV,WAAW;IACX,SAAS;IACT,MAAM;IACN,YAAY;IACZ,WAAW;IACX,OAAO;IACP,KAAK;IACL,QAAQ;IACR,cAAc;IACd,OAAO;IACP,SAAS;IACT,UAAU;IACV,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;IACb,OAAO;IACP,aAAa;IACb,MAAM;IACN,MAAM;IACN,WAAW;IACX,IAAI;IACJ,UAAU;IACV,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,SAAS;IACT,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;IACN,eAAe;IACf,WAAW;IACX,YAAY;IACZ,WAAW;IACX,WAAW;IACX,eAAe;IACf,UAAU;IACV,OAAO;IACP,SAAS;IACT,cAAc;IACd,UAAU;CACX,CAAC,CAAC;AAEH,SAAgB,+BAA+B,CAAC,UAAkB;IAChE,OAAO,8BAA8B,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function normalizePostgresTypeAlias(postgresType: string): string;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizePostgresTypeAlias = normalizePostgresTypeAlias;
4
+ function normalizePostgresTypeAlias(postgresType) {
5
+ const normalized = postgresType.trim().toLowerCase().replace(/\s+/g, " ");
6
+ const baseType = normalized.replace(/\s*\([^)]*\)\s*$/, "");
7
+ switch (baseType) {
8
+ case "bool":
9
+ return "boolean";
10
+ case "bpchar":
11
+ case "char":
12
+ return "character";
13
+ case "decimal":
14
+ return "numeric";
15
+ case "float4":
16
+ return "real";
17
+ case "float8":
18
+ return "double precision";
19
+ case "int":
20
+ case "int4":
21
+ return "integer";
22
+ case "int2":
23
+ return "smallint";
24
+ case "int8":
25
+ return "bigint";
26
+ case "timetz":
27
+ return "time with time zone";
28
+ case "timestamptz":
29
+ return "timestamp with time zone";
30
+ case "varbit":
31
+ return "bit varying";
32
+ case "varchar":
33
+ return "character varying";
34
+ default:
35
+ return postgresType;
36
+ }
37
+ }
38
+ //# sourceMappingURL=normalize-postgres-type-alias.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-postgres-type-alias.js","sourceRoot":"","sources":["../../src/utils/normalize-postgres-type-alias.ts"],"names":[],"mappings":";;AAAA,gEAkCC;AAlCD,SAAgB,0BAA0B,CAAC,YAAoB;IAC7D,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1E,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAE5D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,MAAM;YACT,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ,CAAC;QACd,KAAK,MAAM;YACT,OAAO,WAAW,CAAC;QACrB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC;QAChB,KAAK,QAAQ;YACX,OAAO,kBAAkB,CAAC;QAC5B,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACT,OAAO,SAAS,CAAC;QACnB,KAAK,MAAM;YACT,OAAO,UAAU,CAAC;QACpB,KAAK,MAAM;YACT,OAAO,QAAQ,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,qBAAqB,CAAC;QAC/B,KAAK,aAAa;YAChB,OAAO,0BAA0B,CAAC;QACpC,KAAK,QAAQ;YACX,OAAO,aAAa,CAAC;QACvB,KAAK,SAAS;YACZ,OAAO,mBAAmB,CAAC;QAC7B;YACE,OAAO,YAAY,CAAC;IACxB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nest-boot/row-level-security",
3
- "version": "7.2.1",
3
+ "version": "7.2.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/nest-boot/nest-boot.git",
@@ -47,9 +47,9 @@
47
47
  "ts-jest": "^29.4.4",
48
48
  "typescript": "^5.9.3",
49
49
  "@nest-boot/eslint-config": "^7.0.3",
50
+ "@nest-boot/eslint-plugin": "^7.0.6",
50
51
  "@nest-boot/mikro-orm": "^7.4.0",
51
52
  "@nest-boot/request-context": "^7.4.3",
52
- "@nest-boot/eslint-plugin": "^7.0.6",
53
53
  "@nest-boot/tsconfig": "^7.0.3"
54
54
  },
55
55
  "publishConfig": {