@blotout/qinto-cli 0.1.7 → 0.1.8
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.
|
@@ -14692,7 +14692,14 @@ var scheduleSchema = external_exports.object({
|
|
|
14692
14692
|
id: external_exports.string().min(1).max(32),
|
|
14693
14693
|
cron: external_exports.string().min(1).max(MAX_CRON_LENGTH),
|
|
14694
14694
|
scheduledTime: external_exports.number().int().nonnegative().safe(),
|
|
14695
|
-
installs: external_exports.array(
|
|
14695
|
+
installs: external_exports.array(
|
|
14696
|
+
external_exports.object({
|
|
14697
|
+
id: external_exports.string().min(1).max(64),
|
|
14698
|
+
ord: external_exports.number().int().min(1),
|
|
14699
|
+
label: external_exports.string().max(100),
|
|
14700
|
+
catalogQueryTicket: external_exports.string().min(1).max(2048)
|
|
14701
|
+
}).strict()
|
|
14702
|
+
).min(1).max(MAX_INSTALLS_PER_APP)
|
|
14696
14703
|
}).strict();
|
|
14697
14704
|
var controlEnvelopeSchema = external_exports.object({
|
|
14698
14705
|
v: external_exports.literal(CONTROL_ENVELOPE_VERSION),
|
|
@@ -14760,6 +14767,9 @@ var MAX_UI_BODY_BYTES = 1024 * 1024;
|
|
|
14760
14767
|
var appUiWritePath = (domainId, appSlug2) => {
|
|
14761
14768
|
return `/app-ui/sites/${domainId}/apps/${appSlug2}/install-variables`;
|
|
14762
14769
|
};
|
|
14770
|
+
var appUiCatalogQueryPath = (domainId, appSlug2, resourceIdentifier) => {
|
|
14771
|
+
return `/app-ui/sites/${domainId}/apps/${appSlug2}/catalogs/${resourceIdentifier}/query`;
|
|
14772
|
+
};
|
|
14763
14773
|
var uiInstallSchema = external_exports.object({ id: external_exports.string().min(1).max(64), ord: external_exports.number().int().min(1), label: external_exports.string().max(100), enabled: external_exports.boolean() }).strict();
|
|
14764
14774
|
var uiContextSchema = external_exports.object({
|
|
14765
14775
|
version: external_exports.string().min(1).max(32),
|
|
@@ -15847,6 +15857,48 @@ var failureMessage = (error51) => {
|
|
|
15847
15857
|
return message.slice(0, MAX_ERROR_MESSAGE_LENGTH);
|
|
15848
15858
|
};
|
|
15849
15859
|
|
|
15860
|
+
// src/catalog-query.ts
|
|
15861
|
+
var MAX_CATALOG_RESPONSE_BYTES = 5 * 1024 * 1024;
|
|
15862
|
+
var parseCatalogResponse = async (response) => {
|
|
15863
|
+
const raw = await readBody(response, MAX_CATALOG_RESPONSE_BYTES);
|
|
15864
|
+
if (raw === null) {
|
|
15865
|
+
throw new Error("The catalog query response exceeded the app runtime limit.");
|
|
15866
|
+
}
|
|
15867
|
+
let body;
|
|
15868
|
+
try {
|
|
15869
|
+
body = JSON.parse(raw);
|
|
15870
|
+
} catch {
|
|
15871
|
+
throw new Error(`The catalog query returned an invalid response (${response.status}).`);
|
|
15872
|
+
}
|
|
15873
|
+
if (!response.ok) {
|
|
15874
|
+
const error51 = body;
|
|
15875
|
+
const reason = typeof error51.message === "string" ? error51.message : typeof error51.error === "string" ? error51.error : `request failed with status ${response.status}`;
|
|
15876
|
+
throw new Error(`Catalog query failed: ${reason}`);
|
|
15877
|
+
}
|
|
15878
|
+
return body;
|
|
15879
|
+
};
|
|
15880
|
+
var buildCatalogQuery = ({ env, ticket, installId }) => {
|
|
15881
|
+
return {
|
|
15882
|
+
catalog: async (resourceIdentifier, sql) => {
|
|
15883
|
+
const platform = env;
|
|
15884
|
+
const context = JSON.parse(platform.APP_CONTEXT);
|
|
15885
|
+
const path = appUiCatalogQueryPath(context.domainId, context.slug, resourceIdentifier);
|
|
15886
|
+
return traced(
|
|
15887
|
+
"qinto.catalog.query",
|
|
15888
|
+
{ attrs: { "app.install_id": installId, "app.catalog.resource": resourceIdentifier } },
|
|
15889
|
+
async () => {
|
|
15890
|
+
const response = await fetch(new URL(path, platform.QINTO_PLATFORM_API), {
|
|
15891
|
+
method: "POST",
|
|
15892
|
+
headers: { authorization: `Bearer ${ticket}`, "content-type": "application/json" },
|
|
15893
|
+
body: JSON.stringify({ sql })
|
|
15894
|
+
});
|
|
15895
|
+
return parseCatalogResponse(response);
|
|
15896
|
+
}
|
|
15897
|
+
);
|
|
15898
|
+
}
|
|
15899
|
+
};
|
|
15900
|
+
};
|
|
15901
|
+
|
|
15850
15902
|
// src/schedule.ts
|
|
15851
15903
|
var dispatchSchedule = async (envelope, bundle, env) => {
|
|
15852
15904
|
const schedule = envelope.schedule;
|
|
@@ -15881,6 +15933,7 @@ var dispatchSchedule = async (envelope, bundle, env) => {
|
|
|
15881
15933
|
appSecrets: appScope.appSecrets,
|
|
15882
15934
|
observability: buildObservability(),
|
|
15883
15935
|
apps: buildAppsClient(env, { depth: 0 }),
|
|
15936
|
+
query: buildCatalogQuery({ env, ticket: install.catalogQueryTicket, installId: install.id }),
|
|
15884
15937
|
push: async (userId, message) => {
|
|
15885
15938
|
await brokerPush(env, {
|
|
15886
15939
|
userId,
|
|
@@ -15917,7 +15917,14 @@ var scheduleSchema = external_exports.object({
|
|
|
15917
15917
|
id: external_exports.string().min(1).max(32),
|
|
15918
15918
|
cron: external_exports.string().min(1).max(MAX_CRON_LENGTH),
|
|
15919
15919
|
scheduledTime: external_exports.number().int().nonnegative().safe(),
|
|
15920
|
-
installs: external_exports.array(
|
|
15920
|
+
installs: external_exports.array(
|
|
15921
|
+
external_exports.object({
|
|
15922
|
+
id: external_exports.string().min(1).max(64),
|
|
15923
|
+
ord: external_exports.number().int().min(1),
|
|
15924
|
+
label: external_exports.string().max(100),
|
|
15925
|
+
catalogQueryTicket: external_exports.string().min(1).max(2048)
|
|
15926
|
+
}).strict()
|
|
15927
|
+
).min(1).max(MAX_INSTALLS_PER_APP)
|
|
15921
15928
|
}).strict();
|
|
15922
15929
|
var controlEnvelopeSchema = external_exports.object({
|
|
15923
15930
|
v: external_exports.literal(CONTROL_ENVELOPE_VERSION),
|
|
@@ -20540,10 +20547,24 @@ var verifyAppUiToken = /* @__PURE__ */ __name(async (input) => {
|
|
|
20540
20547
|
return { ok: true, claims: claims.data, kid: signature.kid, key: signature.key };
|
|
20541
20548
|
}, "verifyAppUiToken");
|
|
20542
20549
|
|
|
20550
|
+
// ../../libs/app-ui-token/src/schedule-catalog-ticket.ts
|
|
20551
|
+
var APP_SCHEDULE_CATALOG_TICKET_ISSUER = "qinto-portal";
|
|
20552
|
+
var claimsSchema2 = external_exports.object({
|
|
20553
|
+
iss: external_exports.literal(APP_SCHEDULE_CATALOG_TICKET_ISSUER),
|
|
20554
|
+
aud: external_exports.string().min(1),
|
|
20555
|
+
sub: external_exports.string().min(1),
|
|
20556
|
+
iat: external_exports.number().int(),
|
|
20557
|
+
exp: external_exports.number().int(),
|
|
20558
|
+
domainId: external_exports.string().min(1),
|
|
20559
|
+
appId: external_exports.string().min(1),
|
|
20560
|
+
appInstallId: external_exports.string().min(1),
|
|
20561
|
+
appVersionId: external_exports.string().min(1)
|
|
20562
|
+
}).strict();
|
|
20563
|
+
|
|
20543
20564
|
// ../../libs/app-ui-token/src/write-ticket.ts
|
|
20544
20565
|
var APP_UI_WRITE_TICKET_TTL_SECONDS = 60;
|
|
20545
20566
|
var APP_UI_WRITE_TICKET_ISSUER = "qinto-site";
|
|
20546
|
-
var
|
|
20567
|
+
var claimsSchema3 = external_exports.object({
|
|
20547
20568
|
iss: external_exports.literal(APP_UI_WRITE_TICKET_ISSUER),
|
|
20548
20569
|
aud: external_exports.string().min(1),
|
|
20549
20570
|
sub: external_exports.string().min(1),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main": {
|
|
3
3
|
"version": "0.1.0",
|
|
4
|
-
"gitSha": "
|
|
5
|
-
"builtAt": "2026-08-
|
|
4
|
+
"gitSha": "38683fc9a0a7f29125a35ad77e2c0c701992c82b",
|
|
5
|
+
"builtAt": "2026-08-27T07:08:20.610Z",
|
|
6
6
|
"compatibilityDate": "2026-06-23",
|
|
7
7
|
"compatibilityFlags": [
|
|
8
8
|
"nodejs_compat"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"app-runtime": {
|
|
42
42
|
"version": "0.1.0",
|
|
43
|
-
"gitSha": "
|
|
44
|
-
"builtAt": "2026-08-
|
|
43
|
+
"gitSha": "db5a262cc87eefb7191739982830998dd648ff8b",
|
|
44
|
+
"builtAt": "2026-08-27T05:45:00.519Z",
|
|
45
45
|
"compatibilityDate": "2026-06-23",
|
|
46
46
|
"compatibilityFlags": [
|
|
47
47
|
"nodejs_compat"
|