@adonisjs/core 6.1.5-35 → 6.1.5-36
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.
|
@@ -12,6 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
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;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
+
import { slash } from '@poppinss/utils';
|
|
15
16
|
import string from '@poppinss/utils/string';
|
|
16
17
|
import { basename, extname, relative } from 'node:path';
|
|
17
18
|
import { stubsRoot } from '../../stubs/main.js';
|
|
@@ -56,7 +57,7 @@ export default class MakeMiddleware extends BaseCommand {
|
|
|
56
57
|
* Creative relative path for the middleware file from
|
|
57
58
|
* the "./app/middleware" directory
|
|
58
59
|
*/
|
|
59
|
-
const middlewareRelativePath = relative(this.app.middlewarePath(), destination).replace(extname(destination), '');
|
|
60
|
+
const middlewareRelativePath = slash(relative(this.app.middlewarePath(), destination).replace(extname(destination), ''));
|
|
60
61
|
/**
|
|
61
62
|
* Take the middleware relative path, remove `_middleware` prefix from it
|
|
62
63
|
* and convert everything to camelcase
|
|
@@ -12,6 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
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;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
+
import { slash } from '@poppinss/utils';
|
|
15
16
|
import { extname, relative } from 'node:path';
|
|
16
17
|
import { stubsRoot } from '../../stubs/main.js';
|
|
17
18
|
import { args, flags, BaseCommand } from '../../modules/ace/main.js';
|
|
@@ -69,7 +70,7 @@ export default class MakePreload extends BaseCommand {
|
|
|
69
70
|
* Creative relative path for the preload file from
|
|
70
71
|
* the "./start" directory
|
|
71
72
|
*/
|
|
72
|
-
const preloadFileRelativePath = relative(this.app.startPath(), destination).replace(extname(destination), '');
|
|
73
|
+
const preloadFileRelativePath = slash(relative(this.app.startPath(), destination).replace(extname(destination), ''));
|
|
73
74
|
await codemods.updateRcFile((rcFile) => {
|
|
74
75
|
rcFile.addPreloadFile(`#start/${preloadFileRelativePath}`, this.environments);
|
|
75
76
|
});
|
|
@@ -12,6 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
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;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
+
import { slash } from '@poppinss/utils';
|
|
15
16
|
import { extname, relative } from 'node:path';
|
|
16
17
|
import { stubsRoot } from '../../stubs/main.js';
|
|
17
18
|
import { args, BaseCommand, flags } from '../../modules/ace/main.js';
|
|
@@ -66,7 +67,7 @@ export default class MakeProvider extends BaseCommand {
|
|
|
66
67
|
* Creative relative path for the provider file from
|
|
67
68
|
* the "./start" directory
|
|
68
69
|
*/
|
|
69
|
-
const providerRelativePath = relative(this.app.providersPath(), destination).replace(extname(destination), '');
|
|
70
|
+
const providerRelativePath = slash(relative(this.app.providersPath(), destination).replace(extname(destination), ''));
|
|
70
71
|
await codemods.updateRcFile((rcFile) => {
|
|
71
72
|
rcFile.addProvider(`#providers/${providerRelativePath}`, this.environments);
|
|
72
73
|
});
|