@easysociable/cli 0.1.10 → 0.1.11
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/easysociable.js +45 -3
- package/dist/easysociable.js.map +1 -1
- package/package.json +1 -1
- package/skills/easysociable-content/SKILL.md +5 -5
- package/skills/easysociable-slideshow/SKILL.md +20 -7
- package/skills/easysociable-slideshow/references/GATEWAY.md +9 -0
- package/skills/easysociable-slideshow/workflows/CREATE_RUN.md +28 -13
package/dist/easysociable.js
CHANGED
|
@@ -32655,7 +32655,18 @@ var ENGINE_ROOT_NAME = "Content Engine";
|
|
|
32655
32655
|
var WORKBENCH_PORT = 8765;
|
|
32656
32656
|
var WORKBENCH_URL = `http://127.0.0.1:${WORKBENCH_PORT}/workbench/`;
|
|
32657
32657
|
var CONTENT_ENGINE_REPO = "https://github.com/murphywuwu/content-engine.git";
|
|
32658
|
-
var WORKBENCH_FILES = [
|
|
32658
|
+
var WORKBENCH_FILES = [
|
|
32659
|
+
"template.html",
|
|
32660
|
+
"build.py",
|
|
32661
|
+
"serve.py",
|
|
32662
|
+
"roots.py",
|
|
32663
|
+
"README.md",
|
|
32664
|
+
"easysociable-mark.svg",
|
|
32665
|
+
"css/workbench.css",
|
|
32666
|
+
"js/i18n.js",
|
|
32667
|
+
"js/utils.js",
|
|
32668
|
+
"js/app.js"
|
|
32669
|
+
];
|
|
32659
32670
|
var REQUIRED_RELATIVE = [
|
|
32660
32671
|
"CLAUDE.md",
|
|
32661
32672
|
"engine.json",
|
|
@@ -32875,6 +32886,7 @@ function ensureWorkbench(engine, _moduleUrl, { update = false } = {}) {
|
|
|
32875
32886
|
if (!existsSync3(from))
|
|
32876
32887
|
throw new Error(`Missing ${name} in Content Engine core checkout`);
|
|
32877
32888
|
const existed = existsSync3(dest);
|
|
32889
|
+
mkdirSync2(dirname3(dest), { recursive: true });
|
|
32878
32890
|
copyFileSync(from, dest);
|
|
32879
32891
|
if (existed)
|
|
32880
32892
|
updated.push(name);
|
|
@@ -33004,7 +33016,19 @@ async function initEngine(rootOrEngine, moduleUrl, {
|
|
|
33004
33016
|
};
|
|
33005
33017
|
}
|
|
33006
33018
|
var CORE_REFRESH_FILES = /* @__PURE__ */ new Set(["CLAUDE.md", "LAYOUT.md", "topics/scoring.md"]);
|
|
33007
|
-
var CORE_ADD_ONLY_FILES = /* @__PURE__ */ new Set([
|
|
33019
|
+
var CORE_ADD_ONLY_FILES = /* @__PURE__ */ new Set([
|
|
33020
|
+
"media/_index.md",
|
|
33021
|
+
"media/README.md",
|
|
33022
|
+
"profiles/default/brand.md",
|
|
33023
|
+
"wiki/_index.md",
|
|
33024
|
+
"wiki/_unfiled.md",
|
|
33025
|
+
"wiki/README.md",
|
|
33026
|
+
"wiki/_template.md",
|
|
33027
|
+
"library/README.md",
|
|
33028
|
+
"library/swipe/_index.md",
|
|
33029
|
+
"library/atoms/_index.md",
|
|
33030
|
+
"library/claims/_index.md"
|
|
33031
|
+
]);
|
|
33008
33032
|
function classifyCoreFile(rel) {
|
|
33009
33033
|
const parts = rel.split("/");
|
|
33010
33034
|
if (parts[0] === ".git")
|
|
@@ -33164,6 +33188,21 @@ function validateRun(moduleUrl, args) {
|
|
|
33164
33188
|
};
|
|
33165
33189
|
}
|
|
33166
33190
|
|
|
33191
|
+
// src/studioIdentity.ts
|
|
33192
|
+
var FIXTURE_WORKSPACE_IDS = /* @__PURE__ */ new Set(["workspace_local"]);
|
|
33193
|
+
var IDENTITY_CHAIN_HINT = "Studio login \u2192 Dashboard create API key \u2192 easysociable auth login --api-key <key> \u2192 create Run \u2192 open studioUrl as the same account. See docs/operations/studio-identity-chain.md";
|
|
33194
|
+
async function assertHumanStudioIdentity(client, options = {}) {
|
|
33195
|
+
if (options.allowLocalFixture === true || process.env.EASYSOCIABLE_ALLOW_LOCAL_FIXTURE === "1")
|
|
33196
|
+
return;
|
|
33197
|
+
const envelope = await client.requestJson("GET", "/v1/commercial/me");
|
|
33198
|
+
const workspaceId = envelope.data?.principal?.workspaceId ?? envelope.principal?.workspaceId ?? null;
|
|
33199
|
+
if (typeof workspaceId === "string" && FIXTURE_WORKSPACE_IDS.has(workspaceId)) {
|
|
33200
|
+
throw new Error(
|
|
33201
|
+
`This CLI is using fixture workspace "${workspaceId}". ${IDENTITY_CHAIN_HINT}`
|
|
33202
|
+
);
|
|
33203
|
+
}
|
|
33204
|
+
}
|
|
33205
|
+
|
|
33167
33206
|
// src/v1-cli.ts
|
|
33168
33207
|
var CLI_MODULE_URL = import.meta.url;
|
|
33169
33208
|
function readCliVersion() {
|
|
@@ -33492,7 +33531,10 @@ function buildV1Cli() {
|
|
|
33492
33531
|
contentSlug: opts.contentSlug ? String(opts.contentSlug) : void 0,
|
|
33493
33532
|
status: opts.status ? String(opts.status) : void 0
|
|
33494
33533
|
})));
|
|
33495
|
-
jsonOption(slideshows.command("create").requiredOption("--file <path>")).action(withClient(async (client, opts) =>
|
|
33534
|
+
jsonOption(slideshows.command("create").requiredOption("--file <path>").option("--allow-local-fixture", "Allow workspace_local fixture keys (dev only)")).action(withClient(async (client, opts) => {
|
|
33535
|
+
await assertHumanStudioIdentity(client, { allowLocalFixture: opts.allowLocalFixture === true });
|
|
33536
|
+
return client.createSlideshowRun({ pack: JSON.parse(await readFile(String(opts.file), "utf8")) });
|
|
33537
|
+
}));
|
|
33496
33538
|
jsonOption(slideshows.command("get").requiredOption("--id <id>")).action(withClient(async (client, opts) => client.getSlideshowRun(String(opts.id))));
|
|
33497
33539
|
jsonOption(slideshows.command("update").requiredOption("--id <id>").requiredOption("--file <path>")).action(withClient(async (client, opts) => client.updateSlideshowRun(String(opts.id), JSON.parse(await readFile(String(opts.file), "utf8")))));
|
|
33498
33540
|
jsonOption(slideshows.command("archive").requiredOption("--id <id>")).action(withClient(async (client, opts) => client.archiveSlideshowRun(String(opts.id))));
|