5htp 0.4.6 → 0.5.9-4

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.
Files changed (41) hide show
  1. package/{src/app → app}/config.ts +7 -7
  2. package/app/index.ts +190 -0
  3. package/{src/commands → commands}/dev.ts +2 -2
  4. package/{src/commands → commands}/init.ts +1 -1
  5. package/{src/compiler → compiler}/client/identite.ts +1 -1
  6. package/{src/compiler → compiler}/client/index.ts +6 -6
  7. package/{src/compiler → compiler}/common/babel/index.ts +20 -2
  8. package/{src/compiler → compiler}/common/babel/plugins/injection-dependances/index.ts +5 -3
  9. package/{src/compiler → compiler}/common/babel/plugins/queries/index.ts +1 -1
  10. package/compiler/common/babel/plugins/services.ts +245 -0
  11. package/{src/compiler → compiler}/common/babel/routes/imports.ts +3 -3
  12. package/{src/compiler → compiler}/common/babel/routes/routes.ts +218 -70
  13. package/{src/compiler → compiler}/common/files/style.ts +3 -3
  14. package/{src/compiler → compiler}/common/plugins/indexage/icones-svg/index.ts +2 -2
  15. package/{src/compiler → compiler}/index.ts +179 -48
  16. package/{src/compiler → compiler}/server/index.ts +18 -11
  17. package/package.json +7 -5
  18. package/{src/paths.ts → paths.ts} +3 -4
  19. package/tsconfig.json +3 -2
  20. package/src/app/index.ts +0 -111
  21. package/src/compiler/common/babel/plugins/services.ts +0 -209
  22. /package/{src/commands → commands}/build.ts +0 -0
  23. /package/{src/commands → commands}/deploy/app.ts +0 -0
  24. /package/{src/commands → commands}/deploy/web.ts +0 -0
  25. /package/{src/compiler → compiler}/common/babel/plugins/form.ts +0 -0
  26. /package/{src/compiler → compiler}/common/babel/plugins/icones-svg.ts +0 -0
  27. /package/{src/compiler → compiler}/common/babel/plugins/index.ts +0 -0
  28. /package/{src/compiler → compiler}/common/babel/plugins/injection-dependances/remplacerFonction.ts +0 -0
  29. /package/{src/compiler → compiler}/common/files/autres.ts +0 -0
  30. /package/{src/compiler → compiler}/common/files/images.ts +0 -0
  31. /package/{src/compiler → compiler}/common/index.ts +0 -0
  32. /package/{src/compiler → compiler}/common/plugins/indexage/_utils/Stringify.ts +0 -0
  33. /package/{src/compiler → compiler}/common/plugins/indexage/_utils/annotations.ts +0 -0
  34. /package/{src/compiler → compiler}/common/plugins/indexage/_utils/iterateur.ts +0 -0
  35. /package/{src/compiler → compiler}/common/plugins/indexage/index.ts +0 -0
  36. /package/{src/compiler → compiler}/common/plugins/indexage/indexeur.ts +0 -0
  37. /package/{src/compiler → compiler}/common/plugins/indexage/injection-dependances/index.ts +0 -0
  38. /package/{src/index.ts → index.ts} +0 -0
  39. /package/{src/print.ts → print.ts} +0 -0
  40. /package/{src/utils → utils}/index.ts +0 -0
  41. /package/{src/utils → utils}/keyboard.ts +0 -0
@@ -15,7 +15,7 @@ import fs from 'fs-extra';
15
15
  import yaml from 'yaml';
16
16
 
17
17
  // Types
18
- import type { TEnvConfig } from '../../../core/src/server/app/container/config';
18
+ import type { TEnvConfig } from '../../core/server/app/container/config';
19
19
 
20
20
  /*----------------------------------
21
21
  - LOADE
@@ -38,12 +38,12 @@ export default class ConfigParser {
38
38
  public env(): TEnvConfig {
39
39
  // We assume that when we run 5htp dev, we're in local
40
40
  // Otherwise, we're in production environment (docker)
41
- return process.env.NODE_ENV === 'development' ? {
42
- name: 'local',
43
- profile: 'dev',
44
- } : {
45
- name: 'server',
46
- profile: 'prod',
41
+ console.log("[app] Using environment:", process.env.NODE_ENV);
42
+ const envFileName = this.appDir + '/env.yaml';
43
+ const envFile = this.loadYaml( envFileName );
44
+ return {
45
+ ...envFile,
46
+ version: 'CLI'
47
47
  }
48
48
  }
49
49
 
package/app/index.ts ADDED
@@ -0,0 +1,190 @@
1
+ /*----------------------------------
2
+ - DEPENDANCES
3
+ ----------------------------------*/
4
+
5
+ // npm
6
+ import path from 'path';
7
+ import TsAlias from 'ts-alias';
8
+ import fs from 'fs-extra';
9
+
10
+ // Cre
11
+ import cli from '..';
12
+
13
+ // Specific
14
+ import ConfigParser from './config';
15
+ import type { TEnvConfig } from '../../core/server/app/container/config';
16
+
17
+ /*----------------------------------
18
+ - TYPES
19
+ ----------------------------------*/
20
+
21
+ export type TAppSide = 'server' | 'client'
22
+
23
+ type TServiceSetup = {
24
+ id: string,
25
+ name: string,
26
+ config: {},
27
+ subservices: TServiceSubservices,
28
+ type: 'service.setup'
29
+ }
30
+
31
+ type TServiceRef = {
32
+ refTo: string,
33
+ type: 'service.ref'
34
+ }
35
+
36
+ type TServiceSubservices = {
37
+ [key: string]: TServiceSetup | TServiceRef
38
+ }
39
+
40
+ /*----------------------------------
41
+ - SERVICE
42
+ ----------------------------------*/
43
+ export class App {
44
+
45
+ // config
46
+ // WARNING: High level config files (env and services) shouldn't be loaded from the CLI
47
+ // The CLI will be run on CircleCI, and no env file should be sent to this service
48
+ public identity: Config.Identity;
49
+
50
+ public env: TEnvConfig;
51
+
52
+ public packageJson: {[key: string]: any};
53
+
54
+ public paths = {
55
+
56
+ root: cli.paths.appRoot,
57
+ bin: path.join( cli.paths.appRoot, 'bin'),
58
+ data: path.join( cli.paths.appRoot, 'var', 'data'),
59
+ public: path.join( cli.paths.appRoot, 'public'),
60
+ pages: path.join( cli.paths.appRoot, 'client', 'pages'),
61
+ cache: path.join( cli.paths.appRoot, '.cache'),
62
+
63
+ client: {
64
+ generated: path.join( cli.paths.appRoot, 'client', '.generated')
65
+ },
66
+ server: {
67
+ generated: path.join( cli.paths.appRoot, 'server', '.generated'),
68
+ configs: path.join( cli.paths.appRoot, 'server', 'app')
69
+ },
70
+
71
+ withAlias: (filename: string, side: TAppSide) =>
72
+ this.aliases[side].apply(filename),
73
+
74
+ withoutAlias: (filename: string, side: TAppSide) =>
75
+ this.aliases[side].realpath(filename),
76
+ }
77
+
78
+ public containerServices = [
79
+ //'Services',
80
+ 'Environment',
81
+ 'Identity',
82
+ /*'Application',
83
+ 'Path',
84
+ 'Event'*/
85
+ ]
86
+
87
+ public constructor() {
88
+
89
+ cli.debug && console.log(`[cli] Loading app config ...`);
90
+ const configParser = new ConfigParser( cli.paths.appRoot );
91
+ this.identity = configParser.identity();
92
+ this.env = configParser.env();
93
+ this.packageJson = this.loadPkg();
94
+
95
+ }
96
+
97
+ /*----------------------------------
98
+ - ALIAS
99
+ ----------------------------------*/
100
+
101
+ public aliases = {
102
+ client: new TsAlias({
103
+ rootDir: this.paths.root + '/client',
104
+ modulesDir: [
105
+ cli.paths.appRoot + '/node_modules',
106
+ cli.paths.coreRoot + '/node_modules'
107
+ ],
108
+ debug: false
109
+ }),
110
+ server: new TsAlias({
111
+ rootDir: this.paths.root + '/server',
112
+ modulesDir: [
113
+ cli.paths.appRoot + '/node_modules',
114
+ cli.paths.coreRoot + '/node_modules'
115
+ ],
116
+ debug: false
117
+ }),
118
+ }
119
+
120
+ private loadPkg() {
121
+ return fs.readJSONSync(this.paths.root + '/package.json');
122
+ }
123
+
124
+ /*----------------------------------
125
+ - WARMUP (Services awareness)
126
+ ----------------------------------*/
127
+
128
+ public registered = {}
129
+
130
+ public use( referenceName: string ): TServiceRef {
131
+
132
+ // We don't check because all service are not regstered when we register subservices
133
+ /*if (this.registered[referenceName] === undefined) {
134
+ throw new Error(`Service ${referenceName} is not registered`);
135
+ }*/
136
+
137
+ return {
138
+ refTo: referenceName,
139
+ type: 'service.ref'
140
+ }
141
+ }
142
+
143
+ public setup(...args: [
144
+ // { user: app.setup('Core/User') }
145
+ servicePath: string,
146
+ serviceConfig?: {},
147
+ ] | [
148
+ // app.setup('User', 'Core/User')
149
+ serviceName: string,
150
+ servicePath: string,
151
+ serviceConfig?: {},
152
+ ]): TServiceSetup {
153
+
154
+ // Registration to app root
155
+ if (typeof args[1] === 'string') {
156
+
157
+ const [name, id, config] = args;
158
+
159
+ const service = { id, name, config, type: 'service.setup' } as TServiceSetup
160
+
161
+ this.registered[name] = service;
162
+
163
+ return service;
164
+
165
+ // Scoped to a parent service
166
+ } else {
167
+
168
+ const [id, config] = args;
169
+
170
+ const service = { id, config, type: 'service.setup' } as TServiceSetup
171
+
172
+ return service;
173
+ }
174
+ }
175
+
176
+ public async warmup() {
177
+
178
+ // Require all config files in @/server/config
179
+ const configDir = path.resolve(cli.paths.appRoot, 'server', 'config');
180
+ const configFiles = fs.readdirSync(configDir);
181
+ for (const configFile of configFiles) {
182
+ console.log("Loading config file:", configFile);
183
+ require( path.resolve(configDir, configFile) );
184
+ }
185
+ }
186
+ }
187
+
188
+ export const app = new App
189
+
190
+ export default app
@@ -7,7 +7,7 @@ import fs from 'fs-extra';
7
7
  import { spawn, ChildProcess } from 'child_process';
8
8
 
9
9
  // Cor elibs
10
- import cli from '../';
10
+ import cli from '..';
11
11
  import Keyboard from '../utils/keyboard';
12
12
 
13
13
  // Configs
@@ -51,7 +51,7 @@ export const run = () => new Promise<void>(async () => {
51
51
  // Ignore updated from:
52
52
  // - Node modules except 5HTP core (framework dev mode)
53
53
  // - Generated files during runtime (cause infinite loop. Ex: models.d.ts)
54
- ignored: /(node_modules\/(?!5htp\-core\/src\/))|(\.generated\/)/
54
+ ignored: /(node_modules\/(?!5htp\-core\/))|(\.generated\/)/
55
55
 
56
56
  //aggregateTimeout: 1000,
57
57
  }, async (error, stats) => {
@@ -10,7 +10,7 @@ import cmd from 'node-cmd';
10
10
  import replaceOnce from 'replace-once';
11
11
 
12
12
  // Cor elibs
13
- import cli from '../';
13
+ import cli from '..';
14
14
 
15
15
  // Configs
16
16
  const filesToConfig = [
@@ -19,7 +19,7 @@ export default async ( app: App ) => {
19
19
 
20
20
  const identity = app.identity;
21
21
 
22
- const response = await favicons( app.paths.root + '/src/client/assets/identity/logo.svg', {
22
+ const response = await favicons( app.paths.root + '/client/assets/identity/logo.svg', {
23
23
 
24
24
  path: '/assets/img/identite/favicons/',
25
25
  appName: identity.name,
@@ -75,7 +75,7 @@ export default function createCompiler( app: App, mode: TCompileMode ): webpack.
75
75
  // https://github.com/webpack-contrib/webpack-hot-middleware#config
76
76
  cli.paths.core.root + '/node_modules' + '/webpack-hot-middleware/client?name=client&reload=true',
77
77
  ] : []),*/
78
- cli.paths.core.root + '/src/client/index.ts'
78
+ cli.paths.core.root + '/client/index.ts'
79
79
  ]
80
80
  },
81
81
 
@@ -110,13 +110,13 @@ export default function createCompiler( app: App, mode: TCompileMode ): webpack.
110
110
  test: regex.scripts,
111
111
  include: [
112
112
 
113
- app.paths.root + '/src/client',
114
- cli.paths.core.root + '/src/client',
113
+ app.paths.root + '/client',
114
+ cli.paths.core.root + '/client',
115
115
 
116
- app.paths.root + '/src/common',
117
- cli.paths.core.root + '/src/common',
116
+ app.paths.root + '/common',
117
+ cli.paths.core.root + '/common',
118
118
 
119
- app.paths.root + '/src/server/.generated/models.ts',
119
+ app.paths.root + '/server/.generated/models.ts',
120
120
 
121
121
  ],
122
122
  rules: require('../common/babel')(app, 'client', dev)
@@ -42,7 +42,25 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
42
42
  }
43
43
 
44
44
  return [{
45
- loader: 'babel-loader',
45
+ loader: require.resolve('babel-loader'),
46
+ exclude: (filePath) => {
47
+ // 1) If not in "node_modules" at all => transpile it
48
+ if (!filePath.includes('node_modules')) {
49
+ return false;
50
+ }
51
+
52
+ // 2) If it’s "node_modules/5htp-core" but NOT "node_modules/5htp-core/node_modules",
53
+ // then transpile. Otherwise, exclude.
54
+ if (
55
+ filePath.includes('node_modules/5htp-core') &&
56
+ !filePath.includes('node_modules/5htp-core/node_modules')
57
+ ) {
58
+ return false;
59
+ }
60
+
61
+ // 3) Everything else in node_modules is excluded
62
+ return true;
63
+ },
46
64
  options: {
47
65
 
48
66
  // https://github.com/babel/babel-loader#options
@@ -83,7 +101,7 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
83
101
  // NOTE: On résoud les plugins et presets directement ici
84
102
  // Autrement, babel-loader les cherchera dans projet/node_modules
85
103
 
86
- //[require("@babel/plugin-proposal-decorators"), { "legacy": true }],
104
+ [require("@babel/plugin-proposal-decorators"), { "legacy": true }],
87
105
 
88
106
  [require('@babel/plugin-proposal-class-properties'), { "loose": true }],
89
107
 
@@ -12,9 +12,9 @@ import cli from '@cli';
12
12
  /*----------------------------------
13
13
  - WEBPACK RULE
14
14
  ----------------------------------*/
15
- const globServices = app.paths.root + '/src/server/services/**/*.ts';
15
+ const globServices = app.paths.root + '/server/services/**/*.ts';
16
16
  const globModuleService = '@app/server/services/**';
17
- const globRoutes = app.paths.root + '/src/server/routes/**/*.ts';
17
+ const globRoutes = app.paths.root + '/server/routes/**/*.ts';
18
18
 
19
19
  module.exports = {
20
20
  test: [globRoutes, globServices],
@@ -23,6 +23,8 @@ module.exports = {
23
23
  ]
24
24
  }
25
25
 
26
+ const routerMethods = ['get', 'post', 'put', 'delete', 'patch'];
27
+
26
28
  /*----------------------------------
27
29
  - PLUGIN
28
30
  ----------------------------------*/
@@ -133,7 +135,7 @@ function Plugin (babel) {
133
135
  &&
134
136
  i.node.callee.property.type === 'Identifier'
135
137
  &&
136
- ['get', 'post', 'put', 'delete'].includes(i.node.callee.property.name)
138
+ routerMethods.includes(i.node.callee.property.name)
137
139
  &&
138
140
  i.node.arguments.length >= 2 // url + au moins 1 middleware
139
141
  &&
@@ -48,7 +48,7 @@ function Plugin (babel) {
48
48
 
49
49
  this.fichier = filename;
50
50
 
51
- const prefixeRoot = root + '/src/'
51
+ const prefixeRoot = root;
52
52
  this.dossier = path.dirname(filename).substring(prefixeRoot.length)
53
53
  },
54
54
  visitor: {
@@ -0,0 +1,245 @@
1
+ /*----------------------------------
2
+ - DEPENDANCES
3
+ ----------------------------------*/
4
+
5
+ // Npm
6
+ import * as types from '@babel/types'
7
+ import type { PluginObj } from '@babel/core';
8
+
9
+ // Core
10
+ import cli from '@cli';
11
+ import { App, TAppSide } from '../../../../app';
12
+
13
+ /*----------------------------------
14
+ - WEBPACK RULE
15
+ ----------------------------------*/
16
+
17
+ type TOptions = {
18
+ side: TAppSide,
19
+ app: App,
20
+ debug?: boolean
21
+ }
22
+
23
+ /**
24
+ * Extended source type: now includes "models"
25
+ * so we can differentiate how we rewrite references.
26
+ */
27
+ type TImportSource = 'container' | 'application' | 'models';
28
+
29
+ module.exports = (options: TOptions) => (
30
+ [Plugin, options]
31
+ )
32
+
33
+ /*----------------------------------
34
+ - PLUGIN
35
+ ----------------------------------*/
36
+ function Plugin(babel, { app, side, debug }: TOptions) {
37
+
38
+ const t = babel.types as typeof types;
39
+
40
+ /*
41
+ Transforms:
42
+ import { MyService, Environment } from '@app';
43
+ import { MyModel } from '@models';
44
+ ...
45
+ MyService.method();
46
+ Environment.name;
47
+ MyModel.someCall();
48
+
49
+ To:
50
+ import container from '<path>/server/app/container';
51
+ ...
52
+ container.Environment.name;
53
+ this.app.MyService.method();
54
+ this.app.Models.client.MyModel.someCall();
55
+
56
+ Processed files:
57
+ @/server/config
58
+ @/server/routes
59
+ @/server/services
60
+ */
61
+
62
+ const plugin: PluginObj<{
63
+
64
+ debug: boolean,
65
+
66
+ filename: string,
67
+ processFile: boolean,
68
+
69
+ // Count how many total imports we transform
70
+ importedCount: number,
71
+
72
+ // For every local identifier, store info about how it should be rewritten
73
+ importedReferences: {
74
+ [localName: string]: {
75
+ imported: string, // The original “imported” name
76
+ bindings: any, // reference paths
77
+ source: TImportSource // container | application | models
78
+ }
79
+ }
80
+
81
+ // Tally how many references per kind
82
+ bySource: { [s in TImportSource]: number }
83
+ }> = {
84
+
85
+ pre(state) {
86
+ this.filename = state.opts.filename as string;
87
+ this.processFile = (
88
+ this.filename.startsWith(cli.paths.appRoot + '/server/config')
89
+ ||
90
+ this.filename.startsWith(cli.paths.appRoot + '/server/services')
91
+ );
92
+
93
+ this.importedReferences = {};
94
+ this.bySource = {
95
+ container: 0,
96
+ application: 0,
97
+ models: 0
98
+ };
99
+ this.importedCount = 0;
100
+ this.debug = debug || false;
101
+ },
102
+
103
+ visitor: {
104
+
105
+ /**
106
+ * Detect import statements from '@app' or '@models'
107
+ */
108
+ ImportDeclaration(path) {
109
+ if (!this.processFile) return;
110
+
111
+ const source = path.node.source.value;
112
+ if (source !== '@app' && source !== '@models') {
113
+ return;
114
+ }
115
+
116
+ // For '@app' and '@models', gather imported symbols
117
+ for (const specifier of path.node.specifiers) {
118
+ if (specifier.type !== 'ImportSpecifier') continue;
119
+ if (specifier.imported.type !== 'Identifier') continue;
120
+
121
+ this.importedCount++;
122
+
123
+ let importSource: TImportSource;
124
+ if (source === '@app') {
125
+ // Distinguish whether it's a container service or an application service
126
+ if (app.containerServices.includes(specifier.imported.name)) {
127
+ importSource = 'container';
128
+ } else {
129
+ importSource = 'application';
130
+ }
131
+ } else {
132
+ // source === '@models'
133
+ importSource = 'models';
134
+ }
135
+
136
+ this.importedReferences[specifier.local.name] = {
137
+ imported: specifier.imported.name,
138
+ bindings: path.scope.bindings[specifier.local.name].referencePaths,
139
+ source: importSource
140
+ };
141
+
142
+ this.bySource[importSource]++;
143
+ }
144
+
145
+ // Remove the original import line(s) and replace with any needed new import
146
+ // For @app imports, we might import "container" if needed
147
+ // For @models, we don’t import anything
148
+ const replaceWith: any[] = [];
149
+
150
+ // If this line had container references, add a default import for container
151
+ // Example: import container from '<root>/server/app/container'
152
+ if (source === '@app' && this.bySource.container > 0) {
153
+ replaceWith.push(
154
+ t.importDeclaration(
155
+ [t.importDefaultSpecifier(t.identifier('container'))],
156
+ t.stringLiteral(
157
+ cli.paths.core.root + '/server/app/container'
158
+ )
159
+ )
160
+ );
161
+ }
162
+
163
+ // Replace the original import statement with our new import(s) if any
164
+ // or remove it entirely if no container references exist.
165
+ path.replaceWithMultiple(replaceWith);
166
+ },
167
+
168
+ /**
169
+ * Rewrite references to the imports
170
+ */
171
+ Identifier(path) {
172
+ if (!this.processFile || this.importedCount === 0) {
173
+ return;
174
+ }
175
+
176
+ const name = path.node.name;
177
+ const ref = this.importedReferences[name];
178
+ if (!ref || !ref.bindings) {
179
+ return;
180
+ }
181
+
182
+ // Find a specific binding that hasn't been replaced yet
183
+ let foundBinding = undefined;
184
+ for (const binding of ref.bindings) {
185
+ if (!binding.replaced && path.getPathLocation() === binding.getPathLocation()) {
186
+ foundBinding = binding;
187
+ break;
188
+ }
189
+ }
190
+ if (!foundBinding) {
191
+ return;
192
+ }
193
+
194
+ // Mark as replaced to avoid loops
195
+ foundBinding.replaced = true;
196
+
197
+ // Based on the source, replace the identifier with the proper MemberExpression
198
+ if (ref.source === 'container') {
199
+ // container.[identifier]
200
+ // e.g. container.Environment
201
+ path.replaceWith(
202
+ t.memberExpression(
203
+ t.identifier('container'),
204
+ path.node
205
+ )
206
+ );
207
+ }
208
+ else if (ref.source === 'application') {
209
+ // this.app.[identifier]
210
+ // e.g. this.app.MyService
211
+ path.replaceWith(
212
+ t.memberExpression(
213
+ t.memberExpression(
214
+ t.thisExpression(),
215
+ t.identifier('app')
216
+ ),
217
+ path.node
218
+ )
219
+ );
220
+ }
221
+ else if (ref.source === 'models') {
222
+ // this.app.Models.client.[identifier]
223
+ // e.g. this.app.Models.client.MyModel
224
+ path.replaceWith(
225
+ t.memberExpression(
226
+ t.memberExpression(
227
+ t.memberExpression(
228
+ t.memberExpression(
229
+ t.thisExpression(),
230
+ t.identifier('app')
231
+ ),
232
+ t.identifier('Models')
233
+ ),
234
+ t.identifier('client')
235
+ ),
236
+ path.node
237
+ )
238
+ );
239
+ }
240
+ }
241
+ }
242
+ };
243
+
244
+ return plugin;
245
+ }
@@ -13,7 +13,7 @@ import cli from '@cli';
13
13
  import type { TAppSide, default as App } from '@cli/app';
14
14
 
15
15
  // Resources
16
- const routesToPreload = require( cli.paths.appRoot + '/src/client/pages/preload.json' );
16
+ const routesToPreload = require( cli.paths.appRoot + '/client/pages/preload.json' );
17
17
 
18
18
  /*----------------------------------
19
19
  - CONFIG
@@ -109,10 +109,10 @@ module.exports = (app: App, side: TAppSide, dev: boolean): ImportTransformer =>
109
109
  }
110
110
  }
111
111
 
112
- console.log( generate(t.variableDeclaration("const", [t.variableDeclarator(
112
+ /*console.log( generate(t.variableDeclaration("const", [t.variableDeclarator(
113
113
  t.identifier(request.imported.name),
114
114
  t.objectExpression(pageLoaders)
115
- )])).code );
115
+ )])).code );*/
116
116
 
117
117
  return [
118
118
  ...imports,