@cedarjs/structure 1.1.1-next.21 → 1.1.1-rc.3
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/dist/model/RWEnvHelper.d.ts +2 -2
- package/dist/model/RWEnvHelper.d.ts.map +1 -1
- package/dist/model/RWEnvHelper.js +10 -11
- package/dist/model/RWProject.d.ts.map +1 -1
- package/dist/model/RWProject.js +1 -3
- package/dist/outline/outline.d.ts.map +1 -1
- package/dist/outline/outline.js +12 -14
- package/dist/outline/types.d.ts +3 -2
- package/dist/outline/types.d.ts.map +1 -1
- package/dist/outline/types.js +6 -5
- package/package.json +4 -4
|
@@ -37,8 +37,8 @@ export declare class RWEnvHelper extends BaseNode {
|
|
|
37
37
|
private _dotenv;
|
|
38
38
|
get env_available_to_api(): EnvVarMap;
|
|
39
39
|
get env_available_to_web(): EnvVarMap;
|
|
40
|
-
children():
|
|
41
|
-
process_env_expressions():
|
|
40
|
+
children(): ProcessDotEnvExpression[];
|
|
41
|
+
get process_env_expressions(): ProcessDotEnvExpression[];
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* An occurrence of process.env somewhere in the codebase
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RWEnvHelper.d.ts","sourceRoot":"","sources":["../../src/model/RWEnvHelper.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAA;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"RWEnvHelper.d.ts","sourceRoot":"","sources":["../../src/model/RWEnvHelper.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAA;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGrD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAKjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAO1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEvC,qBAAa,WAAY,SAAQ,QAAQ;IACpB,MAAM,EAAE,SAAS;gBAAjB,MAAM,EAAE,SAAS;IAIpC,IAAY,EAAE,WAGb;IAED,mBAAmB;IAMnB;;;;OAIG;IACH,IAAY,GAAG,IAAI,SAAS,GAAG,SAAS,CAEvC;IAED;;;OAGG;IACH,IAAY,YAAY,IAAI,SAAS,GAAG,SAAS,CAEhD;IAED,IAAY,cAAc,mDAEzB;IAED;;;OAGG;IACH,IAAY,kBAAkB,IAAI,SAAS,CAE1C;IAED;;;;;OAKG;IACH,OAAO,CAAC,2BAA2B;IAOnC,OAAO,CAAC,OAAO;IAQf,IAAY,oBAAoB,cAM/B;IAED,IAAY,oBAAoB,cAI/B;IAED,QAAQ;IAIR,IAAY,uBAAuB,8BAgBlC;CACF;AAED;;GAEG;AACH,cAAM,uBAAwB,SAAQ,QAAQ;IAEnC,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ;IAC9B,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,QAAQ;gBAHzB,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,EAC9B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,QAAQ;IAKlC,mBAAmB,CAAC,GAAG,EAAE,MAAM;IAO/B,IAAY,EAAE,WAIb;IAED,IAAY,IAAI,kBAEf;IAED,IAAY,QAAQ,aAEnB;IAEA,OAAO;IAQP,WAAW;IAQZ,IAAY,8BAA8B,yCAYzC;IAED,IAAY,yBAAyB,IAAI,QAAQ,GAAG,SAAS,CAa5D;IAED,IAAY,kBAAkB,WAM7B;IAED,OAAO,CAAE,MAAM;CA+FhB"}
|
|
@@ -20,7 +20,6 @@ var dotenv = _interopRequireWildcard(require("dotenv-defaults"));
|
|
|
20
20
|
var _fsExtra = require("fs-extra");
|
|
21
21
|
var _lodash = require("lodash");
|
|
22
22
|
var _vscodeLanguageserver = require("vscode-languageserver");
|
|
23
|
-
var _projectConfig = require("@cedarjs/project-config");
|
|
24
23
|
var _ide = require("../ide");
|
|
25
24
|
var _decorators = require("../x/decorators");
|
|
26
25
|
var _prisma = require("../x/prisma");
|
|
@@ -28,8 +27,8 @@ var _URL = require("../x/URL");
|
|
|
28
27
|
var _vscode = require("../x/vscode");
|
|
29
28
|
var _vscodeLanguageserverTypes = require("../x/vscode-languageserver-types");
|
|
30
29
|
var _process_env = require("./util/process_env");
|
|
31
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7,
|
|
32
|
-
let RWEnvHelper = exports.RWEnvHelper = (_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)(), _class = class RWEnvHelper extends _ide.BaseNode {
|
|
30
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _dec9, _dec0, _dec1, _dec10, _dec11, _dec12, _class2;
|
|
31
|
+
let RWEnvHelper = exports.RWEnvHelper = (_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)(), _class = class RWEnvHelper extends _ide.BaseNode {
|
|
33
32
|
constructor(parent) {
|
|
34
33
|
super();
|
|
35
34
|
this.parent = parent;
|
|
@@ -104,26 +103,26 @@ let RWEnvHelper = exports.RWEnvHelper = (_dec = (0, _decorators.lazy)(), _dec2 =
|
|
|
104
103
|
get env_available_to_web() {
|
|
105
104
|
return this.env_default_merged_filtered(this.parent.redwoodTOML.web_includeEnvironmentVariables ?? []);
|
|
106
105
|
}
|
|
107
|
-
|
|
108
|
-
return [...
|
|
106
|
+
children() {
|
|
107
|
+
return [...this.process_env_expressions];
|
|
109
108
|
}
|
|
110
|
-
|
|
109
|
+
get process_env_expressions() {
|
|
111
110
|
var _context3, _context4;
|
|
111
|
+
// TODO: make this async (this is globbing around quite a bit)
|
|
112
112
|
const {
|
|
113
113
|
pathHelper
|
|
114
114
|
} = this.parent;
|
|
115
115
|
const api = (0, _map.default)(_context3 = (0, _process_env.process_env_findAll)(pathHelper.api.base)).call(_context3, x => new ProcessDotEnvExpression(this, 'api', x.key, x.node));
|
|
116
116
|
const web = (0, _map.default)(_context4 = (0, _process_env.process_env_findAll)(pathHelper.web.base)).call(_context4, x => new ProcessDotEnvExpression(this, 'web', x.key, x.node));
|
|
117
|
-
const
|
|
118
|
-
const prisma = (0, _from.default)((0, _prisma.prisma_parseEnvExpressionsInFile)(schemaPath));
|
|
117
|
+
const prisma = (0, _from.default)((0, _prisma.prisma_parseEnvExpressionsInFile)(pathHelper.api.dbSchema));
|
|
119
118
|
const pp = (0, _map.default)(prisma).call(prisma, x => new ProcessDotEnvExpression(this, 'prisma', x.key, x.location));
|
|
120
119
|
return [...api, ...web, ...pp];
|
|
121
120
|
}
|
|
122
|
-
}, (0, _applyDecoratedDescriptor2.default)(_class.prototype, "id", [_dec], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "id"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env", [_dec2], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env_defaults", [_dec3], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env_defaults"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "api_prisma_env", [_dec4], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "api_prisma_env"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env_default_merged", [_dec5], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env_default_merged"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env_available_to_api", [_dec6], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env_available_to_api"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env_available_to_web", [_dec7], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env_available_to_web"), _class.prototype), _class);
|
|
121
|
+
}, (0, _applyDecoratedDescriptor2.default)(_class.prototype, "id", [_dec], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "id"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env", [_dec2], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env_defaults", [_dec3], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env_defaults"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "api_prisma_env", [_dec4], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "api_prisma_env"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env_default_merged", [_dec5], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env_default_merged"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env_available_to_api", [_dec6], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env_available_to_api"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "env_available_to_web", [_dec7], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "env_available_to_web"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "process_env_expressions", [_dec8], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "process_env_expressions"), _class.prototype), _class);
|
|
123
122
|
/**
|
|
124
123
|
* An occurrence of process.env somewhere in the codebase
|
|
125
124
|
*/
|
|
126
|
-
let ProcessDotEnvExpression = (
|
|
125
|
+
let ProcessDotEnvExpression = (_dec9 = (0, _decorators.lazy)(), _dec0 = (0, _decorators.lazy)(), _dec1 = (0, _decorators.lazy)(), _dec10 = (0, _decorators.lazy)(), _dec11 = (0, _decorators.lazy)(), _dec12 = (0, _decorators.lazy)(), _class2 = class ProcessDotEnvExpression extends _ide.BaseNode {
|
|
127
126
|
constructor(parent, kind, key, node) {
|
|
128
127
|
super();
|
|
129
128
|
this.parent = parent;
|
|
@@ -293,4 +292,4 @@ ${snippet}
|
|
|
293
292
|
}
|
|
294
293
|
}
|
|
295
294
|
}
|
|
296
|
-
}, (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "id", [
|
|
295
|
+
}, (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "id", [_dec9], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "id"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "side", [_dec0], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "side"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "location", [_dec1], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "location"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_definition_file_basename", [_dec10], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_definition_file_basename"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_definition_location", [_dec11], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_definition_location"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_as_available", [_dec12], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_as_available"), _class2.prototype), _class2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RWProject.d.ts","sourceRoot":"","sources":["../../src/model/RWProject.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"RWProject.d.ts","sourceRoot":"","sources":["../../src/model/RWProject.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAKpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AASjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,IAAI,CAAA;CACX;AAID;;;GAGG;AACH,qBAAa,SAAU,SAAQ,QAAQ;IAClB,IAAI,EAAE,gBAAgB;gBAAtB,IAAI,EAAE,gBAAgB;IAGzC,MAAM,YAAY;IAElB,IAAI,IAAI,SAEP;IAED,IAAI,WAAW,WAEd;IAED,IAAY,EAAE,WAEb;IAED,QAAQ;IAaR;;OAEG;IACH,IAAY,UAAU,4CAErB;IACD;;OAEG;IACH,IAAY,mBAAmB,IAAI,OAAO,CAKzC;IAEa,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAShD,oBAAoB;IAOlC,IAAY,WAAW,IAAI,MAAM,CAEhC;IACO,OAAO,KAAK,eAAe,GAMlC;IACD,IAAY,KAAK,IAAI,MAAM,EAAE,CAI5B;IACD,IAAY,MAAM,aAEjB;IACD,SAAS,iBAER;IAGD,gBAAgB,CAAC,IAAI,EAAE,MAAM;IAO7B,IAAY,2BAA2B,WAGtC;IAED,IAAY,QAAQ,gBAOnB;IAED,IAAY,IAAI,YAIf;IAED,IAAY,OAAO,IAAI,QAAQ,EAAE,CAOhC;IAED,IAAY,SAAS,IAAI,UAAU,EAAE,CAKpC;IAED,IAAY,UAAU,IAAI,WAAW,EAAE,CAYtC;IAED,IAAY,KAAK,aAEhB;IAGD,IAAY,KAAK,aAEhB;IAED;;;QAGI;IACJ,IAAY,KAAK,IAAI,MAAM,EAAE,CAK5B;IAED,IAAY,SAAS,IAAI,WAAW,CAEnC;CACF"}
|
package/dist/model/RWProject.js
CHANGED
|
@@ -71,9 +71,7 @@ let RWProject = exports.RWProject = (_dec = (0, _decorators.lazy)(), _dec2 = (0,
|
|
|
71
71
|
// TODO: do we move this to a separate node? (ex: RWDatabase)
|
|
72
72
|
async prismaDMMF() {
|
|
73
73
|
try {
|
|
74
|
-
const
|
|
75
|
-
const result = await (0, _internals.getSchemaWithPath)(schemaPath);
|
|
76
|
-
const datamodel = result.schemas;
|
|
74
|
+
const datamodel = await (0, _internals.getSchema)(this.pathHelper.api.dbSchema);
|
|
77
75
|
// consider case where dmmf doesn't exist (or fails to parse)
|
|
78
76
|
return await (0, _internals.getDMMF)({
|
|
79
77
|
datamodel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../src/outline/outline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../src/outline/outline.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAIzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,wBAAgB,UAAU,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CA0DxD"}
|
package/dist/outline/outline.js
CHANGED
|
@@ -7,18 +7,17 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.getOutline = getOutline;
|
|
9
9
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/map"));
|
|
10
|
-
var _projectConfig = require("@cedarjs/project-config");
|
|
11
10
|
var _URL = require("../x/URL");
|
|
12
11
|
var _vscode = require("../x/vscode");
|
|
13
12
|
function getOutline(project) {
|
|
14
13
|
return {
|
|
15
|
-
children:
|
|
14
|
+
children: () => [_router(project), _pages(project), _components(project), _layouts(project), _cells(project), _services(project), _functions(project), _schema(project), {
|
|
16
15
|
label: 'redwood.toml',
|
|
17
16
|
iconPath: 'x-redwood',
|
|
18
17
|
...resourceUriAndCommandFor((0, _URL.URL_file)(project.pathHelper.base, 'redwood.toml')),
|
|
19
18
|
menu: {
|
|
20
19
|
kind: 'withDoc',
|
|
21
|
-
doc: (0, _vscode.Command_open)('https://
|
|
20
|
+
doc: (0, _vscode.Command_open)('https://redwoodjs.com/docs/app-configuration-redwood-toml')
|
|
22
21
|
}
|
|
23
22
|
}, {
|
|
24
23
|
label: 'open graphql playground',
|
|
@@ -34,11 +33,11 @@ function getOutline(project) {
|
|
|
34
33
|
iconPath: 'x-storybook',
|
|
35
34
|
menu: {
|
|
36
35
|
kind: 'withDoc',
|
|
37
|
-
doc: (0, _vscode.Command_open)('https://
|
|
36
|
+
doc: (0, _vscode.Command_open)('https://redwoodjs.com/how-to/mocking-graph-ql-in-storybook')
|
|
38
37
|
}
|
|
39
38
|
}, _rwcli_command_group({
|
|
40
39
|
cmd: 'generate ...',
|
|
41
|
-
tooltip: 'start interactive
|
|
40
|
+
tooltip: 'start interactive redwood generator'
|
|
42
41
|
}, {
|
|
43
42
|
cmd: 'dev',
|
|
44
43
|
tooltip: 'start development server and open browser'
|
|
@@ -60,7 +59,7 @@ function _router(project) {
|
|
|
60
59
|
menu: {
|
|
61
60
|
kind: 'group',
|
|
62
61
|
add: (0, _vscode.Command_cli)('rw generate page ...'),
|
|
63
|
-
doc: (0, _vscode.Command_open)('https://
|
|
62
|
+
doc: (0, _vscode.Command_open)('https://redwoodjs.com/docs/redwood-router')
|
|
64
63
|
}
|
|
65
64
|
};
|
|
66
65
|
}
|
|
@@ -89,7 +88,7 @@ function _pages(project) {
|
|
|
89
88
|
menu: {
|
|
90
89
|
kind: 'group',
|
|
91
90
|
add: (0, _vscode.Command_cli)('rw generate page ...'),
|
|
92
|
-
doc: (0, _vscode.Command_open)('https://
|
|
91
|
+
doc: (0, _vscode.Command_open)('https://redwoodjs.com/docs/tutorial/chapter1/first-page')
|
|
93
92
|
}
|
|
94
93
|
};
|
|
95
94
|
}
|
|
@@ -125,7 +124,7 @@ function _layouts(project) {
|
|
|
125
124
|
menu: {
|
|
126
125
|
kind: 'group',
|
|
127
126
|
add: (0, _vscode.Command_cli)('rw generate layout ...'),
|
|
128
|
-
doc: (0, _vscode.Command_open)('https://
|
|
127
|
+
doc: (0, _vscode.Command_open)('https://redwoodjs.com/docs/tutorial/chapter1/layouts')
|
|
129
128
|
}
|
|
130
129
|
};
|
|
131
130
|
}
|
|
@@ -137,7 +136,7 @@ function _cells(project) {
|
|
|
137
136
|
menu: {
|
|
138
137
|
kind: 'group',
|
|
139
138
|
add: (0, _vscode.Command_cli)('rw generate cell ...'),
|
|
140
|
-
doc: (0, _vscode.Command_open)('https://
|
|
139
|
+
doc: (0, _vscode.Command_open)('https://redwoodjs.com/docs/tutorial/chapter2/cells')
|
|
141
140
|
}
|
|
142
141
|
};
|
|
143
142
|
}
|
|
@@ -163,12 +162,11 @@ function _functions(project) {
|
|
|
163
162
|
menu: {
|
|
164
163
|
kind: 'group',
|
|
165
164
|
add: (0, _vscode.Command_cli)('rw generate function ...'),
|
|
166
|
-
doc: (0, _vscode.Command_open)('https://
|
|
165
|
+
doc: (0, _vscode.Command_open)('https://redwoodjs.com/docs/serverless-functions')
|
|
167
166
|
}
|
|
168
167
|
};
|
|
169
168
|
}
|
|
170
|
-
|
|
171
|
-
const schemaPath = await (0, _projectConfig.getSchemaPath)(project.pathHelper.api.prismaConfig);
|
|
169
|
+
function _schema(project) {
|
|
172
170
|
return {
|
|
173
171
|
label: 'schema.prisma',
|
|
174
172
|
iconPath: 'x-prisma',
|
|
@@ -176,7 +174,7 @@ async function _schema(project) {
|
|
|
176
174
|
kind: 'withDoc',
|
|
177
175
|
doc: (0, _vscode.Command_open)('https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-schema')
|
|
178
176
|
},
|
|
179
|
-
...resourceUriAndCommandFor(
|
|
177
|
+
...resourceUriAndCommandFor(project.pathHelper.api.dbSchema),
|
|
180
178
|
async children() {
|
|
181
179
|
var _context3;
|
|
182
180
|
const dmmf = await project.prismaDMMF();
|
|
@@ -221,7 +219,7 @@ function _rwcli_command_group(...opts) {
|
|
|
221
219
|
return {
|
|
222
220
|
label: 'rw cli',
|
|
223
221
|
key: 'rw-cli-commands',
|
|
224
|
-
tooltip: '
|
|
222
|
+
tooltip: 'Redwood.js CLI commands',
|
|
225
223
|
iconPath: 'terminal',
|
|
226
224
|
children: () => (0, _map.default)(opts).call(opts, _rwcli_command),
|
|
227
225
|
menu: {
|
package/dist/outline/types.d.ts
CHANGED
|
@@ -79,8 +79,9 @@ export type OutlineItemJSON = Omit<OutlineItem, 'children'> & {
|
|
|
79
79
|
children?: OutlineItemJSON[];
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
82
|
-
* this will recursively await all children and return a serializable
|
|
83
|
-
*
|
|
82
|
+
* this will recursively await all children and return a serializable representation
|
|
83
|
+
* of the complete outline
|
|
84
|
+
* @param item
|
|
84
85
|
*/
|
|
85
86
|
export declare function outlineToJSON(item: OutlineItem): Promise<OutlineItemJSON>;
|
|
86
87
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/outline/types.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI;IACd,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,QAAQ,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;IAEnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB;;OAEG;IACH,GAAG,CAAC,EAAE,iBAAiB,CAAA;IACvB,GAAG,CAAC,EAAE,iBAAiB,CAAA;IAEvB,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,KAAK,iBAAiB,GAAG,MAAM,CAAA;AAE/B,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG;IAC5D,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/outline/types.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI;IACd,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,QAAQ,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;IAEnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB;;OAEG;IACH,GAAG,CAAC,EAAE,iBAAiB,CAAA;IACvB,GAAG,CAAC,EAAE,iBAAiB,CAAA;IAEvB,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,KAAK,iBAAiB,GAAG,MAAM,CAAA;AAE/B,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG;IAC5D,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B,CAAA;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC,eAAe,CAAC,CAO1B"}
|
package/dist/outline/types.js
CHANGED
|
@@ -53,8 +53,9 @@ let Icon = exports.Icon = /*#__PURE__*/function (Icon) {
|
|
|
53
53
|
* - see: https://github.com/cedarjs/cedar/tree/main/packages/structure/src/interactive_cli
|
|
54
54
|
*/
|
|
55
55
|
/**
|
|
56
|
-
* this will recursively await all children and return a serializable
|
|
57
|
-
*
|
|
56
|
+
* this will recursively await all children and return a serializable representation
|
|
57
|
+
* of the complete outline
|
|
58
|
+
* @param item
|
|
58
59
|
*/
|
|
59
60
|
async function outlineToJSON(item) {
|
|
60
61
|
if (!item.children) {
|
|
@@ -63,10 +64,10 @@ async function outlineToJSON(item) {
|
|
|
63
64
|
children: undefined
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
|
-
const
|
|
67
|
-
const
|
|
67
|
+
const cs = item.children ? await item.children() : [];
|
|
68
|
+
const css = await _promise.default.all((0, _map.default)(cs).call(cs, outlineToJSON));
|
|
68
69
|
return {
|
|
69
70
|
...item,
|
|
70
|
-
children:
|
|
71
|
+
children: css
|
|
71
72
|
};
|
|
72
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/structure",
|
|
3
|
-
"version": "1.1.1-
|
|
3
|
+
"version": "1.1.1-rc.3",
|
|
4
4
|
"description": "noun: the arrangement of and relations between the parts or elements of something complex",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/runtime-corejs3": "7.27.6",
|
|
29
|
-
"@cedarjs/project-config": "1.1.1-
|
|
30
|
-
"@prisma/internals": "
|
|
29
|
+
"@cedarjs/project-config": "1.1.1-rc.3",
|
|
30
|
+
"@prisma/internals": "5.20.0",
|
|
31
31
|
"@types/line-column": "1.0.2",
|
|
32
32
|
"camelcase": "6.3.0",
|
|
33
33
|
"core-js": "3.42.0",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "1332c50070b0ab7f2cfc0d7bc802c60cd8a664a9"
|
|
67
67
|
}
|