@wix/himalaya-cli 0.1242.0 → 0.1243.0
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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/tokens.d.ts +94 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +40 -6
- package/dist/cli.mjs +363 -226
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/tokens.md +28 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -4053,7 +4053,8 @@ __export(paths_exports, {
|
|
|
4053
4053
|
storeConfigPath: () => storeConfigPath,
|
|
4054
4054
|
storeDir: () => storeDir,
|
|
4055
4055
|
tvosProjectYml: () => tvosProjectYml,
|
|
4056
|
-
watchosProjectYml: () => watchosProjectYml
|
|
4056
|
+
watchosProjectYml: () => watchosProjectYml,
|
|
4057
|
+
watchosStoreSpec: () => watchosStoreSpec
|
|
4057
4058
|
});
|
|
4058
4059
|
import { existsSync as existsSync6, readdirSync as readdirSync4 } from "node:fs";
|
|
4059
4060
|
import { dirname as dirname6, join as join10, resolve as resolve7 } from "node:path";
|
|
@@ -4116,6 +4117,9 @@ function androidTvManifestPath(app) {
|
|
|
4116
4117
|
function iosStoreSpec(app) {
|
|
4117
4118
|
return join10(appDir(app), "ios", "project.store.yml");
|
|
4118
4119
|
}
|
|
4120
|
+
function watchosStoreSpec(app) {
|
|
4121
|
+
return join10(appDir(app), "watchos", "project.store.yml");
|
|
4122
|
+
}
|
|
4119
4123
|
function androidGradle(app) {
|
|
4120
4124
|
const androidDir = join10(appDir(app), "android");
|
|
4121
4125
|
const preferred = join10(androidDir, `${app}-app`, "build.gradle.kts");
|
|
@@ -6757,6 +6761,31 @@ function tonalElevationAlpha(level) {
|
|
|
6757
6761
|
if (typeof level !== "number" || !Number.isFinite(level)) return 0;
|
|
6758
6762
|
return TONAL_ELEVATION_ALPHA[Math.min(5, Math.max(0, Math.round(level)))];
|
|
6759
6763
|
}
|
|
6764
|
+
function resolveButtonTokens(tokens2, size, style) {
|
|
6765
|
+
const button = own(own(tokens2, "controls"), "button");
|
|
6766
|
+
const sizeKey = size === "sm" || size === "lg" ? size : "md";
|
|
6767
|
+
const s2 = own(button, sizeKey);
|
|
6768
|
+
const v2 = own(own(button, "variants"), style || "primary");
|
|
6769
|
+
const out2 = {};
|
|
6770
|
+
const set = (k2, val) => {
|
|
6771
|
+
if (val !== void 0) out2[k2] = val;
|
|
6772
|
+
};
|
|
6773
|
+
set("height", nonNegative(own(s2, "height")));
|
|
6774
|
+
set("paddingH", nonNegative(own(s2, "paddingH")));
|
|
6775
|
+
set("paddingV", nonNegative(own(s2, "paddingV")));
|
|
6776
|
+
set("text", nonEmpty(own(s2, "text")));
|
|
6777
|
+
set("icon", nonNegative(own(s2, "icon")));
|
|
6778
|
+
set("radius", nonNegative(own(v2, "radius")) ?? nonNegative(own(s2, "radius")));
|
|
6779
|
+
set("fill", nonEmpty(own(v2, "fill")));
|
|
6780
|
+
set("label", nonEmpty(own(v2, "label")));
|
|
6781
|
+
set("border", nonEmpty(own(v2, "border")));
|
|
6782
|
+
set("borderWidth", nonNegative(own(v2, "borderWidth")));
|
|
6783
|
+
return out2;
|
|
6784
|
+
}
|
|
6785
|
+
function buttonHitSlop(visibleHeight) {
|
|
6786
|
+
if (typeof visibleHeight !== "number" || !Number.isFinite(visibleHeight)) return 0;
|
|
6787
|
+
return Math.max(0, (BUTTON_MIN_HIT_TARGET - visibleHeight) / 2);
|
|
6788
|
+
}
|
|
6760
6789
|
function buildTokenRegistry(tokens2) {
|
|
6761
6790
|
return {
|
|
6762
6791
|
colors: new Set(Object.keys(tokens2.colors ?? {})),
|
|
@@ -6824,12 +6853,16 @@ function walk(node, registry, path2, out2) {
|
|
|
6824
6853
|
walk(value, registry, `${path2}.${key2}`, out2);
|
|
6825
6854
|
}
|
|
6826
6855
|
}
|
|
6827
|
-
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS;
|
|
6856
|
+
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS;
|
|
6828
6857
|
var init_tokens = __esm({
|
|
6829
6858
|
"../../core/ts/src/tokens.ts"() {
|
|
6830
6859
|
"use strict";
|
|
6831
6860
|
SYSTEM_FONT_FAMILY = "$system";
|
|
6832
6861
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
6862
|
+
BUTTON_MIN_HIT_TARGET = 44;
|
|
6863
|
+
nonNegative = (v2) => typeof v2 === "number" && Number.isFinite(v2) && v2 >= 0 ? v2 : void 0;
|
|
6864
|
+
nonEmpty = (v2) => typeof v2 === "string" && v2 !== "" ? v2 : void 0;
|
|
6865
|
+
own = (o2, k2) => o2 && typeof o2 === "object" && Object.prototype.hasOwnProperty.call(o2, k2) ? o2[k2] : void 0;
|
|
6833
6866
|
COLOR_TOKEN_PROPS = {
|
|
6834
6867
|
Badge: ["token"],
|
|
6835
6868
|
Card: ["background"],
|
|
@@ -8112,7 +8145,7 @@ function isDynamicValue(v2) {
|
|
|
8112
8145
|
function isActionEnvelope(v2) {
|
|
8113
8146
|
return !!v2 && typeof v2 === "object" && !Array.isArray(v2) && typeof v2.actionId === "string";
|
|
8114
8147
|
}
|
|
8115
|
-
function
|
|
8148
|
+
function own2(bag, key2) {
|
|
8116
8149
|
return Object.prototype.hasOwnProperty.call(bag, key2) ? bag[key2] : void 0;
|
|
8117
8150
|
}
|
|
8118
8151
|
function atExposureOf(node) {
|
|
@@ -8136,17 +8169,17 @@ function hasPropHandler(node) {
|
|
|
8136
8169
|
const body = bag(node.body);
|
|
8137
8170
|
const bags = [bag(body.props), bag(node.props), node];
|
|
8138
8171
|
return bags.some((b2) => PROP_HANDLER_KEYS.some((k2) => {
|
|
8139
|
-
const v2 =
|
|
8172
|
+
const v2 = own2(b2, k2);
|
|
8140
8173
|
return !!v2 && typeof v2 === "object" && !Array.isArray(v2);
|
|
8141
8174
|
}));
|
|
8142
8175
|
}
|
|
8143
8176
|
function ownName(n2) {
|
|
8144
8177
|
for (const k2 of ACCESSIBLE_NAME_KEYS) {
|
|
8145
|
-
const v2 =
|
|
8178
|
+
const v2 = own2(n2, k2);
|
|
8146
8179
|
if (typeof v2 === "string" && v2.trim() !== "" || isDynamicValue(v2)) return true;
|
|
8147
8180
|
}
|
|
8148
8181
|
for (const k2 of CONTENT_ARM_KEYS) {
|
|
8149
|
-
const v2 =
|
|
8182
|
+
const v2 = own2(n2, k2);
|
|
8150
8183
|
if (v2 !== void 0 && v2 !== null) return true;
|
|
8151
8184
|
}
|
|
8152
8185
|
return false;
|
|
@@ -8214,7 +8247,7 @@ function accessibleNameGaps(descriptor, options = {}) {
|
|
|
8214
8247
|
if (exposure !== "decorative") {
|
|
8215
8248
|
const tappable = isInteractive(n2) || propHandlers && hasPropHandler(n2);
|
|
8216
8249
|
const type = componentTypeOf(n2);
|
|
8217
|
-
const row = type ?
|
|
8250
|
+
const row = type ? own2(A11Y_CONTRACT, type) : void 0;
|
|
8218
8251
|
const contractual = !interactiveOnly && row?.name === "required";
|
|
8219
8252
|
if ((tappable || contractual) && !hasAccessibleName(n2)) {
|
|
8220
8253
|
out2.push({
|
|
@@ -9799,7 +9832,7 @@ function serviceFieldDeclared(state, path2) {
|
|
|
9799
9832
|
function ellipsis(value, max) {
|
|
9800
9833
|
return value.length <= max ? value : `${value.slice(0, max)}\u2026`;
|
|
9801
9834
|
}
|
|
9802
|
-
function
|
|
9835
|
+
function own3(table, key2) {
|
|
9803
9836
|
return Object.prototype.hasOwnProperty.call(table, key2) ? table[key2] : void 0;
|
|
9804
9837
|
}
|
|
9805
9838
|
function isOpaqueAuthorJson(key2, value, atRoot) {
|
|
@@ -9844,7 +9877,7 @@ function nativeRequiredFindings(descriptor) {
|
|
|
9844
9877
|
value.forEach((v2, i2) => checkNested(v2, of2, `${path2}[${i2}]`, from));
|
|
9845
9878
|
return;
|
|
9846
9879
|
}
|
|
9847
|
-
const rule =
|
|
9880
|
+
const rule = own3(NATIVE_NESTED_CLASSES, cls);
|
|
9848
9881
|
if (!rule) return;
|
|
9849
9882
|
if (Array.isArray(value) || !value || typeof value !== "object") {
|
|
9850
9883
|
reportKind(cls, value, path2, from);
|
|
@@ -9852,17 +9885,17 @@ function nativeRequiredFindings(descriptor) {
|
|
|
9852
9885
|
}
|
|
9853
9886
|
const bag = value;
|
|
9854
9887
|
for (const name of rule.required) {
|
|
9855
|
-
if (
|
|
9888
|
+
if (own3(bag, name) !== void 0 && bag[name] !== null) continue;
|
|
9856
9889
|
out2.push({
|
|
9857
9890
|
path: `${path2}.${name}`,
|
|
9858
9891
|
message: `${cls}.${name} is REQUIRED by the native decoder but is missing \u2014 native decode rejects it ("Field '${name}' is required for type with serial name 'io.himalaya.core.${cls}', but it was missing") and drops the WHOLE screen from the seed, while web renders it fine (reached from ${from})`
|
|
9859
9892
|
});
|
|
9860
9893
|
}
|
|
9861
9894
|
for (const [name, sub] of Object.entries(rule.nested)) {
|
|
9862
|
-
const inner =
|
|
9895
|
+
const inner = own3(bag, name);
|
|
9863
9896
|
if (inner !== void 0 && inner !== null) checkNested(inner, sub, `${path2}.${name}`, from);
|
|
9864
9897
|
}
|
|
9865
|
-
if (cls === "Action") checkActionParams(
|
|
9898
|
+
if (cls === "Action") checkActionParams(own3(bag, "params"), `${path2}.params`, from);
|
|
9866
9899
|
};
|
|
9867
9900
|
const checkActionParams = (params, path2, from) => {
|
|
9868
9901
|
if (params === void 0 || params === null) return;
|
|
@@ -9895,22 +9928,22 @@ function nativeRequiredFindings(descriptor) {
|
|
|
9895
9928
|
const props = body.props;
|
|
9896
9929
|
const bag = props && typeof props === "object" && !Array.isArray(props) ? props : {};
|
|
9897
9930
|
const base = at2 ? `${at2}.body.props` : "body.props";
|
|
9898
|
-
for (const name of
|
|
9899
|
-
if (
|
|
9931
|
+
for (const name of own3(NATIVE_REQUIRED_PROPS, type) ?? []) {
|
|
9932
|
+
if (own3(bag, name) !== void 0 && bag[name] !== null) continue;
|
|
9900
9933
|
const hint = type === "Button" && name === "title" && bag.iconOnly === true ? " \u2014 `iconOnly` HIDES the label, it does not make it optional; keep a title (it is also the accessibility label)" : "";
|
|
9901
9934
|
out2.push({
|
|
9902
9935
|
path: `${base}.${name}`,
|
|
9903
9936
|
message: `${type}.${name} is REQUIRED by the native decoder but is missing \u2014 native decode rejects it ("Field '${name}' is required for type with serial name 'io.himalaya.core.${type}Props', but it was missing") and drops the WHOLE screen from the seed, while web renders it fine${hint}`
|
|
9904
9937
|
});
|
|
9905
9938
|
}
|
|
9906
|
-
for (const [prop, cls] of Object.entries(
|
|
9907
|
-
const value =
|
|
9939
|
+
for (const [prop, cls] of Object.entries(own3(NATIVE_NESTED_PROPS, type) ?? {})) {
|
|
9940
|
+
const value = own3(bag, prop);
|
|
9908
9941
|
if (value === void 0 || value === null) continue;
|
|
9909
9942
|
checkNested(value, cls, `${base}.${prop}`, `${type}.${prop}`);
|
|
9910
9943
|
}
|
|
9911
9944
|
}
|
|
9912
9945
|
if (body && typeof body === "object" && typeof body.type === "string" && typeof body.package === "string") {
|
|
9913
|
-
const modifiers =
|
|
9946
|
+
const modifiers = own3(record2, "modifiers");
|
|
9914
9947
|
if (modifiers !== void 0 && modifiers !== null) {
|
|
9915
9948
|
checkNested(modifiers, NATIVE_MODIFIERS_CLASS, at2 ? `${at2}.modifiers` : "modifiers", "modifiers");
|
|
9916
9949
|
}
|
|
@@ -9924,7 +9957,7 @@ function nativeRequiredFindings(descriptor) {
|
|
|
9924
9957
|
if (descriptor && typeof descriptor === "object" && !Array.isArray(descriptor)) {
|
|
9925
9958
|
const root = descriptor;
|
|
9926
9959
|
for (const [field, cls] of Object.entries(NATIVE_DESCRIPTOR_NESTED)) {
|
|
9927
|
-
const value =
|
|
9960
|
+
const value = own3(root, field);
|
|
9928
9961
|
if (value === void 0 || value === null) continue;
|
|
9929
9962
|
checkNested(value, cls, field, `${NATIVE_DESCRIPTOR_CLASS}.${field}`);
|
|
9930
9963
|
}
|
|
@@ -9954,14 +9987,14 @@ function componentPropFindings(descriptor) {
|
|
|
9954
9987
|
const body = record2.body;
|
|
9955
9988
|
if (typeof body?.package === "string" && CORE_PACKAGES.has(body.package) && typeof body.type === "string") {
|
|
9956
9989
|
const type = body.type;
|
|
9957
|
-
const declared =
|
|
9990
|
+
const declared = own3(KNOWN_PROPS, type);
|
|
9958
9991
|
const props = body.props;
|
|
9959
9992
|
if (declared && props && typeof props === "object" && !Array.isArray(props)) {
|
|
9960
9993
|
const bag = props;
|
|
9961
9994
|
const base = at2 ? `${at2}.body.props` : "body.props";
|
|
9962
9995
|
for (const name of Object.keys(bag)) {
|
|
9963
9996
|
const path2 = `${base}.${name}`;
|
|
9964
|
-
const kind =
|
|
9997
|
+
const kind = own3(declared, name);
|
|
9965
9998
|
if (kind === void 0) {
|
|
9966
9999
|
if (LEGACY_UNSCORED_KEYS.has(`${type}.${name}`)) continue;
|
|
9967
10000
|
const hint = MODIFIER_KEYS.has(name) ? ` \u2014 \`${name}\` is a MODIFIER, not a prop: move it out of \`props\` and into the node's \`modifiers\` bag (\`{ id, body, modifiers: { ${name}: \u2026 } }\`)` : "";
|
|
@@ -9977,7 +10010,7 @@ function componentPropFindings(descriptor) {
|
|
|
9977
10010
|
if (kind === "any") continue;
|
|
9978
10011
|
if (typeof value === "string" && BINDING_SIGIL_RE.test(value)) {
|
|
9979
10012
|
if (kind === "string") continue;
|
|
9980
|
-
const twin =
|
|
10013
|
+
const twin = own3(declared, `${name}Path`) !== void 0 ? `${name}Path` : void 0;
|
|
9981
10014
|
const inArray = IN_ARRAY_BINDING_PROPS.has(`${type}.${name}`) && value.startsWith(SERVICE_SIGIL);
|
|
9982
10015
|
out2.push({
|
|
9983
10016
|
path: path2,
|
|
@@ -10000,10 +10033,10 @@ function componentPropFindings(descriptor) {
|
|
|
10000
10033
|
});
|
|
10001
10034
|
continue;
|
|
10002
10035
|
}
|
|
10003
|
-
if (
|
|
10036
|
+
if (own3(NATIVE_PROP_ENUMS, name) !== void 0) continue;
|
|
10004
10037
|
const actual = wireKind(value);
|
|
10005
10038
|
if (actual === kind) {
|
|
10006
|
-
if (kind === "number" && typeof value === "number" && !Number.isInteger(value) &&
|
|
10039
|
+
if (kind === "number" && typeof value === "number" && !Number.isInteger(value) && own3(INTEGER_PROPS, type)?.includes(name)) {
|
|
10007
10040
|
out2.push({
|
|
10008
10041
|
path: path2,
|
|
10009
10042
|
kind: "decode",
|
|
@@ -10021,13 +10054,13 @@ function componentPropFindings(descriptor) {
|
|
|
10021
10054
|
}
|
|
10022
10055
|
}
|
|
10023
10056
|
if (body && typeof body === "object" && typeof body.type === "string" && typeof body.package === "string") {
|
|
10024
|
-
const modifiers =
|
|
10057
|
+
const modifiers = own3(record2, "modifiers");
|
|
10025
10058
|
if (modifiers && typeof modifiers === "object" && !Array.isArray(modifiers)) {
|
|
10026
10059
|
const schemaOwnsUnknownKeys = SCHEMA_SCORED_NODES.has(at2);
|
|
10027
10060
|
const bag = modifiers;
|
|
10028
10061
|
for (const key2 of Object.keys(bag)) {
|
|
10029
10062
|
if (MODIFIER_KEYS.has(key2)) {
|
|
10030
|
-
const spec =
|
|
10063
|
+
const spec = own3(MODIFIER_KINDS, key2);
|
|
10031
10064
|
const value = bag[key2];
|
|
10032
10065
|
if (!spec || value === void 0 || value === null) continue;
|
|
10033
10066
|
const where = at2 ? `${at2}.modifiers.${key2}` : `modifiers.${key2}`;
|
|
@@ -10815,7 +10848,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
10815
10848
|
if (isOpaqueAuthorJson(k2, val, at2 === "")) continue;
|
|
10816
10849
|
if (k2 === "params" && typeof node.actionId === "string") continue;
|
|
10817
10850
|
const here = at2 ? `${at2}.${k2}` : k2;
|
|
10818
|
-
const allowed2 =
|
|
10851
|
+
const allowed2 = own3(NATIVE_PROP_ENUMS, k2);
|
|
10819
10852
|
if (typeof val === "string" && enums.has(k2) && DYNAMIC_PLACEHOLDER.test(val)) {
|
|
10820
10853
|
issues.push({
|
|
10821
10854
|
severity: "error",
|
|
@@ -13691,6 +13724,47 @@ function tokenColorIssues(dir, tokensPathOverride) {
|
|
|
13691
13724
|
checkElevations(layer, `idiom.${overlay}.`, /* @__PURE__ */ new Set([...baseShadows, ...shadowNames(layer)]));
|
|
13692
13725
|
}
|
|
13693
13726
|
}
|
|
13727
|
+
const groupNames = (layer, group) => {
|
|
13728
|
+
const g2 = layer?.[group];
|
|
13729
|
+
return new Set(g2 !== null && typeof g2 === "object" && !Array.isArray(g2) ? Object.keys(g2) : []);
|
|
13730
|
+
};
|
|
13731
|
+
const checkControlButton = (layer, where, typo, cols) => {
|
|
13732
|
+
const controlButton = layer?.controls?.button;
|
|
13733
|
+
if (controlButton === void 0 || controlButton === null || typeof controlButton !== "object" || Array.isArray(controlButton)) return;
|
|
13734
|
+
const btn = controlButton;
|
|
13735
|
+
for (const size of ["sm", "md", "lg"]) {
|
|
13736
|
+
const text8 = btn[size]?.text;
|
|
13737
|
+
if (text8 === void 0 || typeof text8 === "string" && typo.has(text8)) continue;
|
|
13738
|
+
error(
|
|
13739
|
+
`${tokensPath}: ${where}controls.button.${size}.text is ${JSON.stringify(text8)}, which names no \`typography\` token \u2014 every renderer would keep the built-in Button label. Name one that exists.`
|
|
13740
|
+
);
|
|
13741
|
+
}
|
|
13742
|
+
const variants = btn.variants;
|
|
13743
|
+
if (variants !== null && typeof variants === "object" && !Array.isArray(variants)) {
|
|
13744
|
+
for (const [style, v2] of Object.entries(variants)) {
|
|
13745
|
+
for (const field of ["fill", "label", "border"]) {
|
|
13746
|
+
const value = v2?.[field];
|
|
13747
|
+
if (value === void 0 || typeof value === "string" && (isCanonicalHex(value) || cols.has(value))) continue;
|
|
13748
|
+
error(
|
|
13749
|
+
`${tokensPath}: ${where}controls.button.variants.${style}.${field} is ${JSON.stringify(value)}, which is neither a \`colors\` token nor a #RRGGBB(AA) literal \u2014 every renderer would keep the built-in colour.`
|
|
13750
|
+
);
|
|
13751
|
+
}
|
|
13752
|
+
}
|
|
13753
|
+
}
|
|
13754
|
+
};
|
|
13755
|
+
const baseTypo = groupNames(raw, "typography");
|
|
13756
|
+
const baseCols = groupNames(raw, "colors");
|
|
13757
|
+
checkControlButton(raw, "", baseTypo, baseCols);
|
|
13758
|
+
if (idiom !== null && typeof idiom === "object" && !Array.isArray(idiom)) {
|
|
13759
|
+
for (const [overlay, layer] of Object.entries(idiom)) {
|
|
13760
|
+
checkControlButton(
|
|
13761
|
+
layer,
|
|
13762
|
+
`idiom.${overlay}.`,
|
|
13763
|
+
/* @__PURE__ */ new Set([...baseTypo, ...groupNames(layer, "typography")]),
|
|
13764
|
+
/* @__PURE__ */ new Set([...baseCols, ...groupNames(layer, "colors")])
|
|
13765
|
+
);
|
|
13766
|
+
}
|
|
13767
|
+
}
|
|
13694
13768
|
const colors = raw.colors;
|
|
13695
13769
|
if (colors === void 0) return issues;
|
|
13696
13770
|
if (colors === null || typeof colors !== "object" || Array.isArray(colors)) {
|
|
@@ -15506,15 +15580,15 @@ function hexToRgb2(hex2) {
|
|
|
15506
15580
|
}
|
|
15507
15581
|
function rgba(color, alpha2) {
|
|
15508
15582
|
let h2 = color.trim().replace(/^#/, "");
|
|
15509
|
-
let
|
|
15583
|
+
let own4 = 1;
|
|
15510
15584
|
if (/^[\da-f]{4}$/i.test(h2) || /^[\da-f]{8}$/i.test(h2)) {
|
|
15511
15585
|
const a2 = h2.length === 4 ? h2[3] + h2[3] : h2.slice(6, 8);
|
|
15512
|
-
|
|
15586
|
+
own4 = parseInt(a2, 16) / 255;
|
|
15513
15587
|
h2 = h2.length === 4 ? h2.slice(0, 3) : h2.slice(0, 6);
|
|
15514
15588
|
}
|
|
15515
15589
|
const rgb = hexToRgb2(`#${h2}`);
|
|
15516
15590
|
if (!rgb) return color;
|
|
15517
|
-
const composed2 =
|
|
15591
|
+
const composed2 = own4 === 1 ? clamp(alpha2) : Math.round(clamp(alpha2) * own4 * 1e3) / 1e3;
|
|
15518
15592
|
return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${composed2})`;
|
|
15519
15593
|
}
|
|
15520
15594
|
function normalizeSpring(spring, durationMs) {
|
|
@@ -15875,8 +15949,8 @@ var init_tokens2 = __esm({
|
|
|
15875
15949
|
// ../font-bake/web-fallback.ts
|
|
15876
15950
|
function webRenderedFallback(family) {
|
|
15877
15951
|
const stack = fontStack(family);
|
|
15878
|
-
const
|
|
15879
|
-
const tail = stack.startsWith(
|
|
15952
|
+
const own4 = `"${family}", `;
|
|
15953
|
+
const tail = stack.startsWith(own4) ? stack.slice(own4.length) : stack;
|
|
15880
15954
|
return tail.split(",")[0].trim().replace(/^"(.*)"$/, "$1");
|
|
15881
15955
|
}
|
|
15882
15956
|
var init_web_fallback = __esm({
|
|
@@ -17632,9 +17706,9 @@ function isKnownCapability(id) {
|
|
|
17632
17706
|
function needsNativeBuild(id) {
|
|
17633
17707
|
const req = CAPABILITY_NATIVE[catalogKey(id)];
|
|
17634
17708
|
if (!req) return false;
|
|
17635
|
-
const
|
|
17709
|
+
const nonEmpty2 = (v2) => Array.isArray(v2) ? v2.length > 0 : v2 != null && typeof v2 === "object" ? Object.keys(v2).length > 0 : false;
|
|
17636
17710
|
const { ios, android } = req;
|
|
17637
|
-
return
|
|
17711
|
+
return nonEmpty2(ios?.usageStrings) || nonEmpty2(ios?.infoPlist) || nonEmpty2(ios?.entitlements) || nonEmpty2(ios?.spmProducts) || nonEmpty2(android?.permissions) || nonEmpty2(android?.features) || nonEmpty2(android?.services) || nonEmpty2(android?.foregroundServiceTypes) || nonEmpty2(android?.gradleDeps);
|
|
17638
17712
|
}
|
|
17639
17713
|
function capabilitiesUsedBy(bundleJs) {
|
|
17640
17714
|
const out2 = /* @__PURE__ */ new Set();
|
|
@@ -18687,15 +18761,15 @@ function renderDistCapabilitiesXml(bake, indent) {
|
|
|
18687
18761
|
`${indent}<meta-data android:name="${ANDROID_DIST_CAPABILITIES_META}" android:value="${bake.added.join(",")}" />`
|
|
18688
18762
|
];
|
|
18689
18763
|
}
|
|
18690
|
-
function resolveDistBake(app,
|
|
18691
|
-
const ownSet = new Set(
|
|
18764
|
+
function resolveDistBake(app, own4, extra) {
|
|
18765
|
+
const ownSet = new Set(own4);
|
|
18692
18766
|
const extraKeys = [...new Set(extra.map(catalogKey))].filter((id) => !ownSet.has(id)).sort();
|
|
18693
18767
|
const refused2 = extraKeys.map((id) => [id, distAddRefusal(id)]).filter(([, r2]) => r2 !== null);
|
|
18694
18768
|
if (refused2.length) {
|
|
18695
18769
|
throw new Error(`${app}: a dist build cannot add ${refused2.map(([id, r2]) => `${id} (${r2})`).join("; ")}`);
|
|
18696
18770
|
}
|
|
18697
|
-
const build3 = buildSet([...
|
|
18698
|
-
const ownExpanded = expandCapabilities(
|
|
18771
|
+
const build3 = buildSet([...own4, ...extraKeys]);
|
|
18772
|
+
const ownExpanded = expandCapabilities(own4);
|
|
18699
18773
|
const added = [...expandCapabilities(extraKeys)].filter((id) => !ownExpanded.has(id) && distAddRefusal(id) === null).sort();
|
|
18700
18774
|
return { build: build3, added };
|
|
18701
18775
|
}
|
|
@@ -21735,8 +21809,8 @@ function rewriteNav(nav, removed, homeId) {
|
|
|
21735
21809
|
return p2;
|
|
21736
21810
|
};
|
|
21737
21811
|
const tabFor = (screenId) => {
|
|
21738
|
-
const
|
|
21739
|
-
return typeof
|
|
21812
|
+
const own4 = remainingRoots.find((t2) => t2.screenId === screenId);
|
|
21813
|
+
return typeof own4?.id === "string" ? own4.id : void 0;
|
|
21740
21814
|
};
|
|
21741
21815
|
const homeTab = tabFor(homeId) ?? (typeof remainingRoots[0]?.id === "string" ? remainingRoots[0].id : "");
|
|
21742
21816
|
const finalTab = /* @__PURE__ */ new Map();
|
|
@@ -21871,8 +21945,8 @@ function planTrim(src, keepIds, links) {
|
|
|
21871
21945
|
if (!linksOf(r2).some((l2) => removedTarget(l2.to))) continue;
|
|
21872
21946
|
const block = structuredClone(r2.block);
|
|
21873
21947
|
const isDead = (entry) => {
|
|
21874
|
-
const
|
|
21875
|
-
const to2 =
|
|
21948
|
+
const own4 = tapTarget(entry);
|
|
21949
|
+
const to2 = own4 && removedTarget(own4) ? own4 : rowTemplateTarget(entry, removedTarget);
|
|
21876
21950
|
if (!to2) return false;
|
|
21877
21951
|
dropped.push({ screen: r2.label, node: entryLabel(entry), to: to2 });
|
|
21878
21952
|
return true;
|
|
@@ -24064,12 +24138,12 @@ function clampRule(rule, denyPrefixes, maxTTL) {
|
|
|
24064
24138
|
ttl: Math.min(rule.ttl, maxTTL)
|
|
24065
24139
|
};
|
|
24066
24140
|
}
|
|
24067
|
-
function shadows(
|
|
24068
|
-
const methodCovers =
|
|
24069
|
-
return methodCovers && dflt.pathPrefix.startsWith(
|
|
24141
|
+
function shadows(own4, dflt) {
|
|
24142
|
+
const methodCovers = own4.method === null || own4.method.toUpperCase() === (dflt.method ?? "").toUpperCase();
|
|
24143
|
+
return methodCovers && dflt.pathPrefix.startsWith(own4.pathPrefix);
|
|
24070
24144
|
}
|
|
24071
24145
|
function resolveWixCachePolicy(appName2, declared) {
|
|
24072
|
-
const
|
|
24146
|
+
const own4 = (declared?.rules ?? []).map((r2) => ({
|
|
24073
24147
|
method: r2.method ?? null,
|
|
24074
24148
|
pathPrefix: r2.pathPrefix,
|
|
24075
24149
|
cacheable: r2.cacheable,
|
|
@@ -24078,7 +24152,7 @@ function resolveWixCachePolicy(appName2, declared) {
|
|
|
24078
24152
|
tag: r2.tag ?? null
|
|
24079
24153
|
}));
|
|
24080
24154
|
const legacy = CACHE_OVERRIDES[appName2] ?? [];
|
|
24081
|
-
const appLevel = [...
|
|
24155
|
+
const appLevel = [...own4, ...legacy];
|
|
24082
24156
|
const defaults = declared?.platformDefaults === false ? [] : PLATFORM_DEFAULT_WIX_CACHE_RULES.filter((d2) => !appLevel.some((a2) => shadows(a2, d2)));
|
|
24083
24157
|
const denies = [
|
|
24084
24158
|
...[...PLATFORM_DENY_PREFIXES, ...PERSONAL_DATA_PREFIXES].map((pathPrefix) => ({ method: null, pathPrefix, cacheable: false, ttl: 0, swr: 0, tag: null })),
|
|
@@ -28784,8 +28858,8 @@ var init_src4 = __esm({
|
|
|
28784
28858
|
// ../../core/dev-server/src/descriptor-postprocess.ts
|
|
28785
28859
|
function applyTopBarDefault(descriptor, config) {
|
|
28786
28860
|
const fallback = config?.navigation?.topBarDefault;
|
|
28787
|
-
const
|
|
28788
|
-
if (!fallback ||
|
|
28861
|
+
const own4 = descriptor?.topBar;
|
|
28862
|
+
if (!fallback || own4) return descriptor;
|
|
28789
28863
|
return { ...descriptor, topBar: fallback };
|
|
28790
28864
|
}
|
|
28791
28865
|
function attachAssignments(descriptor, definitions2, ctx, overrides) {
|
|
@@ -31380,13 +31454,13 @@ function parsePaddingShorthand(v2) {
|
|
|
31380
31454
|
}
|
|
31381
31455
|
function addIntrinsicPadding(style, modPad) {
|
|
31382
31456
|
if (!style) return void 0;
|
|
31383
|
-
const
|
|
31384
|
-
if (!
|
|
31457
|
+
const own4 = parsePaddingShorthand(style.padding);
|
|
31458
|
+
if (!own4) return void 0;
|
|
31385
31459
|
const sides = [
|
|
31386
|
-
["paddingTop",
|
|
31387
|
-
["paddingBottom",
|
|
31388
|
-
["paddingLeft",
|
|
31389
|
-
["paddingRight",
|
|
31460
|
+
["paddingTop", own4.top],
|
|
31461
|
+
["paddingBottom", own4.bottom],
|
|
31462
|
+
["paddingLeft", own4.left],
|
|
31463
|
+
["paddingRight", own4.right]
|
|
31390
31464
|
];
|
|
31391
31465
|
let out2;
|
|
31392
31466
|
for (const [key2, ownPx] of sides) {
|
|
@@ -32966,8 +33040,8 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
32966
33040
|
const root = { position: "relative", display: "flex", flexDirection: "column", width: "100%", ...fill ? { flex: "1 1 auto" } : {}, minHeight, ...wrap };
|
|
32967
33041
|
if (!live3) {
|
|
32968
33042
|
const { paddingTop: _t2, paddingBottom: _b, paddingLeft: _l2, paddingRight: _r2, ...rootNoSides } = root;
|
|
32969
|
-
const
|
|
32970
|
-
return /* @__PURE__ */ jsx4("div", { ...dom, style: addIntrinsicPadding(
|
|
33043
|
+
const own4 = { ...rootNoSides, border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 8, padding: 12, boxSizing: "border-box" };
|
|
33044
|
+
return /* @__PURE__ */ jsx4("div", { ...dom, style: addIntrinsicPadding(own4, wrap) ?? own4, children: /* @__PURE__ */ jsx4("span", { style: { color: C2("textSecondary", "#636B78") }, children: placeholder2 || "Rich text editor" }) });
|
|
32971
33045
|
}
|
|
32972
33046
|
if (status === "unavailable") {
|
|
32973
33047
|
return /* @__PURE__ */ jsx4("div", { ...dom, style: root, children: /* @__PURE__ */ jsx4("div", { "data-component-id": `${id}/fallback`, children: props.fallback ? renderChild(props.fallback) : /* @__PURE__ */ jsx4("p", { style: { margin: 0, color: C2("textSecondary", "#636B78") }, children: "Editor unavailable" }) }) });
|
|
@@ -33809,8 +33883,8 @@ function pushModalLayer(el2, opts = {}) {
|
|
|
33809
33883
|
sync();
|
|
33810
33884
|
return {
|
|
33811
33885
|
isTop: () => {
|
|
33812
|
-
const
|
|
33813
|
-
return
|
|
33886
|
+
const own4 = layer.el();
|
|
33887
|
+
return own4 != null && own4.isConnected && topLayerOver(own4) === layer;
|
|
33814
33888
|
},
|
|
33815
33889
|
release: () => {
|
|
33816
33890
|
const i2 = layers.indexOf(layer);
|
|
@@ -116368,18 +116442,18 @@ function editA11yParts(node, edit) {
|
|
|
116368
116442
|
return changed ? out2 : node;
|
|
116369
116443
|
}
|
|
116370
116444
|
if (!React8.isValidElement(node) || typeof node.type !== "string") return node;
|
|
116371
|
-
const
|
|
116372
|
-
if (
|
|
116373
|
-
const part =
|
|
116374
|
-
const kids3 =
|
|
116445
|
+
const own4 = node.props;
|
|
116446
|
+
if (own4["data-component-id"] != null) return node;
|
|
116447
|
+
const part = own4[A11Y_PART];
|
|
116448
|
+
const kids3 = own4.children;
|
|
116375
116449
|
const nextKids = kids3 == null ? kids3 : editA11yParts(kids3, edit);
|
|
116376
116450
|
if (typeof part !== "string" && nextKids === kids3) return node;
|
|
116377
|
-
return cloneWithKids(node, typeof part === "string" ? { ...edit(part,
|
|
116451
|
+
return cloneWithKids(node, typeof part === "string" ? { ...edit(part, own4), [A11Y_PART]: void 0 } : {}, nextKids);
|
|
116378
116452
|
}
|
|
116379
116453
|
function a11yPartEdit(routed, authoredName, onNode, focus) {
|
|
116380
|
-
return (part,
|
|
116454
|
+
return (part, own4) => {
|
|
116381
116455
|
if (part === "derived-name") return authoredName ? {} : { "aria-hidden": "true" };
|
|
116382
|
-
const focusable = typeof
|
|
116456
|
+
const focusable = typeof own4.tabIndex === "number" && own4.tabIndex >= 0;
|
|
116383
116457
|
if (part === "focus") {
|
|
116384
116458
|
if (!focus || !focusable) return {};
|
|
116385
116459
|
focus.onRouted();
|
|
@@ -116392,10 +116466,10 @@ function a11yPartEdit(routed, authoredName, onNode, focus) {
|
|
|
116392
116466
|
Object.assign(patch, focus.carried);
|
|
116393
116467
|
focus.onRouted();
|
|
116394
116468
|
}
|
|
116395
|
-
if (typeof routed["aria-describedby"] === "string" && typeof
|
|
116396
|
-
patch["aria-describedby"] = `${
|
|
116469
|
+
if (typeof routed["aria-describedby"] === "string" && typeof own4["aria-describedby"] === "string") {
|
|
116470
|
+
patch["aria-describedby"] = `${own4["aria-describedby"]} ${routed["aria-describedby"]}`;
|
|
116397
116471
|
}
|
|
116398
|
-
if ("role" in routed && routed.role !==
|
|
116472
|
+
if ("role" in routed && routed.role !== own4.role) {
|
|
116399
116473
|
if (!(typeof routed.role === "string" && RANGE_ROLES.has(routed.role))) {
|
|
116400
116474
|
patch["aria-valuenow"] = void 0;
|
|
116401
116475
|
patch["aria-valuemin"] = void 0;
|
|
@@ -116447,8 +116521,8 @@ function nameFromOwnContent(root) {
|
|
|
116447
116521
|
const t2 = child.textContent?.trim();
|
|
116448
116522
|
if (t2) parts.push(t2);
|
|
116449
116523
|
} else if (child.nodeType === 1 && !child.matches(NAME_SKIP_SELECTOR)) {
|
|
116450
|
-
const
|
|
116451
|
-
if (
|
|
116524
|
+
const own4 = child.getAttribute("aria-label")?.trim() || (child.tagName === "IMG" ? child.getAttribute("alt")?.trim() : void 0);
|
|
116525
|
+
if (own4) parts.push(own4);
|
|
116452
116526
|
else walk2(child);
|
|
116453
116527
|
}
|
|
116454
116528
|
}
|
|
@@ -118275,6 +118349,7 @@ var init_renderNode = __esm({
|
|
|
118275
118349
|
init_helpers();
|
|
118276
118350
|
init_bindings2();
|
|
118277
118351
|
init_bindings();
|
|
118352
|
+
init_tokens();
|
|
118278
118353
|
init_message_format();
|
|
118279
118354
|
init_validation();
|
|
118280
118355
|
init_formBag();
|
|
@@ -120401,22 +120476,30 @@ var init_renderNode = __esm({
|
|
|
120401
120476
|
const buttonStyle = props.style ?? "primary";
|
|
120402
120477
|
const destructive = buttonStyle === "destructive";
|
|
120403
120478
|
const primary = buttonStyle === "primary" || destructive;
|
|
120404
|
-
const
|
|
120405
|
-
const
|
|
120479
|
+
const bt2 = resolveButtonTokens(ctx.tokens, props.size, buttonStyle);
|
|
120480
|
+
const borderWidth = bt2.borderWidth ?? (buttonStyle === "secondary" ? 1 : 0);
|
|
120481
|
+
const outlined = borderWidth > 0;
|
|
120482
|
+
const builtInFill = !primary ? "transparent" : destructive ? C2("danger", "#E62214") : C2("accentPrimary", "#116DFF");
|
|
120483
|
+
const accent = bt2.fill != null ? C2(bt2.fill, builtInFill) : builtInFill;
|
|
120484
|
+
const filled = primary || bt2.fill != null;
|
|
120406
120485
|
const boundDisabled = useResolvedScalar(props.disabledPath, ctx);
|
|
120407
120486
|
const disabled = props.disabled === true || props.loading === true || hiddenBool(boundDisabled);
|
|
120408
120487
|
const onClick = ctx.onAction && props.action && !disabled ? (e2) => {
|
|
120409
120488
|
e2?.stopPropagation?.();
|
|
120410
120489
|
ctx.onAction(resolveItemDeep2(props.action, ctx));
|
|
120411
120490
|
} : void 0;
|
|
120412
|
-
const
|
|
120413
|
-
const
|
|
120414
|
-
const
|
|
120491
|
+
const builtInFg = primary ? C2("textOnAccent", "#fff") : accentTextColor(ctx);
|
|
120492
|
+
const fg = bt2.label != null ? C2(bt2.label, builtInFg) : builtInFg;
|
|
120493
|
+
const outlineColor = bt2.border != null ? C2(bt2.border, fg) : fg;
|
|
120494
|
+
const pillRadius = props.cornerRadius != null ? props.cornerRadius : bt2.radius ?? ctx.radius("pill", 24);
|
|
120495
|
+
const vPad = props.iconOnly ? 11 : bt2.paddingV ?? (props.size === "sm" ? 8 : props.size === "lg" ? 16 : 13);
|
|
120415
120496
|
const hPadBase = props.iconOnly ? 11 : props.size === "sm" ? 13 : props.size === "lg" ? 22 : 16;
|
|
120416
|
-
const hPad = props.iconOnly ? 11 : Math.min(Math.max(hPadBase, pillRadius), vPad + 8);
|
|
120497
|
+
const hPad = props.iconOnly ? 11 : bt2.paddingH ?? Math.min(Math.max(hPadBase, pillRadius), vPad + 8);
|
|
120417
120498
|
const pad3 = `${vPad}px ${hPad}px`;
|
|
120418
|
-
const f2 = ctx.font("bodyEmphasis");
|
|
120419
|
-
const glyph = props.size === "sm" ? 14 : props.size === "lg" ? 18 : 16;
|
|
120499
|
+
const f2 = ctx.font(bt2.text ?? "bodyEmphasis");
|
|
120500
|
+
const glyph = bt2.icon ?? (props.size === "sm" ? 14 : props.size === "lg" ? 18 : 16);
|
|
120501
|
+
const visibleMin = props.iconOnly ? 44 : props.minHeight ?? bt2.height ?? 44;
|
|
120502
|
+
const slop = props.iconOnly ? 0 : buttonHitSlop(Math.max(visibleMin, 2 * vPad + Math.max(f2.size * (f2.line ?? 1.25), glyph)));
|
|
120420
120503
|
const ic = (name) => /* @__PURE__ */ jsx9("span", { style: { display: "inline-grid", placeItems: "center", width: glyph, height: glyph }, children: iconSvg(name, { size: glyph, color: fg }) });
|
|
120421
120504
|
const iconLabel = typeof resolvedLeadingIcon === "string" && resolvedLeadingIcon ? resolvedLeadingIcon.replace(/[_-]+/g, " ").replace(/\b\w/g, (c2) => c2.toUpperCase()) : "";
|
|
120422
120505
|
const hasTitle = typeof resolvedTitle === "string" && resolvedTitle.length > 0 || typeof resolvedTitle === "number";
|
|
@@ -120466,19 +120549,24 @@ var init_renderNode = __esm({
|
|
|
120466
120549
|
width: props.fullWidth ? "100%" : void 0,
|
|
120467
120550
|
flex: rowStretch ? "1 1 0" : void 0,
|
|
120468
120551
|
minWidth: props.iconOnly ? 44 : props.fullWidth ? void 0 : 64,
|
|
120469
|
-
minHeight:
|
|
120552
|
+
minHeight: visibleMin + 2 * slop,
|
|
120470
120553
|
...props.iconOnly ? {} : { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" },
|
|
120471
120554
|
alignItems: "center",
|
|
120472
120555
|
justifyContent: "center",
|
|
120473
120556
|
gap: 8,
|
|
120474
120557
|
padding: pad3,
|
|
120475
|
-
|
|
120558
|
+
// With a hit band the outer box is `slop` taller at each end; an elliptical radius keeps
|
|
120559
|
+
// the VISIBLE (padding-box) corner at `pillRadius`.
|
|
120560
|
+
borderRadius: props.iconOnly ? "50%" : slop > 0 ? `${pillRadius}px / ${pillRadius + slop}px` : pillRadius,
|
|
120476
120561
|
fontFamily: fontStack(f2.family, ctx.idiom),
|
|
120477
120562
|
fontWeight: f2.weight,
|
|
120478
120563
|
fontSize: f2.remSize,
|
|
120479
|
-
|
|
120564
|
+
// An authored `text` token paints its own line height too — the one the hit area estimates with.
|
|
120565
|
+
...bt2.text != null && f2.line != null ? { lineHeight: f2.line } : {},
|
|
120566
|
+
...bt2.text != null && f2.letterSpacing != null ? { letterSpacing: f2.letterSpacing } : {},
|
|
120567
|
+
background: filled ? accent : "transparent",
|
|
120480
120568
|
color: fg,
|
|
120481
|
-
border: outlined ? `
|
|
120569
|
+
...slop > 0 ? { border: "none", borderTop: `${slop}px solid transparent`, borderBottom: `${slop}px solid transparent`, backgroundClip: "padding-box", marginTop: -slop, marginBottom: -slop, ...outlined ? { boxShadow: `inset 0 0 0 ${borderWidth}px ${outlineColor}` } : {} } : { border: outlined ? `${borderWidth}px solid ${outlineColor}` : "none" },
|
|
120482
120570
|
cursor: disabled ? "default" : "pointer",
|
|
120483
120571
|
opacity: disabled ? 0.55 : 1,
|
|
120484
120572
|
boxSizing: "border-box",
|
|
@@ -122303,10 +122391,10 @@ var init_renderNode = __esm({
|
|
|
122303
122391
|
focusRoots = /* @__PURE__ */ new WeakMap();
|
|
122304
122392
|
A11yHintDescription = ({ hint, idBase, children, ...forwarded }) => {
|
|
122305
122393
|
const descId = `${idBase ?? "hm"}__hint${React8.useId()}`;
|
|
122306
|
-
const
|
|
122394
|
+
const own4 = children.props;
|
|
122307
122395
|
const next = { ...forwarded };
|
|
122308
|
-
if (forwarded.style) next.style = { ...
|
|
122309
|
-
next["aria-describedby"] = [
|
|
122396
|
+
if (forwarded.style) next.style = { ...own4.style ?? {}, ...forwarded.style };
|
|
122397
|
+
next["aria-describedby"] = [own4["aria-describedby"], descId].filter(Boolean).join(" ");
|
|
122310
122398
|
return /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
122311
122399
|
React8.cloneElement(children, next),
|
|
122312
122400
|
/* @__PURE__ */ jsx9("span", { id: descId, hidden: true, "data-hm-a11y-hint": "", children: hint })
|
|
@@ -141583,15 +141671,15 @@ function assembleLedger(r2, options = {}) {
|
|
|
141583
141671
|
remedy: SOURCEMAP_REMEDY[c2.sourcemap]
|
|
141584
141672
|
});
|
|
141585
141673
|
}
|
|
141586
|
-
const
|
|
141587
|
-
if (!
|
|
141588
|
-
const named =
|
|
141589
|
-
const more =
|
|
141674
|
+
const own4 = (c2.uncoveredFunctions ?? []).filter((f2) => f2.source?.startsWith("tier5-src/") || f2.source?.startsWith("core/dev-server/tier5-bundles-src/"));
|
|
141675
|
+
if (!own4.length) continue;
|
|
141676
|
+
const named = own4.slice(0, 6).map((f2) => `${f2.name} (${f2.source})`).join(", ");
|
|
141677
|
+
const more = own4.length > 6 ? ` +${own4.length - 6} more` : "";
|
|
141590
141678
|
out2.push({
|
|
141591
141679
|
key: `code-uncovered|${c2.screen}`,
|
|
141592
141680
|
kind: "code-uncovered",
|
|
141593
141681
|
screen: c2.screen,
|
|
141594
|
-
gap: `${
|
|
141682
|
+
gap: `${own4.length} worker function${own4.length === 1 ? "" : "s"} never executed on any axis: ${named}${more}`,
|
|
141595
141683
|
remedy: "usually an error/edge branch \u2014 give the crawl data that reaches it (a net-mocks rule, cms seed rows, or a nav edge with the right input), or verify the path on a preview"
|
|
141596
141684
|
});
|
|
141597
141685
|
}
|
|
@@ -143651,23 +143739,23 @@ var init_preview_assets_generated = __esm({
|
|
|
143651
143739
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
143652
143740
|
init_preview_assets_format();
|
|
143653
143741
|
PREVIEW_ASSET_MANIFEST = [
|
|
143654
|
-
{ key: "assets/index-
|
|
143655
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset:
|
|
143656
|
-
{ key: "assets/pdfDocument-
|
|
143657
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
143658
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
143659
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
143660
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
143661
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
143662
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
143663
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
143664
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
143665
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
143666
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
143667
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
143668
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
143669
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
143670
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
143742
|
+
{ key: "assets/index-CPLD_SKV.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1193794, sha256: "4b6a6e4c6cc9a5bbb9683436c0569281ecc1b23885c6684f42b8e50de02d7d1c" },
|
|
143743
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset: 1193802, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
143744
|
+
{ key: "assets/pdfDocument-DLmlpdLS.js", contentType: "application/javascript; charset=utf-8", offset: 2510836, length: 489166, sha256: "c583b748cbc814a27789ca1bcc8fd812a3c7a9cbc9428fea612f3d321d357fa9" },
|
|
143745
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3000002, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
143746
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3004612, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
143747
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3493196, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
143748
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3584120, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
143749
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3675104, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
143750
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3766084, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
143751
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3856956, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
143752
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3947936, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
143753
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4056572, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
143754
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4165656, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
143755
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4274704, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
143756
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4382404, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
143757
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4470512, length: 4947, sha256: "58e2242ae4a75ea666a13847f575df0455bbc0928a080c861804294ecb72f83f" },
|
|
143758
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4475459, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
143671
143759
|
];
|
|
143672
143760
|
}
|
|
143673
143761
|
});
|
|
@@ -144114,6 +144202,138 @@ var init_git = __esm({
|
|
|
144114
144202
|
}
|
|
144115
144203
|
});
|
|
144116
144204
|
|
|
144205
|
+
// ../store-release/version.ts
|
|
144206
|
+
var version_exports = {};
|
|
144207
|
+
__export(version_exports, {
|
|
144208
|
+
bumpVersion: () => bumpVersion,
|
|
144209
|
+
readAndroidVersion: () => readAndroidVersion,
|
|
144210
|
+
readAndroidVersionName: () => readAndroidVersionName,
|
|
144211
|
+
readIosMarketingVersion: () => readIosMarketingVersion,
|
|
144212
|
+
readIosVersion: () => readIosVersion,
|
|
144213
|
+
readIosVersionStrings: () => readIosVersionStrings,
|
|
144214
|
+
setAndroidVersion: () => setAndroidVersion,
|
|
144215
|
+
setIosVersion: () => setIosVersion,
|
|
144216
|
+
stampIosVersionStrings: () => stampIosVersionStrings
|
|
144217
|
+
});
|
|
144218
|
+
import { readFileSync as readFileSync76, writeFileSync as writeFileSync26 } from "node:fs";
|
|
144219
|
+
function readIosVersion(projectYml) {
|
|
144220
|
+
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144221
|
+
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
144222
|
+
if (marketing === null || build3 === null) {
|
|
144223
|
+
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
144224
|
+
}
|
|
144225
|
+
return { marketing, build: Number(build3) };
|
|
144226
|
+
}
|
|
144227
|
+
function setIosVersion(projectYml, v2) {
|
|
144228
|
+
let out2 = replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing);
|
|
144229
|
+
out2 = replaceScalar(out2, "CFBundleVersion", String(v2.build));
|
|
144230
|
+
out2 = out2.replace(
|
|
144231
|
+
/(^[ \t]*# >>> himalaya:live-activity:target[^\n]*\n)([\s\S]*?)(^[ \t]*# <<< himalaya:live-activity:target[^\n]*$)/m,
|
|
144232
|
+
(_match, start, body, end) => {
|
|
144233
|
+
if (!body.trim()) return start + body + end;
|
|
144234
|
+
return start + replaceScalar(replaceScalar(body, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", String(v2.build)) + end;
|
|
144235
|
+
}
|
|
144236
|
+
);
|
|
144237
|
+
return out2;
|
|
144238
|
+
}
|
|
144239
|
+
function readIosVersionStrings(projectYml) {
|
|
144240
|
+
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144241
|
+
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
144242
|
+
if (marketing === null || build3 === null) {
|
|
144243
|
+
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
144244
|
+
}
|
|
144245
|
+
return { marketing, build: build3 };
|
|
144246
|
+
}
|
|
144247
|
+
function stampIosVersionStrings(projectYml, v2) {
|
|
144248
|
+
return replaceScalar(replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", v2.build);
|
|
144249
|
+
}
|
|
144250
|
+
function readIosMarketingVersion(projectYml) {
|
|
144251
|
+
return matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144252
|
+
}
|
|
144253
|
+
function scalarRe(key2) {
|
|
144254
|
+
return new RegExp(`^(\\s*${key2}:\\s*)("?)([^"\\n#]*?)("?)(\\s*(?:#.*)?)$`, "m");
|
|
144255
|
+
}
|
|
144256
|
+
function matchScalar(content, key2) {
|
|
144257
|
+
const m2 = scalarRe(key2).exec(content);
|
|
144258
|
+
return m2 ? m2[3].trim() : null;
|
|
144259
|
+
}
|
|
144260
|
+
function replaceScalar(content, key2, value) {
|
|
144261
|
+
const re2 = scalarRe(key2);
|
|
144262
|
+
if (!re2.test(content)) throw new Error(`could not locate \`${key2}:\` in project.yml`);
|
|
144263
|
+
return content.replace(re2, (_full, pre, openQ, _oldVal, _closeQ, tail) => {
|
|
144264
|
+
const q2 = openQ ? '"' : "";
|
|
144265
|
+
return `${pre}${q2}${value}${q2}${tail}`;
|
|
144266
|
+
});
|
|
144267
|
+
}
|
|
144268
|
+
function readAndroidVersion(gradle) {
|
|
144269
|
+
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
144270
|
+
const code = /(\bversionCode\s*=\s*)(\d+)/.exec(gradle);
|
|
144271
|
+
if (!name || !code) throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
144272
|
+
return { marketing: name[2], build: Number(code[2]) };
|
|
144273
|
+
}
|
|
144274
|
+
function readAndroidVersionName(gradle) {
|
|
144275
|
+
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
144276
|
+
return name ? name[2] : null;
|
|
144277
|
+
}
|
|
144278
|
+
function setAndroidVersion(gradle, v2) {
|
|
144279
|
+
if (!/\bversionName\s*=\s*"/.test(gradle) || !/\bversionCode\s*=\s*\d+/.test(gradle)) {
|
|
144280
|
+
throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
144281
|
+
}
|
|
144282
|
+
return gradle.replace(/(\bversionName\s*=\s*")[^"]*(")/, `$1${v2.marketing}$2`).replace(/(\bversionCode\s*=\s*)\d+/, `$1${v2.build}`);
|
|
144283
|
+
}
|
|
144284
|
+
function bumpVersion(app, opts) {
|
|
144285
|
+
const iosPath = iosProjectYml(app);
|
|
144286
|
+
const gradlePath = androidGradle(app);
|
|
144287
|
+
const iosYml = readFileSync76(iosPath, "utf8");
|
|
144288
|
+
const gradle = readFileSync76(gradlePath, "utf8");
|
|
144289
|
+
const current = readIosVersion(iosYml);
|
|
144290
|
+
const next = {
|
|
144291
|
+
marketing: opts.marketing ?? current.marketing,
|
|
144292
|
+
build: opts.build === "increment" || opts.build === void 0 ? current.build + (opts.build === "increment" ? 1 : 0) : opts.build
|
|
144293
|
+
};
|
|
144294
|
+
writeFileSync26(iosPath, setIosVersion(iosYml, next));
|
|
144295
|
+
writeFileSync26(gradlePath, setAndroidVersion(gradle, next));
|
|
144296
|
+
return next;
|
|
144297
|
+
}
|
|
144298
|
+
var init_version = __esm({
|
|
144299
|
+
"../store-release/version.ts"() {
|
|
144300
|
+
init_paths2();
|
|
144301
|
+
}
|
|
144302
|
+
});
|
|
144303
|
+
|
|
144304
|
+
// ../store-release/store-spec.ts
|
|
144305
|
+
function detectBundleId(projectYml) {
|
|
144306
|
+
const m2 = /^\s*bundleId:\s*(\S+)\s*$/m.exec(projectYml);
|
|
144307
|
+
if (!m2) throw new Error("project.yml has no `bundleId:` on the application target");
|
|
144308
|
+
return m2[1];
|
|
144309
|
+
}
|
|
144310
|
+
function defaultProdBundleId(devBundleId) {
|
|
144311
|
+
return devBundleId.replace(/\.dev$/, "");
|
|
144312
|
+
}
|
|
144313
|
+
function referencedWatchProject(projectYml) {
|
|
144314
|
+
if (!/^projectReferences:/m.test(projectYml)) return void 0;
|
|
144315
|
+
const m2 = /^projectReferences:\n {2}Watch:\n {4}path:\s*\.\.\/watchos\/(\S+)\.xcodeproj\s*$/m.exec(projectYml);
|
|
144316
|
+
if (!m2) {
|
|
144317
|
+
throw new Error(
|
|
144318
|
+
"store-spec: this iOS project references an xcodegen project other than the generated companion watch app (`projectReferences: Watch: path: ../watchos/<Name>.xcodeproj`) \u2014 only that one is supported"
|
|
144319
|
+
);
|
|
144320
|
+
}
|
|
144321
|
+
return { name: m2[1] };
|
|
144322
|
+
}
|
|
144323
|
+
function storeWatchBundleId(prodIosBundleId) {
|
|
144324
|
+
return `${prodIosBundleId}.watchkitapp`;
|
|
144325
|
+
}
|
|
144326
|
+
function storeSigningBundleIds(projectYml, toBundleId) {
|
|
144327
|
+
const prod = toBundleId ?? defaultProdBundleId(detectBundleId(projectYml));
|
|
144328
|
+
return referencedWatchProject(projectYml) ? [prod, storeWatchBundleId(prod)] : [prod];
|
|
144329
|
+
}
|
|
144330
|
+
var init_store_spec = __esm({
|
|
144331
|
+
"../store-release/store-spec.ts"() {
|
|
144332
|
+
init_paths2();
|
|
144333
|
+
init_version();
|
|
144334
|
+
}
|
|
144335
|
+
});
|
|
144336
|
+
|
|
144117
144337
|
// ../store-release/preflight.ts
|
|
144118
144338
|
var preflight_exports = {};
|
|
144119
144339
|
__export(preflight_exports, {
|
|
@@ -144123,7 +144343,7 @@ __export(preflight_exports, {
|
|
|
144123
144343
|
parseStoreConfig: () => parseStoreConfig,
|
|
144124
144344
|
requireEnv: () => requireEnv
|
|
144125
144345
|
});
|
|
144126
|
-
import { existsSync as existsSync65, readFileSync as
|
|
144346
|
+
import { existsSync as existsSync65, readFileSync as readFileSync77 } from "node:fs";
|
|
144127
144347
|
import { isAbsolute as isAbsolute6, relative as relative13, resolve as resolve50 } from "node:path";
|
|
144128
144348
|
function isInsideRepo(p2) {
|
|
144129
144349
|
const rel = relative13(REPO_ROOT3, resolve50(p2));
|
|
@@ -144183,7 +144403,7 @@ function loadStoreConfig(app) {
|
|
|
144183
144403
|
if (!existsSync65(p2)) {
|
|
144184
144404
|
throw new Error(`No store config at ${p2}. Create apps/${app}/store/store.config.yaml first (see /setup-store-signing).`);
|
|
144185
144405
|
}
|
|
144186
|
-
return parseStoreConfig(
|
|
144406
|
+
return parseStoreConfig(readFileSync77(p2, "utf8"));
|
|
144187
144407
|
}
|
|
144188
144408
|
var init_preflight = __esm({
|
|
144189
144409
|
"../store-release/preflight.ts"() {
|
|
@@ -144192,7 +144412,7 @@ var init_preflight = __esm({
|
|
|
144192
144412
|
});
|
|
144193
144413
|
|
|
144194
144414
|
// ../store-release/register-bundle.ts
|
|
144195
|
-
import { readFileSync as
|
|
144415
|
+
import { readFileSync as readFileSync78 } from "node:fs";
|
|
144196
144416
|
import { createPrivateKey as createPrivateKey2, sign } from "node:crypto";
|
|
144197
144417
|
function b64url2(b2) {
|
|
144198
144418
|
return Buffer.from(b2).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
@@ -144210,7 +144430,7 @@ function bundleIdBody(identifier, name, platform = "IOS") {
|
|
|
144210
144430
|
async function registerBundleId(opts) {
|
|
144211
144431
|
const env = requireEnv(["ASC_KEY_ID", "ASC_ISSUER_ID", "ASC_KEY_PATH"]);
|
|
144212
144432
|
assertCredentialOutsideRepo("ASC_KEY_PATH", env.ASC_KEY_PATH);
|
|
144213
|
-
const jwt = ascJwt(env.ASC_KEY_ID, env.ASC_ISSUER_ID,
|
|
144433
|
+
const jwt = ascJwt(env.ASC_KEY_ID, env.ASC_ISSUER_ID, readFileSync78(env.ASC_KEY_PATH, "utf8"), Math.floor(Date.now() / 1e3));
|
|
144214
144434
|
const res = await fetch(`${ASC_API}/v1/bundleIds`, {
|
|
144215
144435
|
method: "POST",
|
|
144216
144436
|
headers: { Authorization: `Bearer ${jwt}`, "Content-Type": "application/json" },
|
|
@@ -144240,13 +144460,16 @@ async function main() {
|
|
|
144240
144460
|
}
|
|
144241
144461
|
const ni2 = rest.indexOf("--name");
|
|
144242
144462
|
const name = ni2 >= 0 ? rest[ni2 + 1] : cfg.app ?? app;
|
|
144243
|
-
const
|
|
144244
|
-
|
|
144463
|
+
for (const id of storeSigningBundleIds(readFileSync78(iosProjectYml(app), "utf8"), identifier)) {
|
|
144464
|
+
const r2 = await registerBundleId({ identifier: id, name: id === identifier ? name : `${name} Watch` });
|
|
144465
|
+
console.log(`bundle id ${id}: ${r2.status}${r2.id ? ` (${r2.id})` : ""}`);
|
|
144466
|
+
}
|
|
144245
144467
|
}
|
|
144246
144468
|
var ASC_API;
|
|
144247
144469
|
var init_register_bundle = __esm({
|
|
144248
144470
|
"../store-release/register-bundle.ts"() {
|
|
144249
144471
|
init_paths2();
|
|
144472
|
+
init_store_spec();
|
|
144250
144473
|
init_preflight();
|
|
144251
144474
|
ASC_API = "https://api.appstoreconnect.apple.com";
|
|
144252
144475
|
if (runningAsScript("store-release/register-bundle.ts")) {
|
|
@@ -145642,7 +145865,7 @@ __export(credential_profile_exports, {
|
|
|
145642
145865
|
profilePath: () => profilePath,
|
|
145643
145866
|
resolveStoreCredentials: () => resolveStoreCredentials
|
|
145644
145867
|
});
|
|
145645
|
-
import { existsSync as existsSync66, readFileSync as
|
|
145868
|
+
import { existsSync as existsSync66, readFileSync as readFileSync79 } from "node:fs";
|
|
145646
145869
|
import { homedir as homedir5 } from "node:os";
|
|
145647
145870
|
import { join as join66 } from "node:path";
|
|
145648
145871
|
function credentialsDir(home = homedir5()) {
|
|
@@ -145685,7 +145908,7 @@ function resolveStoreCredentials(opts) {
|
|
|
145685
145908
|
const { app, cfg } = opts;
|
|
145686
145909
|
const env = opts.env ?? process.env;
|
|
145687
145910
|
const home = opts.home ?? homedir5();
|
|
145688
|
-
const read = opts.readProfile ?? ((p2) =>
|
|
145911
|
+
const read = opts.readProfile ?? ((p2) => readFileSync79(p2, "utf8"));
|
|
145689
145912
|
const exists = opts.profileExists ?? existsSync66;
|
|
145690
145913
|
const ios = cfg.ios ?? {};
|
|
145691
145914
|
const flagName = opts.profileFlag?.trim();
|
|
@@ -145752,7 +145975,7 @@ var init_credential_profile = __esm({
|
|
|
145752
145975
|
|
|
145753
145976
|
// ../store-release/iap-credentials.ts
|
|
145754
145977
|
import { createHash as createHash32 } from "node:crypto";
|
|
145755
|
-
import { existsSync as existsSync67, readFileSync as
|
|
145978
|
+
import { existsSync as existsSync67, readFileSync as readFileSync80, realpathSync as realpathSync10 } from "node:fs";
|
|
145756
145979
|
import { homedir as homedir6 } from "node:os";
|
|
145757
145980
|
function accountFingerprint(keyId, issuerId) {
|
|
145758
145981
|
return `sha256:${createHash32("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
|
|
@@ -145786,7 +146009,7 @@ function canonicalKeyPath(path2, profile, realpath) {
|
|
|
145786
146009
|
function resolveIapCredentials(options) {
|
|
145787
146010
|
const { target } = options;
|
|
145788
146011
|
const home = options.home ?? homedir6();
|
|
145789
|
-
const readFile3 = options.readFile ?? ((p2) =>
|
|
146012
|
+
const readFile3 = options.readFile ?? ((p2) => readFileSync80(p2, "utf8"));
|
|
145790
146013
|
const realpath = options.realpath ?? realpathSync10;
|
|
145791
146014
|
const profile = requireExplicitProfile(options.profileFlag, target);
|
|
145792
146015
|
const creds = resolveStoreCredentials({
|
|
@@ -146045,8 +146268,8 @@ function scrubBook(value) {
|
|
|
146045
146268
|
}
|
|
146046
146269
|
function assertNoSecrets(serialized) {
|
|
146047
146270
|
const hits = secretFindings([{ path: "book.json", bytes: Buffer.from(serialized) }]);
|
|
146048
|
-
const
|
|
146049
|
-
if (hits.length ||
|
|
146271
|
+
const own4 = TOKEN_PATTERNS.find((re2) => new RegExp(re2.source, re2.flags.replace("g", "")).test(serialized));
|
|
146272
|
+
if (hits.length || own4) {
|
|
146050
146273
|
throw new Error(`refusing to write the app book: it still contains ${hits[0]?.reason ?? "a token-shaped string"} after redaction`);
|
|
146051
146274
|
}
|
|
146052
146275
|
}
|
|
@@ -146243,7 +146466,7 @@ __export(store_iap_exports, {
|
|
|
146243
146466
|
runStoreIap: () => runStoreIap
|
|
146244
146467
|
});
|
|
146245
146468
|
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
146246
|
-
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync32, readFileSync as
|
|
146469
|
+
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync32, readFileSync as readFileSync81, rmSync as rmSync16, writeFileSync as writeFileSync27 } from "node:fs";
|
|
146247
146470
|
import { homedir as homedir7, hostname } from "node:os";
|
|
146248
146471
|
import { join as join67 } from "node:path";
|
|
146249
146472
|
function scrubDeep(value, scrub) {
|
|
@@ -146571,7 +146794,7 @@ function fileJournal(path2) {
|
|
|
146571
146794
|
}
|
|
146572
146795
|
function readLockSummary(path2) {
|
|
146573
146796
|
try {
|
|
146574
|
-
const { pid, host, at: at2 } = JSON.parse(
|
|
146797
|
+
const { pid, host, at: at2 } = JSON.parse(readFileSync81(path2, "utf8"));
|
|
146575
146798
|
return `pid ${pid} on ${host} since ${at2}`;
|
|
146576
146799
|
} catch {
|
|
146577
146800
|
return "unreadable lock";
|
|
@@ -146581,7 +146804,7 @@ function acquireApplyLock(dir, appleAppId) {
|
|
|
146581
146804
|
const path2 = join67(dir, "apply.lock");
|
|
146582
146805
|
const stamp = JSON.stringify({ pid: process.pid, host: hostname(), at: (/* @__PURE__ */ new Date()).toISOString(), token: randomUUID5() });
|
|
146583
146806
|
try {
|
|
146584
|
-
|
|
146807
|
+
writeFileSync27(path2, stamp, { flag: "wx", mode: 384 });
|
|
146585
146808
|
} catch (e2) {
|
|
146586
146809
|
if (e2.code !== "EEXIST") throw e2;
|
|
146587
146810
|
throw new Error(
|
|
@@ -146591,7 +146814,7 @@ function acquireApplyLock(dir, appleAppId) {
|
|
|
146591
146814
|
return () => {
|
|
146592
146815
|
let current = "";
|
|
146593
146816
|
try {
|
|
146594
|
-
current =
|
|
146817
|
+
current = readFileSync81(path2, "utf8");
|
|
146595
146818
|
} catch {
|
|
146596
146819
|
return;
|
|
146597
146820
|
}
|
|
@@ -146615,7 +146838,7 @@ async function confirmOnTerminal(question) {
|
|
|
146615
146838
|
}
|
|
146616
146839
|
function defaultStoreIapDeps() {
|
|
146617
146840
|
return {
|
|
146618
|
-
readFile: (path2) =>
|
|
146841
|
+
readFile: (path2) => readFileSync81(path2, "utf8"),
|
|
146619
146842
|
writeFileAtomic,
|
|
146620
146843
|
resolveCredentials: ({ profileFlag, target }) => resolveIapCredentials({ profileFlag, target }),
|
|
146621
146844
|
createApi: (key2) => createIapApi(createAscClient({ key: key2 })),
|
|
@@ -147078,7 +147301,7 @@ __export(preflight_app_exports, {
|
|
|
147078
147301
|
preflightApp: () => preflightApp,
|
|
147079
147302
|
profileAccount: () => profileAccount
|
|
147080
147303
|
});
|
|
147081
|
-
import { readFileSync as
|
|
147304
|
+
import { readFileSync as readFileSync82, existsSync as existsSync68, readdirSync as readdirSync31, statSync as statSync18 } from "node:fs";
|
|
147082
147305
|
import { createHash as createHash34 } from "node:crypto";
|
|
147083
147306
|
import { join as join68 } from "node:path";
|
|
147084
147307
|
function analyze(projectYml, storeConfig, icon, account) {
|
|
@@ -147144,8 +147367,8 @@ function profileAccount(app, storeConfig, opts = {}) {
|
|
|
147144
147367
|
}
|
|
147145
147368
|
}
|
|
147146
147369
|
async function preflightApp(app, opts = {}) {
|
|
147147
|
-
const projectYml = existsSync68(iosProjectYml(app)) ?
|
|
147148
|
-
const storeConfig = existsSync68(storeConfigPath(app)) ?
|
|
147370
|
+
const projectYml = existsSync68(iosProjectYml(app)) ? readFileSync82(iosProjectYml(app), "utf8") : "";
|
|
147371
|
+
const storeConfig = existsSync68(storeConfigPath(app)) ? readFileSync82(storeConfigPath(app), "utf8") : "";
|
|
147149
147372
|
if (!storeConfig) return [{ level: "error", message: `no apps/${app}/store/store.config.yaml \u2014 run /setup-store-signing first.` }];
|
|
147150
147373
|
const findings = analyze(
|
|
147151
147374
|
projectYml,
|
|
@@ -147304,7 +147527,7 @@ function playListingAssets(app, locale = "en-US") {
|
|
|
147304
147527
|
for (const name of names) {
|
|
147305
147528
|
const p2 = join68(dir, name);
|
|
147306
147529
|
try {
|
|
147307
|
-
if (statSync18(p2).isFile()) return { name, bytes:
|
|
147530
|
+
if (statSync18(p2).isFile()) return { name, bytes: readFileSync82(p2) };
|
|
147308
147531
|
} catch {
|
|
147309
147532
|
}
|
|
147310
147533
|
}
|
|
@@ -147344,7 +147567,7 @@ function listScreenshots(app, locale = "en-US") {
|
|
|
147344
147567
|
const flat = join68(storeDir(app), "screenshots", locale);
|
|
147345
147568
|
if (existsSync68(flat)) {
|
|
147346
147569
|
for (const png of readdirSync31(flat).filter((n2) => n2.endsWith(".png"))) {
|
|
147347
|
-
const sz = pngSize(
|
|
147570
|
+
const sz = pngSize(readFileSync82(join68(flat, png)));
|
|
147348
147571
|
if (sz) out2.push({ name: png, w: sz.w, h: sz.h });
|
|
147349
147572
|
}
|
|
147350
147573
|
}
|
|
@@ -147354,7 +147577,7 @@ function listScreenshots(app, locale = "en-US") {
|
|
|
147354
147577
|
const d2 = join68(legacy, deviceDir);
|
|
147355
147578
|
if (!statSync18(d2).isDirectory()) continue;
|
|
147356
147579
|
for (const png of readdirSync31(d2).filter((n2) => n2.endsWith(".png"))) {
|
|
147357
|
-
const sz = pngSize(
|
|
147580
|
+
const sz = pngSize(readFileSync82(join68(d2, png)));
|
|
147358
147581
|
if (sz) out2.push({ name: `${deviceDir}/${png}`, w: sz.w, h: sz.h });
|
|
147359
147582
|
}
|
|
147360
147583
|
}
|
|
@@ -147368,7 +147591,7 @@ function placeholderHashes2() {
|
|
|
147368
147591
|
const p2 = join68(templateIos, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
|
|
147369
147592
|
try {
|
|
147370
147593
|
if (!statSync18(p2).isFile()) continue;
|
|
147371
|
-
return [LEGACY_PLACEHOLDER_SHA2562, createHash34("sha256").update(
|
|
147594
|
+
return [LEGACY_PLACEHOLDER_SHA2562, createHash34("sha256").update(readFileSync82(p2)).digest("hex")];
|
|
147372
147595
|
} catch {
|
|
147373
147596
|
}
|
|
147374
147597
|
}
|
|
@@ -147404,7 +147627,7 @@ async function appIconState(iosDir) {
|
|
|
147404
147627
|
const p2 = join68(iosDir, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
|
|
147405
147628
|
try {
|
|
147406
147629
|
if (!statSync18(p2).isFile()) continue;
|
|
147407
|
-
const bytes2 =
|
|
147630
|
+
const bytes2 = readFileSync82(p2);
|
|
147408
147631
|
const hash = createHash34("sha256").update(bytes2).digest("hex");
|
|
147409
147632
|
const pixels = await pixelIssues(bytes2);
|
|
147410
147633
|
return {
|
|
@@ -147465,92 +147688,6 @@ var init_preflight_app = __esm({
|
|
|
147465
147688
|
}
|
|
147466
147689
|
});
|
|
147467
147690
|
|
|
147468
|
-
// ../store-release/version.ts
|
|
147469
|
-
var version_exports = {};
|
|
147470
|
-
__export(version_exports, {
|
|
147471
|
-
bumpVersion: () => bumpVersion,
|
|
147472
|
-
readAndroidVersion: () => readAndroidVersion,
|
|
147473
|
-
readAndroidVersionName: () => readAndroidVersionName,
|
|
147474
|
-
readIosMarketingVersion: () => readIosMarketingVersion,
|
|
147475
|
-
readIosVersion: () => readIosVersion,
|
|
147476
|
-
setAndroidVersion: () => setAndroidVersion,
|
|
147477
|
-
setIosVersion: () => setIosVersion
|
|
147478
|
-
});
|
|
147479
|
-
import { readFileSync as readFileSync82, writeFileSync as writeFileSync27 } from "node:fs";
|
|
147480
|
-
function readIosVersion(projectYml) {
|
|
147481
|
-
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
147482
|
-
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
147483
|
-
if (marketing === null || build3 === null) {
|
|
147484
|
-
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
147485
|
-
}
|
|
147486
|
-
return { marketing, build: Number(build3) };
|
|
147487
|
-
}
|
|
147488
|
-
function setIosVersion(projectYml, v2) {
|
|
147489
|
-
let out2 = replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing);
|
|
147490
|
-
out2 = replaceScalar(out2, "CFBundleVersion", String(v2.build));
|
|
147491
|
-
out2 = out2.replace(
|
|
147492
|
-
/(^[ \t]*# >>> himalaya:live-activity:target[^\n]*\n)([\s\S]*?)(^[ \t]*# <<< himalaya:live-activity:target[^\n]*$)/m,
|
|
147493
|
-
(_match, start, body, end) => {
|
|
147494
|
-
if (!body.trim()) return start + body + end;
|
|
147495
|
-
return start + replaceScalar(replaceScalar(body, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", String(v2.build)) + end;
|
|
147496
|
-
}
|
|
147497
|
-
);
|
|
147498
|
-
return out2;
|
|
147499
|
-
}
|
|
147500
|
-
function readIosMarketingVersion(projectYml) {
|
|
147501
|
-
return matchScalar(projectYml, "CFBundleShortVersionString");
|
|
147502
|
-
}
|
|
147503
|
-
function scalarRe(key2) {
|
|
147504
|
-
return new RegExp(`^(\\s*${key2}:\\s*)("?)([^"\\n#]*?)("?)(\\s*(?:#.*)?)$`, "m");
|
|
147505
|
-
}
|
|
147506
|
-
function matchScalar(content, key2) {
|
|
147507
|
-
const m2 = scalarRe(key2).exec(content);
|
|
147508
|
-
return m2 ? m2[3].trim() : null;
|
|
147509
|
-
}
|
|
147510
|
-
function replaceScalar(content, key2, value) {
|
|
147511
|
-
const re2 = scalarRe(key2);
|
|
147512
|
-
if (!re2.test(content)) throw new Error(`could not locate \`${key2}:\` in project.yml`);
|
|
147513
|
-
return content.replace(re2, (_full, pre, openQ, _oldVal, _closeQ, tail) => {
|
|
147514
|
-
const q2 = openQ ? '"' : "";
|
|
147515
|
-
return `${pre}${q2}${value}${q2}${tail}`;
|
|
147516
|
-
});
|
|
147517
|
-
}
|
|
147518
|
-
function readAndroidVersion(gradle) {
|
|
147519
|
-
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
147520
|
-
const code = /(\bversionCode\s*=\s*)(\d+)/.exec(gradle);
|
|
147521
|
-
if (!name || !code) throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
147522
|
-
return { marketing: name[2], build: Number(code[2]) };
|
|
147523
|
-
}
|
|
147524
|
-
function readAndroidVersionName(gradle) {
|
|
147525
|
-
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
147526
|
-
return name ? name[2] : null;
|
|
147527
|
-
}
|
|
147528
|
-
function setAndroidVersion(gradle, v2) {
|
|
147529
|
-
if (!/\bversionName\s*=\s*"/.test(gradle) || !/\bversionCode\s*=\s*\d+/.test(gradle)) {
|
|
147530
|
-
throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
147531
|
-
}
|
|
147532
|
-
return gradle.replace(/(\bversionName\s*=\s*")[^"]*(")/, `$1${v2.marketing}$2`).replace(/(\bversionCode\s*=\s*)\d+/, `$1${v2.build}`);
|
|
147533
|
-
}
|
|
147534
|
-
function bumpVersion(app, opts) {
|
|
147535
|
-
const iosPath = iosProjectYml(app);
|
|
147536
|
-
const gradlePath = androidGradle(app);
|
|
147537
|
-
const iosYml = readFileSync82(iosPath, "utf8");
|
|
147538
|
-
const gradle = readFileSync82(gradlePath, "utf8");
|
|
147539
|
-
const current = readIosVersion(iosYml);
|
|
147540
|
-
const next = {
|
|
147541
|
-
marketing: opts.marketing ?? current.marketing,
|
|
147542
|
-
build: opts.build === "increment" || opts.build === void 0 ? current.build + (opts.build === "increment" ? 1 : 0) : opts.build
|
|
147543
|
-
};
|
|
147544
|
-
writeFileSync27(iosPath, setIosVersion(iosYml, next));
|
|
147545
|
-
writeFileSync27(gradlePath, setAndroidVersion(gradle, next));
|
|
147546
|
-
return next;
|
|
147547
|
-
}
|
|
147548
|
-
var init_version = __esm({
|
|
147549
|
-
"../store-release/version.ts"() {
|
|
147550
|
-
init_paths2();
|
|
147551
|
-
}
|
|
147552
|
-
});
|
|
147553
|
-
|
|
147554
147691
|
// ../store-release/asc-status.ts
|
|
147555
147692
|
var asc_status_exports = {};
|
|
147556
147693
|
__export(asc_status_exports, {
|
|
@@ -151706,9 +151843,9 @@ function routesFromBundle(js2) {
|
|
|
151706
151843
|
const code = codeMask(js2);
|
|
151707
151844
|
for (const m2 of js2.matchAll(/\bpath\s*:\s*["'`](\/[A-Za-z0-9_\-/:.*]*|\*)["'`]/g)) {
|
|
151708
151845
|
if (!code[m2.index]) continue;
|
|
151709
|
-
const
|
|
151846
|
+
const own4 = enclosingObject(js2, m2.index, code);
|
|
151710
151847
|
const before = js2.slice(Math.max(0, m2.index - 80), m2.index);
|
|
151711
|
-
if (!(
|
|
151848
|
+
if (!(own4 && ROUTE_KEY.test(own4)) && !NAV_LABEL_BEFORE.test(before)) continue;
|
|
151712
151849
|
out2.add(m2[1]);
|
|
151713
151850
|
if (out2.size >= MAX_ROUTES) break;
|
|
151714
151851
|
}
|
|
@@ -157022,8 +157159,8 @@ function catalogTypography(overlay, template) {
|
|
|
157022
157159
|
return { typography, notes };
|
|
157023
157160
|
}
|
|
157024
157161
|
function staticFaqFor(overlay, overlayPath) {
|
|
157025
|
-
const
|
|
157026
|
-
if (
|
|
157162
|
+
const own4 = overlay.faq;
|
|
157163
|
+
if (own4 !== void 0) return deriveStaticFaq(own4);
|
|
157027
157164
|
const bookPath = join74(dirname39(resolve54(overlayPath)), "book.json");
|
|
157028
157165
|
if (!existsSync71(bookPath)) return void 0;
|
|
157029
157166
|
try {
|
|
@@ -164682,8 +164819,8 @@ ${doNow.map((l2) => ` ${l2}`).join("\n")}`);
|
|
|
164682
164819
|
const dir = contentDir(flags);
|
|
164683
164820
|
try {
|
|
164684
164821
|
const spec = keepFromSpec2(dir, str9(flags["from-spec"]) ?? join75(dir, "SPEC.md"));
|
|
164685
|
-
const
|
|
164686
|
-
keep = [.../* @__PURE__ */ new Set([...spec.keep, ...
|
|
164822
|
+
const own4 = typeof keep === "string" ? keep.split(",").map((k2) => k2.trim()).filter(Boolean) : [];
|
|
164823
|
+
keep = [.../* @__PURE__ */ new Set([...spec.keep, ...own4])].join(",");
|
|
164687
164824
|
fromSpec = { fromSpec: {
|
|
164688
164825
|
keep: spec.keep,
|
|
164689
164826
|
specOnly: spec.specOnly,
|
|
@@ -168773,10 +168910,10 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
168773
168910
|
const dir = contentDir(flags);
|
|
168774
168911
|
if (!existsSync74(join75(dir, "himalaya.content.json"))) return;
|
|
168775
168912
|
const { lastDistFromJob: lastDistFromJob2, writeLastDist: writeLastDist2 } = await Promise.resolve().then(() => (init_capabilities(), capabilities_exports));
|
|
168776
|
-
const
|
|
168913
|
+
const own4 = await appId(dir);
|
|
168777
168914
|
for (const job of jobs2) {
|
|
168778
168915
|
const rec = lastDistFromJob2(job);
|
|
168779
|
-
if (!rec || rec.app !==
|
|
168916
|
+
if (!rec || rec.app !== own4) continue;
|
|
168780
168917
|
await writeLastDist2(dir, rec);
|
|
168781
168918
|
}
|
|
168782
168919
|
} catch {
|