gutterpress 0.10.6 → 0.10.7-beta.1
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/README.md +71 -3
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +4 -2
- package/dist/{audit-0a4sp2w5.js → audit-82jr4qhw.js} +4 -4
- package/dist/{build-z53bbxtx.js → build-e53pjtez.js} +4 -4
- package/dist/checks/source/css-ownership.d.ts +43 -0
- package/dist/checks/source/index.d.ts +1 -0
- package/dist/{cli-he23vgjj.js → cli-08psmhr5.js} +15 -2
- package/dist/{cli-m99hj80k.js → cli-mk1s46mx.js} +1 -1
- package/dist/{cli-bwbs3qm4.js → cli-s8q42x3r.js} +1 -1
- package/dist/{cli-kwt5ftvc.js → cli-w6h5zegm.js} +4991 -3933
- package/dist/cli.js +70 -37
- package/dist/{doctor-d8vpv1pt.js → doctor-50j69ryq.js} +2 -2
- package/dist/{engine-4ctgbwj5.js → engine-88mynx9a.js} +2 -2
- package/dist/{engine-bhhcne06.js → engine-pb6h089e.js} +1 -1
- package/dist/{index-k5hcp8wj.js → index-837htyjy.js} +1 -1
- package/dist/{index-1rcfsx67.js → index-9zf8mtk7.js} +2586 -2073
- package/dist/{index-eyzv51dw.js → index-a0xpm188.js} +1 -1
- package/dist/index.js +5 -3
- package/dist/lib/cli-args.d.ts +9 -0
- package/dist/lib/manifest-doc.d.ts +8 -2
- package/dist/lib/markdown/assemble.d.ts +24 -7
- package/dist/lib/markdown/gfm-alerts.d.ts +7 -0
- package/dist/lib/markdown/gutterpress-css.d.ts +1 -1
- package/dist/lib/markdown/index.d.ts +16 -0
- package/dist/lib/markdown/plugins.d.ts +8 -12
- package/dist/lib/markdown/renderer.d.ts +48 -1
- package/dist/lib/style-declarations.d.ts +20 -0
- package/dist/lib/style-resolver.d.ts +2 -0
- package/dist/lib/theme-manager.d.ts +110 -9
- package/dist/{lint-nm57gn26.js → lint-zbymjr1z.js} +4 -4
- package/dist/{manifest.schema-hn6ac0ae.json → manifest.schema-kwnrwv8b.json} +11 -8
- package/dist/{new-sawc7zh4.js → new-78j4mx60.js} +4 -4
- package/dist/{plugin-p8yghztz.js → plugin-rahnkax3.js} +5 -11
- package/dist/{preflight-48kwf2pm.js → preflight-qdmqf3j6.js} +4 -4
- package/dist/{preview-10r4dk3d.js → preview-yekma94n.js} +4 -4
- package/dist/{publish-cd05sbdx.js → publish-tm2rqyme.js} +4 -4
- package/dist/render.js +155 -52
- package/dist/schema/manifest.types.d.ts +20 -7
- package/dist/theme-j7f6aegv.js +323 -0
- package/dist/{validate-70ta3br9.js → validate-3ztxavd0.js} +4 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
UsageError,
|
|
7
7
|
package_default,
|
|
8
8
|
rejectUnknownFlags
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-08psmhr5.js";
|
|
10
10
|
import {
|
|
11
11
|
EXIT_CODES
|
|
12
12
|
} from "./cli-46ycxe6r.js";
|
|
@@ -18,16 +18,17 @@ import {
|
|
|
18
18
|
import { defineCommand, parseArgs, runMain } from "citty";
|
|
19
19
|
import { statSync } from "node:fs";
|
|
20
20
|
var SUBCOMMANDS = {
|
|
21
|
-
new: () => import("./new-
|
|
22
|
-
preview: () => import("./preview-
|
|
23
|
-
build: () => import("./build-
|
|
24
|
-
publish: () => import("./publish-
|
|
25
|
-
lint: () => import("./lint-
|
|
26
|
-
validate: () => import("./validate-
|
|
27
|
-
audit: () => import("./audit-
|
|
28
|
-
preflight: () => import("./preflight-
|
|
29
|
-
doctor: () => import("./doctor-
|
|
30
|
-
plugin: () => import("./plugin-
|
|
21
|
+
new: () => import("./new-78j4mx60.js").then((m) => m.default),
|
|
22
|
+
preview: () => import("./preview-yekma94n.js").then((m) => m.default),
|
|
23
|
+
build: () => import("./build-e53pjtez.js").then((m) => m.default),
|
|
24
|
+
publish: () => import("./publish-tm2rqyme.js").then((m) => m.default),
|
|
25
|
+
lint: () => import("./lint-zbymjr1z.js").then((m) => m.default),
|
|
26
|
+
validate: () => import("./validate-3ztxavd0.js").then((m) => m.default),
|
|
27
|
+
audit: () => import("./audit-82jr4qhw.js").then((m) => m.default),
|
|
28
|
+
preflight: () => import("./preflight-qdmqf3j6.js").then((m) => m.default),
|
|
29
|
+
doctor: () => import("./doctor-50j69ryq.js").then((m) => m.default),
|
|
30
|
+
plugin: () => import("./plugin-rahnkax3.js").then((m) => m.default),
|
|
31
|
+
theme: () => import("./theme-j7f6aegv.js").then((m) => m.default)
|
|
31
32
|
};
|
|
32
33
|
var VERSION = package_default.version;
|
|
33
34
|
var main = defineCommand({
|
|
@@ -52,50 +53,81 @@ async function preflightRequiredInvocations(rawArgs) {
|
|
|
52
53
|
const [command, ...commandArgs] = rawArgs;
|
|
53
54
|
try {
|
|
54
55
|
if (command === "new") {
|
|
55
|
-
const { newArgs } = await import("./new-
|
|
56
|
+
const { newArgs } = await import("./new-78j4mx60.js");
|
|
56
57
|
rejectUnknownFlags(commandArgs, newArgs, "new");
|
|
57
|
-
const
|
|
58
|
+
const parsed = parseArgs(commandArgs, {
|
|
58
59
|
...newArgs,
|
|
59
60
|
name: { ...newArgs.name, required: false }
|
|
60
61
|
});
|
|
61
|
-
if (
|
|
62
|
+
if (parsed.name === undefined) {
|
|
62
63
|
throw new UsageError("gutterpress new: missing required positional argument NAME");
|
|
63
64
|
}
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
67
|
if (command === "preflight") {
|
|
67
|
-
const { preflightArgs } = await import("./preflight-
|
|
68
|
+
const { preflightArgs } = await import("./preflight-qdmqf3j6.js");
|
|
68
69
|
rejectUnknownFlags(commandArgs, preflightArgs, "preflight");
|
|
69
|
-
const
|
|
70
|
+
const parsed = parseArgs(commandArgs, {
|
|
70
71
|
...preflightArgs,
|
|
71
72
|
pdf: { ...preflightArgs.pdf, required: false }
|
|
72
73
|
});
|
|
73
|
-
if (
|
|
74
|
+
if (parsed.pdf === undefined) {
|
|
74
75
|
throw new UsageError("gutterpress preflight: missing required argument --pdf");
|
|
75
76
|
}
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
|
-
if (command
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
if (command === "plugin") {
|
|
80
|
+
const [subcommand, ...subcommandArgs] = commandArgs;
|
|
81
|
+
if (subcommand === undefined)
|
|
82
|
+
return;
|
|
83
|
+
if (subcommand === "--" || subcommand === "-") {
|
|
84
|
+
throw new UsageError(`gutterpress plugin: expected a subcommand before ${subcommand}`);
|
|
85
|
+
}
|
|
86
|
+
if (subcommand.startsWith("-"))
|
|
87
|
+
return;
|
|
88
|
+
if (subcommand !== "add") {
|
|
89
|
+
throw new UsageError(`gutterpress plugin: unknown command "${subcommand}"`);
|
|
90
|
+
}
|
|
91
|
+
const { pluginAddArgs } = await import("./plugin-rahnkax3.js");
|
|
92
|
+
rejectUnknownFlags(subcommandArgs, pluginAddArgs, "plugin add");
|
|
93
|
+
const parsed = parseArgs(subcommandArgs, {
|
|
94
|
+
...pluginAddArgs,
|
|
95
|
+
package: { ...pluginAddArgs.package, required: false }
|
|
96
|
+
});
|
|
97
|
+
if (parsed.package === undefined) {
|
|
98
|
+
throw new UsageError("gutterpress plugin add: missing required positional argument PACKAGE");
|
|
99
|
+
}
|
|
87
100
|
return;
|
|
88
|
-
if (subcommand !== "add") {
|
|
89
|
-
throw new UsageError(`gutterpress plugin: unknown command "${subcommand}"`);
|
|
90
101
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
102
|
+
if (command === "theme") {
|
|
103
|
+
const [subcommand, ...subcommandArgs] = commandArgs;
|
|
104
|
+
if (subcommand === undefined)
|
|
105
|
+
return;
|
|
106
|
+
if (subcommand === "--" || subcommand === "-") {
|
|
107
|
+
throw new UsageError(`gutterpress theme: expected a subcommand before ${subcommand}`);
|
|
108
|
+
}
|
|
109
|
+
if (subcommand.startsWith("-"))
|
|
110
|
+
return;
|
|
111
|
+
const THEME_SUBCOMMANDS = ["list", "apply", "import", "revert", "remove"];
|
|
112
|
+
if (!THEME_SUBCOMMANDS.includes(subcommand)) {
|
|
113
|
+
throw new UsageError(`gutterpress theme: unknown command "${subcommand}"`);
|
|
114
|
+
}
|
|
115
|
+
if (subcommand === "list" || subcommand === "revert")
|
|
116
|
+
return;
|
|
117
|
+
const {
|
|
118
|
+
themeApplyArgs,
|
|
119
|
+
themeImportArgs,
|
|
120
|
+
themeRemoveArgs
|
|
121
|
+
} = await import("./theme-j7f6aegv.js");
|
|
122
|
+
const [positionalKey, positionalLabel, commandArgsDef] = subcommand === "apply" ? ["id", "ID", themeApplyArgs] : subcommand === "import" ? ["source", "SOURCE", themeImportArgs] : ["id", "ID", themeRemoveArgs];
|
|
123
|
+
rejectUnknownFlags(subcommandArgs, commandArgsDef, `theme ${subcommand}`);
|
|
124
|
+
const parsed = parseArgs(subcommandArgs, {
|
|
125
|
+
...commandArgsDef,
|
|
126
|
+
[positionalKey]: { ...commandArgsDef[positionalKey], required: false }
|
|
127
|
+
});
|
|
128
|
+
if (parsed[positionalKey] === undefined) {
|
|
129
|
+
throw new UsageError(`gutterpress theme ${subcommand}: missing required positional argument ${positionalLabel}`);
|
|
130
|
+
}
|
|
99
131
|
}
|
|
100
132
|
} catch (error) {
|
|
101
133
|
exitUsage(error);
|
|
@@ -136,8 +168,9 @@ function resolveImplicitPreview(rawArgs) {
|
|
|
136
168
|
return positional === undefined || isDirectory(positional) ? { usePreview: true } : { usePreview: false, unknownCommand: positional };
|
|
137
169
|
}
|
|
138
170
|
var rawArgs = process.argv.slice(2);
|
|
139
|
-
if (rawArgs.length === 1 && rawArgs[0] === "plugin")
|
|
171
|
+
if (rawArgs.length === 1 && (rawArgs[0] === "plugin" || rawArgs[0] === "theme")) {
|
|
140
172
|
rawArgs.push("--help");
|
|
173
|
+
}
|
|
141
174
|
var wantsHelp = rawArgs.includes("--help") || rawArgs.includes("-h");
|
|
142
175
|
var wantsVersion = rawArgs.length === 1 && (rawArgs[0] === "--version" || rawArgs[0] === "-v");
|
|
143
176
|
var firstArg = rawArgs[0];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSystemDiagnostics,
|
|
3
3
|
log
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-mk1s46mx.js";
|
|
5
5
|
import {
|
|
6
6
|
UsageError,
|
|
7
7
|
rejectExtraPositionals,
|
|
8
8
|
rejectUnknownFlags
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-08psmhr5.js";
|
|
10
10
|
import"./cli-c41yr7he.js";
|
|
11
11
|
import"./cli-46ycxe6r.js";
|
|
12
12
|
import"./cli-37x76zdn.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-a0xpm188.js";
|
|
4
4
|
import {
|
|
5
5
|
BuildError,
|
|
6
6
|
RENDER_TIMEOUT_MS,
|
|
7
7
|
assertMilestone,
|
|
8
8
|
connectChromium,
|
|
9
9
|
getBrowser
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-837htyjy.js";
|
|
11
11
|
import"./index-37x76zdn.js";
|
|
12
12
|
|
|
13
13
|
// src/lib/engine.ts
|
|
@@ -593,7 +593,7 @@ import { fileURLToPath } from "node:url";
|
|
|
593
593
|
var favicon_default = "./favicon-wkbm9cjn.ico";
|
|
594
594
|
|
|
595
595
|
// src/assets/manifest.schema.json
|
|
596
|
-
var manifest_schema_default = "./manifest.schema-
|
|
596
|
+
var manifest_schema_default = "./manifest.schema-kwnrwv8b.json";
|
|
597
597
|
|
|
598
598
|
// src/assets/preview/scripts/preview-interface.js
|
|
599
599
|
var preview_interface_default = "./preview-interface-9rwz21yw.js";
|