@cedarjs/structure 2.8.1-next.0 → 2.8.1-next.116
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/README.md +1 -1
- package/dist/errors.js +9 -15
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -67
- package/dist/index.js.map +1 -0
- package/dist/model/RWCell.d.ts +4 -4
- package/dist/model/RWCell.d.ts.map +1 -1
- package/dist/model/RWCell.js +111 -103
- package/dist/model/RWCell.js.map +1 -0
- package/dist/model/RWComponent.d.ts +2 -2
- package/dist/model/RWComponent.d.ts.map +1 -1
- package/dist/model/RWComponent.js +46 -41
- package/dist/model/RWComponent.js.map +1 -0
- package/dist/model/RWEnvHelper.d.ts +4 -4
- package/dist/model/RWEnvHelper.d.ts.map +1 -1
- package/dist/model/RWEnvHelper.js +212 -205
- package/dist/model/RWEnvHelper.js.map +1 -0
- package/dist/model/RWFunction.d.ts +2 -2
- package/dist/model/RWFunction.d.ts.map +1 -1
- package/dist/model/RWFunction.js +10 -15
- package/dist/model/RWFunction.js.map +1 -0
- package/dist/model/RWLayout.d.ts +2 -2
- package/dist/model/RWLayout.d.ts.map +1 -1
- package/dist/model/RWLayout.js +10 -15
- package/dist/model/RWLayout.js.map +1 -0
- package/dist/model/RWPage.d.ts +3 -3
- package/dist/model/RWPage.d.ts.map +1 -1
- package/dist/model/RWPage.js +61 -57
- package/dist/model/RWPage.js.map +1 -0
- package/dist/model/RWProject.d.ts +11 -17
- package/dist/model/RWProject.d.ts.map +1 -1
- package/dist/model/RWProject.js +218 -164
- package/dist/model/RWProject.js.map +1 -0
- package/dist/model/RWRoute.d.ts +5 -5
- package/dist/model/RWRoute.d.ts.map +1 -1
- package/dist/model/RWRoute.js +312 -262
- package/dist/model/RWRoute.js.map +1 -0
- package/dist/model/RWRouter.d.ts +4 -4
- package/dist/model/RWRouter.d.ts.map +1 -1
- package/dist/model/RWRouter.js +130 -126
- package/dist/model/RWRouter.js.map +1 -0
- package/dist/model/RWSDL.d.ts +5 -5
- package/dist/model/RWSDL.d.ts.map +1 -1
- package/dist/model/RWSDL.js +96 -84
- package/dist/model/RWSDL.js.map +1 -0
- package/dist/model/RWSDLField.d.ts +6 -6
- package/dist/model/RWSDLField.d.ts.map +1 -1
- package/dist/model/RWSDLField.js +79 -81
- package/dist/model/RWSDLField.js.map +1 -0
- package/dist/model/RWService.d.ts +4 -4
- package/dist/model/RWService.d.ts.map +1 -1
- package/dist/model/RWService.js +76 -76
- package/dist/model/RWService.js.map +1 -0
- package/dist/model/RWServiceFunction.d.ts +4 -4
- package/dist/model/RWServiceFunction.d.ts.map +1 -1
- package/dist/model/RWServiceFunction.js +95 -97
- package/dist/model/RWServiceFunction.js.map +1 -0
- package/dist/model/RWTOML.d.ts +3 -3
- package/dist/model/RWTOML.d.ts.map +1 -1
- package/dist/model/RWTOML.js +53 -55
- package/dist/model/RWTOML.js.map +1 -0
- package/dist/model/index.d.ts +2 -2
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +3 -20
- package/dist/model/index.js.map +1 -0
- package/dist/model/util/process_env.js +44 -62
- package/dist/model/util/process_env.js.map +1 -0
- package/dist/nodes.d.ts +2 -2
- package/dist/nodes.d.ts.map +1 -1
- package/dist/nodes.js +171 -164
- package/dist/nodes.js.map +1 -0
- package/dist/util.js +23 -33
- package/dist/util.js.map +1 -0
- package/dist/x/Array.js +15 -25
- package/dist/x/Array.js.map +1 -0
- package/dist/x/Location.d.ts +1 -1
- package/dist/x/Location.d.ts.map +1 -1
- package/dist/x/Location.js +11 -17
- package/dist/x/Location.js.map +1 -0
- package/dist/x/Position.js +18 -29
- package/dist/x/Position.js.map +1 -0
- package/dist/x/Range.d.ts +1 -1
- package/dist/x/Range.d.ts.map +1 -1
- package/dist/x/Range.js +17 -22
- package/dist/x/Range.js.map +1 -0
- package/dist/x/URL.js +59 -75
- package/dist/x/URL.js.map +1 -0
- package/dist/x/child_process.d.ts +1 -1
- package/dist/x/child_process.d.ts.map +1 -1
- package/dist/x/child_process.js +35 -49
- package/dist/x/child_process.js.map +1 -0
- package/dist/x/decorators.d.ts +2 -2
- package/dist/x/decorators.d.ts.map +1 -1
- package/dist/x/decorators.js +46 -26
- package/dist/x/decorators.js.map +1 -0
- package/dist/x/diagnostics.d.ts +3 -3
- package/dist/x/diagnostics.d.ts.map +1 -1
- package/dist/x/diagnostics.js +163 -259
- package/dist/x/diagnostics.js.map +1 -0
- package/dist/x/path.js +36 -55
- package/dist/x/path.js.map +1 -0
- package/dist/x/prisma.d.ts +2 -2
- package/dist/x/prisma.d.ts.map +1 -1
- package/dist/x/prisma.js +32 -55
- package/dist/x/prisma.js.map +1 -0
- package/dist/x/ts-morph.js +34 -45
- package/dist/x/ts-morph.js.map +1 -0
- package/package.json +38 -17
package/dist/model/RWRoute.js
CHANGED
|
@@ -1,290 +1,340 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _decorators = require("../x/decorators");
|
|
25
|
-
var _diagnostics = require("../x/diagnostics");
|
|
26
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec0, _dec1, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class;
|
|
27
|
-
let RWRoute = exports.RWRoute = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _decorators.lazy)(), _dec3 = (0, _decorators.lazy)(), _dec4 = (0, _decorators.lazy)(), _dec5 = (0, _decorators.lazy)(), _dec6 = (0, _decorators.lazy)(), _dec7 = (0, _decorators.lazy)(), _dec8 = (0, _decorators.lazy)(), _dec9 = (0, _decorators.lazy)(), _dec0 = (0, _decorators.lazy)(), _dec1 = (0, _decorators.lazy)(), _dec10 = (0, _decorators.lazy)(), _dec11 = (0, _decorators.lazy)(), _dec12 = (0, _decorators.lazy)(), _dec13 = (0, _decorators.lazy)(), _dec14 = (0, _decorators.lazy)(), _dec15 = (0, _decorators.lazy)(), _dec16 = (0, _decorators.lazy)(), _dec17 = (0, _decorators.lazy)(), _class = class RWRoute extends _nodes.BaseNode {
|
|
28
|
-
constructor(
|
|
29
|
-
/**
|
|
30
|
-
* the <Route> tag
|
|
31
|
-
*/
|
|
32
|
-
jsxNode, parent) {
|
|
33
|
-
super();
|
|
34
|
-
this.jsxNode = jsxNode;
|
|
35
|
-
this.parent = parent;
|
|
36
|
-
}
|
|
37
|
-
get id() {
|
|
38
|
-
// we cannot rely on the "path" attribute of the node
|
|
39
|
-
// it might not be unique (which is an error state, but valid while editing)
|
|
40
|
-
return this.parent.id + ' ' + this.jsxNode.getStart();
|
|
41
|
-
}
|
|
42
|
-
get location() {
|
|
43
|
-
return (0, _diagnostics.LocationLike_toLocation)(this.jsxNode);
|
|
44
|
-
}
|
|
45
|
-
get isPrivate() {
|
|
46
|
-
const tagText = this.jsxNode.getParentIfKind(tsm.SyntaxKind.JsxElement)?.getOpeningElement()?.getTagNameNode()?.getText();
|
|
47
|
-
return tagText === 'Private' || tagText === 'PrivateSet';
|
|
48
|
-
}
|
|
49
|
-
get unauthenticated() {
|
|
50
|
-
if (!this.isPrivate) {
|
|
51
|
-
return undefined;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import * as tsm from 'ts-morph';
|
|
8
|
+
import { RWError } from '../errors.js';
|
|
9
|
+
import { BaseNode } from '../nodes.js';
|
|
10
|
+
import { validateRoutePath } from '../util.js';
|
|
11
|
+
import { lazy } from '../x/decorators.js';
|
|
12
|
+
import { err, LocationLike_toLocation } from '../x/diagnostics.js';
|
|
13
|
+
export class RWRoute extends BaseNode {
|
|
14
|
+
jsxNode;
|
|
15
|
+
parent;
|
|
16
|
+
constructor(
|
|
17
|
+
/**
|
|
18
|
+
* the <Route> tag
|
|
19
|
+
*/
|
|
20
|
+
jsxNode, parent) {
|
|
21
|
+
super();
|
|
22
|
+
this.jsxNode = jsxNode;
|
|
23
|
+
this.parent = parent;
|
|
52
24
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
25
|
+
get id() {
|
|
26
|
+
// we cannot rely on the "path" attribute of the node
|
|
27
|
+
// it might not be unique (which is an error state, but valid while editing)
|
|
28
|
+
return this.parent.id + ' ' + this.jsxNode.getStart();
|
|
56
29
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (tsm.Node.isStringLiteral(init)) {
|
|
60
|
-
return init.getLiteralValue();
|
|
61
|
-
}
|
|
30
|
+
get location() {
|
|
31
|
+
return LocationLike_toLocation(this.jsxNode);
|
|
62
32
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
33
|
+
get isPrivate() {
|
|
34
|
+
const tagText = this.jsxNode
|
|
35
|
+
.getParentIfKind(tsm.SyntaxKind.JsxElement)
|
|
36
|
+
?.getOpeningElement()
|
|
37
|
+
?.getTagNameNode()
|
|
38
|
+
?.getText();
|
|
39
|
+
return tagText === 'Private' || tagText === 'PrivateSet';
|
|
68
40
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return undefined;
|
|
72
|
-
}
|
|
73
|
-
if (tsm.Node.isJsxAttribute(a)) {
|
|
74
|
-
const init = a.getInitializer();
|
|
75
|
-
|
|
76
|
-
// Handle string literals
|
|
77
|
-
if (tsm.Node.isStringLiteral(init)) {
|
|
78
|
-
const literalValue = init.getLiteralValue();
|
|
79
|
-
|
|
80
|
-
// Check if the string looks like an array with single quotes
|
|
81
|
-
if ((0, _startsWith.default)(literalValue).call(literalValue, '[') && (0, _endsWith.default)(literalValue).call(literalValue, ']')) {
|
|
82
|
-
try {
|
|
83
|
-
// Unescape the string by replacing single quotes with double quotes
|
|
84
|
-
const correctedLiteralValue = literalValue.replace(/'/g, '"');
|
|
85
|
-
// Attempt to parse as JSON array
|
|
86
|
-
const parsedValue = JSON.parse(correctedLiteralValue);
|
|
87
|
-
if ((0, _isArray.default)(parsedValue)) {
|
|
88
|
-
return parsedValue;
|
|
89
|
-
}
|
|
90
|
-
} catch {
|
|
91
|
-
// If parsing fails, return undefined
|
|
41
|
+
get unauthenticated() {
|
|
42
|
+
if (!this.isPrivate) {
|
|
92
43
|
return undefined;
|
|
93
|
-
}
|
|
94
44
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
// Handle JSX expressions with array literals
|
|
101
|
-
if (tsm.Node.isJsxExpression(init)) {
|
|
102
|
-
const expr = init.getExpression();
|
|
103
|
-
if (tsm.Node.isArrayLiteralExpression(expr)) {
|
|
104
|
-
var _context, _context2;
|
|
105
|
-
return (0, _filter.default)(_context = (0, _map.default)(_context2 = expr.getElements()).call(_context2, element => {
|
|
106
|
-
if (tsm.Node.isStringLiteral(element)) {
|
|
107
|
-
return element.getLiteralValue();
|
|
108
|
-
}
|
|
45
|
+
const a = this.jsxNode
|
|
46
|
+
.getParentIfKind(tsm.SyntaxKind.JsxElement)
|
|
47
|
+
?.getOpeningElement()
|
|
48
|
+
.getAttribute('unauthenticated');
|
|
49
|
+
if (!a) {
|
|
109
50
|
return undefined;
|
|
110
|
-
})).call(_context, val => val !== undefined);
|
|
111
51
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
// KLUDGE: we need a good path parsing library here
|
|
122
|
-
return (0, _includes.default)(_context3 = this.path).call(_context3, '{');
|
|
123
|
-
}
|
|
124
|
-
get hasPrerender() {
|
|
125
|
-
return this.prerender;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* The associated Redwood Page node, if any
|
|
130
|
-
*/
|
|
131
|
-
|
|
132
|
-
get page() {
|
|
133
|
-
var _context4;
|
|
134
|
-
if (!this.page_identifier_str) {
|
|
135
|
-
return undefined;
|
|
52
|
+
if (tsm.Node.isJsxAttribute(a)) {
|
|
53
|
+
const init = a.getInitializer();
|
|
54
|
+
if (tsm.Node.isStringLiteral(init)) {
|
|
55
|
+
return init.getLiteralValue();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return undefined;
|
|
136
59
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
60
|
+
get roles() {
|
|
61
|
+
if (!this.isPrivate) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
const a = this.jsxNode
|
|
65
|
+
.getParentIfKind(tsm.SyntaxKind.JsxElement)
|
|
66
|
+
?.getOpeningElement()
|
|
67
|
+
.getAttribute('roles');
|
|
68
|
+
if (!a) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
if (tsm.Node.isJsxAttribute(a)) {
|
|
72
|
+
const init = a.getInitializer();
|
|
73
|
+
// Handle string literals
|
|
74
|
+
if (tsm.Node.isStringLiteral(init)) {
|
|
75
|
+
const literalValue = init.getLiteralValue();
|
|
76
|
+
// Check if the string looks like an array with single quotes
|
|
77
|
+
if (literalValue.startsWith('[') && literalValue.endsWith(']')) {
|
|
78
|
+
try {
|
|
79
|
+
// Unescape the string by replacing single quotes with double quotes
|
|
80
|
+
const correctedLiteralValue = literalValue.replace(/'/g, '"');
|
|
81
|
+
// Attempt to parse as JSON array
|
|
82
|
+
const parsedValue = JSON.parse(correctedLiteralValue);
|
|
83
|
+
if (Array.isArray(parsedValue)) {
|
|
84
|
+
return parsedValue;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
// If parsing fails, return undefined
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// If not an array, return the string value
|
|
93
|
+
return literalValue;
|
|
94
|
+
}
|
|
95
|
+
// Handle JSX expressions with array literals
|
|
96
|
+
if (tsm.Node.isJsxExpression(init)) {
|
|
97
|
+
const expr = init.getExpression();
|
|
98
|
+
if (tsm.Node.isArrayLiteralExpression(expr)) {
|
|
99
|
+
return expr
|
|
100
|
+
.getElements()
|
|
101
|
+
.map((element) => {
|
|
102
|
+
if (tsm.Node.isStringLiteral(element)) {
|
|
103
|
+
return element.getLiteralValue();
|
|
104
|
+
}
|
|
105
|
+
return undefined;
|
|
106
|
+
})
|
|
107
|
+
.filter((val) => val !== undefined);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return undefined;
|
|
146
112
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const expr = init.getExpression();
|
|
151
|
-
if (tsm.Node.isIdentifier(expr)) {
|
|
152
|
-
return expr;
|
|
113
|
+
get hasParameters() {
|
|
114
|
+
if (!this.path) {
|
|
115
|
+
return false;
|
|
153
116
|
}
|
|
154
|
-
|
|
117
|
+
// KLUDGE: we need a good path parsing library here
|
|
118
|
+
return this.path.includes('{');
|
|
155
119
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
get page_identifier_str() {
|
|
159
|
-
return this.page_identifier?.getText();
|
|
160
|
-
}
|
|
161
|
-
get name() {
|
|
162
|
-
return this.getStringAttr('name');
|
|
163
|
-
}
|
|
164
|
-
get path_errorMessage() {
|
|
165
|
-
// TODO: path validation is not strong enough
|
|
166
|
-
if (typeof this.path === 'undefined') {
|
|
167
|
-
return undefined;
|
|
120
|
+
get hasPrerender() {
|
|
121
|
+
return this.prerender;
|
|
168
122
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
123
|
+
/**
|
|
124
|
+
* The associated Redwood Page node, if any
|
|
125
|
+
*/
|
|
126
|
+
get page() {
|
|
127
|
+
if (!this.page_identifier_str) {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
return this.parent.parent.pages.find((p) => p.constName === this.page_identifier_str);
|
|
174
131
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
132
|
+
/**
|
|
133
|
+
* <Route path="" page={THIS_IDENTIFIER}/>
|
|
134
|
+
*/
|
|
135
|
+
get page_identifier() {
|
|
136
|
+
const a = this.jsxNode.getAttribute('page');
|
|
137
|
+
if (!a) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
if (tsm.Node.isJsxAttribute(a)) {
|
|
141
|
+
const init = a.getInitializer();
|
|
142
|
+
if (tsm.Node.isJsxExpression(init)) {
|
|
143
|
+
const expr = init.getExpression();
|
|
144
|
+
if (tsm.Node.isIdentifier(expr)) {
|
|
145
|
+
return expr;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return undefined;
|
|
191
150
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
if (tsm.Node.isStringLiteral(init)) {
|
|
195
|
-
return init;
|
|
196
|
-
}
|
|
151
|
+
get page_identifier_str() {
|
|
152
|
+
return this.page_identifier?.getText();
|
|
197
153
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
get isNotFound() {
|
|
201
|
-
return typeof this.jsxNode.getAttribute('notfound') !== 'undefined';
|
|
202
|
-
}
|
|
203
|
-
get redirect() {
|
|
204
|
-
return this.getStringAttr('redirect');
|
|
205
|
-
}
|
|
206
|
-
*diagnostics() {
|
|
207
|
-
if (this.page_identifier && !this.page) {
|
|
208
|
-
// normally this would be caught by TypeScript
|
|
209
|
-
// but Redwood has some "magic" import behavior going on
|
|
210
|
-
yield (0, _diagnostics.err)(this.page_identifier, 'Page component not found');
|
|
154
|
+
get name() {
|
|
155
|
+
return this.getStringAttr('name');
|
|
211
156
|
}
|
|
212
|
-
|
|
213
|
-
|
|
157
|
+
get path_errorMessage() {
|
|
158
|
+
// TODO: path validation is not strong enough
|
|
159
|
+
if (typeof this.path === 'undefined') {
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
try {
|
|
163
|
+
validateRoutePath(this.path);
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
catch (e) {
|
|
167
|
+
return e.toString();
|
|
168
|
+
}
|
|
214
169
|
}
|
|
215
|
-
|
|
216
|
-
|
|
170
|
+
get path() {
|
|
171
|
+
return this.getStringAttr('path');
|
|
217
172
|
}
|
|
218
|
-
|
|
219
|
-
|
|
173
|
+
get prerender() {
|
|
174
|
+
return this.getBoolAttr('prerender');
|
|
220
175
|
}
|
|
221
|
-
|
|
222
|
-
|
|
176
|
+
// TODO (STREAMING) Remove this once we're sure we don't want to do Render Modes
|
|
177
|
+
get renderMode() {
|
|
178
|
+
return this.getStringAttr('renderMode') || 'stream';
|
|
223
179
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
180
|
+
get path_literal_node() {
|
|
181
|
+
const a = this.jsxNode.getAttribute('path');
|
|
182
|
+
if (!a) {
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
if (tsm.Node.isJsxAttribute(a)) {
|
|
186
|
+
const init = a.getInitializer();
|
|
187
|
+
if (tsm.Node.isStringLiteral(init)) {
|
|
188
|
+
return init;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return undefined;
|
|
228
192
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
if (route2 === this) {
|
|
232
|
-
continue;
|
|
233
|
-
}
|
|
234
|
-
if (!route2.path) {
|
|
235
|
-
continue;
|
|
236
|
-
}
|
|
237
|
-
if (removeParamNames(route2.path) === pathWithNoParamNames) {
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
193
|
+
get isNotFound() {
|
|
194
|
+
return typeof this.jsxNode.getAttribute('notfound') !== 'undefined';
|
|
240
195
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
// TODO: implement
|
|
244
|
-
// foo/{bar}/baz --> foo/{}/baz
|
|
245
|
-
return p;
|
|
196
|
+
get redirect() {
|
|
197
|
+
return this.getStringAttr('redirect');
|
|
246
198
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
199
|
+
*diagnostics() {
|
|
200
|
+
if (this.page_identifier && !this.page) {
|
|
201
|
+
// normally this would be caught by TypeScript
|
|
202
|
+
// but Redwood has some "magic" import behavior going on
|
|
203
|
+
yield err(this.page_identifier, 'Page component not found');
|
|
204
|
+
}
|
|
205
|
+
if (this.path_errorMessage && this.path_literal_node) {
|
|
206
|
+
yield err(this.path_literal_node, this.path_errorMessage, RWError.INVALID_ROUTE_PATH_SYNTAX);
|
|
207
|
+
}
|
|
208
|
+
if (this.hasPathCollision) {
|
|
209
|
+
yield err(this.path_literal_node, 'Duplicate Path');
|
|
210
|
+
}
|
|
211
|
+
if (this.isPrivate && this.isNotFound) {
|
|
212
|
+
yield err(this.jsxNode, "The 'Not Found' page cannot be within a <PrivateSet> or a <Private> tag");
|
|
213
|
+
}
|
|
214
|
+
if (this.isNotFound && this.path) {
|
|
215
|
+
yield err(this.path_literal_node, "The 'Not Found' page cannot have a path");
|
|
216
|
+
}
|
|
253
217
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
218
|
+
get hasPathCollision() {
|
|
219
|
+
if (!this.path) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
const pathWithNoParamNames = removeParamNames(this.path);
|
|
223
|
+
for (const route2 of this.parent.routes) {
|
|
224
|
+
if (route2 === this) {
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
if (!route2.path) {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
if (removeParamNames(route2.path) === pathWithNoParamNames) {
|
|
231
|
+
return true;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return false;
|
|
235
|
+
function removeParamNames(p) {
|
|
236
|
+
// TODO: implement
|
|
237
|
+
// foo/{bar}/baz --> foo/{}/baz
|
|
238
|
+
return p;
|
|
239
|
+
}
|
|
274
240
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
241
|
+
getBoolAttr(name) {
|
|
242
|
+
const attr = this.jsxNode.getAttribute(name);
|
|
243
|
+
// No attribute
|
|
244
|
+
if (!attr) {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
// Attribute exists
|
|
248
|
+
if (tsm.Node.isJsxAttribute(attr)) {
|
|
249
|
+
const init = attr.getInitializer();
|
|
250
|
+
// Bool attributes with no initializer are true
|
|
251
|
+
// e.g. <Route prerender />
|
|
252
|
+
if (!init) {
|
|
253
|
+
return true;
|
|
254
|
+
}
|
|
255
|
+
if (tsm.Node.isJsxExpression(init)) {
|
|
256
|
+
// If it is explicitly set to true
|
|
257
|
+
// e.g. <Route prerender={true} />
|
|
258
|
+
return tsm.Node.isTrueLiteral(init.getExpression());
|
|
259
|
+
}
|
|
260
|
+
else if (tsm.Node.isStringLiteral(init)) {
|
|
261
|
+
// If its using the incorrect string form, we're accepting it as true
|
|
262
|
+
// e.g. <Route prerender="true" />
|
|
263
|
+
const literalValue = init.getLiteralValue();
|
|
264
|
+
return literalValue === 'true';
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return false;
|
|
281
268
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
269
|
+
getStringAttr(name) {
|
|
270
|
+
const a = this.jsxNode.getAttribute(name);
|
|
271
|
+
if (!a) {
|
|
272
|
+
return undefined;
|
|
273
|
+
}
|
|
274
|
+
if (tsm.Node.isJsxAttribute(a)) {
|
|
275
|
+
const init = a.getInitializer();
|
|
276
|
+
if (tsm.Node.isStringLiteral(init)) {
|
|
277
|
+
return init.getLiteralValue();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return undefined;
|
|
287
281
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
282
|
+
}
|
|
283
|
+
__decorate([
|
|
284
|
+
lazy()
|
|
285
|
+
], RWRoute.prototype, "id", null);
|
|
286
|
+
__decorate([
|
|
287
|
+
lazy()
|
|
288
|
+
], RWRoute.prototype, "location", null);
|
|
289
|
+
__decorate([
|
|
290
|
+
lazy()
|
|
291
|
+
], RWRoute.prototype, "isPrivate", null);
|
|
292
|
+
__decorate([
|
|
293
|
+
lazy()
|
|
294
|
+
], RWRoute.prototype, "unauthenticated", null);
|
|
295
|
+
__decorate([
|
|
296
|
+
lazy()
|
|
297
|
+
], RWRoute.prototype, "roles", null);
|
|
298
|
+
__decorate([
|
|
299
|
+
lazy()
|
|
300
|
+
], RWRoute.prototype, "hasParameters", null);
|
|
301
|
+
__decorate([
|
|
302
|
+
lazy()
|
|
303
|
+
], RWRoute.prototype, "hasPrerender", null);
|
|
304
|
+
__decorate([
|
|
305
|
+
lazy()
|
|
306
|
+
], RWRoute.prototype, "page", null);
|
|
307
|
+
__decorate([
|
|
308
|
+
lazy()
|
|
309
|
+
], RWRoute.prototype, "page_identifier", null);
|
|
310
|
+
__decorate([
|
|
311
|
+
lazy()
|
|
312
|
+
], RWRoute.prototype, "page_identifier_str", null);
|
|
313
|
+
__decorate([
|
|
314
|
+
lazy()
|
|
315
|
+
], RWRoute.prototype, "name", null);
|
|
316
|
+
__decorate([
|
|
317
|
+
lazy()
|
|
318
|
+
], RWRoute.prototype, "path_errorMessage", null);
|
|
319
|
+
__decorate([
|
|
320
|
+
lazy()
|
|
321
|
+
], RWRoute.prototype, "path", null);
|
|
322
|
+
__decorate([
|
|
323
|
+
lazy()
|
|
324
|
+
], RWRoute.prototype, "prerender", null);
|
|
325
|
+
__decorate([
|
|
326
|
+
lazy()
|
|
327
|
+
], RWRoute.prototype, "renderMode", null);
|
|
328
|
+
__decorate([
|
|
329
|
+
lazy()
|
|
330
|
+
], RWRoute.prototype, "path_literal_node", null);
|
|
331
|
+
__decorate([
|
|
332
|
+
lazy()
|
|
333
|
+
], RWRoute.prototype, "isNotFound", null);
|
|
334
|
+
__decorate([
|
|
335
|
+
lazy()
|
|
336
|
+
], RWRoute.prototype, "redirect", null);
|
|
337
|
+
__decorate([
|
|
338
|
+
lazy()
|
|
339
|
+
], RWRoute.prototype, "hasPathCollision", null);
|
|
340
|
+
//# sourceMappingURL=RWRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RWRoute.js","sourceRoot":"","sources":["../../src/model/RWRoute.ts"],"names":[],"mappings":";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C/B,MAAM,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,CAAA;YAC/B,IAAI,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnC,OAAO,IAAI,CAAC,eAAe,EAAE,CAAA;YAC/B,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAzSS;IAAP,IAAI,EAAE;iCAIN;AAEO;IAAP,IAAI,EAAE;uCAEN;AAEO;IAAP,IAAI,EAAE;wCAON;AAEO;IAAP,IAAI,EAAE;8CAoBN;AAGD;IADC,IAAI,EAAE;oCA2DN;AAEO;IAAP,IAAI,EAAE;4CAMN;AAEO;IAAP,IAAI,EAAE;2CAEN;AAMO;IAAP,IAAI,EAAE;mCAON;AAIO;IAAP,IAAI,EAAE;8CAeN;AACO;IAAP,IAAI,EAAE;kDAEN;AACO;IAAP,IAAI,EAAE;mCAEN;AACO;IAAP,IAAI,EAAE;gDAWN;AACO;IAAP,IAAI,EAAE;mCAEN;AAEO;IAAP,IAAI,EAAE;wCAEN;AAGO;IAAP,IAAI,EAAE;yCAEN;AAEO;IAAP,IAAI,EAAE;gDAYN;AAEO;IAAP,IAAI,EAAE;yCAEN;AAEO;IAAP,IAAI,EAAE;uCAEN;AAgCO;IAAP,IAAI,EAAE;+CAsBN"}
|
package/dist/model/RWRouter.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FileNode } from '../nodes';
|
|
2
|
-
import type { ExtendedDiagnostic } from '../x/diagnostics';
|
|
3
|
-
import type { RWProject } from './RWProject';
|
|
4
|
-
import { RWRoute } from './RWRoute';
|
|
1
|
+
import { FileNode } from '../nodes.js';
|
|
2
|
+
import type { ExtendedDiagnostic } from '../x/diagnostics.js';
|
|
3
|
+
import type { RWProject } from './RWProject.js';
|
|
4
|
+
import { RWRoute } from './RWRoute.js';
|
|
5
5
|
/**
|
|
6
6
|
* one per Routes.js
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RWRouter.d.ts","sourceRoot":"","sources":["../../src/model/RWRouter.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RWRouter.d.ts","sourceRoot":"","sources":["../../src/model/RWRouter.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAK7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;GAEG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IAE3B,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,SAAS;gBADjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS;IAKlB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAK9D,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAUrE;;OAEG;IACK,OAAO,KAAK,OAAO,GAI1B;IAED;;OAEG;IACH,IAAY,MAAM,cA+CjB;IAEO,OAAO,KAAK,gBAAgB,GAEnC;IAEA,WAAW;IAiCZ,QAAQ;CAGT"}
|