@powerhousedao/ph-cli 0.23.0 → 0.25.0
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/connect.js
CHANGED
|
@@ -7,7 +7,7 @@ async function startConnect(connectOptions) {
|
|
|
7
7
|
return await startConnectStudio(options);
|
|
8
8
|
}
|
|
9
9
|
function connectCommand(program) {
|
|
10
|
-
program.command("connect").description("Starts Connect Studio").option("-p, --port <port>", "Port to run the server on", "3000").option("-h, --host", "Expose the server to the network").option(
|
|
10
|
+
program.command("connect").description("Starts Connect Studio").option("-p, --port <port>", "Port to run the server on", "3000").option("-h, --host", "Expose the server to the network").option("--https", "Enable HTTPS").option(
|
|
11
11
|
"--config-file <configFile>",
|
|
12
12
|
"Path to the powerhouse.config.js file"
|
|
13
13
|
).option(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/connect.ts"],"names":[],"mappings":";;;AASA,eAAsB,aAAa,cAAgC,EAAA;AACjE,EAAA,MAAM,EAAE,iBAAA,EAAmB,UAAW,EAAA,GAAI,SAAU,EAAA;AACpD,EAAA,MAAM,OAAU,GAAA,EAAE,iBAAmB,EAAA,UAAA,EAAY,GAAG,cAAe,EAAA;AACnE,EAAO,OAAA,MAAM,mBAAmB,OAAO,CAAA;AACzC;AAEO,SAAS,eAAe,OAAkB,EAAA;AAC/C,EAAA,OAAA,CACG,
|
|
1
|
+
{"version":3,"sources":["../../src/commands/connect.ts"],"names":[],"mappings":";;;AASA,eAAsB,aAAa,cAAgC,EAAA;AACjE,EAAA,MAAM,EAAE,iBAAA,EAAmB,UAAW,EAAA,GAAI,SAAU,EAAA;AACpD,EAAA,MAAM,OAAU,GAAA,EAAE,iBAAmB,EAAA,UAAA,EAAY,GAAG,cAAe,EAAA;AACnE,EAAO,OAAA,MAAM,mBAAmB,OAAO,CAAA;AACzC;AAEO,SAAS,eAAe,OAAkB,EAAA;AAC/C,EAAA,OAAA,CACG,QAAQ,SAAS,CAAA,CACjB,YAAY,uBAAuB,CAAA,CACnC,OAAO,mBAAqB,EAAA,2BAAA,EAA6B,MAAM,CAAA,CAC/D,OAAO,YAAc,EAAA,kCAAkC,EACvD,MAAO,CAAA,SAAA,EAAW,cAAc,CAChC,CAAA,MAAA;AAAA,IACC,4BAAA;AAAA,IACA;AAAA,GAED,CAAA,MAAA;AAAA,IACC,qCAAA;AAAA,IACA;AAAA,GAED,CAAA,MAAA;AAAA,IACC,yCAAA;AAAA,IACA;AAAA,GACF,CACC,MAAO,CAAA,OAAA,GAAU,IAA2B,KAAA;AAC3C,IAAM,MAAA,kBAAA,CAAmB,GAAG,IAAI,CAAA;AAAA,GACjC,CAAA;AACL;AAEA,IAAI,OAAQ,CAAA,IAAA,CAAK,EAAG,CAAA,CAAC,MAAM,OAAS,EAAA;AAClC,EAAA,MAAM,UAAa,GAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,CAAC,CAAA;AACpC,EAAA,MAAM,UAAU,UAAc,GAAA,IAAA,CAAK,KAAM,CAAA,UAAU,IAAuB,EAAC;AAC3E,EAAA,YAAA,CAAa,OAAO,CAAA,CAAE,KAAM,CAAA,CAAC,CAAe,KAAA;AAC1C,IAAM,MAAA,CAAA;AAAA,GACP,CAAA;AACH","file":"connect.js","sourcesContent":["import {\n startConnectStudio,\n ConnectStudioOptions,\n} from \"@powerhousedao/connect\";\nimport { getConfig } from \"@powerhousedao/config/powerhouse\";\nimport { Command } from \"commander\";\n\nexport type ConnectOptions = ConnectStudioOptions;\n\nexport async function startConnect(connectOptions: ConnectOptions) {\n const { documentModelsDir, editorsDir } = getConfig();\n const options = { documentModelsDir, editorsDir, ...connectOptions };\n return await startConnectStudio(options);\n}\n\nexport function connectCommand(program: Command) {\n program\n .command(\"connect\")\n .description(\"Starts Connect Studio\")\n .option(\"-p, --port <port>\", \"Port to run the server on\", \"3000\")\n .option(\"-h, --host\", \"Expose the server to the network\")\n .option(\"--https\", \"Enable HTTPS\")\n .option(\n \"--config-file <configFile>\",\n \"Path to the powerhouse.config.js file\",\n )\n .option(\n \"-le, --local-editors <localEditors>\",\n \"Link local document editors path\",\n )\n .option(\n \"-ld, --local-documents <localDocuments>\",\n \"Link local documents path\",\n )\n .action(async (...args: [ConnectOptions]) => {\n await startConnectStudio(...args);\n });\n}\n\nif (process.argv.at(2) === \"spawn\") {\n const optionsArg = process.argv.at(3);\n const options = optionsArg ? (JSON.parse(optionsArg) as ConnectOptions) : {};\n startConnect(options).catch((e: unknown) => {\n throw e;\n });\n}\n"]}
|
package/dist/commands/init.d.ts
CHANGED
package/dist/commands/init.js
CHANGED
|
@@ -6,7 +6,8 @@ const init = async (projectName, options) => {
|
|
|
6
6
|
await createProject({
|
|
7
7
|
name: options.project ?? projectName,
|
|
8
8
|
interactive: options.interactive ?? false,
|
|
9
|
-
version: parseVersion(options)
|
|
9
|
+
version: parseVersion(options),
|
|
10
|
+
packageManager: options.packageManager
|
|
10
11
|
});
|
|
11
12
|
} catch (error) {
|
|
12
13
|
console.error("Failed to initialize the project", error);
|
|
@@ -16,7 +17,10 @@ function initCommand(program) {
|
|
|
16
17
|
program.command("init").description("Initialize a new project").argument("[project-name]", "Name of the project").option("-p, --project", "Name of the project").option("-i, --interactive", "Run the command in interactive mode").option(
|
|
17
18
|
"-v, --version",
|
|
18
19
|
'Specify development version to use. Defaults to "main"'
|
|
19
|
-
).option("--dev", 'Use "development" version of the boilerplate').option("--staging", 'Use "development" version of the boilerplate').
|
|
20
|
+
).option("--dev", 'Use "development" version of the boilerplate').option("--staging", 'Use "development" version of the boilerplate').option(
|
|
21
|
+
"--package-manager <packageManager>",
|
|
22
|
+
"force package manager to use"
|
|
23
|
+
).action(init);
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
export { init, initCommand };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/init.ts"],"names":[],"mappings":";;AAIa,MAAA,IAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/commands/init.ts"],"names":[],"mappings":";;AAIa,MAAA,IAAA,GAYT,OAAO,WAAA,EAAa,OAAY,KAAA;AAClC,EAAA,OAAA,CAAQ,IAAI,+BAA+B,CAAA;AAE3C,EAAI,IAAA;AACF,IAAA,MAAM,aAAc,CAAA;AAAA,MAClB,IAAA,EAAM,QAAQ,OAAW,IAAA,WAAA;AAAA,MACzB,WAAA,EAAa,QAAQ,WAAe,IAAA,KAAA;AAAA,MACpC,OAAA,EAAS,aAAa,OAAO,CAAA;AAAA,MAC7B,gBAAgB,OAAQ,CAAA;AAAA,KACzB,CAAA;AAAA,WACM,KAAO,EAAA;AACd,IAAQ,OAAA,CAAA,KAAA,CAAM,oCAAoC,KAAK,CAAA;AAAA;AAE3D;AAEO,SAAS,YAAY,OAAkB,EAAA;AAC5C,EAAA,OAAA,CACG,QAAQ,MAAM,CAAA,CACd,WAAY,CAAA,0BAA0B,EACtC,QAAS,CAAA,gBAAA,EAAkB,qBAAqB,CAAA,CAChD,OAAO,eAAiB,EAAA,qBAAqB,EAC7C,MAAO,CAAA,mBAAA,EAAqB,qCAAqC,CACjE,CAAA,MAAA;AAAA,IACC,eAAA;AAAA,IACA;AAAA,GACF,CACC,OAAO,OAAS,EAAA,8CAA8C,EAC9D,MAAO,CAAA,WAAA,EAAa,8CAA8C,CAClE,CAAA,MAAA;AAAA,IACC,oCAAA;AAAA,IACA;AAAA,GACF,CACC,OAAO,IAAI,CAAA;AAChB","file":"init.js","sourcesContent":["import { Command } from \"commander\";\nimport { createProject, parseVersion } from \"@powerhousedao/codegen\";\nimport { CommandActionType } from \"../types.js\";\n\nexport const init: CommandActionType<\n [\n string | undefined,\n {\n project?: string;\n interactive?: boolean;\n version?: string;\n dev?: boolean;\n staging?: boolean;\n packageManager?: string;\n },\n ]\n> = async (projectName, options) => {\n console.log(\"Initializing a new project...\");\n\n try {\n await createProject({\n name: options.project ?? projectName,\n interactive: options.interactive ?? false,\n version: parseVersion(options),\n packageManager: options.packageManager,\n });\n } catch (error) {\n console.error(\"Failed to initialize the project\", error);\n }\n};\n\nexport function initCommand(program: Command) {\n program\n .command(\"init\")\n .description(\"Initialize a new project\")\n .argument(\"[project-name]\", \"Name of the project\")\n .option(\"-p, --project\", \"Name of the project\")\n .option(\"-i, --interactive\", \"Run the command in interactive mode\")\n .option(\n \"-v, --version\",\n 'Specify development version to use. Defaults to \"main\"',\n )\n .option(\"--dev\", 'Use \"development\" version of the boilerplate')\n .option(\"--staging\", 'Use \"development\" version of the boilerplate')\n .option(\n \"--package-manager <packageManager>\",\n \"force package manager to use\",\n )\n .action(init);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/ph-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
@@ -29,22 +29,22 @@
|
|
|
29
29
|
"graphql-tag": "^2.12.6",
|
|
30
30
|
"knex": "^3.1.0",
|
|
31
31
|
"luxon": "^3.5.0",
|
|
32
|
-
"document-drive": "1.15.
|
|
32
|
+
"document-drive": "1.15.3"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@powerhousedao/connect": "1.0.0-dev.
|
|
35
|
+
"@powerhousedao/connect": "1.0.0-dev.192",
|
|
36
36
|
"colorette": "^2.0.20",
|
|
37
37
|
"commander": "^12.1.0",
|
|
38
38
|
"graphql": "^16.9.0",
|
|
39
39
|
"pm2": "^5.4.3",
|
|
40
40
|
"react": "^18.3.1",
|
|
41
41
|
"react-dom": "^18.3.1",
|
|
42
|
-
"@powerhousedao/codegen": "0.31.
|
|
43
|
-
"@powerhousedao/design-system": "1.21.
|
|
44
|
-
"@powerhousedao/config": "1.
|
|
45
|
-
"@powerhousedao/
|
|
46
|
-
"document-model-libs": "1.127.
|
|
47
|
-
"@powerhousedao/
|
|
42
|
+
"@powerhousedao/codegen": "0.31.3",
|
|
43
|
+
"@powerhousedao/design-system": "1.21.3",
|
|
44
|
+
"@powerhousedao/config": "1.12.0",
|
|
45
|
+
"@powerhousedao/scalars": "1.19.0",
|
|
46
|
+
"document-model-libs": "1.127.3",
|
|
47
|
+
"@powerhousedao/reactor-local": "1.15.3"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsup",
|