@superwall/cli 2.6.0-beta.1 → 2.6.0-beta.2
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/{apple-Bmt_iywx.js → apple-Dc5pOPms.js} +14 -14
- package/dist/{approve-D2UgqaRx.js → approve-BSbdmOez.js} +11 -8
- package/dist/{assets-B_quADds.js → assets-C_RjojkK.js} +3 -3
- package/dist/auth.js +3 -3
- package/dist/{base-ChTi42M0.js → base-83ZTv6up.js} +5 -5
- package/dist/{billing-ZIETn0j4.js → billing-B6HK-F_a.js} +3 -3
- package/dist/{bind-ClFjTt0U.js → bind-DcWIIPgk.js} +4 -4
- package/dist/{build-BWjXurjs.js → build-DK88pTMW.js} +8 -8
- package/dist/{client-CyrYJzBF.js → client-x08fpvay.js} +55 -5
- package/dist/{create-C3uklw-U.js → create-B6-Dr3GZ.js} +27 -27
- package/dist/create-Du8Fx7W5.js +20 -0
- package/dist/{create-BCIgjRHn.js → create-kpqEhqkk.js} +6 -6
- package/dist/{doctor-D2Q1EZe8.js → doctor-DYbm8IKQ.js} +6 -6
- package/dist/{drivers-BQkO5tHs.js → drivers-Dyi-y9Jn.js} +3 -3
- package/dist/entry.js +20 -20
- package/dist/{environment-BocmdvZ-.js → environment-BFNzLLPN.js} +1 -1
- package/dist/{existing-Cl5x6_5u.js → existing-WQ3pz94o.js} +2 -2
- package/dist/{framework-CLmf4swr.js → framework-JFLjmD5Y.js} +1 -1
- package/dist/held-DmOhszHR.js +17 -0
- package/dist/{held-Bykbwy-m.js → held-sKq3xrsT.js} +6 -6
- package/dist/{install-dXZZ79Oe.js → install-DsIsif39.js} +10 -10
- package/dist/{integrate-DiSjlOjC.js → integrate-B8eA676b.js} +22 -22
- package/dist/{login-5sWIKDI2.js → login-Blhxi20A.js} +6 -6
- package/dist/{login-Jp6E6d2e.js → login-BlpfYapG.js} +1 -1
- package/dist/login-D9jfRO8w.js +17 -0
- package/dist/{lookup-CWzVfPpq.js → lookup-Dg55W9S7.js} +3 -3
- package/dist/{migrate-BKiOUsMY.js → migrate-DoRb9jmA.js} +25 -25
- package/dist/{migration-Z69tLeHC.js → migration-BUedsREQ.js} +8 -8
- package/dist/{notification-url-BDBxbwZq.js → notification-url-D82msWF5.js} +2 -2
- package/dist/{open-DNd49kT-.js → open-BAqLpTSI.js} +2 -2
- package/dist/{org-Dud1rF9f.js → org-C4G7WjTV.js} +3 -3
- package/dist/{organization-7vJA3uy1.js → organization-CmuQwcKN.js} +3 -3
- package/dist/{orgs-Z0H9WOs1.js → orgs-1OzwUtpT.js} +1 -1
- package/dist/{paths-CzTJVpfi.js → paths-gBbqgkS7.js} +1 -1
- package/dist/{playbook-DJ__edOW.js → playbook-BKqlv77S.js} +10 -10
- package/dist/{promote-DLtPSvmL.js → promote-D0i8A0CO.js} +19 -19
- package/dist/pull-CO5HlqBe.js +36 -0
- package/dist/{pull-D-YuT3e0.js → pull-CiIrJ5ik.js} +27 -27
- package/dist/{pull-AoUmaiMK.js → pull-DgQ_UmGv.js} +6 -6
- package/dist/{push-BMblzg_6.js → push-7N4XIVtg.js} +6 -6
- package/dist/push-BIhGDNpL.js +30 -0
- package/dist/{push-BrzMFd4Z.js → push-BWsXO7FN.js} +11 -5
- package/dist/{push-B42D8fKf.js → push-BgqTddLA.js} +11 -11
- package/dist/{registry-DDU10_Ix.js → registry-aAR_8VOw.js} +52 -50
- package/dist/{resolve-DpOSDDdr.js → resolve-CcOpO_5s.js} +50 -4
- package/dist/{resources-CptT7HD6.js → resources-DNwvf8rg.js} +2 -2
- package/dist/{run-c1O2_8pp.js → run-B-YoyB-a.js} +2 -2
- package/dist/{run-r3foWfhV.js → run-tVYJ3V5j.js} +9 -9
- package/dist/scan-BU41gcQY.js +4 -0
- package/dist/{scan-nVQO7JLx.js → scan-dv0rrY4C.js} +1 -1
- package/dist/{scope-l1qGLsgz.js → scope-BXoQo30_.js} +5 -5
- package/dist/server-BemmM1FV.js +29 -0
- package/dist/{server-DLARhh1k.js → server-CcZGdYjE.js} +7 -7
- package/dist/session-4aITGsF1.js +6 -0
- package/dist/{session-Z0BeaJPf.js → session-dHBtgSN0.js} +1 -1
- package/dist/{setup-C6NFy14d.js → setup-m94dpT3t.js} +7 -7
- package/dist/skills/superwall-artifacts/SKILL.md +7 -2
- package/dist/skills/superwall-artifacts/references/cli.md +4 -1
- package/dist/{skills-CdKwaTRS.js → skills-Bqz2l_bx.js} +8 -8
- package/dist/{skills-421SFEyF.js → skills-Q7xB784d.js} +4 -4
- package/dist/{source-push-B4s6r9bB.js → source-push-CG948HrX.js} +4 -4
- package/dist/{spinner-DPdBlZe2.js → spinner-IA6hV8nI.js} +3 -3
- package/dist/{starter-0OdVPH4l.js → starter-BtUUQWhd.js} +14 -4
- package/dist/{status-Dsc7d3z2.js → status-CB_MrFu5.js} +6 -6
- package/dist/{storage-DT_wxwJ8.js → storage-pR0Wb0d9.js} +1 -1
- package/dist/storekit-BMxyYAHj.js +17 -0
- package/dist/{storekit-B9M2raxe.js → storekit-CQnwlpKV.js} +3 -3
- package/dist/{telemetry-ovPiseFm.js → telemetry-DU56L7Cy.js} +1 -1
- package/dist/{token-Bu3FaRkv.js → token-BbUeExGJ.js} +1 -1
- package/dist/tools.d.ts +5 -0
- package/dist/tools.js +61 -3
- package/dist/{try-B8FYkTvQ.js → try-CS3jLyoP.js} +13 -13
- package/dist/{upgrade-B7TmvEPP.js → upgrade-CKn88PZD.js} +2 -2
- package/dist/{upgrade-CAHyrWUL.js → upgrade-DfD3-ClG.js} +2 -2
- package/package.json +2 -2
- package/dist/create-7HDW3DCl.js +0 -20
- package/dist/held-Chw3BtBV.js +0 -17
- package/dist/login-DZ8Pipf6.js +0 -17
- package/dist/pull-C1xm2zqG.js +0 -36
- package/dist/push-Co5jk6Kr.js +0 -30
- package/dist/scan-D86kLtM7.js +0 -4
- package/dist/server-BEcsQaPu.js +0 -29
- package/dist/session-Csuaw6RU.js +0 -6
- package/dist/storekit-BWZf-fNE.js +0 -17
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { r as NotLoggedInError } from "./token-
|
|
1
|
+
import { r as NotLoggedInError } from "./token-BbUeExGJ.js";
|
|
2
2
|
import { a as stripAnsi, l as readJson, o as cache, r as formatJson, t as blocks } from "./output-Ggzq5_-t.js";
|
|
3
|
-
import { o as AUTO_UPDATE_TARGET, s as CHANNEL, t as API_HOST, v as TELEMETRY_HOST, w as detectAgent, x as VERSION, y as TELEMETRY_KEY } from "./environment-
|
|
4
|
-
import { n as readSession } from "./storage-
|
|
5
|
-
import { a as withQuery$1, n as ApiUnreachableError, t as ApiError } from "./client-
|
|
6
|
-
import { C as listKeySources, S as listBundleIdSuggestions, T as replaceRevenueProvider, _ as checkServerNotifications, b as importAppKey, c as resolveAscOrgApi, d as runAscDocs, f as parseParams, h as REVENUE_INTEGRATIONS, i as savedKey, l as resolveAscTeam, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, r as chooseKeyApp, t as upsertHeldKey, u as sendAscRequest, v as copyAppKey, w as removeAppKey, x as keyKind, y as findIntegrations } from "./held-
|
|
3
|
+
import { o as AUTO_UPDATE_TARGET, s as CHANNEL, t as API_HOST, v as TELEMETRY_HOST, w as detectAgent, x as VERSION, y as TELEMETRY_KEY } from "./environment-BFNzLLPN.js";
|
|
4
|
+
import { n as readSession } from "./storage-pR0Wb0d9.js";
|
|
5
|
+
import { a as withQuery$1, n as ApiUnreachableError, t as ApiError } from "./client-x08fpvay.js";
|
|
6
|
+
import { C as listKeySources, S as listBundleIdSuggestions, T as replaceRevenueProvider, _ as checkServerNotifications, b as importAppKey, c as resolveAscOrgApi, d as runAscDocs, f as parseParams, h as REVENUE_INTEGRATIONS, i as savedKey, l as resolveAscTeam, m as KEY_LABEL, n as testModeWarning, p as KEY_KINDS, r as chooseKeyApp, t as upsertHeldKey, u as sendAscRequest, v as copyAppKey, w as removeAppKey, x as keyKind, y as findIntegrations } from "./held-sKq3xrsT.js";
|
|
7
7
|
import { f as writeDefaultApp, i as readOnboardedApp, r as readDefaultApp, t as readAnonymousId } from "./config-CGcG7GOt.js";
|
|
8
|
-
import { a as defineCommand, d as readInput, i as defineCatalog, r as UsageError, t as apiCall } from "./spinner-
|
|
8
|
+
import { a as defineCommand, d as readInput, i as defineCatalog, r as UsageError, t as apiCall } from "./spinner-IA6hV8nI.js";
|
|
9
9
|
import { n as fg, t as THEME } from "./theme-DUsCh-Vd.js";
|
|
10
|
-
import { n as runWhoami } from "./session-
|
|
11
|
-
import { i as orgIdOf, t as listOrgGroups } from "./orgs-
|
|
12
|
-
import { M as textField, O as field, T as rowName, a as createEntitlement, c as createProject, h as listResource, i as createCampaign, j as parseJson, k as isRecord, m as listProjects, r as createApplication, s as createProduct, t as RESOURCES, u as isAppScoped, y as platformLabel } from "./resources-
|
|
13
|
-
import { n as orgForNewProject } from "./org-
|
|
14
|
-
import { i as parseDashboardUrl, n as findApplication, r as findProject, t as appNotFound } from "./lookup-
|
|
15
|
-
import { a as pickScope, i as pickProject, n as chooseApp, r as pickOrganization, t as boundOrganization } from "./scope-
|
|
10
|
+
import { n as runWhoami } from "./session-dHBtgSN0.js";
|
|
11
|
+
import { i as orgIdOf, t as listOrgGroups } from "./orgs-1OzwUtpT.js";
|
|
12
|
+
import { M as textField, O as field, T as rowName, a as createEntitlement, c as createProject, h as listResource, i as createCampaign, j as parseJson, k as isRecord, m as listProjects, r as createApplication, s as createProduct, t as RESOURCES, u as isAppScoped, y as platformLabel } from "./resources-DNwvf8rg.js";
|
|
13
|
+
import { n as orgForNewProject } from "./org-C4G7WjTV.js";
|
|
14
|
+
import { i as parseDashboardUrl, n as findApplication, r as findProject, t as appNotFound } from "./lookup-Dg55W9S7.js";
|
|
15
|
+
import { a as pickScope, i as pickProject, n as chooseApp, r as pickOrganization, t as boundOrganization } from "./scope-BXoQo30_.js";
|
|
16
16
|
import { a as listAscConfigs, i as findAppNotificationUrl, o as removeAscConfig, t as ascProxy } from "./client-BJQXl62Q.js";
|
|
17
17
|
import { i as listUnimportedAscProducts, n as findAscAppId, r as listAscApps, t as ascTypeDisplay } from "./products-Cqq59DBQ.js";
|
|
18
18
|
import { n as readResourceFlags, r as textOf, t as fieldName } from "./input-MDd67UIp.js";
|
|
19
|
-
import { a as runAscNotificationUrlSet, i as printServerNotifications, t as describeNotificationUrl } from "./notification-url-
|
|
20
|
-
import { t as platformForIntegration } from "./bind-
|
|
19
|
+
import { a as runAscNotificationUrlSet, i as printServerNotifications, t as describeNotificationUrl } from "./notification-url-D82msWF5.js";
|
|
20
|
+
import { t as platformForIntegration } from "./bind-DcWIIPgk.js";
|
|
21
21
|
import pc from "picocolors";
|
|
22
22
|
|
|
23
23
|
//#region src/ui/help-layout.ts
|
|
@@ -144,7 +144,7 @@ const command = defineCommand({
|
|
|
144
144
|
prompts: true,
|
|
145
145
|
mcp: false,
|
|
146
146
|
async run(ctx, input) {
|
|
147
|
-
const { runLogin } = await import("./login-
|
|
147
|
+
const { runLogin } = await import("./login-D9jfRO8w.js");
|
|
148
148
|
return runLogin(ctx, input);
|
|
149
149
|
}
|
|
150
150
|
});
|
|
@@ -160,7 +160,7 @@ const command$1 = defineCommand({
|
|
|
160
160
|
prompts: true,
|
|
161
161
|
mcp: false,
|
|
162
162
|
async run(ctx) {
|
|
163
|
-
const { runLogout } = await import("./session-
|
|
163
|
+
const { runLogout } = await import("./session-4aITGsF1.js");
|
|
164
164
|
return runLogout(ctx);
|
|
165
165
|
}
|
|
166
166
|
});
|
|
@@ -596,10 +596,12 @@ async function runApiRequest(ctx, api, request) {
|
|
|
596
596
|
}
|
|
597
597
|
}).catch(async (error) => {
|
|
598
598
|
if (!(error instanceof ApiError) || error.status >= 500 || error.status === 401) throw error;
|
|
599
|
+
if (namesMissingResource(error)) throw error;
|
|
599
600
|
throw new Error(`${error.message}\n${await resolveReferenceHint(verb, path)}`, { cause: error });
|
|
600
601
|
});
|
|
601
602
|
ctx.output.data(res ?? { ok: true });
|
|
602
603
|
}
|
|
604
|
+
const namesMissingResource = ({ status, detail }) => status === 404 && (detail.code === "resource_missing" || detail.type === "resource_missing" || detail.resourceType !== void 0);
|
|
603
605
|
async function resolveReferenceHint(verb, path) {
|
|
604
606
|
const index = await resolveApiIndex().catch(() => void 0);
|
|
605
607
|
if (!index) return "The API reference: superwall api docs <words>";
|
|
@@ -3481,7 +3483,7 @@ A purchase_key is for the app's bundle ID; an app with none gets --bundle-id sav
|
|
|
3481
3483
|
prompts: true,
|
|
3482
3484
|
mcp: false,
|
|
3483
3485
|
async run(ctx, input) {
|
|
3484
|
-
const { runAscKeysCreate } = await import("./create-
|
|
3486
|
+
const { runAscKeysCreate } = await import("./create-Du8Fx7W5.js");
|
|
3485
3487
|
return runAscKeysCreate(ctx, input);
|
|
3486
3488
|
}
|
|
3487
3489
|
});
|
|
@@ -3868,7 +3870,7 @@ With --app it saves the key you hold on that app instead, as asc keys create --k
|
|
|
3868
3870
|
prompts: true,
|
|
3869
3871
|
mcp: false,
|
|
3870
3872
|
async run(ctx, { args, flags }) {
|
|
3871
|
-
const { upsertHeldKey: upsertHeldKey$1 } = await import("./held-
|
|
3873
|
+
const { upsertHeldKey: upsertHeldKey$1 } = await import("./held-DmOhszHR.js");
|
|
3872
3874
|
return upsertHeldKey$1(ctx, {
|
|
3873
3875
|
action: "update",
|
|
3874
3876
|
key: {
|
|
@@ -5120,7 +5122,7 @@ Exit codes
|
|
|
5120
5122
|
prompts: true,
|
|
5121
5123
|
mcp: false,
|
|
5122
5124
|
async run(ctx, input) {
|
|
5123
|
-
const { runSetupApple } = await import("./apple-
|
|
5125
|
+
const { runSetupApple } = await import("./apple-Dc5pOPms.js");
|
|
5124
5126
|
return runSetupApple(ctx, input);
|
|
5125
5127
|
}
|
|
5126
5128
|
});
|
|
@@ -7751,7 +7753,7 @@ const command$45 = defineCommand({
|
|
|
7751
7753
|
prompts: true,
|
|
7752
7754
|
mcp: false,
|
|
7753
7755
|
async run(ctx, { args, flags }) {
|
|
7754
|
-
const { runBuildPipeline } = await import("./build-
|
|
7756
|
+
const { runBuildPipeline } = await import("./build-DK88pTMW.js");
|
|
7755
7757
|
await runBuildPipeline({
|
|
7756
7758
|
output: ctx.output,
|
|
7757
7759
|
json: ctx.json
|
|
@@ -7812,7 +7814,7 @@ const command$46 = defineCommand({
|
|
|
7812
7814
|
prompts: true,
|
|
7813
7815
|
mcp: false,
|
|
7814
7816
|
async run(ctx, { args, flags }) {
|
|
7815
|
-
const { runCreate } = await import("./create-
|
|
7817
|
+
const { runCreate } = await import("./create-B6-Dr3GZ.js");
|
|
7816
7818
|
return runCreate(ctx, {
|
|
7817
7819
|
dir: args.dir,
|
|
7818
7820
|
...flags
|
|
@@ -7855,7 +7857,7 @@ const command$47 = defineCommand({
|
|
|
7855
7857
|
prompts: true,
|
|
7856
7858
|
mcp: false,
|
|
7857
7859
|
async run(ctx, { args, flags }) {
|
|
7858
|
-
const { runStudio } = await import("./server-
|
|
7860
|
+
const { runStudio } = await import("./server-BemmM1FV.js");
|
|
7859
7861
|
await runStudio({
|
|
7860
7862
|
dirs: args.dir,
|
|
7861
7863
|
port: flags.port,
|
|
@@ -7895,7 +7897,7 @@ const command$48 = defineCommand({
|
|
|
7895
7897
|
prompts: true,
|
|
7896
7898
|
mcp: false,
|
|
7897
7899
|
async run(ctx, input) {
|
|
7898
|
-
const { runPromote } = await import("./promote-
|
|
7900
|
+
const { runPromote } = await import("./promote-D0i8A0CO.js");
|
|
7899
7901
|
return runPromote(ctx, input);
|
|
7900
7902
|
}
|
|
7901
7903
|
});
|
|
@@ -7951,7 +7953,7 @@ const command$49 = defineCommand({
|
|
|
7951
7953
|
prompts: true,
|
|
7952
7954
|
mcp: false,
|
|
7953
7955
|
async run(ctx, input) {
|
|
7954
|
-
const { runPush } = await import("./push-
|
|
7956
|
+
const { runPush } = await import("./push-BIhGDNpL.js");
|
|
7955
7957
|
return runPush(ctx, input, true);
|
|
7956
7958
|
}
|
|
7957
7959
|
});
|
|
@@ -7987,7 +7989,7 @@ const command$50 = defineCommand({
|
|
|
7987
7989
|
prompts: true,
|
|
7988
7990
|
mcp: false,
|
|
7989
7991
|
async run(ctx, input) {
|
|
7990
|
-
const { runPull } = await import("./pull-
|
|
7992
|
+
const { runPull } = await import("./pull-CO5HlqBe.js");
|
|
7991
7993
|
return runPull(ctx, input);
|
|
7992
7994
|
}
|
|
7993
7995
|
});
|
|
@@ -8039,7 +8041,7 @@ const command$51 = defineCommand({
|
|
|
8039
8041
|
prompts: true,
|
|
8040
8042
|
mcp: false,
|
|
8041
8043
|
async run(ctx, input) {
|
|
8042
|
-
const { runPush } = await import("./push-
|
|
8044
|
+
const { runPush } = await import("./push-BIhGDNpL.js");
|
|
8043
8045
|
return runPush(ctx, input, false);
|
|
8044
8046
|
}
|
|
8045
8047
|
});
|
|
@@ -8434,7 +8436,7 @@ async function createApp(context, api, nameArg, fields) {
|
|
|
8434
8436
|
let name = nameArg;
|
|
8435
8437
|
let platform = textOf(fields.platform);
|
|
8436
8438
|
if (interactive && (!name || !platform)) {
|
|
8437
|
-
const { scanProject } = await import("./scan-
|
|
8439
|
+
const { scanProject } = await import("./scan-BU41gcQY.js");
|
|
8438
8440
|
const detected = (await scanProject(context.installDir).catch(() => null))?.apps[0];
|
|
8439
8441
|
if (detected && !name && !platform) {
|
|
8440
8442
|
ui.info(`Detected \`${detected.framework.name}\`` + (detected.details ? ` · \`${detected.details}\`` : ""));
|
|
@@ -8744,7 +8746,7 @@ async function runResource(ctx, resource, action, value$1, value2, flags) {
|
|
|
8744
8746
|
if (action === "create") return create(ctx, ctx.api, resource, value$1, value2, flags);
|
|
8745
8747
|
if (action === "use" && resource === "apps") return useApp(ctx, ctx.api, value$1);
|
|
8746
8748
|
if (action === "storekit" && resource === "products") {
|
|
8747
|
-
const { writeStoreKit } = await import("./storekit-
|
|
8749
|
+
const { writeStoreKit } = await import("./storekit-BMxyYAHj.js");
|
|
8748
8750
|
return writeStoreKit(ctx, ctx.api, flags.fields.out);
|
|
8749
8751
|
}
|
|
8750
8752
|
throw new Error(`Unknown action "${action}" for ${resource}.`);
|
|
@@ -10098,7 +10100,7 @@ const command$62 = defineCommand({
|
|
|
10098
10100
|
prompts: true,
|
|
10099
10101
|
mcp: false,
|
|
10100
10102
|
async run(ctx) {
|
|
10101
|
-
const { runDoctor } = await import("./doctor-
|
|
10103
|
+
const { runDoctor } = await import("./doctor-DYbm8IKQ.js");
|
|
10102
10104
|
return runDoctor(ctx);
|
|
10103
10105
|
}
|
|
10104
10106
|
});
|
|
@@ -10443,7 +10445,7 @@ const command$64 = defineCommand({
|
|
|
10443
10445
|
prompts: true,
|
|
10444
10446
|
mcp: false,
|
|
10445
10447
|
async run(ctx, input) {
|
|
10446
|
-
const { runSkills } = await import("./skills-
|
|
10448
|
+
const { runSkills } = await import("./skills-Bqz2l_bx.js");
|
|
10447
10449
|
return runSkills(ctx, input);
|
|
10448
10450
|
}
|
|
10449
10451
|
});
|
|
@@ -10459,7 +10461,7 @@ const command$65 = defineCommand({
|
|
|
10459
10461
|
prompts: true,
|
|
10460
10462
|
mcp: false,
|
|
10461
10463
|
async run(ctx) {
|
|
10462
|
-
const { runUpgrade } = await import("./upgrade-
|
|
10464
|
+
const { runUpgrade } = await import("./upgrade-DfD3-ClG.js");
|
|
10463
10465
|
return runUpgrade(ctx, AUTO_UPDATE_TARGET());
|
|
10464
10466
|
}
|
|
10465
10467
|
});
|
|
@@ -10499,7 +10501,7 @@ const command$66 = defineCommand({
|
|
|
10499
10501
|
mcp: false,
|
|
10500
10502
|
channel: "next",
|
|
10501
10503
|
async run(ctx, { args, flags }) {
|
|
10502
|
-
const { runArtifactApprove } = await import("./approve-
|
|
10504
|
+
const { runArtifactApprove } = await import("./approve-BSbdmOez.js");
|
|
10503
10505
|
await runArtifactApprove(ctx, {
|
|
10504
10506
|
version: args.version,
|
|
10505
10507
|
...flags
|
|
@@ -10525,7 +10527,7 @@ const command$67 = defineCommand({
|
|
|
10525
10527
|
mcp: false,
|
|
10526
10528
|
channel: "next",
|
|
10527
10529
|
async run(ctx, { args, flags }) {
|
|
10528
|
-
const { runArtifactCreate } = await import("./starter-
|
|
10530
|
+
const { runArtifactCreate } = await import("./starter-BtUUQWhd.js");
|
|
10529
10531
|
await runArtifactCreate(ctx, {
|
|
10530
10532
|
dir: args.dir,
|
|
10531
10533
|
install: flags.install
|
|
@@ -10609,7 +10611,7 @@ const command$68 = defineCommand({
|
|
|
10609
10611
|
mcp: false,
|
|
10610
10612
|
channel: "next",
|
|
10611
10613
|
async run(ctx, { args, flags }) {
|
|
10612
|
-
const { runArtifactDev } = await import("./run-
|
|
10614
|
+
const { runArtifactDev } = await import("./run-tVYJ3V5j.js");
|
|
10613
10615
|
await runArtifactDev(ctx, {
|
|
10614
10616
|
dir: args.dir,
|
|
10615
10617
|
...flags
|
|
@@ -10665,7 +10667,7 @@ const command$69 = defineCommand({
|
|
|
10665
10667
|
mcp: false,
|
|
10666
10668
|
channel: "next",
|
|
10667
10669
|
async run(ctx, { args, flags }) {
|
|
10668
|
-
const { runArtifactInstall } = await import("./install-
|
|
10670
|
+
const { runArtifactInstall } = await import("./install-DsIsif39.js");
|
|
10669
10671
|
await runArtifactInstall(ctx, {
|
|
10670
10672
|
entrypoint: args.entrypoint,
|
|
10671
10673
|
...flags
|
|
@@ -10693,7 +10695,7 @@ const command$70 = defineCommand({
|
|
|
10693
10695
|
mcp: false,
|
|
10694
10696
|
channel: "next",
|
|
10695
10697
|
async run(ctx, { flags }) {
|
|
10696
|
-
const { runArtifactList } = await import("./install-
|
|
10698
|
+
const { runArtifactList } = await import("./install-DsIsif39.js");
|
|
10697
10699
|
await runArtifactList(ctx, flags);
|
|
10698
10700
|
}
|
|
10699
10701
|
});
|
|
@@ -10721,7 +10723,7 @@ const command$71 = defineCommand({
|
|
|
10721
10723
|
mcp: false,
|
|
10722
10724
|
channel: "next",
|
|
10723
10725
|
async run(ctx, { args, flags }) {
|
|
10724
|
-
const { runArtifactLogs } = await import("./status-
|
|
10726
|
+
const { runArtifactLogs } = await import("./status-CB_MrFu5.js");
|
|
10725
10727
|
await runArtifactLogs(ctx, {
|
|
10726
10728
|
version: args.version,
|
|
10727
10729
|
...flags
|
|
@@ -10760,7 +10762,7 @@ const command$72 = defineCommand({
|
|
|
10760
10762
|
mcp: false,
|
|
10761
10763
|
channel: "next",
|
|
10762
10764
|
async run(ctx, { args, flags }) {
|
|
10763
|
-
const { runArtifactOpen } = await import("./install-
|
|
10765
|
+
const { runArtifactOpen } = await import("./install-DsIsif39.js");
|
|
10764
10766
|
await runArtifactOpen(ctx, {
|
|
10765
10767
|
entrypoint: args.entrypoint,
|
|
10766
10768
|
...flags
|
|
@@ -10797,7 +10799,7 @@ const command$73 = defineCommand({
|
|
|
10797
10799
|
mcp: false,
|
|
10798
10800
|
channel: "next",
|
|
10799
10801
|
async run(ctx, { args, flags }) {
|
|
10800
|
-
const { runArtifactPull } = await import("./pull-
|
|
10802
|
+
const { runArtifactPull } = await import("./pull-CiIrJ5ik.js");
|
|
10801
10803
|
await runArtifactPull(ctx, {
|
|
10802
10804
|
dir: args.dir,
|
|
10803
10805
|
...flags
|
|
@@ -10843,7 +10845,7 @@ const command$74 = defineCommand({
|
|
|
10843
10845
|
mcp: false,
|
|
10844
10846
|
channel: "next",
|
|
10845
10847
|
async run(ctx, { args, flags }) {
|
|
10846
|
-
const { runArtifactPush } = await import("./push-
|
|
10848
|
+
const { runArtifactPush } = await import("./push-BgqTddLA.js");
|
|
10847
10849
|
await runArtifactPush(ctx, {
|
|
10848
10850
|
dir: args.dir,
|
|
10849
10851
|
...flags
|
|
@@ -10874,7 +10876,7 @@ const command$75 = defineCommand({
|
|
|
10874
10876
|
mcp: false,
|
|
10875
10877
|
channel: "next",
|
|
10876
10878
|
async run(ctx, { args, flags }) {
|
|
10877
|
-
const { runArtifactShare } = await import("./status-
|
|
10879
|
+
const { runArtifactShare } = await import("./status-CB_MrFu5.js");
|
|
10878
10880
|
await runArtifactShare(ctx, {
|
|
10879
10881
|
version: args.version,
|
|
10880
10882
|
...flags
|
|
@@ -10907,7 +10909,7 @@ const command$76 = defineCommand({
|
|
|
10907
10909
|
mcp: false,
|
|
10908
10910
|
channel: "next",
|
|
10909
10911
|
async run(ctx, { flags }) {
|
|
10910
|
-
const { runArtifactStatus } = await import("./status-
|
|
10912
|
+
const { runArtifactStatus } = await import("./status-CB_MrFu5.js");
|
|
10911
10913
|
await runArtifactStatus(ctx, flags);
|
|
10912
10914
|
}
|
|
10913
10915
|
});
|
|
@@ -11009,7 +11011,7 @@ const command$77 = defineCommand({
|
|
|
11009
11011
|
mcp: false,
|
|
11010
11012
|
channel: "next",
|
|
11011
11013
|
async run(ctx, { args, flags }) {
|
|
11012
|
-
const { runArtifactTry } = await import("./try-
|
|
11014
|
+
const { runArtifactTry } = await import("./try-CS3jLyoP.js");
|
|
11013
11015
|
await runArtifactTry(ctx, {
|
|
11014
11016
|
entrypoint: args.entrypoint,
|
|
11015
11017
|
...flags
|
|
@@ -11041,7 +11043,7 @@ const command$78 = defineCommand({
|
|
|
11041
11043
|
mcp: false,
|
|
11042
11044
|
channel: "next",
|
|
11043
11045
|
async run(ctx, { args, flags }) {
|
|
11044
|
-
const { runArtifactUpdate } = await import("./starter-
|
|
11046
|
+
const { runArtifactUpdate } = await import("./starter-BtUUQWhd.js");
|
|
11045
11047
|
await runArtifactUpdate(ctx, {
|
|
11046
11048
|
dir: args.dir,
|
|
11047
11049
|
install: flags.install,
|
|
@@ -11084,8 +11086,8 @@ const command$79 = defineCommand({
|
|
|
11084
11086
|
prompts: true,
|
|
11085
11087
|
mcp: false,
|
|
11086
11088
|
async run(ctx, { flags }) {
|
|
11087
|
-
const { runIntegrate } = await import("./integrate-
|
|
11088
|
-
const { printPlaybook } = await import("./playbook-
|
|
11089
|
+
const { runIntegrate } = await import("./integrate-B8eA676b.js");
|
|
11090
|
+
const { printPlaybook } = await import("./playbook-BKqlv77S.js");
|
|
11089
11091
|
if (flags.skill) return printPlaybook(ctx.installDir, "integrate");
|
|
11090
11092
|
await runIntegrate({
|
|
11091
11093
|
...ctx,
|
|
@@ -11131,8 +11133,8 @@ const command$80 = defineCommand({
|
|
|
11131
11133
|
prompts: true,
|
|
11132
11134
|
mcp: false,
|
|
11133
11135
|
async run(ctx, { args, flags }) {
|
|
11134
|
-
const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-
|
|
11135
|
-
const { printPlaybook } = await import("./playbook-
|
|
11136
|
+
const { runPaywallMigration, runProviderMigration, runScreenMigration } = await import("./migrate-DoRb9jmA.js");
|
|
11137
|
+
const { printPlaybook } = await import("./playbook-BKqlv77S.js");
|
|
11136
11138
|
if (flags.screen !== void 0) return runScreenMigration(ctx, {
|
|
11137
11139
|
path: flags.screen,
|
|
11138
11140
|
screenshot: flags.screenshot
|
|
@@ -11166,8 +11168,8 @@ const command$81 = defineCommand({
|
|
|
11166
11168
|
prompts: true,
|
|
11167
11169
|
mcp: false,
|
|
11168
11170
|
async run(ctx, { flags }) {
|
|
11169
|
-
const { runReview } = await import("./integrate-
|
|
11170
|
-
const { printPlaybook } = await import("./playbook-
|
|
11171
|
+
const { runReview } = await import("./integrate-B8eA676b.js");
|
|
11172
|
+
const { printPlaybook } = await import("./playbook-BKqlv77S.js");
|
|
11171
11173
|
if (flags.skill) return printPlaybook(ctx.installDir, flags.fix ? "review-fix" : "review");
|
|
11172
11174
|
await runReview(ctx, flags.fix);
|
|
11173
11175
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as DASHBOARD_ORIGIN_OVERRIDE } from "./environment-
|
|
2
|
-
import { a as orgProjects, n as listOrganizations } from "./orgs-
|
|
1
|
+
import { u as DASHBOARD_ORIGIN_OVERRIDE } from "./environment-BFNzLLPN.js";
|
|
2
|
+
import { a as orgProjects, n as listOrganizations } from "./orgs-1OzwUtpT.js";
|
|
3
3
|
import { t as ArtifactError } from "./project-NoMtbMyl.js";
|
|
4
4
|
import { n as ARTIFACT_FILE } from "./scope-ehZ7L1nj.js";
|
|
5
5
|
import * as fs from "node:fs";
|
|
@@ -117,13 +117,16 @@ const appEntrypointUrl = (apiHost, artifact, applicationId, entrypoint) => {
|
|
|
117
117
|
if (EMBED_SLOTS.has(entrypoint.slot)) return `${app}/embeds`;
|
|
118
118
|
return `${app}/apps/${artifact.id}/${encodeURIComponent(entrypoint.id)}`;
|
|
119
119
|
};
|
|
120
|
+
async function orgApps(api, organizationId) {
|
|
121
|
+
return (await orgProjects(api, String(organizationId))).flatMap((project) => project.applications ?? []);
|
|
122
|
+
}
|
|
120
123
|
const mainEntrypoint = (entrypoints) => entrypoints.find((entrypoint) => entrypoint.slot === "app.page@1") ?? entrypoints.find((entrypoint) => EMBED_SLOTS.has(entrypoint.slot)) ?? entrypoints.find((entrypoint) => entrypoint.slot === "chart.source@1");
|
|
121
124
|
async function openLink(ctx, artifact, manifest) {
|
|
122
125
|
const fallback = { url: artifactUrl(ctx.api.host, artifact) };
|
|
123
126
|
const entrypoints = manifest?.entrypoints ?? [];
|
|
124
127
|
const main = mainEntrypoint(entrypoints);
|
|
125
128
|
if (!main || entrypoints.some((entrypoint) => entrypoint.slot === "org.page@1")) return fallback;
|
|
126
|
-
const apps =
|
|
129
|
+
const apps = await orgApps(ctx.api, artifact.organization_id).catch(() => []);
|
|
127
130
|
const [first] = apps;
|
|
128
131
|
if (first === void 0) return fallback;
|
|
129
132
|
return {
|
|
@@ -139,6 +142,49 @@ async function awaitingInstall(api, artifactId, manifest) {
|
|
|
139
142
|
if (installed === void 0) return false;
|
|
140
143
|
return entrypoints.every((entrypoint) => !installed.some((row) => row.entrypoint_id === entrypoint.id));
|
|
141
144
|
}
|
|
145
|
+
const INSTALL_SURFACE = {
|
|
146
|
+
"chart.source@1": "Charts",
|
|
147
|
+
"campaign.metric@1": "Campaigns",
|
|
148
|
+
"campaign.tab@1": "Campaigns",
|
|
149
|
+
"app.dashboard.widget@1": "The app dashboard",
|
|
150
|
+
"user.panel@1": "User pages",
|
|
151
|
+
"user.action@1": "User pages"
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* One line per entrypoint that has no installation yet, saying what won't show it and the command that
|
|
155
|
+
* installs it. Empty when the installations can't be read, so a failed read never claims anything.
|
|
156
|
+
*/
|
|
157
|
+
async function installHints(api, artifact, manifest, { artifactFlag = false } = {}) {
|
|
158
|
+
const installable = (manifest?.entrypoints ?? []).filter((entrypoint) => entrypoint.slot !== "org.page@1");
|
|
159
|
+
if (installable.length === 0) return [];
|
|
160
|
+
const installed = await listInstallations(api, artifact.id).catch(() => void 0);
|
|
161
|
+
if (installed === void 0) return [];
|
|
162
|
+
const missing = installable.filter((entrypoint) => !installed.some((row) => row.entrypoint_id === entrypoint.id));
|
|
163
|
+
if (missing.length === 0) return [];
|
|
164
|
+
const apps = await orgApps(api, artifact.organization_id).catch(() => []);
|
|
165
|
+
const app = apps.length === 1 ? String(apps[0].id) : "<app-id>";
|
|
166
|
+
return missing.map((entrypoint) => {
|
|
167
|
+
const command = [
|
|
168
|
+
`superwall artifacts install ${entrypoint.id}`,
|
|
169
|
+
`--app ${app}`,
|
|
170
|
+
...artifactFlag ? [`--artifact ${artifact.id}`] : []
|
|
171
|
+
].join(" ");
|
|
172
|
+
const title = JSON.stringify(entrypoint.title || entrypoint.id);
|
|
173
|
+
const surface = INSTALL_SURFACE[entrypoint.slot];
|
|
174
|
+
const sentence = surface ? `${surface} won't show ${title} until you install it: ${command}` : `${title} won't show until you install it: ${command}`;
|
|
175
|
+
return {
|
|
176
|
+
entrypoint_id: entrypoint.id,
|
|
177
|
+
slot: entrypoint.slot,
|
|
178
|
+
command,
|
|
179
|
+
sentence
|
|
180
|
+
};
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
const notInstalledOf = ({ entrypoint_id, slot, command }) => ({
|
|
184
|
+
entrypoint_id,
|
|
185
|
+
slot,
|
|
186
|
+
command
|
|
187
|
+
});
|
|
142
188
|
const latestManifest = (versions) => newestFirst(versions).find((version) => version.manifest !== null)?.manifest;
|
|
143
189
|
async function visibilityOf(ctx, artifactId, version, manifest) {
|
|
144
190
|
const [artifact, me] = await Promise.all([getArtifact(ctx.api, artifactId).catch(() => void 0), getMe(ctx.api).catch(() => void 0)]);
|
|
@@ -193,4 +239,4 @@ async function pickVersion(ctx, artifact, requested, matches = () => true) {
|
|
|
193
239
|
}
|
|
194
240
|
|
|
195
241
|
//#endregion
|
|
196
|
-
export {
|
|
242
|
+
export { listInstallations as C, requestDeploy as D, mintSourceAccess as E, setInstallation as O, listArtifacts as S, listVersions as T, approveVersion as _, latestManifest as a, getBuild as b, openLink as c, resolveArtifact as d, roleCanApprove as f, writeBinding as g, readSourceFile as h, installHints as i, startBuild as k, pickVersion as l, readBinding as m, awaitingInstall as n, newestFirst as o, visibilityOf as p, dashboardOrigin as r, notInstalledOf as s, appEntrypointUrl as t, projectRoot as u, createArtifact as v, listMembers as w, getMe as x, deleteInstallation as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ApiUnreachableError, t as ApiError } from "./client-
|
|
2
|
-
import { r as listReachableProjects } from "./orgs-
|
|
1
|
+
import { n as ApiUnreachableError, t as ApiError } from "./client-x08fpvay.js";
|
|
2
|
+
import { r as listReachableProjects } from "./orgs-1OzwUtpT.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/json.ts
|
|
5
5
|
function isRecord(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as DASHBOARD_URL } from "./environment-
|
|
2
|
-
import { i as packagedDir } from "./paths-
|
|
1
|
+
import { d as DASHBOARD_URL } from "./environment-BFNzLLPN.js";
|
|
2
|
+
import { i as packagedDir } from "./paths-gBbqgkS7.js";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import "./token-
|
|
1
|
+
import "./token-BbUeExGJ.js";
|
|
2
2
|
import "./output-Ggzq5_-t.js";
|
|
3
|
-
import "./environment-
|
|
4
|
-
import "./storage-
|
|
5
|
-
import { t as ApiError } from "./client-
|
|
3
|
+
import "./environment-BFNzLLPN.js";
|
|
4
|
+
import "./storage-pR0Wb0d9.js";
|
|
5
|
+
import { t as ApiError } from "./client-x08fpvay.js";
|
|
6
6
|
import "./config-CGcG7GOt.js";
|
|
7
|
-
import "./spinner-
|
|
7
|
+
import "./spinner-IA6hV8nI.js";
|
|
8
8
|
import "./ui-D_qf3Gvw.js";
|
|
9
|
-
import "./orgs-
|
|
10
|
-
import "./resources-
|
|
11
|
-
import "./lookup-
|
|
9
|
+
import "./orgs-1OzwUtpT.js";
|
|
10
|
+
import "./resources-DNwvf8rg.js";
|
|
11
|
+
import "./lookup-Dg55W9S7.js";
|
|
12
12
|
import { a as findEntrypoint, o as readManifest, s as readProject, t as ArtifactError } from "./project-NoMtbMyl.js";
|
|
13
13
|
import "./lock-DgSx-p8Y.js";
|
|
14
14
|
import { n as ARTIFACT_FILE } from "./scope-ehZ7L1nj.js";
|
|
15
15
|
import { C as TRIGGER_HEADER, S as READOUT_LIMITS, b as MOUNT_LOAD_TIMEOUT_MS, c as defaultRange, d as resolveWranglerPackage, f as API_HOST, g as CONTEXT_HEADER, h as BRIDGE_PROTOCOL, i as seriesProblem, l as parseContextJson, m as ARTIFACT_HEADER_PREFIX, o as SLOTS, p as ARTIFACT_COMPATIBILITY_DATE, r as readoutProblem, s as buildContext, t as checkMetricQuery, u as bundleArtifact, v as ENTRYPOINT_HEADER, w as isInternalPath, x as PLATFORM_HOST, y as METRIC_LIMITS } from "./series-D2ZpZ8cx.js";
|
|
16
|
-
import { n as resolveOrganization, t as resolveAppScope } from "./organization-
|
|
16
|
+
import { n as resolveOrganization, t as resolveAppScope } from "./organization-CmuQwcKN.js";
|
|
17
17
|
import "./download-DhGd4hOB.js";
|
|
18
18
|
import { i as warnIfSdkBehind } from "./sdk-DEfQttek.js";
|
|
19
19
|
import { createRequire } from "node:module";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as Integration } from "./environment-
|
|
1
|
+
import { h as Integration } from "./environment-BFNzLLPN.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { basename, dirname, join, relative, sep } from "node:path";
|
|
4
4
|
import fg from "fast-glob";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { f as writeDefaultApp, r as readDefaultApp } from "./config-CGcG7GOt.js";
|
|
2
|
-
import { t as apiCall, u as currentHost } from "./spinner-
|
|
3
|
-
import { i as orgIdOf, o as organizationOf, t as listOrgGroups } from "./orgs-
|
|
4
|
-
import { l as findPaywall, m as listProjects, y as platformLabel } from "./resources-
|
|
5
|
-
import { t as chooseOrgOfApps } from "./org-
|
|
6
|
-
import { n as findApplication, r as findProject, t as appNotFound } from "./lookup-
|
|
2
|
+
import { t as apiCall, u as currentHost } from "./spinner-IA6hV8nI.js";
|
|
3
|
+
import { i as orgIdOf, o as organizationOf, t as listOrgGroups } from "./orgs-1OzwUtpT.js";
|
|
4
|
+
import { l as findPaywall, m as listProjects, y as platformLabel } from "./resources-DNwvf8rg.js";
|
|
5
|
+
import { t as chooseOrgOfApps } from "./org-C4G7WjTV.js";
|
|
6
|
+
import { n as findApplication, r as findProject, t as appNotFound } from "./lookup-Dg55W9S7.js";
|
|
7
7
|
|
|
8
8
|
//#region src/core/account/scope.ts
|
|
9
9
|
function moveFirst(items, match) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "./token-BbUeExGJ.js";
|
|
2
|
+
import "./output-Ggzq5_-t.js";
|
|
3
|
+
import "./environment-BFNzLLPN.js";
|
|
4
|
+
import "./storage-pR0Wb0d9.js";
|
|
5
|
+
import "./client-x08fpvay.js";
|
|
6
|
+
import "./config-CGcG7GOt.js";
|
|
7
|
+
import "./telemetry-DU56L7Cy.js";
|
|
8
|
+
import "./spawn-DmmmHIP-.js";
|
|
9
|
+
import "./spinner-IA6hV8nI.js";
|
|
10
|
+
import "./ui-D_qf3Gvw.js";
|
|
11
|
+
import "./scan-dv0rrY4C.js";
|
|
12
|
+
import "./paths-gBbqgkS7.js";
|
|
13
|
+
import "./orgs-1OzwUtpT.js";
|
|
14
|
+
import "./resources-DNwvf8rg.js";
|
|
15
|
+
import "./lookup-Dg55W9S7.js";
|
|
16
|
+
import "./login-Blhxi20A.js";
|
|
17
|
+
import "./skills-Q7xB784d.js";
|
|
18
|
+
import "./browser-Bp3yRKlU.js";
|
|
19
|
+
import "./lock-DgSx-p8Y.js";
|
|
20
|
+
import "./scope-ehZ7L1nj.js";
|
|
21
|
+
import "./base-83ZTv6up.js";
|
|
22
|
+
import "./framework-JFLjmD5Y.js";
|
|
23
|
+
import "./login-BlpfYapG.js";
|
|
24
|
+
import "./source-BccdO4aL.js";
|
|
25
|
+
import "./assets-C_RjojkK.js";
|
|
26
|
+
import "./source-push-CG948HrX.js";
|
|
27
|
+
import { t as runStudio } from "./server-CcZGdYjE.js";
|
|
28
|
+
|
|
29
|
+
export { runStudio };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { x as VERSION } from "./environment-
|
|
2
|
-
import { t as ApiError } from "./client-
|
|
1
|
+
import { x as VERSION } from "./environment-BFNzLLPN.js";
|
|
2
|
+
import { t as ApiError } from "./client-x08fpvay.js";
|
|
3
3
|
import { n as ui } from "./ui-D_qf3Gvw.js";
|
|
4
|
-
import { C as pushPaywallVersion, D as versionProducts, p as listApplications, x as promotePaywallVersion } from "./resources-
|
|
4
|
+
import { C as pushPaywallVersion, D as versionProducts, p as listApplications, x as promotePaywallVersion } from "./resources-DNwvf8rg.js";
|
|
5
5
|
import { n as openBrowser } from "./browser-Bp3yRKlU.js";
|
|
6
6
|
import { b as writeProjectTypes, l as readLock, y as collectProjectDeclarations } from "./lock-DgSx-p8Y.js";
|
|
7
|
-
import { c as planTargets, d as wantedPlatforms, h as resolveApps, i as requireApi, o as writeProjectScaffold } from "./base-
|
|
8
|
-
import { c as resolveProjectDirs, f as LAYOUT_HINT, n as resolveFramework, o as requireProject, t as frameworkVersion } from "./framework-
|
|
7
|
+
import { c as planTargets, d as wantedPlatforms, h as resolveApps, i as requireApi, o as writeProjectScaffold } from "./base-83ZTv6up.js";
|
|
8
|
+
import { c as resolveProjectDirs, f as LAYOUT_HINT, n as resolveFramework, o as requireProject, t as frameworkVersion } from "./framework-JFLjmD5Y.js";
|
|
9
9
|
import { t as collectSourceFiles } from "./source-BccdO4aL.js";
|
|
10
|
-
import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-
|
|
11
|
-
import { a as listApplicationCatalogue, c as projectForApplication, i as warnNotPortable, r as pushSource, s as listProjectProducts, u as resolveBinding } from "./source-push-
|
|
10
|
+
import { n as requireAssets, r as syncAssets, t as assetBaseUrl } from "./assets-C_RjojkK.js";
|
|
11
|
+
import { a as listApplicationCatalogue, c as projectForApplication, i as warnNotPortable, r as pushSource, s as listProjectProducts, u as resolveBinding } from "./source-push-CG948HrX.js";
|
|
12
12
|
import { execFile } from "node:child_process";
|
|
13
13
|
import * as fs from "node:fs";
|
|
14
14
|
import * as path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveApiHost, i as removeSession, n as readSession, o as serializeSession, s as sessionOrgName } from "./storage-
|
|
1
|
+
import { a as resolveApiHost, i as removeSession, n as readSession, o as serializeSession, s as sessionOrgName } from "./storage-pR0Wb0d9.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/account/session.ts
|
|
4
4
|
function runWhoami(ctx) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as readPackageJson, r as allDeps, t as scanProject } from "./scan-
|
|
2
|
-
import { t as detectExisting } from "./existing-
|
|
3
|
-
import { m as listProjects, p as listApplications, r as createApplication, y as platformLabel } from "./resources-
|
|
4
|
-
import { n as findApplication } from "./lookup-
|
|
5
|
-
import { r as resolveScopeFromKey } from "./bind-
|
|
1
|
+
import { i as readPackageJson, r as allDeps, t as scanProject } from "./scan-dv0rrY4C.js";
|
|
2
|
+
import { t as detectExisting } from "./existing-WQ3pz94o.js";
|
|
3
|
+
import { m as listProjects, p as listApplications, r as createApplication, y as platformLabel } from "./resources-DNwvf8rg.js";
|
|
4
|
+
import { n as findApplication } from "./lookup-Dg55W9S7.js";
|
|
5
|
+
import { r as resolveScopeFromKey } from "./bind-DcWIIPgk.js";
|
|
6
6
|
import { d as writeApp } from "./lock-DgSx-p8Y.js";
|
|
7
|
-
import { a as projectPackageName, i as requireApi, m as requirePlatform } from "./base-
|
|
8
|
-
import { r as isSuperwallProject } from "./migration-
|
|
7
|
+
import { a as projectPackageName, i as requireApi, m as requirePlatform } from "./base-83ZTv6up.js";
|
|
8
|
+
import { r as isSuperwallProject } from "./migration-BUedsREQ.js";
|
|
9
9
|
import { n as gitAvailable } from "./source-BccdO4aL.js";
|
|
10
10
|
import { execFile } from "node:child_process";
|
|
11
11
|
import * as fs from "node:fs";
|
|
@@ -22,6 +22,8 @@ superwall artifacts dev --app <app> # http://localhost:8790, real data, re
|
|
|
22
22
|
superwall artifacts try transactions --app <app> # a metric on the real runtime
|
|
23
23
|
superwall artifacts try home --org <org> # a page in the dashboard
|
|
24
24
|
superwall artifacts push --org <org> # build it; only you see it until an admin approves it
|
|
25
|
+
superwall artifacts approve # an admin approves it; every slot but org.page then needs install
|
|
26
|
+
superwall artifacts install transactions --app <app> # a metric shows in Charts only once installed
|
|
25
27
|
```
|
|
26
28
|
|
|
27
29
|
1. **`dev`** bundles it the way the builder does and runs it in workerd. A local page plays the
|
|
@@ -36,7 +38,10 @@ superwall artifacts push --org <org> # build it; only you see it until an
|
|
|
36
38
|
4. **Only the author can see a pushed version until an admin approves it.** Say so. A staff account gets no copy, so
|
|
37
39
|
nobody can see what it pushes until then, and `push` and `share` say which. After approval, the author keeps a
|
|
38
40
|
copy marked "Not installed" until an entrypoint has an install. `share` asks for review,
|
|
39
|
-
an admin runs `approve`, and `install` chooses where it shows. `org.page@1` needs no install
|
|
41
|
+
an admin runs `approve`, and `install` chooses where it shows. `org.page@1` needs no install; every other
|
|
42
|
+
entrypoint does, a `chart.source@1` metric included: it isn't in Charts until
|
|
43
|
+
`superwall artifacts install <entrypoint> --app <app>` has run. `push` and `approve` print that command for
|
|
44
|
+
each entrypoint that has no install yet (`not_installed` in `--json`), so run it or tell the person to.
|
|
40
45
|
5. **A pusher's own copy can include teammates' merged code, and it runs with the pusher's reads.** `push` lists
|
|
41
46
|
those commits and asks first. Without a terminal it stops unless `--accept-merged-commits` is passed. That flag
|
|
42
47
|
is for a person who has read them, so don't add it to get past the refusal.
|
|
@@ -52,7 +57,7 @@ scope it knows is missing; a draft holds only the manifest's read scopes ∩ you
|
|
|
52
57
|
| `src/worker.ts` | The code. One default export and no other exports. |
|
|
53
58
|
| `wrangler.jsonc` | `name`, `main` and `compatibility_date`. No bindings of any kind. |
|
|
54
59
|
| `package-lock.json` | Required, from npm. The builder installs exactly this. |
|
|
55
|
-
| `superwall.artifact.json` | Written by the first push: which artifact this is. Commit it, so teammates push to the same one. |
|
|
60
|
+
| `superwall.artifact.json` | Written by the first push: `artifact_id`, `organization_id` and `slug`, so commands know which artifact this is, plus `synced_commit` (where this copy last matched the artifact's source) and `reviewed_commit` (the newest teammates' commit `push` already asked you about), which stay out of the artifact's own source. Commit it, so teammates push to the same one. Never edit it. |
|
|
56
61
|
| `vendor/artifact-sdk` | Generated, never edited. `superwall artifacts update` refreshes it. There is no npm package. |
|
|
57
62
|
|
|
58
63
|
## A metric
|
|
@@ -134,7 +134,10 @@ and `diff`, and exits 1, so run that first and show the person the result.
|
|
|
134
134
|
With no entrypoint, lists what's installed. Otherwise installs it from the live version for the whole organization,
|
|
135
135
|
or one app with `--app`. `--disable` turns it off and keeps its row, `--remove` deletes the row and ends open
|
|
136
136
|
sessions (`--yes` without a terminal), and `--position` orders entrypoints in a slot. Every slot but `org.page@1`
|
|
137
|
-
shows only where it's installed and enabled.
|
|
137
|
+
shows only where it's installed and enabled, so a metric isn't in Charts until it's installed for that app.
|
|
138
|
+
`push` and `approve` print one line per entrypoint with no install yet, for example
|
|
139
|
+
`Charts won't show "Transactions" until you install it: superwall artifacts install transactions --app 42`
|
|
140
|
+
(`--app <app-id>` when the organization has more than one app), and list them as `not_installed` in `--json`.
|
|
138
141
|
|
|
139
142
|
## What errors mean
|
|
140
143
|
|