@popcraft/cli 0.39.2 → 0.39.3

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.
Files changed (2) hide show
  1. package/dist/popcraft.mjs +13 -8
  2. package/package.json +2 -2
package/dist/popcraft.mjs CHANGED
@@ -1196,7 +1196,7 @@ function operations(spec = openapi) {
1196
1196
  }
1197
1197
  async function call(target2, method, path, opts = {}) {
1198
1198
  const qs = new URLSearchParams(opts.query ?? {}).toString();
1199
- const headers = { "user-agent": `popcraft-cli/${"0.39.2"}`, ...opts.headers };
1199
+ const headers = { "user-agent": `popcraft-cli/${"0.39.3"}`, ...opts.headers };
1200
1200
  if (target2.token) headers.authorization = `Bearer ${target2.token}`;
1201
1201
  if (opts.contentType) headers["content-type"] = opts.contentType;
1202
1202
  try {
@@ -247694,7 +247694,6 @@ function resyncText(doc2, ids2) {
247694
247694
  var isVirtualId;
247695
247695
  var init_invariants2 = __esm({
247696
247696
  "lib/document/invariants.ts"() {
247697
- "use strict";
247698
247697
  init_auto_layout();
247699
247698
  init_scene_graph();
247700
247699
  init_text_bounds();
@@ -316770,8 +316769,11 @@ var init_shared = __esm({
316770
316769
  });
316771
316770
 
316772
316771
  // lib/hypery/client.ts
316773
- function paymentSourceHeaders() {
316774
- return inAppPurchases() ? { [HYPERY_PAYMENT_SOURCE_HEADER]: "credits" } : {};
316772
+ async function paymentSourceHeaders() {
316773
+ if (!inAppPurchases()) return {};
316774
+ const workspaceId = activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
316775
+ const ent = workspaceId ? await loadEntitlements(workspaceId).catch(() => null) : null;
316776
+ return ent?.appStoreOnly ? { [HYPERY_PAYMENT_SOURCE_HEADER]: "credits" } : {};
316775
316777
  }
316776
316778
  async function hyperyRequestHeaders() {
316777
316779
  const token = await accessToken();
@@ -316779,7 +316781,7 @@ async function hyperyRequestHeaders() {
316779
316781
  const headers = new Headers({ authorization: `Bearer ${token}` });
316780
316782
  const team = activeHyperyTeamId();
316781
316783
  if (team) headers.set(HYPERY_TEAM_HEADER, team);
316782
- for (const [k2, v] of Object.entries(paymentSourceHeaders())) headers.set(k2, v);
316784
+ for (const [k2, v] of Object.entries(await paymentSourceHeaders())) headers.set(k2, v);
316783
316785
  return headers;
316784
316786
  }
316785
316787
  var init_client2 = __esm({
@@ -316787,6 +316789,7 @@ var init_client2 = __esm({
316787
316789
  init_session();
316788
316790
  init_team();
316789
316791
  init_purchases();
316792
+ init_entitlements();
316790
316793
  init_shared();
316791
316794
  init_shared();
316792
316795
  }
@@ -327444,7 +327447,7 @@ var init_package = __esm({
327444
327447
  "packages/runtime/package.json"() {
327445
327448
  package_default = {
327446
327449
  name: "@popcraft/runtime",
327447
- version: "0.39.2",
327450
+ version: "0.39.3",
327448
327451
  description: "What code exported from PopCraft shares: the meaning of expressions (operators and functions) and, as it grows, the parts of a design's behaviour that are common code rather than generated React.",
327449
327452
  license: "MIT",
327450
327453
  homepage: "https://popcraft.app/docs/exporting/nextjs",
@@ -352152,6 +352155,7 @@ function compileModule(module2) {
352152
352155
  var import_sucrase, BUILT_IN, memo4;
352153
352156
  var init_compile2 = __esm({
352154
352157
  "lib/code/compile.ts"() {
352158
+ "use strict";
352155
352159
  import_sucrase = __toESM(require_dist2());
352156
352160
  init_source2();
352157
352161
  init_source2();
@@ -364436,7 +364440,7 @@ async function authHeaders2() {
364436
364440
  "Content-Type": "application/json",
364437
364441
  Accept: "text/event-stream",
364438
364442
  ...team ? { [HYPERY_TEAM_HEADER]: team } : {},
364439
- ...paymentSourceHeaders()
364443
+ ...await paymentSourceHeaders()
364440
364444
  };
364441
364445
  }
364442
364446
  async function streamChat(opts, handlers = {}, signal) {
@@ -403453,6 +403457,7 @@ function registerBuiltinCommands() {
403453
403457
  var builtinCommands, uiOnlyCommands;
403454
403458
  var init_builtin4 = __esm({
403455
403459
  "lib/commands/builtin.ts"() {
403460
+ "use strict";
403456
403461
  init_registry();
403457
403462
  init_node();
403458
403463
  init_node();
@@ -411031,7 +411036,7 @@ init_resources();
411031
411036
  init_desktop();
411032
411037
  init_hypery();
411033
411038
  import { createInterface } from "node:readline";
411034
- var VERSION2 = "0.39.2";
411039
+ var VERSION2 = "0.39.3";
411035
411040
  var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
411036
411041
 
411037
411042
  Files (headless, on .popcraft files):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcraft/cli",
3
- "version": "0.39.2",
3
+ "version": "0.39.3",
4
4
  "description": "The PopCraft command line: edit .popcraft files headlessly, call the REST API, publish to the marketplace and manage the desktop app's local plugins, themes, fonts, skills and agents.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://popcraft.app/docs/api/cli",
@@ -34,7 +34,7 @@
34
34
  "esbuild": "0.28.2"
35
35
  },
36
36
  "dependencies": {
37
- "@popcraft/kit": "0.39.2"
37
+ "@popcraft/kit": "0.39.3"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "node build.mjs",