@xyd-js/cli 0.1.0-xyd.11 → 0.1.0-xyd.12
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/{.cli → dist}/index.js +101 -126
- package/package.json +41 -38
- package/.cli/app/root.tsx +0 -23
- package/.cli/app/routes.ts +0 -5
- package/.cli/bin.js +0 -3
- package/.cli/index.d.ts +0 -1
- package/.cli/package-lock.json +0 -7497
- package/.cli/package.json +0 -37
- package/.cli/plugins/xyd-plugin-zero/src/pages/api-reference.tsx +0 -406
- package/.cli/plugins/xyd-plugin-zero/src/pages/docs.tsx +0 -166
- package/.cli/plugins/xyd-plugin-zero/src/pages/root.tsx +0 -37
- package/.cli/postcss.config.cjs +0 -5
- package/.cli/react-router.config.ts +0 -8
- package/.cli/tsconfig.json +0 -22
- package/.cli/vite.config.ts +0 -9
- package/postinstall.js +0 -10
package/{.cli → dist}/index.js
RENAMED
|
@@ -31,9 +31,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
mod
|
|
32
32
|
));
|
|
33
33
|
|
|
34
|
-
// node_modules/picocolors/picocolors.js
|
|
34
|
+
// ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
35
35
|
var require_picocolors = __commonJS({
|
|
36
|
-
"node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
36
|
+
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
37
37
|
"use strict";
|
|
38
38
|
var p = process || {};
|
|
39
39
|
var argv = p.argv || [];
|
|
@@ -109,69 +109,72 @@ var require_package = __commonJS({
|
|
|
109
109
|
"package.json"(exports2, module2) {
|
|
110
110
|
module2.exports = {
|
|
111
111
|
name: "@xyd-js/cli",
|
|
112
|
-
version: "0.1.0-xyd.
|
|
112
|
+
version: "0.1.0-xyd.4",
|
|
113
113
|
keywords: [],
|
|
114
114
|
author: "",
|
|
115
115
|
description: "",
|
|
116
116
|
type: "module",
|
|
117
|
+
main: "dist/index.js",
|
|
118
|
+
bin: {
|
|
119
|
+
xyd: "bin.js"
|
|
120
|
+
},
|
|
117
121
|
files: [
|
|
118
|
-
"
|
|
119
|
-
"
|
|
122
|
+
"../cli",
|
|
123
|
+
"../cli/package.json"
|
|
120
124
|
],
|
|
121
125
|
scripts: {
|
|
122
126
|
build: "tsup",
|
|
123
127
|
postinstall: "node postinstall.js"
|
|
124
128
|
},
|
|
125
129
|
dependencies: {
|
|
126
|
-
"@graphql-markdown/core": "^1.12.0",
|
|
127
|
-
"@graphql-markdown/graphql": "^1.1.4",
|
|
128
|
-
"@graphql-markdown/types": "^1.4.0",
|
|
129
|
-
"@react-router/dev": "^7.1.1",
|
|
130
|
-
"@react-router/node": "^7.1.1",
|
|
131
|
-
"@react-router/serve": "^7.1.1",
|
|
132
|
-
"@readme/oas-to-snippet": "^26.0.1",
|
|
133
|
-
"@xyd-js/documan-host": "file:.cli",
|
|
134
130
|
"@xyd-js/react-router-dev": "7.1.1-xyd.3",
|
|
135
131
|
arg: "^5.0.2",
|
|
136
|
-
codehike: "^1.0.3",
|
|
137
132
|
colors: "^1.4.0",
|
|
138
|
-
|
|
133
|
+
semver: "^7.6.3",
|
|
134
|
+
codehike: "^1.0.3",
|
|
139
135
|
express: "^4.21.1",
|
|
140
|
-
"get-port": "^7.1.0",
|
|
141
|
-
"graphql-config": "^5.1.2",
|
|
142
|
-
"gray-matter": "^4.0.3",
|
|
143
136
|
isbot: "^5.1.17",
|
|
144
|
-
"js-yaml": "^4.1.0",
|
|
145
|
-
"json-schema-ref-parser": "^9.0.9",
|
|
146
|
-
"json-to-graphql-query": "^2.3.0",
|
|
147
|
-
lightningcss: "^1.27.0",
|
|
148
|
-
morgan: "^1.10.0",
|
|
149
|
-
oas: "^25.0.3",
|
|
150
|
-
"openapi-sampler": "^1.5.1",
|
|
151
|
-
"openapi-types": "^12.1.3",
|
|
152
137
|
react: "^18.3.1",
|
|
153
138
|
"react-dom": "^18.3.1",
|
|
154
139
|
"react-router": "^7.1.1",
|
|
155
|
-
remark: "^15.0.1",
|
|
156
140
|
"remark-frontmatter": "^5.0.0",
|
|
157
141
|
"remark-gfm": "^4.0.0",
|
|
158
142
|
"remark-mdx-frontmatter": "^5.0.0",
|
|
159
|
-
"remark-stringify": "^11.0.0",
|
|
160
|
-
semver: "^7.6.3",
|
|
161
|
-
"source-map-support": "^0.5.21",
|
|
162
143
|
typescript: "^5.6.3",
|
|
144
|
+
vfile: "^6.0.3",
|
|
145
|
+
yaml: "^2.6.0",
|
|
146
|
+
"@graphql-markdown/core": "^1.12.0",
|
|
147
|
+
"@graphql-markdown/graphql": "^1.1.4",
|
|
148
|
+
"@graphql-markdown/types": "^1.4.0",
|
|
149
|
+
"graphql-config": "^5.1.2",
|
|
150
|
+
"gray-matter": "^4.0.3",
|
|
151
|
+
"json-to-graphql-query": "^2.3.0",
|
|
152
|
+
remark: "^15.0.1",
|
|
153
|
+
"remark-stringify": "^11.0.0",
|
|
163
154
|
"unist-builder": "^4.0.0",
|
|
164
155
|
"unist-util-visit": "^5.0.0",
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
|
|
156
|
+
"@readme/oas-to-snippet": "^26.0.1",
|
|
157
|
+
"js-yaml": "^4.1.0",
|
|
158
|
+
"json-schema-ref-parser": "^9.0.9",
|
|
159
|
+
oas: "^25.0.3",
|
|
160
|
+
"openapi-sampler": "^1.5.1",
|
|
161
|
+
"openapi-types": "^12.1.3",
|
|
162
|
+
"@react-router/node": "^7.1.1",
|
|
163
|
+
"@react-router/serve": "^7.1.1",
|
|
164
|
+
"@react-router/dev": "^7.1.1",
|
|
165
|
+
compression: "^1.7.5",
|
|
166
|
+
"get-port": "^7.1.0",
|
|
167
|
+
lightningcss: "^1.27.0",
|
|
168
|
+
morgan: "^1.10.0",
|
|
169
|
+
"source-map-support": "^0.5.21",
|
|
170
|
+
"vite-tsconfig-paths": "^5.1.4"
|
|
168
171
|
},
|
|
169
172
|
devDependencies: {
|
|
170
|
-
"@xyd-js/documan": "
|
|
173
|
+
"@xyd-js/documan": "workspace:*",
|
|
174
|
+
tsup: "^8.3.0",
|
|
171
175
|
arg: "^5.0.2",
|
|
172
176
|
colors: "^1.4.0",
|
|
173
177
|
semver: "^7.6.3",
|
|
174
|
-
tsup: "^8.3.0",
|
|
175
178
|
"vite-tsconfig-paths": "^5.1.4"
|
|
176
179
|
}
|
|
177
180
|
};
|
|
@@ -183,16 +186,16 @@ var import_picocolors = __toESM(require_picocolors(), 1);
|
|
|
183
186
|
import arg from "arg";
|
|
184
187
|
import semver from "semver";
|
|
185
188
|
|
|
186
|
-
//
|
|
189
|
+
// ../xyd-documan/dist/index.js
|
|
187
190
|
import path4 from "node:path";
|
|
188
191
|
import fs4 from "node:fs";
|
|
189
|
-
import { fileURLToPath as
|
|
192
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
190
193
|
import { execSync } from "child_process";
|
|
191
194
|
import { build as viteBuild } from "vite";
|
|
192
195
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
193
196
|
import { reactRouter } from "@xyd-js/react-router-dev/vite";
|
|
194
197
|
|
|
195
|
-
//
|
|
198
|
+
// ../xyd-content/dist/index.js
|
|
196
199
|
import { VFile } from "vfile";
|
|
197
200
|
import { compile as mdxCompile } from "@mdx-js/mdx";
|
|
198
201
|
import remarkFrontmatter from "remark-frontmatter";
|
|
@@ -361,7 +364,7 @@ function vitePlugins(options2) {
|
|
|
361
364
|
];
|
|
362
365
|
}
|
|
363
366
|
|
|
364
|
-
//
|
|
367
|
+
// ../xyd-plugin-zero/dist/index.js
|
|
365
368
|
import { promises as fs2 } from "fs";
|
|
366
369
|
import path22 from "node:path";
|
|
367
370
|
import { createServer as createServer2 } from "vite";
|
|
@@ -371,10 +374,10 @@ import path3 from "node:path";
|
|
|
371
374
|
import { createServer } from "vite";
|
|
372
375
|
import { fileURLToPath } from "node:url";
|
|
373
376
|
|
|
374
|
-
//
|
|
377
|
+
// ../xyd-gql/dist/index.js
|
|
375
378
|
import { getDocumentLoaders, loadSchema } from "@graphql-markdown/graphql";
|
|
376
379
|
|
|
377
|
-
//
|
|
380
|
+
// ../xyd-uniform/dist/index.js
|
|
378
381
|
import path from "path";
|
|
379
382
|
import matter from "gray-matter";
|
|
380
383
|
function uniform(references, config) {
|
|
@@ -476,29 +479,29 @@ function convertGroupMapsToNavigations(groupMaps) {
|
|
|
476
479
|
});
|
|
477
480
|
return nav;
|
|
478
481
|
}
|
|
479
|
-
var ReferenceCategory = /* @__PURE__ */ ((
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
return
|
|
482
|
+
var ReferenceCategory = /* @__PURE__ */ ((ReferenceCategory2) => {
|
|
483
|
+
ReferenceCategory2["COMPONENTS"] = "components";
|
|
484
|
+
ReferenceCategory2["HOOKS"] = "hooks";
|
|
485
|
+
ReferenceCategory2["REST"] = "rest";
|
|
486
|
+
ReferenceCategory2["GRAPHQL"] = "graphql";
|
|
487
|
+
ReferenceCategory2["FUNCTIONS"] = "functions";
|
|
488
|
+
return ReferenceCategory2;
|
|
486
489
|
})(ReferenceCategory || {});
|
|
487
|
-
var ReferenceType = /* @__PURE__ */ ((
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
return
|
|
490
|
+
var ReferenceType = /* @__PURE__ */ ((ReferenceType2) => {
|
|
491
|
+
ReferenceType2["COMPONENT"] = "component";
|
|
492
|
+
ReferenceType2["HOOK"] = "hook";
|
|
493
|
+
ReferenceType2["REST_HTTP_GET"] = "rest_get";
|
|
494
|
+
ReferenceType2["REST_HTTP_POST"] = "rest_post";
|
|
495
|
+
ReferenceType2["REST_HTTP_PUT"] = "rest_put";
|
|
496
|
+
ReferenceType2["REST_HTTP_PATCH"] = "rest_patch";
|
|
497
|
+
ReferenceType2["REST_HTTP_DELETE"] = "rest_delete";
|
|
498
|
+
ReferenceType2["GRAPHQL_QUERY"] = "graphql_query";
|
|
499
|
+
ReferenceType2["GRAPHQL_MUTATION"] = "graphql_mutation";
|
|
500
|
+
ReferenceType2["FUNCTION_JS"] = "function_js";
|
|
501
|
+
return ReferenceType2;
|
|
499
502
|
})(ReferenceType || {});
|
|
500
503
|
|
|
501
|
-
//
|
|
504
|
+
// ../xyd-gql/dist/index.js
|
|
502
505
|
import { jsonToGraphQLQuery, VariableType } from "json-to-graphql-query";
|
|
503
506
|
var __create2 = Object.create;
|
|
504
507
|
var __defProp2 = Object.defineProperty;
|
|
@@ -526,7 +529,7 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__
|
|
|
526
529
|
mod
|
|
527
530
|
));
|
|
528
531
|
var require_ast = __commonJS2({
|
|
529
|
-
"node_modules/graphql/language/ast.js"(exports2) {
|
|
532
|
+
"../../node_modules/.pnpm/graphql@16.10.0/node_modules/graphql/language/ast.js"(exports2) {
|
|
530
533
|
"use strict";
|
|
531
534
|
Object.defineProperty(exports2, "__esModule", {
|
|
532
535
|
value: true
|
|
@@ -976,12 +979,13 @@ async function gqlSchemaToReferences(schemaLocation) {
|
|
|
976
979
|
return references;
|
|
977
980
|
}
|
|
978
981
|
|
|
979
|
-
//
|
|
982
|
+
// ../xyd-plugin-zero/dist/index.js
|
|
980
983
|
import path32 from "path";
|
|
981
984
|
import { promises as fs32 } from "fs";
|
|
985
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
982
986
|
import { route as route2 } from "@react-router/dev/routes";
|
|
983
987
|
|
|
984
|
-
//
|
|
988
|
+
// ../xyd-uniform/dist/markdown.js
|
|
985
989
|
import { remark } from "remark";
|
|
986
990
|
import remarkStringify from "remark-stringify";
|
|
987
991
|
import { u } from "unist-builder";
|
|
@@ -1205,34 +1209,8 @@ function referenceAST(ref) {
|
|
|
1205
1209
|
return md;
|
|
1206
1210
|
}
|
|
1207
1211
|
|
|
1208
|
-
//
|
|
1212
|
+
// ../xyd-openapi/dist/index.js
|
|
1209
1213
|
import Oas from "oas";
|
|
1210
|
-
|
|
1211
|
-
// node_modules/@xyd-js/openapi/node_modules/@xyd-js/uniform/dist/index.js
|
|
1212
|
-
import matter2 from "gray-matter";
|
|
1213
|
-
var ReferenceCategory2 = /* @__PURE__ */ ((ReferenceCategory22) => {
|
|
1214
|
-
ReferenceCategory22["COMPONENTS"] = "components";
|
|
1215
|
-
ReferenceCategory22["HOOKS"] = "hooks";
|
|
1216
|
-
ReferenceCategory22["REST"] = "rest";
|
|
1217
|
-
ReferenceCategory22["GRAPHQL"] = "graphql";
|
|
1218
|
-
ReferenceCategory22["FUNCTIONS"] = "functions";
|
|
1219
|
-
return ReferenceCategory22;
|
|
1220
|
-
})(ReferenceCategory2 || {});
|
|
1221
|
-
var ReferenceType2 = /* @__PURE__ */ ((ReferenceType22) => {
|
|
1222
|
-
ReferenceType22["COMPONENT"] = "component";
|
|
1223
|
-
ReferenceType22["HOOK"] = "hook";
|
|
1224
|
-
ReferenceType22["REST_HTTP_GET"] = "rest_get";
|
|
1225
|
-
ReferenceType22["REST_HTTP_POST"] = "rest_post";
|
|
1226
|
-
ReferenceType22["REST_HTTP_PUT"] = "rest_put";
|
|
1227
|
-
ReferenceType22["REST_HTTP_PATCH"] = "rest_patch";
|
|
1228
|
-
ReferenceType22["REST_HTTP_DELETE"] = "rest_delete";
|
|
1229
|
-
ReferenceType22["GRAPHQL_QUERY"] = "graphql_query";
|
|
1230
|
-
ReferenceType22["GRAPHQL_MUTATION"] = "graphql_mutation";
|
|
1231
|
-
ReferenceType22["FUNCTION_JS"] = "function_js";
|
|
1232
|
-
return ReferenceType22;
|
|
1233
|
-
})(ReferenceType2 || {});
|
|
1234
|
-
|
|
1235
|
-
// node_modules/@xyd-js/openapi/dist/index.js
|
|
1236
1214
|
import path2 from "path";
|
|
1237
1215
|
import fs from "fs";
|
|
1238
1216
|
import yaml2 from "js-yaml";
|
|
@@ -1368,15 +1346,15 @@ async function deferencedOpenAPI(openApiPath) {
|
|
|
1368
1346
|
function httpMethodToUniformMethod(method) {
|
|
1369
1347
|
switch (method) {
|
|
1370
1348
|
case "get":
|
|
1371
|
-
return
|
|
1349
|
+
return ReferenceType.REST_HTTP_GET;
|
|
1372
1350
|
case "put":
|
|
1373
|
-
return
|
|
1351
|
+
return ReferenceType.REST_HTTP_PUT;
|
|
1374
1352
|
case "patch":
|
|
1375
|
-
return
|
|
1353
|
+
return ReferenceType.REST_HTTP_PATCH;
|
|
1376
1354
|
case "post":
|
|
1377
|
-
return
|
|
1355
|
+
return ReferenceType.REST_HTTP_POST;
|
|
1378
1356
|
case "delete":
|
|
1379
|
-
return
|
|
1357
|
+
return ReferenceType.REST_HTTP_DELETE;
|
|
1380
1358
|
// case 'options':
|
|
1381
1359
|
// return ReferenceType.REST_HTTP_OPTIONS
|
|
1382
1360
|
// case 'head':
|
|
@@ -1403,7 +1381,7 @@ function oapPathToReference(httpMethod, path24, oapPath) {
|
|
|
1403
1381
|
title: (oapMethod == null ? void 0 : oapMethod.summary) || "",
|
|
1404
1382
|
canonical: toPascalCase((oapMethod == null ? void 0 : oapMethod.summary) || ""),
|
|
1405
1383
|
description: (oapMethod == null ? void 0 : oapMethod.description) || "",
|
|
1406
|
-
category:
|
|
1384
|
+
category: ReferenceCategory.REST,
|
|
1407
1385
|
type: mType,
|
|
1408
1386
|
context: {
|
|
1409
1387
|
method: httpMethod,
|
|
@@ -1561,7 +1539,7 @@ function oapSchemaToReferences(schema) {
|
|
|
1561
1539
|
return references;
|
|
1562
1540
|
}
|
|
1563
1541
|
|
|
1564
|
-
//
|
|
1542
|
+
// ../xyd-plugin-zero/dist/index.js
|
|
1565
1543
|
var __create3 = Object.create;
|
|
1566
1544
|
var __defProp3 = Object.defineProperty;
|
|
1567
1545
|
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
@@ -4631,10 +4609,10 @@ var require_stringify = __commonJS3({
|
|
|
4631
4609
|
data = Object.assign({}, file.data, data);
|
|
4632
4610
|
const open = opts.delimiters[0];
|
|
4633
4611
|
const close = opts.delimiters[1];
|
|
4634
|
-
const
|
|
4612
|
+
const matter2 = engine.stringify(data, options2).trim();
|
|
4635
4613
|
let buf = "";
|
|
4636
|
-
if (
|
|
4637
|
-
buf = newline(open) + newline(
|
|
4614
|
+
if (matter2 !== "{}") {
|
|
4615
|
+
buf = newline(open) + newline(matter2) + newline(close);
|
|
4638
4616
|
}
|
|
4639
4617
|
if (typeof file.excerpt === "string" && file.excerpt !== "") {
|
|
4640
4618
|
if (str2.indexOf(file.excerpt.trim()) === -1) {
|
|
@@ -4750,8 +4728,8 @@ function vitePluginThemeCSS() {
|
|
|
4750
4728
|
let basePath = "";
|
|
4751
4729
|
if (process.env.XYD_CLI) {
|
|
4752
4730
|
const __filename3 = fileURLToPath(import.meta.url);
|
|
4753
|
-
const
|
|
4754
|
-
basePath =
|
|
4731
|
+
const __dirname3 = path22.dirname(__filename3);
|
|
4732
|
+
basePath = __dirname3 + "/";
|
|
4755
4733
|
} else {
|
|
4756
4734
|
basePath = import.meta.url.split("xyd/packages")[0] += "xyd/";
|
|
4757
4735
|
}
|
|
@@ -4836,10 +4814,10 @@ function vitePluginTheme() {
|
|
|
4836
4814
|
}
|
|
4837
4815
|
function preset(settings, options2) {
|
|
4838
4816
|
const __filename3 = fileURLToPath(import.meta.url);
|
|
4839
|
-
const
|
|
4817
|
+
const __dirname3 = path22.dirname(__filename3);
|
|
4840
4818
|
let basePath = "";
|
|
4841
4819
|
if (process.env.XYD_CLI) {
|
|
4842
|
-
basePath = path22.join(
|
|
4820
|
+
basePath = path22.join(__dirname3, "./plugins/xyd-plugin-zero");
|
|
4843
4821
|
} else {
|
|
4844
4822
|
basePath = "../../../xyd-plugin-zero";
|
|
4845
4823
|
}
|
|
@@ -5171,7 +5149,9 @@ function uniformPreset(id, apiFile, sidebar, options2, uniformApiResolver) {
|
|
|
5171
5149
|
}
|
|
5172
5150
|
let basePath = "";
|
|
5173
5151
|
if (process.env.XYD_CLI) {
|
|
5174
|
-
|
|
5152
|
+
const __filename3 = fileURLToPath2(import.meta.url);
|
|
5153
|
+
const __dirname3 = path32.dirname(__filename3);
|
|
5154
|
+
basePath = path32.join(__dirname3, "./plugins/xyd-plugin-zero");
|
|
5175
5155
|
} else {
|
|
5176
5156
|
basePath = "../../../xyd-plugin-zero";
|
|
5177
5157
|
}
|
|
@@ -5323,7 +5303,7 @@ async function pluginZero() {
|
|
|
5323
5303
|
};
|
|
5324
5304
|
}
|
|
5325
5305
|
|
|
5326
|
-
//
|
|
5306
|
+
// ../xyd-documan/dist/index.js
|
|
5327
5307
|
import path23 from "node:path";
|
|
5328
5308
|
import { fileURLToPath as fileURLToPath22 } from "node:url";
|
|
5329
5309
|
import { createServer as createServer3, searchForWorkspaceRoot } from "vite";
|
|
@@ -5338,8 +5318,8 @@ import express from "express";
|
|
|
5338
5318
|
import morgan from "morgan";
|
|
5339
5319
|
import sourceMapSupport from "source-map-support";
|
|
5340
5320
|
import getPort from "get-port";
|
|
5341
|
-
var __filename =
|
|
5342
|
-
var
|
|
5321
|
+
var __filename = fileURLToPath3(import.meta.url);
|
|
5322
|
+
var __dirname = path4.dirname(__filename);
|
|
5343
5323
|
async function build() {
|
|
5344
5324
|
const resp = await pluginZero();
|
|
5345
5325
|
if (!resp) {
|
|
@@ -5366,12 +5346,11 @@ async function build() {
|
|
|
5366
5346
|
fs4.mkdirSync(buildDir, { recursive: true });
|
|
5367
5347
|
}
|
|
5368
5348
|
fs4.writeFileSync(packageJsonPath, JSON.stringify(packageJsonContent, null, 2), "utf8");
|
|
5369
|
-
console.log("Installing dependencies...");
|
|
5370
5349
|
execSync("npm install", { cwd: buildDir, stdio: "inherit" });
|
|
5371
5350
|
}
|
|
5372
5351
|
try {
|
|
5373
5352
|
await viteBuild({
|
|
5374
|
-
root: process.env.XYD_CLI ?
|
|
5353
|
+
root: process.env.XYD_CLI ? __dirname : process.env.XYD_DOCUMAN_HOST || path4.join(__dirname, "../host"),
|
|
5375
5354
|
// @ts-ignore
|
|
5376
5355
|
plugins: [
|
|
5377
5356
|
...vitePlugins({
|
|
@@ -5391,7 +5370,7 @@ async function build() {
|
|
|
5391
5370
|
}
|
|
5392
5371
|
});
|
|
5393
5372
|
await viteBuild({
|
|
5394
|
-
root: process.env.XYD_CLI ?
|
|
5373
|
+
root: process.env.XYD_CLI ? __dirname : process.env.XYD_DOCUMAN_HOST || path4.join(__dirname, "../host"),
|
|
5395
5374
|
build: {
|
|
5396
5375
|
ssr: true
|
|
5397
5376
|
},
|
|
@@ -5419,7 +5398,7 @@ async function build() {
|
|
|
5419
5398
|
}
|
|
5420
5399
|
}
|
|
5421
5400
|
var __filename2 = fileURLToPath22(import.meta.url);
|
|
5422
|
-
var
|
|
5401
|
+
var __dirname2 = path23.dirname(__filename2);
|
|
5423
5402
|
var port = process.env.XYD_PORT ? parseInt(process.env.XYD_PORT) : 5175;
|
|
5424
5403
|
async function dev() {
|
|
5425
5404
|
const resp = await pluginZero();
|
|
@@ -5432,14 +5411,14 @@ async function dev() {
|
|
|
5432
5411
|
// configFile: path.join(__dirname, "../src/vite/empty-config.ts"), // TODO: bundler??
|
|
5433
5412
|
// configFile: path.join(__dirname, "../"), // TODO: bundler??
|
|
5434
5413
|
// root: path.join(__dirname, "../"), // TODO: bundler?
|
|
5435
|
-
root: process.env.XYD_CLI ?
|
|
5414
|
+
root: process.env.XYD_CLI ? __dirname2 : process.env.XYD_DOCUMAN_HOST || path23.join(__dirname2, "../host"),
|
|
5436
5415
|
// TODO: bundler?
|
|
5437
5416
|
server: {
|
|
5438
5417
|
port,
|
|
5439
5418
|
fs: {
|
|
5440
5419
|
allow: [
|
|
5441
5420
|
allowCwd,
|
|
5442
|
-
process.env.XYD_CLI ? path23.join(
|
|
5421
|
+
process.env.XYD_CLI ? path23.join(__dirname2, "../../") : ""
|
|
5443
5422
|
// path.join(__dirname, "../node_modules") // Ensure node_modules from xyd-documan is included
|
|
5444
5423
|
]
|
|
5445
5424
|
}
|
|
@@ -5660,15 +5639,11 @@ run().then(
|
|
|
5660
5639
|
);
|
|
5661
5640
|
/*! Bundled license information:
|
|
5662
5641
|
|
|
5663
|
-
|
|
5664
|
-
(*!
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
|
5671
|
-
* Released under the MIT License.
|
|
5672
|
-
*)
|
|
5673
|
-
*)
|
|
5642
|
+
strip-bom-string/index.js:
|
|
5643
|
+
(*!
|
|
5644
|
+
* strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
|
|
5645
|
+
*
|
|
5646
|
+
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
|
5647
|
+
* Released under the MIT License.
|
|
5648
|
+
*)
|
|
5674
5649
|
*/
|
package/package.json
CHANGED
|
@@ -1,68 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyd-js/cli",
|
|
3
|
-
"version": "0.1.0-xyd.
|
|
3
|
+
"version": "0.1.0-xyd.12",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "",
|
|
6
6
|
"description": "",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"xyd": "bin.js"
|
|
11
|
+
},
|
|
8
12
|
"files": [
|
|
9
13
|
".cli",
|
|
10
|
-
"
|
|
14
|
+
".cli/package.json"
|
|
11
15
|
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsup",
|
|
14
|
-
"postinstall": "node postinstall.js"
|
|
15
|
-
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@graphql-markdown/core": "^1.12.0",
|
|
18
|
-
"@graphql-markdown/graphql": "^1.1.4",
|
|
19
|
-
"@graphql-markdown/types": "^1.4.0",
|
|
20
|
-
"@react-router/dev": "^7.1.1",
|
|
21
|
-
"@react-router/node": "^7.1.1",
|
|
22
|
-
"@react-router/serve": "^7.1.1",
|
|
23
|
-
"@readme/oas-to-snippet": "^26.0.1",
|
|
24
|
-
"@xyd-js/documan-host": "file:.cli",
|
|
25
17
|
"@xyd-js/react-router-dev": "7.1.1-xyd.3",
|
|
26
18
|
"arg": "^5.0.2",
|
|
27
|
-
"codehike": "^1.0.3",
|
|
28
19
|
"colors": "^1.4.0",
|
|
29
|
-
"
|
|
20
|
+
"semver": "^7.6.3",
|
|
21
|
+
"codehike": "^1.0.3",
|
|
30
22
|
"express": "^4.21.1",
|
|
31
|
-
"get-port": "^7.1.0",
|
|
32
|
-
"graphql-config": "^5.1.2",
|
|
33
|
-
"gray-matter": "^4.0.3",
|
|
34
23
|
"isbot": "^5.1.17",
|
|
35
|
-
"js-yaml": "^4.1.0",
|
|
36
|
-
"json-schema-ref-parser": "^9.0.9",
|
|
37
|
-
"json-to-graphql-query": "^2.3.0",
|
|
38
|
-
"lightningcss": "^1.27.0",
|
|
39
|
-
"morgan": "^1.10.0",
|
|
40
|
-
"oas": "^25.0.3",
|
|
41
|
-
"openapi-sampler": "^1.5.1",
|
|
42
|
-
"openapi-types": "^12.1.3",
|
|
43
24
|
"react": "^18.3.1",
|
|
44
25
|
"react-dom": "^18.3.1",
|
|
45
26
|
"react-router": "^7.1.1",
|
|
46
|
-
"remark": "^15.0.1",
|
|
47
27
|
"remark-frontmatter": "^5.0.0",
|
|
48
28
|
"remark-gfm": "^4.0.0",
|
|
49
29
|
"remark-mdx-frontmatter": "^5.0.0",
|
|
50
|
-
"remark-stringify": "^11.0.0",
|
|
51
|
-
"semver": "^7.6.3",
|
|
52
|
-
"source-map-support": "^0.5.21",
|
|
53
30
|
"typescript": "^5.6.3",
|
|
31
|
+
"vfile": "^6.0.3",
|
|
32
|
+
"yaml": "^2.6.0",
|
|
33
|
+
"@graphql-markdown/core": "^1.12.0",
|
|
34
|
+
"@graphql-markdown/graphql": "^1.1.4",
|
|
35
|
+
"@graphql-markdown/types": "^1.4.0",
|
|
36
|
+
"graphql-config": "^5.1.2",
|
|
37
|
+
"gray-matter": "^4.0.3",
|
|
38
|
+
"json-to-graphql-query": "^2.3.0",
|
|
39
|
+
"remark": "^15.0.1",
|
|
40
|
+
"remark-stringify": "^11.0.0",
|
|
54
41
|
"unist-builder": "^4.0.0",
|
|
55
42
|
"unist-util-visit": "^5.0.0",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
43
|
+
"@readme/oas-to-snippet": "^26.0.1",
|
|
44
|
+
"js-yaml": "^4.1.0",
|
|
45
|
+
"json-schema-ref-parser": "^9.0.9",
|
|
46
|
+
"oas": "^25.0.3",
|
|
47
|
+
"openapi-sampler": "^1.5.1",
|
|
48
|
+
"openapi-types": "^12.1.3",
|
|
49
|
+
"@react-router/node": "^7.1.1",
|
|
50
|
+
"@react-router/serve": "^7.1.1",
|
|
51
|
+
"@react-router/dev": "^7.1.1",
|
|
52
|
+
"compression": "^1.7.5",
|
|
53
|
+
"get-port": "^7.1.0",
|
|
54
|
+
"lightningcss": "^1.27.0",
|
|
55
|
+
"morgan": "^1.10.0",
|
|
56
|
+
"source-map-support": "^0.5.21",
|
|
57
|
+
"vite-tsconfig-paths": "^5.1.4"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
|
-
"
|
|
60
|
+
"tsup": "^8.3.0",
|
|
62
61
|
"arg": "^5.0.2",
|
|
63
62
|
"colors": "^1.4.0",
|
|
64
63
|
"semver": "^7.6.3",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
64
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
65
|
+
"@xyd-js/documan": "0.1.0-xyd.16"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsup",
|
|
69
|
+
"postinstall": "node postinstall.js"
|
|
67
70
|
}
|
|
68
|
-
}
|
|
71
|
+
}
|
package/.cli/app/root.tsx
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";
|
|
2
|
-
|
|
3
|
-
export function Layout({ children }: { children: React.ReactNode }) {
|
|
4
|
-
return (
|
|
5
|
-
<html lang="en">
|
|
6
|
-
<head>
|
|
7
|
-
<meta charSet="utf-8" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
9
|
-
<Meta />
|
|
10
|
-
<Links />
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
{children}
|
|
14
|
-
<ScrollRestoration />
|
|
15
|
-
<Scripts />
|
|
16
|
-
</body>
|
|
17
|
-
</html>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default function App() {
|
|
22
|
-
return <Outlet />;
|
|
23
|
-
}
|
package/.cli/app/routes.ts
DELETED
package/.cli/bin.js
DELETED
package/.cli/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|