esm.dev 1.5.1 → 1.5.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/commands/InitCommand.js +4 -4
- package/dist/commands/MustacheGeneratorCommand.js +1 -1
- package/dist/commands/mixins/ESMServed.js +1 -1
- package/dist/lib/queue.js +1 -1
- package/package.json +1 -1
- package/src/commands/InitCommand.ts +10 -4
- package/src/commands/MustacheGeneratorCommand.ts +1 -1
- package/src/commands/mixins/ESMServed.ts +2 -2
- package/src/commands/mixins/ESMStorageSpecific.ts +1 -1
- package/src/commands/mixins/Watchable.ts +1 -1
- package/src/lib/queue.ts +1 -1
- /package/{src/commands/templates → templates}/init/docker-compose.yml.mustache +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
|
-
import { ESMDevCommand } from './ESMDevCommand';
|
|
3
|
-
import { PackagePathSpecific } from './mixins/PackagePathSpecific';
|
|
4
|
-
import { MustacheGeneratorCommand } from './MustacheGeneratorCommand';
|
|
2
|
+
import { ESMDevCommand } from './ESMDevCommand.js';
|
|
3
|
+
import { PackagePathSpecific } from './mixins/PackagePathSpecific.js';
|
|
4
|
+
import { MustacheGeneratorCommand } from './MustacheGeneratorCommand.js';
|
|
5
5
|
import { Option } from 'clipanion';
|
|
6
6
|
export class InitCommand extends PackagePathSpecific(MustacheGeneratorCommand) {
|
|
7
7
|
static paths = [['init']];
|
|
@@ -27,7 +27,7 @@ export class InitCommand extends PackagePathSpecific(MustacheGeneratorCommand) {
|
|
|
27
27
|
npmRegistryURL;
|
|
28
28
|
packages;
|
|
29
29
|
async execute() {
|
|
30
|
-
this.templateDir = path.
|
|
30
|
+
this.templateDir = path.resolve(import.meta.dirname, '..', '..', 'templates', 'init');
|
|
31
31
|
this.destinationDir = this.outputDirectory;
|
|
32
32
|
this.esmURL = new URL(this.esmOrigin);
|
|
33
33
|
this.npmRegistryURL = new URL(this.registry);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GeneratorCommand } from 'clipanion-generator-command';
|
|
2
|
-
import { MustacheGenerator } from '../lib/MustacheGenerator';
|
|
2
|
+
import { MustacheGenerator } from '../lib/MustacheGenerator.js';
|
|
3
3
|
export class MustacheGeneratorCommand extends GeneratorCommand {
|
|
4
4
|
get generator() {
|
|
5
5
|
return new MustacheGenerator(this.templateDir, this.destinationDir, [
|
package/dist/lib/queue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import debounce from 'lodash.debounce';
|
|
2
2
|
import throat from 'throat';
|
|
3
|
-
export const queue = throat(1);
|
|
3
|
+
export const queue = throat.default(1);
|
|
4
4
|
/**
|
|
5
5
|
* Just like debounce, but the first call will add a promise to the queue
|
|
6
6
|
* and that promise won't resolve until the debounced function is finally called.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as path from 'node:path'
|
|
2
|
-
import { ESMDevCommand } from './ESMDevCommand'
|
|
3
|
-
import { PackagePathSpecific } from './mixins/PackagePathSpecific'
|
|
4
|
-
import { MustacheGeneratorCommand } from './MustacheGeneratorCommand'
|
|
2
|
+
import { ESMDevCommand } from './ESMDevCommand.js'
|
|
3
|
+
import { PackagePathSpecific } from './mixins/PackagePathSpecific.js'
|
|
4
|
+
import { MustacheGeneratorCommand } from './MustacheGeneratorCommand.js'
|
|
5
5
|
import { Option } from 'clipanion'
|
|
6
6
|
|
|
7
7
|
export class InitCommand extends PackagePathSpecific(MustacheGeneratorCommand) {
|
|
@@ -44,7 +44,13 @@ export class InitCommand extends PackagePathSpecific(MustacheGeneratorCommand) {
|
|
|
44
44
|
packages!: { path: string; basename: string }[]
|
|
45
45
|
|
|
46
46
|
override async execute() {
|
|
47
|
-
this.templateDir = path.
|
|
47
|
+
this.templateDir = path.resolve(
|
|
48
|
+
import.meta.dirname,
|
|
49
|
+
'..',
|
|
50
|
+
'..',
|
|
51
|
+
'templates',
|
|
52
|
+
'init',
|
|
53
|
+
)
|
|
48
54
|
this.destinationDir = this.outputDirectory
|
|
49
55
|
this.esmURL = new URL(this.esmOrigin)
|
|
50
56
|
this.npmRegistryURL = new URL(this.registry)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GeneratorCommand } from 'clipanion-generator-command'
|
|
2
|
-
import { MustacheGenerator } from '../lib/MustacheGenerator'
|
|
2
|
+
import { MustacheGenerator } from '../lib/MustacheGenerator.js'
|
|
3
3
|
|
|
4
4
|
export abstract class MustacheGeneratorCommand extends GeneratorCommand {
|
|
5
5
|
override get generator() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EnvOption } from '../../options/EnvOption'
|
|
2
|
-
import type { CommandClass } from './CommandClass'
|
|
1
|
+
import { EnvOption } from '../../options/EnvOption.js'
|
|
2
|
+
import type { CommandClass } from './CommandClass.js'
|
|
3
3
|
|
|
4
4
|
export function ESMServed<T extends CommandClass>(Base: T) {
|
|
5
5
|
abstract class ESMServed extends Base {
|
package/src/lib/queue.ts
CHANGED
|
File without changes
|