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