@cedarjs/structure 1.1.1-next.0 → 1.1.1-next.21
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 +11 -10
- package/dist/model/RWProject.d.ts.map +1 -1
- package/dist/model/RWProject.js +3 -1
- package/dist/outline/outline.d.ts.map +1 -1
- package/dist/outline/outline.js +14 -12
- package/dist/outline/types.d.ts +2 -3
- package/dist/outline/types.d.ts.map +1 -1
- package/dist/outline/types.js +5 -6
- 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(): ProcessDotEnvExpression[]
|
|
41
|
-
|
|
40
|
+
children(): Promise<ProcessDotEnvExpression[]>;
|
|
41
|
+
process_env_expressions(): Promise<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;AAKrD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EA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IAQZ,IAAY,8BAA8B,yCAYzC;IAED,IAAY,yBAAyB,IAAI,QAAQ,GAAG,SAAS,CAa5D;IAED,IAAY,kBAAkB,WAM7B;IAED,OAAO,CAAE,MAAM;CA+FhB"}
|
|
@@ -20,6 +20,7 @@ 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");
|
|
23
24
|
var _ide = require("../ide");
|
|
24
25
|
var _decorators = require("../x/decorators");
|
|
25
26
|
var _prisma = require("../x/prisma");
|
|
@@ -27,8 +28,8 @@ var _URL = require("../x/URL");
|
|
|
27
28
|
var _vscode = require("../x/vscode");
|
|
28
29
|
var _vscodeLanguageserverTypes = require("../x/vscode-languageserver-types");
|
|
29
30
|
var _process_env = require("./util/process_env");
|
|
30
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7,
|
|
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)(),
|
|
31
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _dec8, _dec9, _dec0, _dec1, _dec10, _dec11, _class2;
|
|
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 {
|
|
32
33
|
constructor(parent) {
|
|
33
34
|
super();
|
|
34
35
|
this.parent = parent;
|
|
@@ -103,26 +104,26 @@ let RWEnvHelper = exports.RWEnvHelper = (_dec = (0, _decorators.lazy)(), _dec2 =
|
|
|
103
104
|
get env_available_to_web() {
|
|
104
105
|
return this.env_default_merged_filtered(this.parent.redwoodTOML.web_includeEnvironmentVariables ?? []);
|
|
105
106
|
}
|
|
106
|
-
children() {
|
|
107
|
-
return [...this.process_env_expressions];
|
|
107
|
+
async children() {
|
|
108
|
+
return [...(await this.process_env_expressions())];
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
+
async process_env_expressions() {
|
|
110
111
|
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
|
|
117
|
+
const schemaPath = await (0, _projectConfig.getSchemaPath)(pathHelper.api.prismaConfig);
|
|
118
|
+
const prisma = (0, _from.default)((0, _prisma.prisma_parseEnvExpressionsInFile)(schemaPath));
|
|
118
119
|
const pp = (0, _map.default)(prisma).call(prisma, x => new ProcessDotEnvExpression(this, 'prisma', x.key, x.location));
|
|
119
120
|
return [...api, ...web, ...pp];
|
|
120
121
|
}
|
|
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),
|
|
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);
|
|
122
123
|
/**
|
|
123
124
|
* An occurrence of process.env somewhere in the codebase
|
|
124
125
|
*/
|
|
125
|
-
let ProcessDotEnvExpression = (
|
|
126
|
+
let ProcessDotEnvExpression = (_dec8 = (0, _decorators.lazy)(), _dec9 = (0, _decorators.lazy)(), _dec0 = (0, _decorators.lazy)(), _dec1 = (0, _decorators.lazy)(), _dec10 = (0, _decorators.lazy)(), _dec11 = (0, _decorators.lazy)(), _class2 = class ProcessDotEnvExpression extends _ide.BaseNode {
|
|
126
127
|
constructor(parent, kind, key, node) {
|
|
127
128
|
super();
|
|
128
129
|
this.parent = parent;
|
|
@@ -292,4 +293,4 @@ ${snippet}
|
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
}
|
|
295
|
-
}, (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "id", [
|
|
296
|
+
}, (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "id", [_dec8], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "id"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "side", [_dec9], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "side"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "location", [_dec0], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "location"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_definition_file_basename", [_dec1], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_definition_file_basename"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_definition_location", [_dec10], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_definition_location"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_as_available", [_dec11], (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,EAA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AY,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,7 +71,9 @@ 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
|
|
74
|
+
const schemaPath = await (0, _projectConfig.getSchemaPath)(this.pathHelper.api.prismaConfig);
|
|
75
|
+
const result = await (0, _internals.getSchemaWithPath)(schemaPath);
|
|
76
|
+
const datamodel = result.schemas;
|
|
75
77
|
// consider case where dmmf doesn't exist (or fails to parse)
|
|
76
78
|
return await (0, _internals.getDMMF)({
|
|
77
79
|
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":"AAGA,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,17 +7,18 @@ _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");
|
|
10
11
|
var _URL = require("../x/URL");
|
|
11
12
|
var _vscode = require("../x/vscode");
|
|
12
13
|
function getOutline(project) {
|
|
13
14
|
return {
|
|
14
|
-
children: () => [_router(project), _pages(project), _components(project), _layouts(project), _cells(project), _services(project), _functions(project), _schema(project), {
|
|
15
|
+
children: async () => [_router(project), _pages(project), _components(project), _layouts(project), _cells(project), _services(project), _functions(project), await _schema(project), {
|
|
15
16
|
label: 'redwood.toml',
|
|
16
17
|
iconPath: 'x-redwood',
|
|
17
18
|
...resourceUriAndCommandFor((0, _URL.URL_file)(project.pathHelper.base, 'redwood.toml')),
|
|
18
19
|
menu: {
|
|
19
20
|
kind: 'withDoc',
|
|
20
|
-
doc: (0, _vscode.Command_open)('https://
|
|
21
|
+
doc: (0, _vscode.Command_open)('https://cedarjs.com/docs/app-configuration-redwood-toml')
|
|
21
22
|
}
|
|
22
23
|
}, {
|
|
23
24
|
label: 'open graphql playground',
|
|
@@ -33,11 +34,11 @@ function getOutline(project) {
|
|
|
33
34
|
iconPath: 'x-storybook',
|
|
34
35
|
menu: {
|
|
35
36
|
kind: 'withDoc',
|
|
36
|
-
doc: (0, _vscode.Command_open)('https://
|
|
37
|
+
doc: (0, _vscode.Command_open)('https://cedarjs.com/docs/how-to/mocking-graphql-in-storybook')
|
|
37
38
|
}
|
|
38
39
|
}, _rwcli_command_group({
|
|
39
40
|
cmd: 'generate ...',
|
|
40
|
-
tooltip: 'start interactive
|
|
41
|
+
tooltip: 'start interactive Cedar generator'
|
|
41
42
|
}, {
|
|
42
43
|
cmd: 'dev',
|
|
43
44
|
tooltip: 'start development server and open browser'
|
|
@@ -59,7 +60,7 @@ function _router(project) {
|
|
|
59
60
|
menu: {
|
|
60
61
|
kind: 'group',
|
|
61
62
|
add: (0, _vscode.Command_cli)('rw generate page ...'),
|
|
62
|
-
doc: (0, _vscode.Command_open)('https://
|
|
63
|
+
doc: (0, _vscode.Command_open)('https://cedarjs.com/docs/router')
|
|
63
64
|
}
|
|
64
65
|
};
|
|
65
66
|
}
|
|
@@ -88,7 +89,7 @@ function _pages(project) {
|
|
|
88
89
|
menu: {
|
|
89
90
|
kind: 'group',
|
|
90
91
|
add: (0, _vscode.Command_cli)('rw generate page ...'),
|
|
91
|
-
doc: (0, _vscode.Command_open)('https://
|
|
92
|
+
doc: (0, _vscode.Command_open)('https://cedarjs.com/docs/tutorial/chapter1/first-page')
|
|
92
93
|
}
|
|
93
94
|
};
|
|
94
95
|
}
|
|
@@ -124,7 +125,7 @@ function _layouts(project) {
|
|
|
124
125
|
menu: {
|
|
125
126
|
kind: 'group',
|
|
126
127
|
add: (0, _vscode.Command_cli)('rw generate layout ...'),
|
|
127
|
-
doc: (0, _vscode.Command_open)('https://
|
|
128
|
+
doc: (0, _vscode.Command_open)('https://cedarjs.com/docs/tutorial/chapter1/layouts')
|
|
128
129
|
}
|
|
129
130
|
};
|
|
130
131
|
}
|
|
@@ -136,7 +137,7 @@ function _cells(project) {
|
|
|
136
137
|
menu: {
|
|
137
138
|
kind: 'group',
|
|
138
139
|
add: (0, _vscode.Command_cli)('rw generate cell ...'),
|
|
139
|
-
doc: (0, _vscode.Command_open)('https://
|
|
140
|
+
doc: (0, _vscode.Command_open)('https://cedarjs.com/docs/tutorial/chapter2/cells')
|
|
140
141
|
}
|
|
141
142
|
};
|
|
142
143
|
}
|
|
@@ -162,11 +163,12 @@ function _functions(project) {
|
|
|
162
163
|
menu: {
|
|
163
164
|
kind: 'group',
|
|
164
165
|
add: (0, _vscode.Command_cli)('rw generate function ...'),
|
|
165
|
-
doc: (0, _vscode.Command_open)('https://
|
|
166
|
+
doc: (0, _vscode.Command_open)('https://cedarjs.com/docs/serverless-functions')
|
|
166
167
|
}
|
|
167
168
|
};
|
|
168
169
|
}
|
|
169
|
-
function _schema(project) {
|
|
170
|
+
async function _schema(project) {
|
|
171
|
+
const schemaPath = await (0, _projectConfig.getSchemaPath)(project.pathHelper.api.prismaConfig);
|
|
170
172
|
return {
|
|
171
173
|
label: 'schema.prisma',
|
|
172
174
|
iconPath: 'x-prisma',
|
|
@@ -174,7 +176,7 @@ function _schema(project) {
|
|
|
174
176
|
kind: 'withDoc',
|
|
175
177
|
doc: (0, _vscode.Command_open)('https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-schema')
|
|
176
178
|
},
|
|
177
|
-
...resourceUriAndCommandFor(
|
|
179
|
+
...resourceUriAndCommandFor(schemaPath),
|
|
178
180
|
async children() {
|
|
179
181
|
var _context3;
|
|
180
182
|
const dmmf = await project.prismaDMMF();
|
|
@@ -219,7 +221,7 @@ function _rwcli_command_group(...opts) {
|
|
|
219
221
|
return {
|
|
220
222
|
label: 'rw cli',
|
|
221
223
|
key: 'rw-cli-commands',
|
|
222
|
-
tooltip: '
|
|
224
|
+
tooltip: 'Cedar CLI commands',
|
|
223
225
|
iconPath: 'terminal',
|
|
224
226
|
children: () => (0, _map.default)(opts).call(opts, _rwcli_command),
|
|
225
227
|
menu: {
|
package/dist/outline/types.d.ts
CHANGED
|
@@ -79,9 +79,8 @@ 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
|
-
* of the complete outline
|
|
84
|
-
* @param item
|
|
82
|
+
* this will recursively await all children and return a serializable
|
|
83
|
+
* representation of the complete outline
|
|
85
84
|
*/
|
|
86
85
|
export declare function outlineToJSON(item: OutlineItem): Promise<OutlineItemJSON>;
|
|
87
86
|
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":"A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ar/tree/main/packages/structure/src/interactive_cli
|
|
54
54
|
*/
|
|
55
55
|
/**
|
|
56
|
-
* this will recursively await all children and return a serializable
|
|
57
|
-
* of the complete outline
|
|
58
|
-
* @param item
|
|
56
|
+
* this will recursively await all children and return a serializable
|
|
57
|
+
* representation of the complete outline
|
|
59
58
|
*/
|
|
60
59
|
async function outlineToJSON(item) {
|
|
61
60
|
if (!item.children) {
|
|
@@ -64,10 +63,10 @@ async function outlineToJSON(item) {
|
|
|
64
63
|
children: undefined
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
|
-
const
|
|
68
|
-
const
|
|
66
|
+
const children = item.children ? await item.children() : [];
|
|
67
|
+
const childrenOutlines = await _promise.default.all((0, _map.default)(children).call(children, outlineToJSON));
|
|
69
68
|
return {
|
|
70
69
|
...item,
|
|
71
|
-
children:
|
|
70
|
+
children: childrenOutlines
|
|
72
71
|
};
|
|
73
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/structure",
|
|
3
|
-
"version": "1.1.1-next.
|
|
3
|
+
"version": "1.1.1-next.21+77cfbaa90",
|
|
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-next.
|
|
30
|
-
"@prisma/internals": "
|
|
29
|
+
"@cedarjs/project-config": "1.1.1-next.21+77cfbaa90",
|
|
30
|
+
"@prisma/internals": "6.19.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": "77cfbaa90a726923a763fb33b836638d94b2d431"
|
|
67
67
|
}
|