@swarm.ing/pieui 2.0.18 → 2.0.20
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/cli.js +487 -23
- package/dist/code/args.d.ts.map +1 -1
- package/dist/code/commands/cardRemote/cardRef.d.ts +9 -0
- package/dist/code/commands/cardRemote/cardRef.d.ts.map +1 -0
- package/dist/code/commands/cardRemote/history.d.ts +9 -0
- package/dist/code/commands/cardRemote/history.d.ts.map +1 -0
- package/dist/code/commands/cardRemote/private.d.ts +2 -0
- package/dist/code/commands/cardRemote/private.d.ts.map +1 -0
- package/dist/code/commands/cardRemote/public.d.ts +2 -0
- package/dist/code/commands/cardRemote/public.d.ts.map +1 -0
- package/dist/code/commands/cardRemote/pull.d.ts +1 -1
- package/dist/code/commands/cardRemote/pull.d.ts.map +1 -1
- package/dist/code/commands/cardRemote/push.d.ts +1 -1
- package/dist/code/commands/cardRemote/push.d.ts.map +1 -1
- package/dist/code/services/models.d.ts +50 -0
- package/dist/code/services/models.d.ts.map +1 -1
- package/dist/code/services/storage.d.ts +60 -1
- package/dist/code/services/storage.d.ts.map +1 -1
- package/dist/code/types.d.ts +5 -1
- package/dist/code/types.d.ts.map +1 -1
- package/package.json +1 -2
package/dist/cli.js
CHANGED
|
@@ -184030,18 +184030,31 @@ var parseArgs = (argv) => {
|
|
|
184030
184030
|
componentName = positionalArgs[0];
|
|
184031
184031
|
}
|
|
184032
184032
|
}
|
|
184033
|
+
let historyPage;
|
|
184034
|
+
let historyPerPage;
|
|
184035
|
+
let historyFrom;
|
|
184036
|
+
let historyTo;
|
|
184033
184037
|
if (command === "card" && cardAction === "remote" && argv[2]) {
|
|
184034
184038
|
const validRemoteActions = [
|
|
184035
184039
|
"push",
|
|
184036
184040
|
"pull",
|
|
184037
184041
|
"list",
|
|
184038
|
-
"remove"
|
|
184042
|
+
"remove",
|
|
184043
|
+
"history",
|
|
184044
|
+
"public",
|
|
184045
|
+
"private"
|
|
184039
184046
|
];
|
|
184040
184047
|
const action = argv[2];
|
|
184041
184048
|
if (validRemoteActions.includes(action)) {
|
|
184042
184049
|
cardRemoteAction = action;
|
|
184043
184050
|
const rest = argv.slice(3);
|
|
184044
184051
|
const flagIndexes = new Set;
|
|
184052
|
+
const parseIntFlag = (name, raw) => {
|
|
184053
|
+
if (!/^-?\d+$/.test(raw)) {
|
|
184054
|
+
throw new Error(`${name} must be an integer, got ${JSON.stringify(raw)}`);
|
|
184055
|
+
}
|
|
184056
|
+
return Number(raw);
|
|
184057
|
+
};
|
|
184045
184058
|
for (let i = 0;i < rest.length; i++) {
|
|
184046
184059
|
const tok = rest[i];
|
|
184047
184060
|
if (tok === "--user" && rest[i + 1]) {
|
|
@@ -184054,12 +184067,44 @@ var parseArgs = (argv) => {
|
|
|
184054
184067
|
flagIndexes.add(i);
|
|
184055
184068
|
flagIndexes.add(i + 1);
|
|
184056
184069
|
i++;
|
|
184070
|
+
} else if (tok === "--page" && rest[i + 1]) {
|
|
184071
|
+
historyPage = parseIntFlag("--page", rest[i + 1]);
|
|
184072
|
+
flagIndexes.add(i);
|
|
184073
|
+
flagIndexes.add(i + 1);
|
|
184074
|
+
i++;
|
|
184075
|
+
} else if (tok === "--per-page" && rest[i + 1]) {
|
|
184076
|
+
historyPerPage = parseIntFlag("--per-page", rest[i + 1]);
|
|
184077
|
+
flagIndexes.add(i);
|
|
184078
|
+
flagIndexes.add(i + 1);
|
|
184079
|
+
i++;
|
|
184080
|
+
} else if (tok === "--from" && rest[i + 1]) {
|
|
184081
|
+
historyFrom = parseIntFlag("--from", rest[i + 1]);
|
|
184082
|
+
flagIndexes.add(i);
|
|
184083
|
+
flagIndexes.add(i + 1);
|
|
184084
|
+
i++;
|
|
184085
|
+
} else if (tok === "--to" && rest[i + 1]) {
|
|
184086
|
+
historyTo = parseIntFlag("--to", rest[i + 1]);
|
|
184087
|
+
flagIndexes.add(i);
|
|
184088
|
+
flagIndexes.add(i + 1);
|
|
184089
|
+
i++;
|
|
184057
184090
|
} else if (tok?.startsWith("--user=")) {
|
|
184058
184091
|
remoteUserId = tok.slice("--user=".length);
|
|
184059
184092
|
flagIndexes.add(i);
|
|
184060
184093
|
} else if (tok?.startsWith("--project=")) {
|
|
184061
184094
|
remoteProject = tok.slice("--project=".length);
|
|
184062
184095
|
flagIndexes.add(i);
|
|
184096
|
+
} else if (tok?.startsWith("--page=")) {
|
|
184097
|
+
historyPage = parseIntFlag("--page", tok.slice("--page=".length));
|
|
184098
|
+
flagIndexes.add(i);
|
|
184099
|
+
} else if (tok?.startsWith("--per-page=")) {
|
|
184100
|
+
historyPerPage = parseIntFlag("--per-page", tok.slice("--per-page=".length));
|
|
184101
|
+
flagIndexes.add(i);
|
|
184102
|
+
} else if (tok?.startsWith("--from=")) {
|
|
184103
|
+
historyFrom = parseIntFlag("--from", tok.slice("--from=".length));
|
|
184104
|
+
flagIndexes.add(i);
|
|
184105
|
+
} else if (tok?.startsWith("--to=")) {
|
|
184106
|
+
historyTo = parseIntFlag("--to", tok.slice("--to=".length));
|
|
184107
|
+
flagIndexes.add(i);
|
|
184063
184108
|
}
|
|
184064
184109
|
}
|
|
184065
184110
|
const positionals = rest.filter((_, i) => !flagIndexes.has(i));
|
|
@@ -184109,7 +184154,11 @@ var parseArgs = (argv) => {
|
|
|
184109
184154
|
remoteUserId,
|
|
184110
184155
|
remoteProject,
|
|
184111
184156
|
pageAction,
|
|
184112
|
-
pagePath
|
|
184157
|
+
pagePath,
|
|
184158
|
+
historyPage,
|
|
184159
|
+
historyPerPage,
|
|
184160
|
+
historyFrom,
|
|
184161
|
+
historyTo
|
|
184113
184162
|
};
|
|
184114
184163
|
};
|
|
184115
184164
|
var printUsage = () => {
|
|
@@ -184123,10 +184172,15 @@ var printUsage = () => {
|
|
|
184123
184172
|
console.log(" init Initialize piecomponents directory with registry.ts");
|
|
184124
184173
|
console.log(" card add [type] <ComponentName> [--io] [--ajax] Create a new component in piecomponents directory");
|
|
184125
184174
|
console.log(" page add <path> Create app/<path>/page.tsx from the standard Pie page template");
|
|
184126
|
-
console.log(" card remote push <ComponentName> Upload piecomponents/<Name>/ to PieUI storage");
|
|
184127
|
-
console.log(" card remote pull <ComponentName>
|
|
184175
|
+
console.log(" card remote push <ComponentName> Upload piecomponents/<Name>/ to PieUI storage (prints new revision)");
|
|
184176
|
+
console.log(" card remote pull <ComponentName>[@rev] Download component from current project (optional @<revision>)");
|
|
184177
|
+
console.log(" card remote pull <project>/<ComponentName>[@rev] Pull from a different project of the current user");
|
|
184178
|
+
console.log(" card remote pull r/<user>/<ComponentName> Pull a public component by another user");
|
|
184128
184179
|
console.log(" card remote list [--user U] [--project S] List remote components for the configured or specified user/project");
|
|
184129
184180
|
console.log(" card remote remove <ComponentName> Delete component from PieUI storage");
|
|
184181
|
+
console.log(" card remote history <ComponentName> [--page N] [--per-page N] [--from R] [--to R] Show revision history with per-file diff stats");
|
|
184182
|
+
console.log(" card remote public <ComponentName> Mark a component public (readable without API key as r/<user>/<Name>)");
|
|
184183
|
+
console.log(" card remote private <ComponentName> Make a public component private again");
|
|
184130
184184
|
console.log(' list-events <ComponentName> List registered methods keys for <PieCard card="ComponentName" ... methods={...} />');
|
|
184131
184185
|
console.log(' add-event <ComponentName> <event> Add a new methods key with a default handler to <PieCard card="ComponentName" ... methods={...} />');
|
|
184132
184186
|
console.log(" remove <ComponentName> Remove a component from piecomponents directory");
|
|
@@ -184186,10 +184240,18 @@ var printUsage = () => {
|
|
|
184186
184240
|
console.log(" pieui list complex-container --src-dir app # List complex containers in app/");
|
|
184187
184241
|
console.log(" pieui list-events ExchangeAlertsCard # Print methods table for that PieCard usage");
|
|
184188
184242
|
console.log(" pieui add-event ExchangeAlertsCard alert # Add methods.alert with default handler");
|
|
184189
|
-
console.log(" pieui card remote push ExchangeAlertsCard # Upload component directory");
|
|
184190
|
-
console.log(" pieui card remote pull ExchangeAlertsCard # Download
|
|
184243
|
+
console.log(" pieui card remote push ExchangeAlertsCard # Upload component directory (server assigns new revision)");
|
|
184244
|
+
console.log(" pieui card remote pull ExchangeAlertsCard # Download latest revision from current project");
|
|
184245
|
+
console.log(" pieui card remote pull ExchangeAlertsCard@7 # Download revision 7 snapshot");
|
|
184246
|
+
console.log(" pieui card remote pull other-proj/AlertsCard # Pull from another of your projects");
|
|
184247
|
+
console.log(" pieui card remote pull r/delta37/YetAnotherCard # Pull a public component by user delta37");
|
|
184191
184248
|
console.log(" pieui card remote list # List remote components");
|
|
184192
184249
|
console.log(" pieui card remote remove ExchangeAlertsCard # Delete remote component");
|
|
184250
|
+
console.log(" pieui card remote history ExchangeAlertsCard # Full history (newest first)");
|
|
184251
|
+
console.log(" pieui card remote history ExchangeAlertsCard --page 1 --per-page 5 # Paginate");
|
|
184252
|
+
console.log(" pieui card remote history ExchangeAlertsCard --from 12 --to 14 # Revision range");
|
|
184253
|
+
console.log(" pieui card remote public ExchangeAlertsCard # Make this component public");
|
|
184254
|
+
console.log(" pieui card remote private ExchangeAlertsCard # Revert to private");
|
|
184193
184255
|
};
|
|
184194
184256
|
|
|
184195
184257
|
// src/code/commands/init.ts
|
|
@@ -189226,6 +189288,26 @@ var loadSettings = (cwd = process.cwd()) => {
|
|
|
189226
189288
|
};
|
|
189227
189289
|
|
|
189228
189290
|
// src/code/services/models.ts
|
|
189291
|
+
var parseComponentRevisionList = (raw) => {
|
|
189292
|
+
const obj = raw ?? {};
|
|
189293
|
+
const userId = typeof obj.user_id === "string" ? obj.user_id : typeof obj.userId === "string" ? obj.userId : "";
|
|
189294
|
+
const project = typeof obj.project_slug === "string" ? obj.project_slug : typeof obj.projectSlug === "string" ? obj.projectSlug : "";
|
|
189295
|
+
const componentName = typeof obj.component_name === "string" ? obj.component_name : typeof obj.componentName === "string" ? obj.componentName : "";
|
|
189296
|
+
const rawRevisions = Array.isArray(obj.revisions) ? obj.revisions : [];
|
|
189297
|
+
const revisions = rawRevisions.map((entry) => {
|
|
189298
|
+
const e = entry ?? {};
|
|
189299
|
+
if (typeof e.revision !== "number")
|
|
189300
|
+
return null;
|
|
189301
|
+
const createdAt = typeof e.created_at === "string" ? e.created_at : typeof e.createdAt === "string" ? e.createdAt : "";
|
|
189302
|
+
return {
|
|
189303
|
+
revision: e.revision,
|
|
189304
|
+
createdAt,
|
|
189305
|
+
mutation: typeof e.mutation === "string" ? e.mutation : "",
|
|
189306
|
+
deleted: e.deleted === true
|
|
189307
|
+
};
|
|
189308
|
+
}).filter((e) => e !== null);
|
|
189309
|
+
return { userId, project, componentName, revisions };
|
|
189310
|
+
};
|
|
189229
189311
|
var parseComponentObject = (raw) => {
|
|
189230
189312
|
const obj = raw ?? {};
|
|
189231
189313
|
const key = typeof obj.key === "string" ? obj.key : "";
|
|
@@ -189236,6 +189318,92 @@ var parseComponentObject = (raw) => {
|
|
|
189236
189318
|
signedUrl: typeof obj.signed_url === "string" ? obj.signed_url : typeof obj.signedUrl === "string" ? obj.signedUrl : undefined
|
|
189237
189319
|
};
|
|
189238
189320
|
};
|
|
189321
|
+
var parsePublicComponentState = (raw) => {
|
|
189322
|
+
const obj = raw ?? {};
|
|
189323
|
+
const pickStr = (...keys) => {
|
|
189324
|
+
for (const k2 of keys) {
|
|
189325
|
+
const v2 = obj[k2];
|
|
189326
|
+
if (typeof v2 === "string")
|
|
189327
|
+
return v2;
|
|
189328
|
+
}
|
|
189329
|
+
return "";
|
|
189330
|
+
};
|
|
189331
|
+
const registry = typeof obj.public_registry_name === "string" ? obj.public_registry_name : typeof obj.publicRegistryName === "string" ? obj.publicRegistryName : null;
|
|
189332
|
+
return {
|
|
189333
|
+
userId: pickStr("user_id", "userId"),
|
|
189334
|
+
project: pickStr("project_slug", "projectSlug"),
|
|
189335
|
+
componentName: pickStr("component_name", "componentName"),
|
|
189336
|
+
isPublic: obj.is_public === true || obj.isPublic === true,
|
|
189337
|
+
publicRegistryName: registry
|
|
189338
|
+
};
|
|
189339
|
+
};
|
|
189340
|
+
var pickString = (obj, ...keys) => {
|
|
189341
|
+
for (const k2 of keys) {
|
|
189342
|
+
const v2 = obj[k2];
|
|
189343
|
+
if (typeof v2 === "string")
|
|
189344
|
+
return v2;
|
|
189345
|
+
}
|
|
189346
|
+
return "";
|
|
189347
|
+
};
|
|
189348
|
+
var pickNumber = (obj, ...keys) => {
|
|
189349
|
+
for (const k2 of keys) {
|
|
189350
|
+
const v2 = obj[k2];
|
|
189351
|
+
if (typeof v2 === "number")
|
|
189352
|
+
return v2;
|
|
189353
|
+
}
|
|
189354
|
+
return null;
|
|
189355
|
+
};
|
|
189356
|
+
var parseHistoryFile = (raw) => {
|
|
189357
|
+
const obj = raw ?? {};
|
|
189358
|
+
const key = typeof obj.key === "string" ? obj.key : "";
|
|
189359
|
+
const status = obj.status;
|
|
189360
|
+
if (status !== "added" && status !== "modified" && status !== "deleted") {
|
|
189361
|
+
return null;
|
|
189362
|
+
}
|
|
189363
|
+
const additions = pickNumber(obj, "additions") ?? 0;
|
|
189364
|
+
const deletions = pickNumber(obj, "deletions") ?? 0;
|
|
189365
|
+
return {
|
|
189366
|
+
key,
|
|
189367
|
+
status,
|
|
189368
|
+
isBinary: obj.is_binary === true || obj.isBinary === true,
|
|
189369
|
+
additions,
|
|
189370
|
+
deletions,
|
|
189371
|
+
patch: typeof obj.patch === "string" ? obj.patch : undefined
|
|
189372
|
+
};
|
|
189373
|
+
};
|
|
189374
|
+
var parseHistoryEntry = (raw) => {
|
|
189375
|
+
const obj = raw ?? {};
|
|
189376
|
+
const revision = pickNumber(obj, "revision");
|
|
189377
|
+
if (revision === null)
|
|
189378
|
+
return null;
|
|
189379
|
+
const diff = obj.diff ?? {};
|
|
189380
|
+
const rawFiles = Array.isArray(diff.files) ? diff.files : [];
|
|
189381
|
+
const files = rawFiles.map(parseHistoryFile).filter((f) => f !== null);
|
|
189382
|
+
return {
|
|
189383
|
+
revision,
|
|
189384
|
+
previousRevision: pickNumber(obj, "previous_revision", "previousRevision"),
|
|
189385
|
+
createdAt: pickString(obj, "created_at", "createdAt"),
|
|
189386
|
+
mutation: pickString(obj, "mutation"),
|
|
189387
|
+
deleted: obj.deleted === true,
|
|
189388
|
+
files
|
|
189389
|
+
};
|
|
189390
|
+
};
|
|
189391
|
+
var parseComponentHistory = (raw) => {
|
|
189392
|
+
const obj = raw ?? {};
|
|
189393
|
+
const rawEntries = Array.isArray(obj.entries) ? obj.entries : [];
|
|
189394
|
+
const entries = rawEntries.map(parseHistoryEntry).filter((e) => e !== null);
|
|
189395
|
+
return {
|
|
189396
|
+
userId: pickString(obj, "user_id", "userId"),
|
|
189397
|
+
project: pickString(obj, "project_slug", "projectSlug"),
|
|
189398
|
+
componentName: pickString(obj, "component_name", "componentName"),
|
|
189399
|
+
page: pickNumber(obj, "page") ?? 1,
|
|
189400
|
+
perPage: pickNumber(obj, "per_page", "perPage") ?? 10,
|
|
189401
|
+
totalRevisions: pickNumber(obj, "total_revisions", "totalRevisions") ?? 0,
|
|
189402
|
+
fromRevision: pickNumber(obj, "from_revision", "fromRevision"),
|
|
189403
|
+
toRevision: pickNumber(obj, "to_revision", "toRevision"),
|
|
189404
|
+
entries
|
|
189405
|
+
};
|
|
189406
|
+
};
|
|
189239
189407
|
var parseProjectComponentList = (raw) => {
|
|
189240
189408
|
const obj = raw ?? {};
|
|
189241
189409
|
const userId = typeof obj.user_id === "string" ? obj.user_id : typeof obj.userId === "string" ? obj.userId : "";
|
|
@@ -189315,15 +189483,55 @@ class PieStorageService {
|
|
|
189315
189483
|
}
|
|
189316
189484
|
componentUrl(args) {
|
|
189317
189485
|
const userId = args.userId ?? this.settings.userId;
|
|
189318
|
-
const slug = args.project ?? this.settings.project;
|
|
189319
189486
|
if (!userId) {
|
|
189320
189487
|
throw new PieStorageError("user_id is required (configure PIE_USER_ID or pass user_id)");
|
|
189321
189488
|
}
|
|
189489
|
+
if (args.isPublic) {
|
|
189490
|
+
return `${this.baseUrl}/public-components/${pathPart(userId)}/${pathPart(args.componentName)}`;
|
|
189491
|
+
}
|
|
189492
|
+
const slug = args.project ?? this.settings.project;
|
|
189322
189493
|
return `${this.baseUrl}/components/${pathPart(userId)}/${pathPart(slug)}/${pathPart(args.componentName)}`;
|
|
189323
189494
|
}
|
|
189324
189495
|
languageFileUrl(args) {
|
|
189325
189496
|
const base = this.componentUrl(args);
|
|
189326
|
-
|
|
189497
|
+
const encodedPath = normalizeObjectPath(args.objectPath);
|
|
189498
|
+
if (args.revision !== undefined) {
|
|
189499
|
+
if (args.isPublic) {
|
|
189500
|
+
throw new PieStorageError("revision is not supported for public components");
|
|
189501
|
+
}
|
|
189502
|
+
return `${base}/revisions/${args.revision}/${STORAGE_LANGUAGE}/${encodedPath}`;
|
|
189503
|
+
}
|
|
189504
|
+
return `${base}/${STORAGE_LANGUAGE}/${encodedPath}`;
|
|
189505
|
+
}
|
|
189506
|
+
componentTreeUrl(args) {
|
|
189507
|
+
const base = this.componentUrl(args);
|
|
189508
|
+
if (args.revision !== undefined) {
|
|
189509
|
+
if (args.isPublic) {
|
|
189510
|
+
throw new PieStorageError("revision is not supported for public components");
|
|
189511
|
+
}
|
|
189512
|
+
return `${base}/revisions/${args.revision}`;
|
|
189513
|
+
}
|
|
189514
|
+
return base;
|
|
189515
|
+
}
|
|
189516
|
+
revisionsUrl(args) {
|
|
189517
|
+
return `${this.componentUrl(args)}/revisions`;
|
|
189518
|
+
}
|
|
189519
|
+
publicMarkUrl(args) {
|
|
189520
|
+
return `${this.componentUrl(args)}/public`;
|
|
189521
|
+
}
|
|
189522
|
+
historyUrl(args) {
|
|
189523
|
+
const base = `${this.componentUrl(args)}/history`;
|
|
189524
|
+
const params = new URLSearchParams;
|
|
189525
|
+
if (args.page !== undefined)
|
|
189526
|
+
params.set("page", String(args.page));
|
|
189527
|
+
if (args.perPage !== undefined)
|
|
189528
|
+
params.set("per_page", String(args.perPage));
|
|
189529
|
+
if (args.from !== undefined)
|
|
189530
|
+
params.set("from", String(args.from));
|
|
189531
|
+
if (args.to !== undefined)
|
|
189532
|
+
params.set("to", String(args.to));
|
|
189533
|
+
const qs2 = params.toString();
|
|
189534
|
+
return qs2 ? `${base}?${qs2}` : base;
|
|
189327
189535
|
}
|
|
189328
189536
|
languageBatchUrl(args) {
|
|
189329
189537
|
return `${this.componentUrl(args)}/batch/${STORAGE_LANGUAGE}`;
|
|
@@ -189337,9 +189545,39 @@ class PieStorageService {
|
|
|
189337
189545
|
return parseProjectComponentList(await response.json());
|
|
189338
189546
|
}
|
|
189339
189547
|
async listComponent(args) {
|
|
189340
|
-
const url = this.
|
|
189548
|
+
const url = this.componentTreeUrl(args);
|
|
189549
|
+
const response = await this.request({
|
|
189550
|
+
method: "GET",
|
|
189551
|
+
url,
|
|
189552
|
+
noAuth: args.isPublic
|
|
189553
|
+
});
|
|
189554
|
+
const payload = await response.json();
|
|
189555
|
+
if (args.revision !== undefined) {
|
|
189556
|
+
const inner = payload.tree;
|
|
189557
|
+
if (inner !== undefined)
|
|
189558
|
+
return inner;
|
|
189559
|
+
}
|
|
189560
|
+
return payload;
|
|
189561
|
+
}
|
|
189562
|
+
async listRevisions(args) {
|
|
189563
|
+
const url = this.revisionsUrl(args);
|
|
189564
|
+
const response = await this.request({ method: "GET", url });
|
|
189565
|
+
return parseComponentRevisionList(await response.json());
|
|
189566
|
+
}
|
|
189567
|
+
async markComponentPublic(args) {
|
|
189568
|
+
const url = this.publicMarkUrl(args);
|
|
189569
|
+
const response = await this.request({ method: "PUT", url });
|
|
189570
|
+
return parsePublicComponentState(await response.json());
|
|
189571
|
+
}
|
|
189572
|
+
async markComponentPrivate(args) {
|
|
189573
|
+
const url = this.publicMarkUrl(args);
|
|
189574
|
+
const response = await this.request({ method: "DELETE", url });
|
|
189575
|
+
return parsePublicComponentState(await response.json());
|
|
189576
|
+
}
|
|
189577
|
+
async getHistory(args) {
|
|
189578
|
+
const url = this.historyUrl(args);
|
|
189341
189579
|
const response = await this.request({ method: "GET", url });
|
|
189342
|
-
return await response.json();
|
|
189580
|
+
return parseComponentHistory(await response.json());
|
|
189343
189581
|
}
|
|
189344
189582
|
async deleteComponent(args) {
|
|
189345
189583
|
const url = this.componentUrl(args);
|
|
@@ -189442,7 +189680,11 @@ class PieStorageService {
|
|
|
189442
189680
|
const fs9 = await import("node:fs");
|
|
189443
189681
|
const path11 = await import("node:path");
|
|
189444
189682
|
const url = this.languageFileUrl(args);
|
|
189445
|
-
const response = await this.request({
|
|
189683
|
+
const response = await this.request({
|
|
189684
|
+
method: "GET",
|
|
189685
|
+
url,
|
|
189686
|
+
noAuth: args.isPublic
|
|
189687
|
+
});
|
|
189446
189688
|
const buf = Buffer.from(await response.arrayBuffer());
|
|
189447
189689
|
fs9.mkdirSync(path11.dirname(args.targetPath), { recursive: true });
|
|
189448
189690
|
fs9.writeFileSync(args.targetPath, buf);
|
|
@@ -189467,9 +189709,9 @@ class PieStorageService {
|
|
|
189467
189709
|
}
|
|
189468
189710
|
return downloaded;
|
|
189469
189711
|
}
|
|
189470
|
-
headers(extra) {
|
|
189712
|
+
headers(extra, noAuth) {
|
|
189471
189713
|
const base = {};
|
|
189472
|
-
if (this.settings.apiKey)
|
|
189714
|
+
if (!noAuth && this.settings.apiKey)
|
|
189473
189715
|
base["x-api-key"] = this.settings.apiKey;
|
|
189474
189716
|
return { ...base, ...extra ?? {} };
|
|
189475
189717
|
}
|
|
@@ -189480,7 +189722,7 @@ class PieStorageService {
|
|
|
189480
189722
|
try {
|
|
189481
189723
|
response = await fetch(opts.url, {
|
|
189482
189724
|
method: opts.method,
|
|
189483
|
-
headers: this.headers(opts.headers),
|
|
189725
|
+
headers: this.headers(opts.headers, opts.noAuth),
|
|
189484
189726
|
body: opts.body,
|
|
189485
189727
|
signal: controller.signal
|
|
189486
189728
|
});
|
|
@@ -189500,8 +189742,73 @@ ${detail}` : `${opts.method} ${opts.url} failed: ${response.status}`;
|
|
|
189500
189742
|
}
|
|
189501
189743
|
}
|
|
189502
189744
|
|
|
189745
|
+
// src/code/commands/cardRemote/cardRef.ts
|
|
189746
|
+
var parseNameAndRevision = (namePart, raw) => {
|
|
189747
|
+
const atIndex = namePart.indexOf("@");
|
|
189748
|
+
if (atIndex === -1)
|
|
189749
|
+
return { componentName: namePart };
|
|
189750
|
+
const componentName = namePart.slice(0, atIndex);
|
|
189751
|
+
const revisionPart = namePart.slice(atIndex + 1);
|
|
189752
|
+
if (!componentName) {
|
|
189753
|
+
throw new Error(`missing component name in ${JSON.stringify(raw)}`);
|
|
189754
|
+
}
|
|
189755
|
+
if (!revisionPart) {
|
|
189756
|
+
throw new Error(`missing revision after '@' in ${JSON.stringify(raw)}`);
|
|
189757
|
+
}
|
|
189758
|
+
if (!/^\d+$/.test(revisionPart)) {
|
|
189759
|
+
throw new Error(`revision must be a positive integer, got ${JSON.stringify(revisionPart)}`);
|
|
189760
|
+
}
|
|
189761
|
+
const revision = Number(revisionPart);
|
|
189762
|
+
if (revision < 1) {
|
|
189763
|
+
throw new Error(`revision must be >= 1, got ${revision}`);
|
|
189764
|
+
}
|
|
189765
|
+
return { componentName, revision };
|
|
189766
|
+
};
|
|
189767
|
+
var parseCardRef = (input) => {
|
|
189768
|
+
if (!input) {
|
|
189769
|
+
throw new Error("card ref must not be empty");
|
|
189770
|
+
}
|
|
189771
|
+
if (input.startsWith("r/")) {
|
|
189772
|
+
const rest = input.slice(2);
|
|
189773
|
+
const parts2 = rest.split("/");
|
|
189774
|
+
if (parts2.length !== 2 || !parts2[0] || !parts2[1]) {
|
|
189775
|
+
throw new Error(`expected r/<user>/<Component>, got ${JSON.stringify(input)}`);
|
|
189776
|
+
}
|
|
189777
|
+
const [userId, namePart] = parts2;
|
|
189778
|
+
const { componentName, revision } = parseNameAndRevision(namePart, input);
|
|
189779
|
+
if (revision !== undefined) {
|
|
189780
|
+
throw new Error("revision suffix is not supported for public refs (r/...)");
|
|
189781
|
+
}
|
|
189782
|
+
return { componentName, userId, isPublic: true };
|
|
189783
|
+
}
|
|
189784
|
+
const parts = input.split("/");
|
|
189785
|
+
if (parts.length === 1) {
|
|
189786
|
+
return parseNameAndRevision(input, input);
|
|
189787
|
+
}
|
|
189788
|
+
if (parts.length === 2) {
|
|
189789
|
+
const [project, namePart] = parts;
|
|
189790
|
+
if (!project || !namePart) {
|
|
189791
|
+
throw new Error(`expected <project>/<Component>, got ${JSON.stringify(input)}`);
|
|
189792
|
+
}
|
|
189793
|
+
const { componentName, revision } = parseNameAndRevision(namePart, input);
|
|
189794
|
+
return { componentName, revision, project };
|
|
189795
|
+
}
|
|
189796
|
+
throw new Error(`invalid card ref ${JSON.stringify(input)}: expected <Component>, <project>/<Component>, or r/<user>/<Component>`);
|
|
189797
|
+
};
|
|
189798
|
+
|
|
189503
189799
|
// src/code/commands/cardRemote/push.ts
|
|
189504
|
-
var cardRemotePushCommand = async (
|
|
189800
|
+
var cardRemotePushCommand = async (cardRef) => {
|
|
189801
|
+
const ref = parseCardRef(cardRef);
|
|
189802
|
+
if (ref.revision !== undefined) {
|
|
189803
|
+
throw new Error("push does not accept a revision suffix");
|
|
189804
|
+
}
|
|
189805
|
+
if (ref.isPublic) {
|
|
189806
|
+
throw new Error("push does not accept public refs (r/...)");
|
|
189807
|
+
}
|
|
189808
|
+
if (ref.project || ref.userId) {
|
|
189809
|
+
throw new Error("push does not accept project/user override; pass just <ComponentName>");
|
|
189810
|
+
}
|
|
189811
|
+
const { componentName } = ref;
|
|
189505
189812
|
if (!/^[A-Z][A-Za-z0-9]+$/.test(componentName)) {
|
|
189506
189813
|
throw new Error("Component name must start with uppercase letter and contain only letters and numbers");
|
|
189507
189814
|
}
|
|
@@ -189529,22 +189836,42 @@ var cardRemotePushCommand = async (componentName) => {
|
|
|
189529
189836
|
schemaKind: "eventSchema",
|
|
189530
189837
|
content: serializeCardMetadata(metadata)
|
|
189531
189838
|
});
|
|
189839
|
+
const latestRevision = await latestRevisionNumber(service, componentName);
|
|
189532
189840
|
console.log(`[pieui] Uploaded card: ${componentName}`);
|
|
189533
189841
|
console.log(`[pieui] Path: ${componentDir}`);
|
|
189534
189842
|
console.log(`[pieui] Files uploaded: ${uploaded.length}`);
|
|
189535
189843
|
console.log(`[pieui] Metadata key: ${metadataResult.key}`);
|
|
189844
|
+
if (latestRevision !== undefined) {
|
|
189845
|
+
console.log(`[pieui] Revision: ${componentName}@${latestRevision}`);
|
|
189846
|
+
}
|
|
189536
189847
|
console.log(`[pieui] Metadata: Input=${metadata.input ? "Yes" : "No"}, ` + `Ajax=${metadata.ajax ? "Yes" : "No"}, IO=${metadata.io ? "Yes" : "No"}`);
|
|
189537
189848
|
};
|
|
189849
|
+
var latestRevisionNumber = async (service, componentName) => {
|
|
189850
|
+
try {
|
|
189851
|
+
const list = await service.listRevisions({ componentName });
|
|
189852
|
+
if (list.revisions.length === 0)
|
|
189853
|
+
return;
|
|
189854
|
+
return list.revisions.reduce((max, entry) => entry.revision > max ? entry.revision : max, 0);
|
|
189855
|
+
} catch (error) {
|
|
189856
|
+
if (error instanceof PieStorageError)
|
|
189857
|
+
return;
|
|
189858
|
+
throw error;
|
|
189859
|
+
}
|
|
189860
|
+
};
|
|
189538
189861
|
|
|
189539
189862
|
// src/code/commands/cardRemote/pull.ts
|
|
189540
189863
|
var import_node_fs3 = __toESM(require("node:fs"));
|
|
189541
189864
|
var import_node_path4 = __toESM(require("node:path"));
|
|
189542
|
-
var cardRemotePullCommand = async (
|
|
189865
|
+
var cardRemotePullCommand = async (cardRef) => {
|
|
189866
|
+
const ref = parseCardRef(cardRef);
|
|
189867
|
+
const { componentName, revision, isPublic } = ref;
|
|
189543
189868
|
const settings = loadSettings();
|
|
189544
|
-
|
|
189869
|
+
const effectiveUserId = ref.userId ?? settings.userId;
|
|
189870
|
+
if (!effectiveUserId) {
|
|
189545
189871
|
throw new Error("user_id is required (set PIE_USER_ID in env or .env; run `pieui login`)");
|
|
189546
189872
|
}
|
|
189547
|
-
|
|
189873
|
+
const effectiveProject = isPublic ? undefined : ref.project ?? settings.project;
|
|
189874
|
+
if (!isPublic && !effectiveProject) {
|
|
189548
189875
|
throw new Error("project is required (set PIE_PROJECT or PIE_PROJECT_SLUG in env or .env)");
|
|
189549
189876
|
}
|
|
189550
189877
|
const componentDir = import_node_path4.default.join(settings.componentsDir, componentName);
|
|
@@ -189557,21 +189884,28 @@ var cardRemotePullCommand = async (componentName) => {
|
|
|
189557
189884
|
try {
|
|
189558
189885
|
downloaded = await service.downloadComponentDirectory({
|
|
189559
189886
|
componentName,
|
|
189560
|
-
targetDir: tempDir
|
|
189887
|
+
targetDir: tempDir,
|
|
189888
|
+
revision,
|
|
189889
|
+
userId: effectiveUserId,
|
|
189890
|
+
project: effectiveProject,
|
|
189891
|
+
isPublic
|
|
189561
189892
|
});
|
|
189562
189893
|
} catch (error) {
|
|
189563
189894
|
import_node_fs3.default.rmSync(tempDir, { recursive: true, force: true });
|
|
189564
189895
|
throw error;
|
|
189565
189896
|
}
|
|
189897
|
+
const sourceLabel = isPublic ? `r/${effectiveUserId}/${componentName}` : ref.project ? `${effectiveProject}/${componentName}` : componentName;
|
|
189898
|
+
const suffix = revision !== undefined ? `@${revision}` : "";
|
|
189566
189899
|
if (downloaded.length === 0) {
|
|
189567
189900
|
import_node_fs3.default.rmSync(tempDir, { recursive: true, force: true });
|
|
189568
|
-
|
|
189901
|
+
const where = isPublic ? `user_id=${effectiveUserId} (public)` : `user_id=${effectiveUserId}, project=${effectiveProject}`;
|
|
189902
|
+
throw new Error(`No typescript files found for remote component ${sourceLabel}${suffix} (${where})`);
|
|
189569
189903
|
}
|
|
189570
189904
|
if (import_node_fs3.default.existsSync(componentDir)) {
|
|
189571
189905
|
import_node_fs3.default.rmSync(componentDir, { recursive: true, force: true });
|
|
189572
189906
|
}
|
|
189573
189907
|
import_node_fs3.default.renameSync(tempDir, componentDir);
|
|
189574
|
-
console.log(`[pieui] Pulled card: ${
|
|
189908
|
+
console.log(`[pieui] Pulled card: ${sourceLabel}${suffix}`);
|
|
189575
189909
|
for (const p of downloaded) {
|
|
189576
189910
|
const relative = import_node_path4.default.relative(tempDir, p);
|
|
189577
189911
|
console.log(`[pieui] Path: ${import_node_path4.default.join(componentDir, relative)}`);
|
|
@@ -189611,6 +189945,114 @@ var cardRemoteRemoveCommand = async (componentName) => {
|
|
|
189611
189945
|
console.log(`[pieui] Removed remote component: ${componentName}`);
|
|
189612
189946
|
};
|
|
189613
189947
|
|
|
189948
|
+
// src/code/commands/cardRemote/history.ts
|
|
189949
|
+
var extractPath = (key, componentName) => {
|
|
189950
|
+
const marker = `/${componentName}/${STORAGE_LANGUAGE}/`;
|
|
189951
|
+
const idx = key.indexOf(marker);
|
|
189952
|
+
if (idx === -1)
|
|
189953
|
+
return key;
|
|
189954
|
+
return key.slice(idx + marker.length);
|
|
189955
|
+
};
|
|
189956
|
+
var formatFileBlock = (file, componentName) => {
|
|
189957
|
+
const path13 = extractPath(file.key, componentName);
|
|
189958
|
+
const before = file.status === "added" ? "a//dev/null" : `a/${path13}`;
|
|
189959
|
+
const after = file.status === "deleted" ? "b//dev/null" : `b/${path13}`;
|
|
189960
|
+
const lines = [];
|
|
189961
|
+
lines.push(`diff --git ${before} ${after}`);
|
|
189962
|
+
lines.push(`${file.status} +${file.additions} -${file.deletions} ${path13}`);
|
|
189963
|
+
if (file.isBinary) {
|
|
189964
|
+
lines.push("Binary files differ");
|
|
189965
|
+
} else if (file.patch) {
|
|
189966
|
+
lines.push(file.patch.replace(/\n+$/, ""));
|
|
189967
|
+
}
|
|
189968
|
+
return lines;
|
|
189969
|
+
};
|
|
189970
|
+
var formatRevisionBlock = (entry, componentName) => {
|
|
189971
|
+
const lines = [];
|
|
189972
|
+
lines.push(`revision ${componentName}@${entry.revision}`);
|
|
189973
|
+
lines.push(`date ${entry.createdAt}`);
|
|
189974
|
+
lines.push(`mutation ${entry.mutation}`);
|
|
189975
|
+
if (entry.previousRevision !== null) {
|
|
189976
|
+
lines.push(`previous ${entry.previousRevision}`);
|
|
189977
|
+
}
|
|
189978
|
+
if (entry.deleted) {
|
|
189979
|
+
lines.push("deleted true");
|
|
189980
|
+
}
|
|
189981
|
+
for (const file of entry.files) {
|
|
189982
|
+
lines.push("");
|
|
189983
|
+
lines.push(...formatFileBlock(file, componentName));
|
|
189984
|
+
}
|
|
189985
|
+
return lines;
|
|
189986
|
+
};
|
|
189987
|
+
var cardRemoteHistoryCommand = async (options) => {
|
|
189988
|
+
const settings = loadSettings();
|
|
189989
|
+
if (!settings.userId) {
|
|
189990
|
+
throw new Error("user_id is required (set PIE_USER_ID in env or .env)");
|
|
189991
|
+
}
|
|
189992
|
+
if (!settings.project) {
|
|
189993
|
+
throw new Error("project is required (set PIE_PROJECT or PIE_PROJECT_SLUG)");
|
|
189994
|
+
}
|
|
189995
|
+
if (options.from !== undefined && options.to !== undefined && options.from > options.to) {
|
|
189996
|
+
throw new Error("--from must be <= --to");
|
|
189997
|
+
}
|
|
189998
|
+
const service = new PieStorageService(settings);
|
|
189999
|
+
const history = await service.getHistory({
|
|
190000
|
+
componentName: options.componentName,
|
|
190001
|
+
page: options.page,
|
|
190002
|
+
perPage: options.perPage,
|
|
190003
|
+
from: options.from,
|
|
190004
|
+
to: options.to
|
|
190005
|
+
});
|
|
190006
|
+
const output = [];
|
|
190007
|
+
output.push(`component ${history.userId}/${history.project}/${history.componentName}`);
|
|
190008
|
+
output.push(`page ${history.page} per-page ${history.perPage} total-revisions ${history.totalRevisions}`);
|
|
190009
|
+
if (history.fromRevision !== null || history.toRevision !== null) {
|
|
190010
|
+
const from = history.fromRevision !== null ? String(history.fromRevision) : "*";
|
|
190011
|
+
const to = history.toRevision !== null ? String(history.toRevision) : "*";
|
|
190012
|
+
output.push(`range ${from}..${to}`);
|
|
190013
|
+
}
|
|
190014
|
+
for (const entry of history.entries) {
|
|
190015
|
+
output.push("");
|
|
190016
|
+
output.push(...formatRevisionBlock(entry, history.componentName));
|
|
190017
|
+
}
|
|
190018
|
+
console.log(output.join(`
|
|
190019
|
+
`));
|
|
190020
|
+
};
|
|
190021
|
+
|
|
190022
|
+
// src/code/commands/cardRemote/public.ts
|
|
190023
|
+
var cardRemotePublicCommand = async (componentName) => {
|
|
190024
|
+
const settings = loadSettings();
|
|
190025
|
+
if (!settings.userId) {
|
|
190026
|
+
throw new Error("user_id is required (set PIE_USER_ID in env or .env)");
|
|
190027
|
+
}
|
|
190028
|
+
if (!settings.project) {
|
|
190029
|
+
throw new Error("project is required (set PIE_PROJECT or PIE_PROJECT_SLUG)");
|
|
190030
|
+
}
|
|
190031
|
+
const service = new PieStorageService(settings);
|
|
190032
|
+
const state = await service.markComponentPublic({ componentName });
|
|
190033
|
+
console.log(`[pieui] Marked public: ${state.componentName} (user=${state.userId} project=${state.project})`);
|
|
190034
|
+
console.log(`[pieui] is_public: ${state.isPublic}`);
|
|
190035
|
+
if (state.publicRegistryName) {
|
|
190036
|
+
console.log(`[pieui] Public registry name: ${state.publicRegistryName}`);
|
|
190037
|
+
}
|
|
190038
|
+
console.log(`[pieui] Public read URL: <api>/public-components/${state.userId}/${state.componentName}`);
|
|
190039
|
+
};
|
|
190040
|
+
|
|
190041
|
+
// src/code/commands/cardRemote/private.ts
|
|
190042
|
+
var cardRemotePrivateCommand = async (componentName) => {
|
|
190043
|
+
const settings = loadSettings();
|
|
190044
|
+
if (!settings.userId) {
|
|
190045
|
+
throw new Error("user_id is required (set PIE_USER_ID in env or .env)");
|
|
190046
|
+
}
|
|
190047
|
+
if (!settings.project) {
|
|
190048
|
+
throw new Error("project is required (set PIE_PROJECT or PIE_PROJECT_SLUG)");
|
|
190049
|
+
}
|
|
190050
|
+
const service = new PieStorageService(settings);
|
|
190051
|
+
const state = await service.markComponentPrivate({ componentName });
|
|
190052
|
+
console.log(`[pieui] Marked private: ${state.componentName} (user=${state.userId} project=${state.project})`);
|
|
190053
|
+
console.log(`[pieui] is_public: ${state.isPublic}`);
|
|
190054
|
+
};
|
|
190055
|
+
|
|
189614
190056
|
// src/code/commands/pageAdd.ts
|
|
189615
190057
|
var import_fs8 = __toESM(require("fs"));
|
|
189616
190058
|
var import_path10 = __toESM(require("path"));
|
|
@@ -190157,7 +190599,11 @@ var main = async () => {
|
|
|
190157
190599
|
remoteUserId,
|
|
190158
190600
|
remoteProject,
|
|
190159
190601
|
pageAction,
|
|
190160
|
-
pagePath
|
|
190602
|
+
pagePath,
|
|
190603
|
+
historyPage,
|
|
190604
|
+
historyPerPage,
|
|
190605
|
+
historyFrom,
|
|
190606
|
+
historyTo
|
|
190161
190607
|
} = parseArgs(process.argv.slice(2));
|
|
190162
190608
|
console.log(`[pieui] CLI started with command: "${command}"`);
|
|
190163
190609
|
switch (command) {
|
|
@@ -190219,7 +190665,25 @@ var main = async () => {
|
|
|
190219
190665
|
await cardRemoteRemoveCommand(componentName);
|
|
190220
190666
|
return;
|
|
190221
190667
|
}
|
|
190222
|
-
|
|
190668
|
+
if (cardRemoteAction === "history") {
|
|
190669
|
+
await cardRemoteHistoryCommand({
|
|
190670
|
+
componentName,
|
|
190671
|
+
page: historyPage,
|
|
190672
|
+
perPage: historyPerPage,
|
|
190673
|
+
from: historyFrom,
|
|
190674
|
+
to: historyTo
|
|
190675
|
+
});
|
|
190676
|
+
return;
|
|
190677
|
+
}
|
|
190678
|
+
if (cardRemoteAction === "public") {
|
|
190679
|
+
await cardRemotePublicCommand(componentName);
|
|
190680
|
+
return;
|
|
190681
|
+
}
|
|
190682
|
+
if (cardRemoteAction === "private") {
|
|
190683
|
+
await cardRemotePrivateCommand(componentName);
|
|
190684
|
+
return;
|
|
190685
|
+
}
|
|
190686
|
+
console.error("[pieui] Error: Supported card remote subcommands: push, pull, list, remove, history, public, private");
|
|
190223
190687
|
printUsage();
|
|
190224
190688
|
process.exit(1);
|
|
190225
190689
|
}
|
package/dist/code/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/code/args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAMR,UAAU,EACb,MAAM,SAAS,CAAA;AAEhB,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/code/args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAMR,UAAU,EACb,MAAM,SAAS,CAAA;AAEhB,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,KAAG,UAoP1C,CAAA;AAED,eAAO,MAAM,UAAU,YA2MtB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardRef.d.ts","sourceRoot":"","sources":["../../../../src/code/commands/cardRemote/cardRef.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AA4BD,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OA4C5C,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type CardRemoteHistoryOptions = {
|
|
2
|
+
componentName: string;
|
|
3
|
+
page?: number;
|
|
4
|
+
perPage?: number;
|
|
5
|
+
from?: number;
|
|
6
|
+
to?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const cardRemoteHistoryCommand: (options: CardRemoteHistoryOptions) => Promise<void>;
|
|
9
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/code/commands/cardRemote/history.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,wBAAwB,GAAG;IACnC,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAkDD,eAAO,MAAM,wBAAwB,GACjC,SAAS,wBAAwB,KAClC,OAAO,CAAC,IAAI,CAgDd,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private.d.ts","sourceRoot":"","sources":["../../../../src/code/commands/cardRemote/private.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,GACjC,eAAe,MAAM,KACtB,OAAO,CAAC,IAAI,CAkBd,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../../src/code/commands/cardRemote/public.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,GAChC,eAAe,MAAM,KACtB,OAAO,CAAC,IAAI,CA0Bd,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const cardRemotePullCommand: (
|
|
1
|
+
export declare const cardRemotePullCommand: (cardRef: string) => Promise<void>;
|
|
2
2
|
//# sourceMappingURL=pull.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../../src/code/commands/cardRemote/pull.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../../src/code/commands/cardRemote/pull.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,qBAAqB,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,IAAI,CAsEzE,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const cardRemotePushCommand: (
|
|
1
|
+
export declare const cardRemotePushCommand: (cardRef: string) => Promise<void>;
|
|
2
2
|
//# sourceMappingURL=push.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../../src/code/commands/cardRemote/push.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../../src/code/commands/cardRemote/push.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,qBAAqB,GAC9B,SAAS,MAAM,KAChB,OAAO,CAAC,IAAI,CAoEd,CAAA"}
|
|
@@ -19,6 +19,56 @@ export type ProjectComponentList = {
|
|
|
19
19
|
project: string;
|
|
20
20
|
components: ProjectComponentEntry[];
|
|
21
21
|
};
|
|
22
|
+
export type ComponentRevisionSummary = {
|
|
23
|
+
revision: number;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
mutation: string;
|
|
26
|
+
deleted: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type ComponentRevisionList = {
|
|
29
|
+
userId: string;
|
|
30
|
+
project: string;
|
|
31
|
+
componentName: string;
|
|
32
|
+
revisions: ComponentRevisionSummary[];
|
|
33
|
+
};
|
|
34
|
+
export declare const parseComponentRevisionList: (raw: unknown) => ComponentRevisionList;
|
|
22
35
|
export declare const parseComponentObject: (raw: unknown) => ComponentObject;
|
|
36
|
+
export type PublicComponentState = {
|
|
37
|
+
userId: string;
|
|
38
|
+
project: string;
|
|
39
|
+
componentName: string;
|
|
40
|
+
isPublic: boolean;
|
|
41
|
+
publicRegistryName: string | null;
|
|
42
|
+
};
|
|
43
|
+
export declare const parsePublicComponentState: (raw: unknown) => PublicComponentState;
|
|
44
|
+
export type HistoryFileStatus = 'added' | 'modified' | 'deleted';
|
|
45
|
+
export type HistoryFileEntry = {
|
|
46
|
+
key: string;
|
|
47
|
+
status: HistoryFileStatus;
|
|
48
|
+
isBinary: boolean;
|
|
49
|
+
additions: number;
|
|
50
|
+
deletions: number;
|
|
51
|
+
patch?: string;
|
|
52
|
+
};
|
|
53
|
+
export type HistoryEntry = {
|
|
54
|
+
revision: number;
|
|
55
|
+
previousRevision: number | null;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
mutation: string;
|
|
58
|
+
deleted: boolean;
|
|
59
|
+
files: HistoryFileEntry[];
|
|
60
|
+
};
|
|
61
|
+
export type ComponentHistory = {
|
|
62
|
+
userId: string;
|
|
63
|
+
project: string;
|
|
64
|
+
componentName: string;
|
|
65
|
+
page: number;
|
|
66
|
+
perPage: number;
|
|
67
|
+
totalRevisions: number;
|
|
68
|
+
fromRevision: number | null;
|
|
69
|
+
toRevision: number | null;
|
|
70
|
+
entries: HistoryEntry[];
|
|
71
|
+
};
|
|
72
|
+
export declare const parseComponentHistory: (raw: unknown) => ComponentHistory;
|
|
23
73
|
export declare const parseProjectComponentList: (raw: unknown) => ProjectComponentList;
|
|
24
74
|
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/code/services/models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAC9B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,mBAAmB,CAAA;CACnC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE3B,MAAM,MAAM,qBAAqB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpD,MAAM,MAAM,oBAAoB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,qBAAqB,EAAE,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,KAAK,OAAO,KAAG,eAmBnD,CAAA;AAED,eAAO,MAAM,yBAAyB,GAClC,KAAK,OAAO,KACb,oBAsBF,CAAA"}
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/code/services/models.ts"],"names":[],"mappings":"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{ type ComponentObject, type ComponentTree, type ProjectComponentList } from './models';
|
|
2
|
+
import { type ComponentHistory, type ComponentObject, type ComponentRevisionList, type ComponentTree, type ProjectComponentList, type PublicComponentState } from './models';
|
|
3
3
|
export declare const STORAGE_LANGUAGE = "typescript";
|
|
4
4
|
export type SchemaKind = 'jsonSchema' | 'eventSchema' | 'llms.txt';
|
|
5
5
|
export declare class PieStorageError extends Error {
|
|
@@ -18,12 +18,41 @@ export declare class PieStorageService {
|
|
|
18
18
|
componentName: string;
|
|
19
19
|
userId?: string;
|
|
20
20
|
project?: string;
|
|
21
|
+
isPublic?: boolean;
|
|
21
22
|
}): string;
|
|
22
23
|
languageFileUrl(args: {
|
|
23
24
|
componentName: string;
|
|
24
25
|
objectPath: string;
|
|
25
26
|
userId?: string;
|
|
26
27
|
project?: string;
|
|
28
|
+
revision?: number;
|
|
29
|
+
isPublic?: boolean;
|
|
30
|
+
}): string;
|
|
31
|
+
componentTreeUrl(args: {
|
|
32
|
+
componentName: string;
|
|
33
|
+
userId?: string;
|
|
34
|
+
project?: string;
|
|
35
|
+
revision?: number;
|
|
36
|
+
isPublic?: boolean;
|
|
37
|
+
}): string;
|
|
38
|
+
revisionsUrl(args: {
|
|
39
|
+
componentName: string;
|
|
40
|
+
userId?: string;
|
|
41
|
+
project?: string;
|
|
42
|
+
}): string;
|
|
43
|
+
publicMarkUrl(args: {
|
|
44
|
+
componentName: string;
|
|
45
|
+
userId?: string;
|
|
46
|
+
project?: string;
|
|
47
|
+
}): string;
|
|
48
|
+
historyUrl(args: {
|
|
49
|
+
componentName: string;
|
|
50
|
+
userId?: string;
|
|
51
|
+
project?: string;
|
|
52
|
+
page?: number;
|
|
53
|
+
perPage?: number;
|
|
54
|
+
from?: number;
|
|
55
|
+
to?: number;
|
|
27
56
|
}): string;
|
|
28
57
|
languageBatchUrl(args: {
|
|
29
58
|
componentName: string;
|
|
@@ -44,7 +73,33 @@ export declare class PieStorageService {
|
|
|
44
73
|
componentName: string;
|
|
45
74
|
userId?: string;
|
|
46
75
|
project?: string;
|
|
76
|
+
revision?: number;
|
|
77
|
+
isPublic?: boolean;
|
|
47
78
|
}): Promise<ComponentTree>;
|
|
79
|
+
listRevisions(args: {
|
|
80
|
+
componentName: string;
|
|
81
|
+
userId?: string;
|
|
82
|
+
project?: string;
|
|
83
|
+
}): Promise<ComponentRevisionList>;
|
|
84
|
+
markComponentPublic(args: {
|
|
85
|
+
componentName: string;
|
|
86
|
+
userId?: string;
|
|
87
|
+
project?: string;
|
|
88
|
+
}): Promise<PublicComponentState>;
|
|
89
|
+
markComponentPrivate(args: {
|
|
90
|
+
componentName: string;
|
|
91
|
+
userId?: string;
|
|
92
|
+
project?: string;
|
|
93
|
+
}): Promise<PublicComponentState>;
|
|
94
|
+
getHistory(args: {
|
|
95
|
+
componentName: string;
|
|
96
|
+
userId?: string;
|
|
97
|
+
project?: string;
|
|
98
|
+
page?: number;
|
|
99
|
+
perPage?: number;
|
|
100
|
+
from?: number;
|
|
101
|
+
to?: number;
|
|
102
|
+
}): Promise<ComponentHistory>;
|
|
48
103
|
deleteComponent(args: {
|
|
49
104
|
componentName: string;
|
|
50
105
|
userId?: string;
|
|
@@ -88,12 +143,16 @@ export declare class PieStorageService {
|
|
|
88
143
|
targetPath: string;
|
|
89
144
|
userId?: string;
|
|
90
145
|
project?: string;
|
|
146
|
+
revision?: number;
|
|
147
|
+
isPublic?: boolean;
|
|
91
148
|
}): Promise<string>;
|
|
92
149
|
downloadComponentDirectory(args: {
|
|
93
150
|
componentName: string;
|
|
94
151
|
targetDir: string;
|
|
95
152
|
userId?: string;
|
|
96
153
|
project?: string;
|
|
154
|
+
revision?: number;
|
|
155
|
+
isPublic?: boolean;
|
|
97
156
|
}): Promise<string[]>;
|
|
98
157
|
private headers;
|
|
99
158
|
private request;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/code/services/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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oB,CAAC,IAAI,EAAE;QAC7B,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;QAClB,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;KACrB,GAAG,OAAO,CAAC,MAAM,CAAC;IAeb,0BAA0B,CAAC,IAAI,EAAE;QACnC,aAAa,EAAE,MAAM,CAAA;QACrB,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;KACrB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAqBrB,OAAO,CAAC,OAAO;YAUD,OAAO;CA6BxB"}
|
package/dist/code/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const REGISTER_FUNCTION = "registerPieComponent";
|
|
|
4
4
|
export type ComponentType = 'simple' | 'complex' | 'simple-container' | 'complex-container';
|
|
5
5
|
export type ListFilter = 'all' | ComponentType;
|
|
6
6
|
export type CardAction = 'add' | 'remote';
|
|
7
|
-
export type CardRemoteAction = 'push' | 'pull' | 'list' | 'remove';
|
|
7
|
+
export type CardRemoteAction = 'push' | 'pull' | 'list' | 'remove' | 'history' | 'public' | 'private';
|
|
8
8
|
export type PageAction = 'add';
|
|
9
9
|
export type ParsedArgs = {
|
|
10
10
|
command: string;
|
|
@@ -25,6 +25,10 @@ export type ParsedArgs = {
|
|
|
25
25
|
remoteProject?: string;
|
|
26
26
|
pageAction?: PageAction;
|
|
27
27
|
pagePath?: string;
|
|
28
|
+
historyPage?: number;
|
|
29
|
+
historyPerPage?: number;
|
|
30
|
+
historyFrom?: number;
|
|
31
|
+
historyTo?: number;
|
|
28
32
|
};
|
|
29
33
|
export type CardScaffoldOptions = {
|
|
30
34
|
ajax?: boolean;
|
package/dist/code/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/code/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,wBAAwB,CAAA;AAElD,eAAO,MAAM,iBAAiB,0BAA0B,CAAA;AACxD,eAAO,MAAM,iBAAiB,yBAAyB,CAAA;AAEvD,MAAM,MAAM,aAAa,GACnB,QAAQ,GACR,SAAS,GACT,kBAAkB,GAClB,mBAAmB,CAAA;AAEzB,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,aAAa,CAAA;AAC9C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAA;AACzC,MAAM,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/code/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,wBAAwB,CAAA;AAElD,eAAO,MAAM,iBAAiB,0BAA0B,CAAA;AACxD,eAAO,MAAM,iBAAiB,yBAAyB,CAAA;AAEvD,MAAM,MAAM,aAAa,GACnB,QAAQ,GACR,SAAS,GACT,kBAAkB,GAClB,mBAAmB,CAAA;AAEzB,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,aAAa,CAAA;AAC9C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAA;AACzC,MAAM,MAAM,gBAAgB,GACtB,MAAM,GACN,MAAM,GACN,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,CAAA;AACf,MAAM,MAAM,UAAU,GAAG,KAAK,CAAA;AAE9B,MAAM,MAAM,UAAU,GAAG;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,EAAE,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,GAAG,CAAC,UAAU,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;CACvB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swarm.ing/pieui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.20",
|
|
4
4
|
"description": "A React component library featuring PieCard component",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -103,7 +103,6 @@
|
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"@openai/agents": "^0.4.5",
|
|
106
|
-
"@swarm.ing/pieui": "^2.0.17",
|
|
107
106
|
"@tanstack/react-query": "^5.90.20",
|
|
108
107
|
"@telegram-apps/sdk": "^3.11.8",
|
|
109
108
|
"annyang": "^2.6.1",
|