@superdoc-dev/cli 0.2.0-next.98 → 0.2.0-next.99
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/index.js +133 -81
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -33280,7 +33280,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
|
|
|
33280
33280
|
emptyOptions2 = {};
|
|
33281
33281
|
});
|
|
33282
33282
|
|
|
33283
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
33283
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-DSgQEo7o.es.js
|
|
33284
33284
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
33285
33285
|
const fieldValue = extension$1.config[field];
|
|
33286
33286
|
if (typeof fieldValue === "function")
|
|
@@ -65108,7 +65108,7 @@ var isRegExp = (value) => {
|
|
|
65108
65108
|
state.kern = kernNode.attributes["w:val"];
|
|
65109
65109
|
}
|
|
65110
65110
|
}, SuperConverter;
|
|
65111
|
-
var
|
|
65111
|
+
var init_SuperConverter_DSgQEo7o_es = __esm(() => {
|
|
65112
65112
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
65113
65113
|
init_jszip_ChlR43oI_es();
|
|
65114
65114
|
init_xml_js_DLE8mr0n_es();
|
|
@@ -94979,7 +94979,7 @@ var init_SuperConverter_6i_hCnOE_es = __esm(() => {
|
|
|
94979
94979
|
static getStoredSuperdocVersion(docx) {
|
|
94980
94980
|
return SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
94981
94981
|
}
|
|
94982
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.
|
|
94982
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.18.0") {
|
|
94983
94983
|
return SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
94984
94984
|
}
|
|
94985
94985
|
static generateWordTimestamp() {
|
|
@@ -121914,9 +121914,9 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
121914
121914
|
init_remark_gfm_z_sDF4ss_es();
|
|
121915
121915
|
});
|
|
121916
121916
|
|
|
121917
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
121918
|
-
var
|
|
121919
|
-
__export(
|
|
121917
|
+
// ../../packages/superdoc/dist/chunks/src-CPyKzDwB.es.js
|
|
121918
|
+
var exports_src_CPyKzDwB_es = {};
|
|
121919
|
+
__export(exports_src_CPyKzDwB_es, {
|
|
121920
121920
|
zt: () => defineMark,
|
|
121921
121921
|
z: () => cM,
|
|
121922
121922
|
yt: () => removeAwarenessStates,
|
|
@@ -122146,7 +122146,7 @@ function hasV8CaptureStackTrace(error) {
|
|
|
122146
122146
|
}
|
|
122147
122147
|
function getSuperdocVersion() {
|
|
122148
122148
|
try {
|
|
122149
|
-
return "1.
|
|
122149
|
+
return "1.18.0";
|
|
122150
122150
|
} catch {
|
|
122151
122151
|
return "unknown";
|
|
122152
122152
|
}
|
|
@@ -145010,21 +145010,32 @@ function imagesSetHyperlinkWrapper(editor, input2, options) {
|
|
|
145010
145010
|
return buildNoOpResult("Set hyperlink produced no change.");
|
|
145011
145011
|
return buildSuccessResult(findImageById(editor, input2.imageId));
|
|
145012
145012
|
}
|
|
145013
|
-
function
|
|
145013
|
+
function findContainingParagraph(editor, imagePos) {
|
|
145014
145014
|
const $pos = editor.state.doc.resolve(imagePos);
|
|
145015
|
-
|
|
145016
|
-
|
|
145017
|
-
|
|
145018
|
-
|
|
145019
|
-
|
|
145015
|
+
for (let depth = $pos.depth;depth >= 1; depth -= 1) {
|
|
145016
|
+
const node3 = $pos.node(depth);
|
|
145017
|
+
if (node3.type.name !== "paragraph")
|
|
145018
|
+
continue;
|
|
145019
|
+
return {
|
|
145020
|
+
depth,
|
|
145021
|
+
pos: $pos.before(depth),
|
|
145022
|
+
node: node3
|
|
145023
|
+
};
|
|
145024
|
+
}
|
|
145025
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", "Caption operations require the image to be inside a paragraph.");
|
|
145026
|
+
}
|
|
145027
|
+
function findCaptionParagraph(editor, imagePos) {
|
|
145028
|
+
const paragraph2 = findContainingParagraph(editor, imagePos);
|
|
145029
|
+
const afterParagraphPos = paragraph2.pos + paragraph2.node.nodeSize;
|
|
145030
|
+
if (afterParagraphPos >= editor.state.doc.content.size)
|
|
145020
145031
|
return null;
|
|
145021
|
-
const nextNode = editor.state.doc.nodeAt(
|
|
145032
|
+
const nextNode = editor.state.doc.nodeAt(afterParagraphPos);
|
|
145022
145033
|
if (!nextNode || nextNode.type.name !== "paragraph")
|
|
145023
145034
|
return null;
|
|
145024
|
-
if (nextNode.attrs?.paragraphProperties?.styleId !== "Caption")
|
|
145035
|
+
if ((nextNode.attrs?.paragraphProperties?.styleId ?? nextNode.attrs?.styleId) !== "Caption")
|
|
145025
145036
|
return null;
|
|
145026
145037
|
return {
|
|
145027
|
-
pos:
|
|
145038
|
+
pos: afterParagraphPos,
|
|
145028
145039
|
node: nextNode
|
|
145029
145040
|
};
|
|
145030
145041
|
}
|
|
@@ -145051,12 +145062,11 @@ function imagesInsertCaptionWrapper(editor, input2, options) {
|
|
|
145051
145062
|
if (options?.dryRun)
|
|
145052
145063
|
return buildSuccessResult(image2);
|
|
145053
145064
|
if (executeDomainCommand(editor, () => {
|
|
145054
|
-
const
|
|
145055
|
-
const
|
|
145056
|
-
const afterParentPos = $pos.before(parentDepth + 1) + $pos.node(parentDepth + 1).nodeSize;
|
|
145065
|
+
const paragraph2 = findContainingParagraph(editor, findImageById(editor, input2.imageId).pos);
|
|
145066
|
+
const afterParagraphPos = paragraph2.pos + paragraph2.node.nodeSize;
|
|
145057
145067
|
const tr = editor.state.tr;
|
|
145058
145068
|
const captionPara = editor.state.schema.nodes.paragraph.create({ paragraphProperties: { styleId: "Caption" } }, editor.state.schema.text(input2.text));
|
|
145059
|
-
tr.insert(
|
|
145069
|
+
tr.insert(afterParagraphPos, captionPara);
|
|
145060
145070
|
if (!tr.docChanged)
|
|
145061
145071
|
return false;
|
|
145062
145072
|
editor.dispatch(tr);
|
|
@@ -180189,7 +180199,7 @@ var Node$13 = class Node$14 {
|
|
|
180189
180199
|
domAvailabilityCache = false;
|
|
180190
180200
|
return false;
|
|
180191
180201
|
}
|
|
180192
|
-
}, summaryVersion = "1.
|
|
180202
|
+
}, summaryVersion = "1.18.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
|
|
180193
180203
|
const container = document.createElement("div");
|
|
180194
180204
|
container.innerHTML = html3;
|
|
180195
180205
|
const result = [];
|
|
@@ -199186,9 +199196,9 @@ var Node$13 = class Node$14 {
|
|
|
199186
199196
|
trackedChanges: context.trackedChanges ?? []
|
|
199187
199197
|
});
|
|
199188
199198
|
}, _hoisted_1$6, _hoisted_2$2, _hoisted_3, _hoisted_4, ContextMenu_default, _hoisted_1$5, BasicUpload_default, _hoisted_1$4, MIN_WIDTH = 200, PPI = 96, alignment = "flex-end", Ruler_default, GenericPopover_default, _hoisted_1$3, _hoisted_2$1, RESIZE_HANDLE_WIDTH_PX = 9, RESIZE_HANDLE_HEIGHT_PX = 9, RESIZE_HANDLE_OFFSET_PX = 4, DRAG_OVERLAY_EXTENSION_PX = 1000, MIN_DRAG_OVERLAY_WIDTH_PX = 2000, THROTTLE_INTERVAL_MS = 16, MIN_RESIZE_DELTA_PX = 1, TableResizeOverlay_default, _hoisted_1$2, OVERLAY_EXPANSION_PX = 2000, RESIZE_HANDLE_SIZE_PX = 12, MOUSE_MOVE_THROTTLE_MS = 16, DIMENSION_CHANGE_THRESHOLD_PX = 1, Z_INDEX_OVERLAY = 10, Z_INDEX_HANDLE = 15, Z_INDEX_GUIDELINE = 20, ImageResizeOverlay_default, LINK_CLICK_DEBOUNCE_MS = 300, CURSOR_UPDATE_TIMEOUT_MS = 10, POPOVER_VERTICAL_OFFSET_PX = 15, LinkClickHandler_default, _hoisted_1$1, _hoisted_2, DOCX2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", TABLE_RESIZE_HOVER_THRESHOLD = 8, TABLE_RESIZE_THROTTLE_MS = 16, SuperEditor_default, _hoisted_1, SuperInput_default, SlashMenu, Extensions;
|
|
199189
|
-
var
|
|
199199
|
+
var init_src_CPyKzDwB_es = __esm(() => {
|
|
199190
199200
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
199191
|
-
|
|
199201
|
+
init_SuperConverter_DSgQEo7o_es();
|
|
199192
199202
|
init_jszip_ChlR43oI_es();
|
|
199193
199203
|
init_uuid_qzgm05fK_es();
|
|
199194
199204
|
init_constants_CMPtQbp7_es();
|
|
@@ -209549,7 +209559,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
209549
209559
|
return migrations.length > 0;
|
|
209550
209560
|
}
|
|
209551
209561
|
processCollaborationMigrations() {
|
|
209552
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.
|
|
209562
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.18.0");
|
|
209553
209563
|
if (!this.options.ydoc)
|
|
209554
209564
|
return;
|
|
209555
209565
|
let docVersion = this.options.ydoc.getMap("meta").get("version");
|
|
@@ -230937,8 +230947,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
230937
230947
|
return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
230938
230948
|
};
|
|
230939
230949
|
stubFalse_default = stubFalse;
|
|
230940
|
-
freeExports$2 = typeof
|
|
230941
|
-
freeModule$2 = freeExports$2 && typeof
|
|
230950
|
+
freeExports$2 = typeof exports_src_CPyKzDwB_es == "object" && exports_src_CPyKzDwB_es && !exports_src_CPyKzDwB_es.nodeType && exports_src_CPyKzDwB_es;
|
|
230951
|
+
freeModule$2 = freeExports$2 && typeof module_src_CPyKzDwB_es == "object" && module_src_CPyKzDwB_es && !module_src_CPyKzDwB_es.nodeType && module_src_CPyKzDwB_es;
|
|
230942
230952
|
Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
|
|
230943
230953
|
isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
|
|
230944
230954
|
typedArrayTags = {};
|
|
@@ -230946,8 +230956,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
230946
230956
|
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
|
|
230947
230957
|
_baseIsTypedArray_default = baseIsTypedArray;
|
|
230948
230958
|
_baseUnary_default = baseUnary;
|
|
230949
|
-
freeExports$1 = typeof
|
|
230950
|
-
freeModule$1 = freeExports$1 && typeof
|
|
230959
|
+
freeExports$1 = typeof exports_src_CPyKzDwB_es == "object" && exports_src_CPyKzDwB_es && !exports_src_CPyKzDwB_es.nodeType && exports_src_CPyKzDwB_es;
|
|
230960
|
+
freeModule$1 = freeExports$1 && typeof module_src_CPyKzDwB_es == "object" && module_src_CPyKzDwB_es && !module_src_CPyKzDwB_es.nodeType && module_src_CPyKzDwB_es;
|
|
230951
230961
|
freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
|
|
230952
230962
|
_nodeUtil_default = function() {
|
|
230953
230963
|
try {
|
|
@@ -231052,8 +231062,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
231052
231062
|
Stack.prototype.has = _stackHas_default;
|
|
231053
231063
|
Stack.prototype.set = _stackSet_default;
|
|
231054
231064
|
_Stack_default = Stack;
|
|
231055
|
-
freeExports = typeof
|
|
231056
|
-
freeModule = freeExports && typeof
|
|
231065
|
+
freeExports = typeof exports_src_CPyKzDwB_es == "object" && exports_src_CPyKzDwB_es && !exports_src_CPyKzDwB_es.nodeType && exports_src_CPyKzDwB_es;
|
|
231066
|
+
freeModule = freeExports && typeof module_src_CPyKzDwB_es == "object" && module_src_CPyKzDwB_es && !module_src_CPyKzDwB_es.nodeType && module_src_CPyKzDwB_es;
|
|
231057
231067
|
Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
|
|
231058
231068
|
allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
|
|
231059
231069
|
_cloneBuffer_default = cloneBuffer;
|
|
@@ -239133,8 +239143,8 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
239133
239143
|
|
|
239134
239144
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
239135
239145
|
var init_super_editor_es = __esm(() => {
|
|
239136
|
-
|
|
239137
|
-
|
|
239146
|
+
init_src_CPyKzDwB_es();
|
|
239147
|
+
init_SuperConverter_DSgQEo7o_es();
|
|
239138
239148
|
init_jszip_ChlR43oI_es();
|
|
239139
239149
|
init_xml_js_DLE8mr0n_es();
|
|
239140
239150
|
init_constants_CMPtQbp7_es();
|
|
@@ -317230,22 +317240,32 @@ function imagesSetHyperlinkWrapper2(editor, input2, options) {
|
|
|
317230
317240
|
return buildNoOpResult2("Set hyperlink produced no change.");
|
|
317231
317241
|
return buildSuccessResult2(findImageById2(editor, input2.imageId));
|
|
317232
317242
|
}
|
|
317233
|
-
function
|
|
317243
|
+
function findContainingParagraph2(editor, imagePos) {
|
|
317234
317244
|
const $pos = editor.state.doc.resolve(imagePos);
|
|
317235
|
-
|
|
317236
|
-
|
|
317237
|
-
|
|
317238
|
-
|
|
317239
|
-
|
|
317240
|
-
|
|
317241
|
-
|
|
317245
|
+
for (let depth = $pos.depth;depth >= 1; depth -= 1) {
|
|
317246
|
+
const node4 = $pos.node(depth);
|
|
317247
|
+
if (node4.type.name !== "paragraph")
|
|
317248
|
+
continue;
|
|
317249
|
+
return {
|
|
317250
|
+
depth,
|
|
317251
|
+
pos: $pos.before(depth),
|
|
317252
|
+
node: node4
|
|
317253
|
+
};
|
|
317254
|
+
}
|
|
317255
|
+
throw new DocumentApiAdapterError3("INVALID_TARGET", "Caption operations require the image to be inside a paragraph.");
|
|
317256
|
+
}
|
|
317257
|
+
function findCaptionParagraph2(editor, imagePos) {
|
|
317258
|
+
const paragraph3 = findContainingParagraph2(editor, imagePos);
|
|
317259
|
+
const afterParagraphPos = paragraph3.pos + paragraph3.node.nodeSize;
|
|
317260
|
+
if (afterParagraphPos >= editor.state.doc.content.size)
|
|
317242
317261
|
return null;
|
|
317243
|
-
const nextNode = editor.state.doc.nodeAt(
|
|
317262
|
+
const nextNode = editor.state.doc.nodeAt(afterParagraphPos);
|
|
317244
317263
|
if (!nextNode || nextNode.type.name !== "paragraph")
|
|
317245
317264
|
return null;
|
|
317246
|
-
|
|
317265
|
+
const styleId = nextNode.attrs?.paragraphProperties?.styleId ?? nextNode.attrs?.styleId;
|
|
317266
|
+
if (styleId !== "Caption")
|
|
317247
317267
|
return null;
|
|
317248
|
-
return { pos:
|
|
317268
|
+
return { pos: afterParagraphPos, node: nextNode };
|
|
317249
317269
|
}
|
|
317250
317270
|
function requireSoleImageInParagraph2(editor, imagePos) {
|
|
317251
317271
|
const $pos = editor.state.doc.resolve(imagePos);
|
|
@@ -317274,14 +317294,12 @@ function imagesInsertCaptionWrapper2(editor, input2, options) {
|
|
|
317274
317294
|
if (options?.dryRun)
|
|
317275
317295
|
return buildSuccessResult2(image3);
|
|
317276
317296
|
const receipt2 = executeDomainCommand2(editor, () => {
|
|
317277
|
-
const
|
|
317278
|
-
const
|
|
317279
|
-
const
|
|
317280
|
-
const parentNode2 = $pos.node(parentDepth + 1);
|
|
317281
|
-
const afterParentPos = parentPos + parentNode2.nodeSize;
|
|
317297
|
+
const currentImage = findImageById2(editor, input2.imageId);
|
|
317298
|
+
const paragraph3 = findContainingParagraph2(editor, currentImage.pos);
|
|
317299
|
+
const afterParagraphPos = paragraph3.pos + paragraph3.node.nodeSize;
|
|
317282
317300
|
const tr = editor.state.tr;
|
|
317283
317301
|
const captionPara = editor.state.schema.nodes.paragraph.create({ paragraphProperties: { styleId: "Caption" } }, editor.state.schema.text(input2.text));
|
|
317284
|
-
tr.insert(
|
|
317302
|
+
tr.insert(afterParagraphPos, captionPara);
|
|
317285
317303
|
if (!tr.docChanged)
|
|
317286
317304
|
return false;
|
|
317287
317305
|
editor.dispatch(tr);
|
|
@@ -382129,16 +382147,61 @@ var init_wrapper_dispatch = __esm(() => {
|
|
|
382129
382147
|
COMMAND_SPEC_BY_KEY = new Map(CLI_COMMAND_SPECS.map((spec) => [spec.key, spec]));
|
|
382130
382148
|
});
|
|
382131
382149
|
|
|
382150
|
+
// src/commands/skill-targets.ts
|
|
382151
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
382152
|
+
import { homedir as homedir2 } from "node:os";
|
|
382153
|
+
import { join as join7 } from "node:path";
|
|
382154
|
+
function realPathOrSelf(path3) {
|
|
382155
|
+
try {
|
|
382156
|
+
return realpathSync(path3);
|
|
382157
|
+
} catch {
|
|
382158
|
+
return path3;
|
|
382159
|
+
}
|
|
382160
|
+
}
|
|
382161
|
+
function resolveTargetRoots(cwd2) {
|
|
382162
|
+
const roots = [{ baseDir: cwd2, displayPrefix: "" }];
|
|
382163
|
+
const homeDir = process.env.HOME || process.env.USERPROFILE || homedir2();
|
|
382164
|
+
if (homeDir && homeDir !== cwd2) {
|
|
382165
|
+
roots.push({ baseDir: homeDir, displayPrefix: "~/" });
|
|
382166
|
+
}
|
|
382167
|
+
return roots;
|
|
382168
|
+
}
|
|
382169
|
+
function resolveSkillTargets(cwd2) {
|
|
382170
|
+
const targets = [];
|
|
382171
|
+
const seen = new Set;
|
|
382172
|
+
for (const root5 of resolveTargetRoots(cwd2)) {
|
|
382173
|
+
for (const agentDirName of AGENT_DIRS) {
|
|
382174
|
+
const agentDir = join7(root5.baseDir, agentDirName);
|
|
382175
|
+
if (!existsSync(agentDir))
|
|
382176
|
+
continue;
|
|
382177
|
+
const dedupeKey = realPathOrSelf(agentDir);
|
|
382178
|
+
if (seen.has(dedupeKey))
|
|
382179
|
+
continue;
|
|
382180
|
+
seen.add(dedupeKey);
|
|
382181
|
+
const displaySkillDir = `${root5.displayPrefix}${agentDirName}/skills/superdoc/`;
|
|
382182
|
+
targets.push({
|
|
382183
|
+
skillDir: join7(agentDir, "skills", "superdoc"),
|
|
382184
|
+
displaySkillDir
|
|
382185
|
+
});
|
|
382186
|
+
}
|
|
382187
|
+
}
|
|
382188
|
+
return targets;
|
|
382189
|
+
}
|
|
382190
|
+
var AGENT_DIRS;
|
|
382191
|
+
var init_skill_targets = __esm(() => {
|
|
382192
|
+
AGENT_DIRS = [".claude", ".agents"];
|
|
382193
|
+
});
|
|
382194
|
+
|
|
382132
382195
|
// src/commands/install.ts
|
|
382133
|
-
import { existsSync, cpSync, mkdirSync } from "node:fs";
|
|
382134
|
-
import { join as
|
|
382196
|
+
import { existsSync as existsSync2, cpSync, mkdirSync } from "node:fs";
|
|
382197
|
+
import { join as join8, dirname as dirname2 } from "node:path";
|
|
382135
382198
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
382136
382199
|
function resolveSkillSource() {
|
|
382137
|
-
const fromDist =
|
|
382138
|
-
if (
|
|
382200
|
+
const fromDist = join8(__dirname2, "..", "skill");
|
|
382201
|
+
if (existsSync2(fromDist))
|
|
382139
382202
|
return fromDist;
|
|
382140
|
-
const fromSrc =
|
|
382141
|
-
if (
|
|
382203
|
+
const fromSrc = join8(__dirname2, "..", "..", "skill");
|
|
382204
|
+
if (existsSync2(fromSrc))
|
|
382142
382205
|
return fromSrc;
|
|
382143
382206
|
throw new Error("Could not locate bundled skill directory. Is the package installed correctly?");
|
|
382144
382207
|
}
|
|
@@ -382150,38 +382213,31 @@ async function runInstall(tokens, io) {
|
|
|
382150
382213
|
}
|
|
382151
382214
|
const cwd2 = process.cwd();
|
|
382152
382215
|
const skillSource = resolveSkillSource();
|
|
382216
|
+
const targets = resolveSkillTargets(cwd2);
|
|
382153
382217
|
let installed = 0;
|
|
382154
|
-
for (const target2 of
|
|
382155
|
-
|
|
382156
|
-
|
|
382157
|
-
|
|
382158
|
-
const dest = join7(agentDir, "skills", "superdoc");
|
|
382159
|
-
mkdirSync(dest, { recursive: true });
|
|
382160
|
-
cpSync(skillSource, dest, { recursive: true });
|
|
382161
|
-
io.stdout(`Installed skill to ${target2.dir}/skills/superdoc/
|
|
382218
|
+
for (const target2 of targets) {
|
|
382219
|
+
mkdirSync(target2.skillDir, { recursive: true });
|
|
382220
|
+
cpSync(skillSource, target2.skillDir, { recursive: true });
|
|
382221
|
+
io.stdout(`Installed skill to ${target2.displaySkillDir}
|
|
382162
382222
|
`);
|
|
382163
382223
|
installed += 1;
|
|
382164
382224
|
}
|
|
382165
382225
|
if (installed === 0) {
|
|
382166
|
-
io.stderr(`No agent directories found. Create .claude/ (Claude Code) or .agents/ (Codex) first, then re-run.
|
|
382226
|
+
io.stderr(`No agent directories found in current or home directory. Create .claude/ (Claude Code) or .agents/ (Codex) first, then re-run.
|
|
382167
382227
|
`);
|
|
382168
382228
|
return 1;
|
|
382169
382229
|
}
|
|
382170
382230
|
return 0;
|
|
382171
382231
|
}
|
|
382172
|
-
var __filename2, __dirname2
|
|
382232
|
+
var __filename2, __dirname2;
|
|
382173
382233
|
var init_install = __esm(() => {
|
|
382234
|
+
init_skill_targets();
|
|
382174
382235
|
__filename2 = fileURLToPath2(import.meta.url);
|
|
382175
382236
|
__dirname2 = dirname2(__filename2);
|
|
382176
|
-
AGENT_TARGETS = [
|
|
382177
|
-
{ name: "Claude Code", dir: ".claude" },
|
|
382178
|
-
{ name: "Codex", dir: ".agents" }
|
|
382179
|
-
];
|
|
382180
382237
|
});
|
|
382181
382238
|
|
|
382182
382239
|
// src/commands/uninstall.ts
|
|
382183
|
-
import { existsSync as
|
|
382184
|
-
import { join as join8 } from "node:path";
|
|
382240
|
+
import { existsSync as existsSync3, rmSync } from "node:fs";
|
|
382185
382241
|
async function runUninstall(tokens, io) {
|
|
382186
382242
|
if (!tokens.includes("--skills")) {
|
|
382187
382243
|
io.stderr(`Usage: superdoc uninstall --skills
|
|
@@ -382189,13 +382245,13 @@ async function runUninstall(tokens, io) {
|
|
|
382189
382245
|
return 1;
|
|
382190
382246
|
}
|
|
382191
382247
|
const cwd2 = process.cwd();
|
|
382248
|
+
const targets = resolveSkillTargets(cwd2);
|
|
382192
382249
|
let removed = 0;
|
|
382193
|
-
for (const target2 of
|
|
382194
|
-
|
|
382195
|
-
if (!existsSync2(fullPath))
|
|
382250
|
+
for (const target2 of targets) {
|
|
382251
|
+
if (!existsSync3(target2.skillDir))
|
|
382196
382252
|
continue;
|
|
382197
|
-
rmSync(
|
|
382198
|
-
io.stdout(`Removed ${target2.
|
|
382253
|
+
rmSync(target2.skillDir, { recursive: true });
|
|
382254
|
+
io.stdout(`Removed ${target2.displaySkillDir}
|
|
382199
382255
|
`);
|
|
382200
382256
|
removed += 1;
|
|
382201
382257
|
}
|
|
@@ -382205,12 +382261,8 @@ async function runUninstall(tokens, io) {
|
|
|
382205
382261
|
}
|
|
382206
382262
|
return 0;
|
|
382207
382263
|
}
|
|
382208
|
-
var SKILL_PATHS;
|
|
382209
382264
|
var init_uninstall = __esm(() => {
|
|
382210
|
-
|
|
382211
|
-
{ name: "Claude Code", path: ".claude/skills/superdoc" },
|
|
382212
|
-
{ name: "Codex", path: ".agents/skills/superdoc" }
|
|
382213
|
-
];
|
|
382265
|
+
init_skill_targets();
|
|
382214
382266
|
});
|
|
382215
382267
|
|
|
382216
382268
|
// src/host/session-pool.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.99",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
"@types/bun": "^1.3.8",
|
|
21
21
|
"@types/node": "22.19.2",
|
|
22
22
|
"typescript": "^5.9.2",
|
|
23
|
-
"@superdoc/document-api": "0.0.1",
|
|
24
|
-
"@superdoc/super-editor": "0.0.1",
|
|
25
23
|
"@superdoc/pm-adapter": "0.0.0",
|
|
26
|
-
"superdoc": "1.
|
|
24
|
+
"superdoc": "1.18.0",
|
|
25
|
+
"@superdoc/super-editor": "0.0.1",
|
|
26
|
+
"@superdoc/document-api": "0.0.1"
|
|
27
27
|
},
|
|
28
28
|
"module": "src/index.ts",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.
|
|
34
|
-
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.
|
|
35
|
-
"@superdoc-dev/cli-linux-x64": "0.2.0-next.
|
|
36
|
-
"@superdoc-dev/cli-
|
|
37
|
-
"@superdoc-dev/cli-
|
|
33
|
+
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.99",
|
|
34
|
+
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.99",
|
|
35
|
+
"@superdoc-dev/cli-linux-x64": "0.2.0-next.99",
|
|
36
|
+
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.99",
|
|
37
|
+
"@superdoc-dev/cli-windows-x64": "0.2.0-next.99"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"dev": "bun run src/index.ts",
|