@akala/pm 5.2.38 → 5.2.40

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 (149) hide show
  1. package/changelog.md +7 -1
  2. package/commands.json +2 -1
  3. package/dist/cjs/cli-helper.d.ts +1 -1
  4. package/dist/cjs/cli-helper.js +1 -1
  5. package/dist/cjs/commands/bridge.d.ts +1 -1
  6. package/dist/cjs/commands/bridge.js +1 -1
  7. package/dist/cjs/commands/config.d.ts +1 -1
  8. package/dist/cjs/commands/config.js +1 -1
  9. package/dist/cjs/commands/connect.d.ts +1 -1
  10. package/dist/cjs/commands/connect.js +1 -1
  11. package/dist/cjs/commands/discover.d.ts +1 -1
  12. package/dist/cjs/commands/discover.js +1 -1
  13. package/dist/cjs/commands/install.d.ts +1 -1
  14. package/dist/cjs/commands/install.js +1 -1
  15. package/dist/cjs/commands/link.d.ts +1 -1
  16. package/dist/cjs/commands/link.js +1 -1
  17. package/dist/cjs/commands/log.d.ts +1 -1
  18. package/dist/cjs/commands/log.js +1 -1
  19. package/dist/cjs/commands/ls.d.ts +1 -1
  20. package/dist/cjs/commands/ls.js +1 -1
  21. package/dist/cjs/commands/map.d.ts +1 -1
  22. package/dist/cjs/commands/map.js +1 -1
  23. package/dist/cjs/commands/name.d.ts +1 -1
  24. package/dist/cjs/commands/name.js +1 -1
  25. package/dist/cjs/commands/plugin/add.d.ts +1 -1
  26. package/dist/cjs/commands/plugin/add.js +1 -1
  27. package/dist/cjs/commands/plugin/remove.d.ts +1 -1
  28. package/dist/cjs/commands/plugin/remove.js +1 -1
  29. package/dist/cjs/commands/proxy.d.ts +1 -1
  30. package/dist/cjs/commands/proxy.js +1 -1
  31. package/dist/cjs/commands/ready.d.ts +1 -1
  32. package/dist/cjs/commands/ready.js +1 -1
  33. package/dist/cjs/commands/reload-metadata.d.ts +1 -1
  34. package/dist/cjs/commands/reload-metadata.js +1 -1
  35. package/dist/cjs/commands/restart.d.ts +1 -1
  36. package/dist/cjs/commands/restart.js +1 -1
  37. package/dist/cjs/commands/start.d.ts +1 -1
  38. package/dist/cjs/commands/start.js +1 -1
  39. package/dist/cjs/commands/status.d.ts +1 -1
  40. package/dist/cjs/commands/status.js +1 -1
  41. package/dist/cjs/commands/stop.d.ts +1 -1
  42. package/dist/cjs/commands/stop.js +1 -1
  43. package/dist/cjs/commands/update.d.ts +1 -1
  44. package/dist/cjs/commands/update.js +1 -1
  45. package/dist/cjs/commands/version.d.ts +1 -1
  46. package/dist/cjs/commands/version.js +1 -1
  47. package/dist/cjs/container.d.ts +1 -3
  48. package/dist/cjs/container.js +1 -1
  49. package/dist/cjs/index.d.ts +1 -1
  50. package/dist/cjs/index.js +1 -1
  51. package/dist/cjs/ipc-adapter.d.ts +1 -1
  52. package/dist/cjs/ipc-adapter.js +1 -1
  53. package/dist/cjs/new-line-prefixer.d.ts +1 -1
  54. package/dist/cjs/new-line-prefixer.js +1 -1
  55. package/dist/cjs/npm-helper.d.ts +1 -1
  56. package/dist/cjs/npm-helper.js +1 -1
  57. package/dist/cjs/sidecar.d.ts +1 -1
  58. package/dist/cjs/sidecar.js +1 -1
  59. package/dist/cjs/standalone.d.ts +1 -1
  60. package/dist/cjs/standalone.js +1 -1
  61. package/dist/cjs/state.d.ts +1 -1
  62. package/dist/cjs/state.js +1 -1
  63. package/dist/cjs/test/pwet.d.ts +1 -1
  64. package/dist/cjs/test/pwet.js +1 -1
  65. package/dist/cjs/yarn-helper.d.ts +1 -1
  66. package/dist/cjs/yarn-helper.js +1 -1
  67. package/dist/esm/akala.d.mts +1 -1
  68. package/dist/esm/akala.mjs +1 -1
  69. package/dist/esm/cli-helper.d.ts +1 -1
  70. package/dist/esm/cli-helper.js +1 -1
  71. package/dist/esm/cli.d.ts +1 -1
  72. package/dist/esm/cli.js +1 -1
  73. package/dist/esm/commands/$init.d.ts +2 -1
  74. package/dist/esm/commands/$init.js +5 -12
  75. package/dist/esm/commands/$init.js.map +1 -1
  76. package/dist/esm/commands/bridge.d.ts +1 -1
  77. package/dist/esm/commands/bridge.js +1 -1
  78. package/dist/esm/commands/config.d.ts +1 -1
  79. package/dist/esm/commands/config.js +1 -1
  80. package/dist/esm/commands/connect.d.ts +1 -1
  81. package/dist/esm/commands/connect.js +1 -1
  82. package/dist/esm/commands/discover.d.ts +1 -1
  83. package/dist/esm/commands/discover.js +1 -1
  84. package/dist/esm/commands/install.d.ts +1 -1
  85. package/dist/esm/commands/install.js +1 -1
  86. package/dist/esm/commands/link.d.ts +1 -1
  87. package/dist/esm/commands/link.js +1 -1
  88. package/dist/esm/commands/log.d.ts +1 -1
  89. package/dist/esm/commands/log.js +1 -1
  90. package/dist/esm/commands/ls.d.ts +1 -1
  91. package/dist/esm/commands/ls.js +1 -1
  92. package/dist/esm/commands/map.d.ts +1 -1
  93. package/dist/esm/commands/map.js +1 -1
  94. package/dist/esm/commands/name.d.ts +1 -1
  95. package/dist/esm/commands/name.js +1 -1
  96. package/dist/esm/commands/plugin/add.d.ts +1 -1
  97. package/dist/esm/commands/plugin/add.js +1 -1
  98. package/dist/esm/commands/plugin/remove.d.ts +1 -1
  99. package/dist/esm/commands/plugin/remove.js +1 -1
  100. package/dist/esm/commands/proxy.d.ts +1 -1
  101. package/dist/esm/commands/proxy.js +1 -1
  102. package/dist/esm/commands/ready.d.ts +1 -1
  103. package/dist/esm/commands/ready.js +1 -1
  104. package/dist/esm/commands/reload-metadata.d.ts +1 -1
  105. package/dist/esm/commands/reload-metadata.js +1 -1
  106. package/dist/esm/commands/restart.d.ts +1 -1
  107. package/dist/esm/commands/restart.js +1 -1
  108. package/dist/esm/commands/start.d.ts +1 -1
  109. package/dist/esm/commands/start.js +1 -1
  110. package/dist/esm/commands/status.d.ts +1 -1
  111. package/dist/esm/commands/status.js +1 -1
  112. package/dist/esm/commands/stop.d.ts +1 -1
  113. package/dist/esm/commands/stop.js +1 -1
  114. package/dist/esm/commands/update.d.ts +1 -1
  115. package/dist/esm/commands/update.js +1 -1
  116. package/dist/esm/commands/version.d.ts +1 -1
  117. package/dist/esm/commands/version.js +1 -1
  118. package/dist/esm/container.d.ts +1 -3
  119. package/dist/esm/container.js +1 -1
  120. package/dist/esm/fork.d.ts +1 -1
  121. package/dist/esm/fork.js +1 -1
  122. package/dist/esm/index.d.ts +1 -1
  123. package/dist/esm/index.js +1 -1
  124. package/dist/esm/ipc-adapter.d.ts +1 -1
  125. package/dist/esm/ipc-adapter.js +1 -1
  126. package/dist/esm/new-line-prefixer.d.ts +1 -1
  127. package/dist/esm/new-line-prefixer.js +1 -1
  128. package/dist/esm/npm-helper.d.ts +1 -1
  129. package/dist/esm/npm-helper.js +1 -1
  130. package/dist/esm/sidecar.d.ts +1 -1
  131. package/dist/esm/sidecar.js +1 -1
  132. package/dist/esm/standalone.d.ts +1 -1
  133. package/dist/esm/standalone.js +1 -1
  134. package/dist/esm/state.d.ts +1 -1
  135. package/dist/esm/state.js +1 -1
  136. package/dist/esm/test/pwet.d.ts +1 -1
  137. package/dist/esm/test/pwet.js +1 -1
  138. package/dist/esm/yarn-helper.d.ts +1 -1
  139. package/dist/esm/yarn-helper.js +1 -1
  140. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  141. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  142. package/package.json +4 -4
  143. package/src/commands/$init.json +4 -1
  144. package/src/commands/$init.ts +6 -15
  145. package/src/container.ts +0 -2
  146. package/tsconfig.cjs.json +2 -1
  147. package/dist/cjs/commands/$init.d.ts +0 -10
  148. package/dist/cjs/commands/$init.js +0 -145
  149. package/dist/cjs/commands/$init.js.map +0 -1
package/changelog.md CHANGED
@@ -1,4 +1,10 @@
1
- # (2023-04-14)
1
+ # (2023-04-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * init leverage ESM 557af46
7
+ * make pm work with connect args ec5e1fc
2
8
 
3
9
 
4
10
 
package/commands.json CHANGED
@@ -5,6 +5,7 @@
5
5
  "name": "$init",
6
6
  "config": {
7
7
  "fs": {
8
+ "disabled": true,
8
9
  "path": "dist/esm/commands/$init.js",
9
10
  "source": "src/commands/$init.ts",
10
11
  "inject": [
@@ -23,7 +24,7 @@
23
24
  "$container",
24
25
  "context"
25
26
  ],
26
- "usage": "$init [config]",
27
+ "usage": "$init [...args]",
27
28
  "options": {
28
29
  "config": {
29
30
  "needsValue": true,
@@ -1,3 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  import * as cp from 'child_process';
3
3
  export declare function spawnAsync(program: string, options: cp.SpawnOptions, ...args: string[]): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1,3 +1,3 @@
1
- import { SocketAdapter } from "@akala/json-rpc-ws";
1
+ import { SocketAdapter } from "@akala/json-rpc-ws";
2
2
  import State from "../state.js";
3
3
  export default function (this: State, connectionId: string, socket: SocketAdapter): boolean;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function default_1(connectionId, socket) {
4
4
  this.bridges[connectionId].left.off('message');
@@ -1,3 +1,3 @@
1
- import { CliContext } from "@akala/cli";
1
+ import { CliContext } from "@akala/cli";
2
2
  import State from '../state.js';
3
3
  export default function config(this: State, name: string | undefined | void, options: CliContext['options'] | undefined | void): Promise<string[] | State['config'] | State['config']['containers']['']>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1,4 +1,4 @@
1
- import { ServeMetadata, ServeOptions } from "@akala/commands";
1
+ import { ServeMetadata, ServeOptions } from "@akala/commands";
2
2
  import State from '../state.js';
3
3
  export default function connect(this: State, name: string): Promise<ServeMetadata>;
4
4
  export default function connect(this: State, name: string, context?: ServeOptions): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,4 @@
1
- import State from '../state.js';
1
+ import State from '../state.js';
2
2
  import pmContainer from '../container.js';
3
3
  import map from './map.js';
4
4
  type Unpromise<T> = T extends Promise<infer X> ? X : never;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,4 @@
1
- import State from '../state.js';
1
+ import State from '../state.js';
2
2
  import { Container } from "@akala/commands";
3
3
  import discover from './discover.js';
4
4
  export default function install(this: State, packageName: string, pm: Container<State>): ReturnType<typeof discover>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1,4 +1,4 @@
1
- import State from '../state.js';
1
+ import State from '../state.js';
2
2
  import { Container } from "@akala/commands";
3
3
  import discover from './discover.js';
4
4
  export default function link(this: State, packageName: string, folder: string, pm: Container<State>): ReturnType<typeof discover>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1,4 +1,4 @@
1
- /// <reference types="node" resolution-mode="require"/>
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  import { Readable } from "stream";
3
3
  import State from '../state.js';
4
4
  export default function log(this: State, name: string): Readable;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const stream_1 = require("stream");
4
4
  function log(name) {
@@ -1,2 +1,2 @@
1
- import State from '../state.js';
1
+ import State from '../state.js';
2
2
  export default function ls(this: State): State['config']['containers'];
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function ls() {
4
4
  return this.config.containers;
@@ -1,4 +1,4 @@
1
- import State from '../state.js';
1
+ import State from '../state.js';
2
2
  export default function map<TName extends string>(this: State, name: TName, targetPath: string, cwd?: string, options?: {
3
3
  commandable?: boolean;
4
4
  stateless?: boolean;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1 +1 @@
1
- export default function getRandomName(retry?: boolean): string;
1
+ export default function getRandomName(retry?: boolean): string;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const left = [
4
4
  "admiring",
@@ -1,2 +1,2 @@
1
- import State from "../../state.js";
1
+ import State from "../../state.js";
2
2
  export default function (this: State, plugin: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function default_1(plugin) {
4
4
  this.config.plugins.push(plugin);
@@ -1,2 +1,2 @@
1
- import State from "../../state.js";
1
+ import State from "../../state.js";
2
2
  export default function (this: State, plugin: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function default_1(plugin) {
4
4
  const indexOfPlugin = this.config.plugins.indexOf(plugin);
@@ -1,3 +1,3 @@
1
- import { SocketAdapter } from "@akala/json-rpc-ws";
1
+ import { SocketAdapter } from "@akala/json-rpc-ws";
2
2
  import State from "../state.js";
3
3
  export default function (this: State, name: string, socket: SocketAdapter): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,4 @@
1
- import { Container } from '@akala/commands';
1
+ import { Container } from '@akala/commands';
2
2
  import pm from '../container.js';
3
3
  import State, { RunningContainer } from '../state.js';
4
4
  export default function ready(this: State, pm: pm.container & Container<State>, container: RunningContainer, standaloneContainer: Container<void>): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,2 +1,2 @@
1
- import { Container } from "@akala/commands";
1
+ import { Container } from "@akala/commands";
2
2
  export default function (remoteContainer: Container<void>): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,4 @@
1
- /// <reference types="node" resolution-mode="require"/>
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  import { StdioOptions } from "child_process";
3
3
  import pmContainer from '../container.js';
4
4
  import { CliContext } from "@akala/cli";
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,4 @@
1
- /// <reference types="node" resolution-mode="require"/>
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  import { Container } from "@akala/commands";
3
3
  import State from '../state.js';
4
4
  import { StdioOptions } from "child_process";
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,4 @@
1
- import State from '../state.js';
1
+ import State from '../state.js';
2
2
  export default function status(this: State, name?: string): {
3
3
  name: string;
4
4
  filter: string;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function status(name) {
4
4
  let processes = Object.values(this.processes);
@@ -1,3 +1,3 @@
1
- import { Container } from "@akala/commands";
1
+ import { Container } from "@akala/commands";
2
2
  import State from '../state.js';
3
3
  export default function stop(this: State, name: string, container: Container<State>): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,3 +1,3 @@
1
- import State from '../state.js';
1
+ import State from '../state.js';
2
2
  import { Container } from "@akala/commands";
3
3
  export default function update(this: State, packageName: string, folder: string, pm: Container<State>): Promise<string>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1,2 +1,2 @@
1
- import State from '../state.js';
1
+ import State from '../state.js';
2
2
  export default function version(this: State, packageName: string, folder: string): Promise<string>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,7 +1,6 @@
1
- import { Argument0, Argument1, Argument2, Argument3 } from '@akala/core';
1
+ import { Argument0, Argument1, Argument2, Argument3 } from '@akala/core';
2
2
  declare namespace commands {
3
3
  interface container {
4
- dispatch(cmd: '$init', ...args: [Argument1<typeof import('./commands/$init.js').default>]): ReturnType<typeof import('./commands/$init.js').default>;
5
4
  dispatch(cmd: 'add', ...args: [Argument0<typeof import('./commands/plugin/add.js').default>]): ReturnType<typeof import('./commands/plugin/add.js').default>;
6
5
  dispatch(cmd: 'bridge', ...args: [Argument0<typeof import('./commands/bridge.js').default>, Argument1<typeof import('./commands/bridge.js').default>]): ReturnType<typeof import('./commands/bridge.js').default>;
7
6
  dispatch(cmd: 'config', ...args: [Argument0<typeof import('./commands/config.js').default>, Argument1<typeof import('./commands/config.js').default>]): ReturnType<typeof import('./commands/config.js').default>;
@@ -25,7 +24,6 @@ declare namespace commands {
25
24
  dispatch(cmd: 'version', ...args: [Argument0<typeof import('./commands/version.js').default>, Argument1<typeof import('./commands/version.js').default>]): ReturnType<typeof import('./commands/version.js').default>;
26
25
  }
27
26
  interface proxy {
28
- '$init'(...args: [Argument1<typeof import('./commands/$init.js').default>]): ReturnType<typeof import('./commands/$init.js').default>;
29
27
  'add'(...args: [Argument0<typeof import('./commands/plugin/add.js').default>]): ReturnType<typeof import('./commands/plugin/add.js').default>;
30
28
  'bridge'(...args: [Argument0<typeof import('./commands/bridge.js').default>, Argument1<typeof import('./commands/bridge.js').default>]): ReturnType<typeof import('./commands/bridge.js').default>;
31
29
  'config'(...args: [Argument0<typeof import('./commands/config.js').default>, Argument1<typeof import('./commands/config.js').default>]): ReturnType<typeof import('./commands/config.js').default>;
@@ -1,3 +1,3 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=container.js.map
@@ -1,4 +1,4 @@
1
- import { Container, Metadata, ServeMetadata, ConnectionPreference } from "@akala/commands";
1
+ import { Container, Metadata, ServeMetadata, ConnectionPreference } from "@akala/commands";
2
2
  import definition from './container.js';
3
3
  type pmContainer = definition.container;
4
4
  export { pmContainer as Container };
package/dist/cjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1,4 +1,4 @@
1
- /// <reference types="node" resolution-mode="require"/>
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="webpack-env" />
3
3
  /// <reference types="node" resolution-mode="require"/>
4
4
  import { ChildProcess } from "child_process";
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IpcAdapter = void 0;
4
4
  class IpcAdapter {
@@ -1,4 +1,4 @@
1
- /// <reference types="node" resolution-mode="require"/>
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="node" resolution-mode="require"/>
3
3
  import { Transform, TransformCallback } from "stream";
4
4
  interface Options {
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NewLinePrefixer = void 0;
4
4
  const stream_1 = require("stream");
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ declare const _default: {
2
2
  install(packageName: string, path?: string): Promise<void>;
3
3
  update(packageName: string, path?: string): Promise<void>;
4
4
  link(packageName: string, path?: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,4 @@
1
- import { ConnectionPreference, Container } from "@akala/commands";
1
+ import { ConnectionPreference, Container } from "@akala/commands";
2
2
  import { SideCarConnectionPreference, Sidecar } from "./index.js";
3
3
  import pm from './container.js';
4
4
  export default function (options?: {
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  export {};
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  "use strict";
3
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
4
  if (k2 === undefined) k2 = k;
@@ -1,4 +1,4 @@
1
- /// <reference types="node" resolution-mode="require"/>
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  import { Container } from "@akala/commands";
3
3
  import { ChildProcess } from "child_process";
4
4
  import { Deferred, SerializableObject } from "@akala/core";
package/dist/cjs/state.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";
1
+ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=state.js.map
@@ -1 +1 @@
1
- export default function pwet(a: string): Promise<void>;
1
+ export default function pwet(a: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,4 @@
1
- export declare function hasYarn(path?: string): Promise<boolean>;
1
+ export declare function hasYarn(path?: string): Promise<boolean>;
2
2
  declare const _default: {
3
3
  install(packageName: string, path?: string): Promise<void>;
4
4
  update(packageName: string, path?: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,2 +1,2 @@
1
- import { NamespaceMiddleware } from '@akala/cli';
1
+ import { NamespaceMiddleware } from '@akala/cli';
2
2
  export default function (_config: any, program: NamespaceMiddleware): void;
@@ -1,4 +1,4 @@
1
- import * as path from 'path';
1
+ import * as path from 'path';
2
2
  import { Processors, NetSocketAdapter, Metadata, Container, proxy, Triggers, Cli } from '@akala/commands';
3
3
  import { Socket } from 'net';
4
4
  import { TLSSocket } from 'tls';
@@ -1,3 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  import * as cp from 'child_process';
3
3
  export declare function spawnAsync(program: string, options: cp.SpawnOptions, ...args: string[]): Promise<void>;
@@ -1,4 +1,4 @@
1
- import * as cp from 'child_process';
1
+ import * as cp from 'child_process';
2
2
  export function spawnAsync(program, options, ...args) {
3
3
  options = Object.assign({ stdio: ['ignore', 'ignore', 'pipe'], shell: false, windowsHide: true }, options);
4
4
  return new Promise((resolve, reject) => {
package/dist/esm/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  export {};
package/dist/esm/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  import * as path from 'path';
3
3
  import { Processors, NetSocketAdapter, Metadata, proxy, Triggers, Cli } from '@akala/commands';
4
4
  import { Socket } from 'net';
@@ -1,4 +1,4 @@
1
- import State, { RunningContainer } from '../state.js';
1
+ import State, { RunningContainer } from '../state.js';
2
2
  import pmContainer from '../container.js';
3
3
  import { Container, Metadata } from '@akala/commands';
4
4
  import { CliContext } from '@akala/cli';
@@ -7,4 +7,5 @@ export declare function isRunningContainer(c: Container<unknown>): c is RunningC
7
7
  export default function (this: State, container: RunningContainer & pmContainer.container, context: CliContext<{
8
8
  config: string;
9
9
  keepAttached: boolean;
10
+ args: string[];
10
11
  }>): Promise<void>;
@@ -1,10 +1,11 @@
1
- import { homedir } from 'os';
1
+ import { homedir } from 'os';
2
2
  import fs from 'fs/promises';
3
3
  import { join } from 'path';
4
- import { Container, Metadata, ignoredCommands, configure, SelfDefinedCommand } from '@akala/commands';
4
+ import { Container, Metadata, ignoredCommands, configure, SelfDefinedCommand, serveMetadata } from '@akala/commands';
5
5
  import { PassThrough } from 'stream';
6
6
  import { EventEmitter } from 'events';
7
7
  import { Configuration } from '@akala/config';
8
+ import { fileURLToPath } from 'url';
8
9
  export async function metadata(container, deep) {
9
10
  const metacontainer = { name: container.name || 'unnamed', commands: [] };
10
11
  await Promise.all(container.keys().map(async (key) => {
@@ -36,15 +37,6 @@ export async function metadata(container, deep) {
36
37
  export function isRunningContainer(c) {
37
38
  return 'running' in c;
38
39
  }
39
- //eslint-disable-next-line @typescript-eslint/no-explicit-any
40
- function requireOrImportJson(path) {
41
- if (require)
42
- return Promise.resolve(require(path));
43
- else
44
- //eslint-disable-next-line @typescript-eslint/ban-ts-comment
45
- //@ts-ignore
46
- return import(path, { assert: { type: 'json' } }).then(i => i.default);
47
- }
48
40
  export default async function (container, context) {
49
41
  this.isDaemon = true;
50
42
  this.processes = {};
@@ -84,10 +76,11 @@ export default async function (container, context) {
84
76
  }
85
77
  else
86
78
  this.config = Configuration.new(configPath, {
87
- containers: { pm: { commandable: true, stateless: false, path: await requireOrImportJson('../../../commands.json') } },
79
+ containers: { pm: { commandable: true, stateless: false, path: fileURLToPath(new URL('../../../commands.json', import.meta.url)) } },
88
80
  mapping: { pm: { cwd: process.cwd(), container: 'pm' } },
89
81
  plugins: []
90
82
  });
83
+ this.config.mapping['pm'].set('connect', serveMetadata('pm', { options: context.options, args: context.options.args }));
91
84
  if (context && context.args.length)
92
85
  await container.dispatch('connect', 'pm', context);
93
86
  else {