@decohere/flux 0.0.1-dev.117 → 0.0.1-dev.119
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/commonjs/src/deferred-script-runner.js +1 -1
- package/commonjs/src/flux.command.js +1 -1
- package/commonjs/src/flux.module.js +1 -1
- package/commonjs/src/hot-reload-server.js +3 -2
- package/commonjs/src/run.action.js +1 -1
- package/commonjs/src/run.command.js +1 -1
- package/commonjs/src/serve.action.js +1 -1
- package/commonjs/src/serve.command.js +1 -1
- package/es6/src/deferred-script-runner.js +1 -1
- package/es6/src/flux.command.js +1 -1
- package/es6/src/flux.module.js +1 -1
- package/es6/src/hot-reload-server.js +3 -2
- package/es6/src/run.action.js +1 -1
- package/es6/src/run.command.js +1 -1
- package/es6/src/serve.action.js +1 -1
- package/es6/src/serve.command.js +1 -1
- package/package.json +7 -6
- package/types/src/flux.command.d.ts +2 -2
- package/types/src/flux.module.d.ts +2 -2
- package/types/src/run.action.d.ts +1 -1
- package/types/src/run.command.d.ts +1 -1
- package/types/src/serve.action.d.ts +1 -1
- package/types/src/serve.command.d.ts +1 -1
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "DeferredScriptRunner", {
|
|
|
10
10
|
});
|
|
11
11
|
const _nodechild_process = require("node:child_process");
|
|
12
12
|
const _decorators = require("@decohere/crucible/decorators");
|
|
13
|
-
const _interop = require("@decohere/
|
|
13
|
+
const _interop = require("@decohere/devkit/interop");
|
|
14
14
|
const _scribe = require("@decohere/scribe");
|
|
15
15
|
function _ts_decorate(decorators, target, key, desc) {
|
|
16
16
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "FluxCommand", {
|
|
|
8
8
|
return FluxCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _runcommand = require("./run.command.js");
|
|
13
13
|
const _servecommand = require("./serve.command.js");
|
|
14
14
|
class FluxCommand extends _cli.DecohereCommand {
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "FluxModule", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _forge = require("@decohere/forge");
|
|
12
|
-
const _cli = require("@decohere/
|
|
12
|
+
const _cli = require("@decohere/devkit/cli");
|
|
13
13
|
const _deferredscriptrunner = require("./deferred-script-runner.js");
|
|
14
14
|
const _fluxcommand = require("./flux.command.js");
|
|
15
15
|
const _hotreloadserver = require("./hot-reload-server.js");
|
|
@@ -28,6 +28,7 @@ _export(exports, {
|
|
|
28
28
|
const _nodeevents = require("node:events");
|
|
29
29
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
30
30
|
const _io = require("@decohere/core/io");
|
|
31
|
+
const _io1 = require("@decohere/devkit/io");
|
|
31
32
|
const _system = require("@decohere/core/system");
|
|
32
33
|
const _scribe = require("@decohere/scribe");
|
|
33
34
|
const _sourcemoduleloader = require("./source-module-loader.js");
|
|
@@ -301,12 +302,12 @@ class HotReloadServer extends _nodeevents.EventEmitter {
|
|
|
301
302
|
const { file, eventName, project } = evt;
|
|
302
303
|
const fullPath = file.fullPath;
|
|
303
304
|
this.logger.trace(`File ${eventName}: ${fullPath}`);
|
|
304
|
-
if (eventName ===
|
|
305
|
+
if (eventName === _io1.WatchEvents.unlink) {
|
|
305
306
|
this.loader.invalidateTranspile(fullPath);
|
|
306
307
|
this.moduleCache.set(fullPath, null);
|
|
307
308
|
return;
|
|
308
309
|
}
|
|
309
|
-
if (eventName ===
|
|
310
|
+
if (eventName === _io1.WatchEvents.add) {
|
|
310
311
|
if (project.isSourceFile(file)) {
|
|
311
312
|
this.loader.setSourceFile(fullPath, project);
|
|
312
313
|
this.moduleCache.set(fullPath, null);
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "RunAction", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
14
|
const _scribe = require("@decohere/scribe");
|
|
15
15
|
const _flux = require("./flux.js");
|
|
16
16
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "RunCommand", {
|
|
|
8
8
|
return RunCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _runaction = require("./run.action.js");
|
|
13
13
|
class RunCommand extends _cli.DecohereCommand {
|
|
14
14
|
get actions() {
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "ServeAction", {
|
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _decorators = require("@decohere/crucible/decorators");
|
|
13
13
|
const _workspace = require("@decohere/workspace");
|
|
14
|
-
const _cli = require("@decohere/
|
|
14
|
+
const _cli = require("@decohere/devkit/cli");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
const _deferredscriptrunner = require("./deferred-script-runner.js");
|
|
17
17
|
const _hotreloadserver = require("./hot-reload-server.js");
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "ServeCommand", {
|
|
|
8
8
|
return ServeCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _hotreloadserver = require("./hot-reload-server.js");
|
|
13
13
|
const _serveaction = require("./serve.action.js");
|
|
14
14
|
class ServeCommand extends _cli.DecohereCommand {
|
|
@@ -6,7 +6,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
6
6
|
}
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
8
|
import { injectable } from "@decohere/crucible/decorators";
|
|
9
|
-
import { detectPackageManager, packageManagerFromString } from "@decohere/
|
|
9
|
+
import { detectPackageManager, packageManagerFromString } from "@decohere/devkit/interop";
|
|
10
10
|
import { scribe } from "@decohere/scribe";
|
|
11
11
|
export class DeferredScriptRunner {
|
|
12
12
|
logger = scribe.logger(DeferredScriptRunner.name);
|
package/es6/src/flux.command.js
CHANGED
package/es6/src/flux.module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createWorkspace } from "@decohere/forge";
|
|
2
|
-
import { ModuleManifest } from "@decohere/
|
|
2
|
+
import { ModuleManifest } from "@decohere/devkit/cli";
|
|
3
3
|
import { DeferredScriptRunner } from "./deferred-script-runner.js";
|
|
4
4
|
import { FluxCommand } from "./flux.command.js";
|
|
5
5
|
import { HotReloadServer } from "./hot-reload-server.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { io } from "@decohere/core/io";
|
|
4
|
+
import { WatchEvents } from "@decohere/devkit/io";
|
|
4
5
|
import { debounce } from "@decohere/core/system";
|
|
5
6
|
import { scribe } from "@decohere/scribe";
|
|
6
7
|
import { SourceModuleLoader } from "./source-module-loader.js";
|
|
@@ -269,12 +270,12 @@ export class HotReloadServer extends EventEmitter {
|
|
|
269
270
|
const { file, eventName, project } = evt;
|
|
270
271
|
const fullPath = file.fullPath;
|
|
271
272
|
this.logger.trace(`File ${eventName}: ${fullPath}`);
|
|
272
|
-
if (eventName ===
|
|
273
|
+
if (eventName === WatchEvents.unlink) {
|
|
273
274
|
this.loader.invalidateTranspile(fullPath);
|
|
274
275
|
this.moduleCache.set(fullPath, null);
|
|
275
276
|
return;
|
|
276
277
|
}
|
|
277
|
-
if (eventName ===
|
|
278
|
+
if (eventName === WatchEvents.add) {
|
|
278
279
|
if (project.isSourceFile(file)) {
|
|
279
280
|
this.loader.setSourceFile(fullPath, project);
|
|
280
281
|
this.moduleCache.set(fullPath, null);
|
package/es6/src/run.action.js
CHANGED
|
@@ -9,7 +9,7 @@ function _ts_metadata(k, v) {
|
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
11
|
import { Workspace } from "@decohere/workspace";
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
12
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
13
13
|
import { scribe } from "@decohere/scribe";
|
|
14
14
|
import { flux } from "./flux.js";
|
|
15
15
|
export class RunAction {
|
package/es6/src/run.command.js
CHANGED
package/es6/src/serve.action.js
CHANGED
|
@@ -10,7 +10,7 @@ function _ts_metadata(k, v) {
|
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { injectable } from "@decohere/crucible/decorators";
|
|
12
12
|
import { Workspace } from "@decohere/workspace";
|
|
13
|
-
import { ActionResponse } from "@decohere/
|
|
13
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
14
14
|
import { scribe } from "@decohere/scribe";
|
|
15
15
|
import { DeferredScriptRunner } from "./deferred-script-runner.js";
|
|
16
16
|
import { HotReloadServer } from "./hot-reload-server.js";
|
package/es6/src/serve.command.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigurationOption, DecohereCommand, ProjectOption } from "@decohere/
|
|
1
|
+
import { ConfigurationOption, DecohereCommand, ProjectOption } from "@decohere/devkit/cli";
|
|
2
2
|
import { DEFAULT_REBOOT_DEBOUNCE_MS, resolveRebootDebounceMs } from "./hot-reload-server.js";
|
|
3
3
|
import { ServeAction } from "./serve.action.js";
|
|
4
4
|
export class ServeCommand extends DecohereCommand {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decohere/flux",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.119",
|
|
4
4
|
"description": "Hot module reload server for Node.js ESM applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -25,11 +25,12 @@
|
|
|
25
25
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@decohere/core": "0.0.1-dev.
|
|
29
|
-
"@decohere/crucible": "0.0.1-dev.
|
|
30
|
-
"@decohere/
|
|
31
|
-
"@decohere/
|
|
32
|
-
"@decohere/
|
|
28
|
+
"@decohere/core": "0.0.1-dev.119",
|
|
29
|
+
"@decohere/crucible": "0.0.1-dev.119",
|
|
30
|
+
"@decohere/devkit": "0.0.1-dev.119",
|
|
31
|
+
"@decohere/forge": "0.0.1-dev.119",
|
|
32
|
+
"@decohere/scribe": "0.0.1-dev.119",
|
|
33
|
+
"@decohere/workspace": "0.0.1-dev.119",
|
|
33
34
|
"commander": "^13.1.0",
|
|
34
35
|
"rxjs": "^7.8.2"
|
|
35
36
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Actions } from "@decohere/
|
|
2
|
-
import { type CommandHandler, type CommandResponse, type CommandType, DecohereCommand } from "@decohere/
|
|
1
|
+
import type { Actions } from "@decohere/devkit/cli";
|
|
2
|
+
import { type CommandHandler, type CommandResponse, type CommandType, DecohereCommand } from "@decohere/devkit/cli";
|
|
3
3
|
export declare class FluxCommand extends DecohereCommand {
|
|
4
4
|
constructor(commands: Record<string, CommandType>, handler: CommandHandler);
|
|
5
5
|
run(_actions: Actions, _options: never): Promise<CommandResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WorkspaceFactoryOptions } from "@decohere/
|
|
2
|
-
import { ModuleManifest } from "@decohere/
|
|
1
|
+
import type { WorkspaceFactoryOptions } from "@decohere/devkit/cli";
|
|
2
|
+
import { ModuleManifest } from "@decohere/devkit/cli";
|
|
3
3
|
import type { ContainerBuilder } from "@decohere/core/composition";
|
|
4
4
|
import { FluxCommand } from "./flux.command.js";
|
|
5
5
|
import { RunAction } from "./run.action.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Workspace } from "@decohere/workspace";
|
|
2
|
-
import { type Action, ActionResponse } from "@decohere/
|
|
2
|
+
import { type Action, ActionResponse } from "@decohere/devkit/cli";
|
|
3
3
|
export type RunOptions = {
|
|
4
4
|
/** Absolute or cwd-relative path to a `.ts` entry file. */
|
|
5
5
|
entry: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Workspace } from "@decohere/workspace";
|
|
2
|
-
import { type Action, ActionResponse } from "@decohere/
|
|
2
|
+
import { type Action, ActionResponse } from "@decohere/devkit/cli";
|
|
3
3
|
import { DeferredScriptRunner } from "./deferred-script-runner.js";
|
|
4
4
|
import { HotReloadServer } from "./hot-reload-server.js";
|
|
5
5
|
export type ServeOptions = {
|