@legendapp/spark 0.0.4 → 0.0.6
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/package.json +4 -4
- package/skills/spark/UPGRADING.md +105 -0
- package/skills/spark/storage-settings.md +2 -28
- package/skills/spark/ui.md +27 -1
- package/vendor/node_modules/@legendapp/spark-ai/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-audio/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-auth-session/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +47 -25
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-desktop-template-bare-minimum-55.83.10.tgz +0 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package.js +4 -8
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +5 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/publish-directory.js +40 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release-app.js +139 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +21 -21
- package/vendor/node_modules/@legendapp/spark-cli/dist/signing.js +61 -41
- package/vendor/node_modules/@legendapp/spark-cli/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-clipboard/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-codex/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-commands/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.h +2 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.mm +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +1 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.cjs +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.cjs +15 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-desktop-config/rpaths.cjs +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/rpaths.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/AppDelegate.mm +16 -5
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-documents/package.json +7 -7
- package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-expo-compat/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-html/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-markdown/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-notifications/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-processes/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-rich-text/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-settings/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-settings-ui/src/heading.tsx +14 -0
- package/vendor/node_modules/@legendapp/spark-settings-ui/src/index.tsx +132 -332
- package/vendor/node_modules/@legendapp/spark-settings-ui/src/rows.tsx +185 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-system/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-tray/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSegmentedControl.mm +29 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSelect.mm +17 -1
- package/vendor/node_modules/@legendapp/spark-ui/macos/sidebar/RNSidebar.mm +20 -0
- package/vendor/node_modules/@legendapp/spark-ui/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-ui/src/availability.ts +2 -1
- package/vendor/node_modules/@legendapp/spark-ui/src/control.ts +1 -1
- package/vendor/node_modules/@legendapp/spark-ui/src/desktop.tsx +15 -12
- package/vendor/node_modules/@legendapp/spark-ui/src/index.android.tsx +7 -6
- package/vendor/node_modules/@legendapp/spark-ui/src/index.ios.tsx +10 -9
- package/vendor/node_modules/@legendapp/spark-ui/src/index.web.tsx +6 -4
- package/vendor/node_modules/@legendapp/spark-ui/src/native-select/NativeSegmentedControlNativeComponent.ts +2 -1
- package/vendor/node_modules/@legendapp/spark-ui/src/native-select/NativeSelectNativeComponent.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/select.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/switch.tsx +13 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/types.ts +16 -4
- package/vendor/node_modules/@legendapp/spark-updates/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-webview/package.json +2 -2
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +1 -1
- /package/{settings-window.ts → ui-settings.ts} +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync, realpathSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
export function checkReleasePayload(app, runner, info) {
|
|
4
|
+
const runtime = path.join(app, "Contents/Resources/spark-runtime.json");
|
|
5
|
+
if (!existsSync(runtime))
|
|
6
|
+
throw new Error("Distribution app is missing spark-runtime.json.");
|
|
7
|
+
if (!runner) {
|
|
8
|
+
const bundle = path.join(app, "Contents/Resources/main.jsbundle");
|
|
9
|
+
if (!existsSync(bundle))
|
|
10
|
+
throw new Error("Distribution app is missing its JavaScript bundle.");
|
|
11
|
+
if (readFileSync(bundle).subarray(0, 8).toString("hex") !== "c61fbc03c103191f") {
|
|
12
|
+
throw new Error("The release main.jsbundle must contain Hermes bytecode.");
|
|
13
|
+
}
|
|
14
|
+
const ats = info.NSAppTransportSecurity;
|
|
15
|
+
if (ats?.NSAllowsLocalNetworking === true || ats?.NSAllowsArbitraryLoads === true) {
|
|
16
|
+
throw new Error("The release Info.plist allows local networking or arbitrary loads.");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
for (const entry of readdirSync(app, { recursive: true, withFileTypes: true })) {
|
|
20
|
+
if (/(?:^\.(?:git|DS_Store)$|^node_modules$|^__tests__$|\.(?:map|dSYM|o|a|p12|p8)$|^libclang_rt\..*\.dylib$)/i.test(entry.name) ||
|
|
21
|
+
(!runner && entry.name.endsWith(".debug.dylib"))) {
|
|
22
|
+
throw new Error(`Development artifact in the distribution app: ${path.relative(app, path.join(entry.parentPath, entry.name))}`);
|
|
23
|
+
}
|
|
24
|
+
if (entry.isFile() && /\.(?:mjs|cjs|js)$/.test(entry.name) &&
|
|
25
|
+
/(?:\/\/[#@]|\/\*[#@])\s*sourceMappingURL\s*=/.test(readFileSync(path.join(entry.parentPath, entry.name), "utf8"))) {
|
|
26
|
+
throw new Error(`Source map reference in the distribution app: ${path.relative(app, path.join(entry.parentPath, entry.name))}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function loadCommands(file, output) {
|
|
31
|
+
const images = output.split(/^Mach header$/m).slice(1).map(slice => {
|
|
32
|
+
const header = /^MH_\S+\s+(\S+)\s+\S+\s+\S+\s+(\S+)\s/m.exec(slice);
|
|
33
|
+
if (!header)
|
|
34
|
+
throw new Error(`Cannot read the Mach-O header in ${file}.`);
|
|
35
|
+
const image = { file, arch: header[1], type: header[2], rpaths: [], loads: [] };
|
|
36
|
+
for (const command of slice.split(/^Load command \d+$/m).slice(1)) {
|
|
37
|
+
const kind = /^\s*cmd (LC_\w+)$/m.exec(command)?.[1];
|
|
38
|
+
if (kind === "LC_DYLD_ENVIRONMENT")
|
|
39
|
+
throw new Error(`LC_DYLD_ENVIRONMENT in ${file}.`);
|
|
40
|
+
if (!kind || !/^LC_(?:RPATH|ID_DYLIB|LOAD_DYLINKER|(?:LOAD(?:_WEAK|_UPWARD)?|LAZY_LOAD|REEXPORT)_DYLIB)$/.test(kind))
|
|
41
|
+
continue;
|
|
42
|
+
const value = /^\s*(?:name|path) (.+) \(offset \d+\)$/m.exec(command)?.[1];
|
|
43
|
+
if (!value)
|
|
44
|
+
throw new Error(`Cannot read ${kind} in ${file}.`);
|
|
45
|
+
if (kind === "LC_RPATH")
|
|
46
|
+
image.rpaths.push(value);
|
|
47
|
+
else if (kind === "LC_ID_DYLIB")
|
|
48
|
+
image.id = value;
|
|
49
|
+
else
|
|
50
|
+
image.loads.push(value);
|
|
51
|
+
}
|
|
52
|
+
return image;
|
|
53
|
+
});
|
|
54
|
+
if (!images.length)
|
|
55
|
+
throw new Error(`Cannot read Mach-O load commands in ${file}.`);
|
|
56
|
+
return images;
|
|
57
|
+
}
|
|
58
|
+
const systemPath = (file) => /^\/(?:usr\/lib|System\/Library)(?:\/|$)/.test(file);
|
|
59
|
+
const cleanRpath = (value) => value.startsWith("@rpath/") && !value.split("/").includes("..");
|
|
60
|
+
export async function checkReleaseLoadPaths(root, app, main, files, execute) {
|
|
61
|
+
const byFile = new Map();
|
|
62
|
+
for (const file of files) {
|
|
63
|
+
byFile.set(file, loadCommands(file, await execute(root, ["otool", "-arch", "all", "-hv", "-l", file], { capture: true })));
|
|
64
|
+
}
|
|
65
|
+
const mainImages = byFile.get(realpathSync(main));
|
|
66
|
+
if (!mainImages?.every(image => image.type === "EXECUTE"))
|
|
67
|
+
throw new Error("Distribution app is missing its Mach-O executable.");
|
|
68
|
+
let sdk;
|
|
69
|
+
const visited = new Map();
|
|
70
|
+
const inside = (file) => file === app || file.startsWith(app + path.sep);
|
|
71
|
+
function expand(value, loader, executable) {
|
|
72
|
+
const token = /^@(loader_path|executable_path)(?:\/|$)/.exec(value);
|
|
73
|
+
if (token) {
|
|
74
|
+
const directory = path.dirname(token[1] === "loader_path" ? loader : executable);
|
|
75
|
+
const resolved = path.resolve(directory, value.slice(token[0].length));
|
|
76
|
+
if (inside(resolved))
|
|
77
|
+
return resolved;
|
|
78
|
+
}
|
|
79
|
+
else if (systemPath(value) && systemPath(path.normalize(value)))
|
|
80
|
+
return path.normalize(value);
|
|
81
|
+
}
|
|
82
|
+
async function inspect(image, loader, executable, inherited, ancestors = new Set()) {
|
|
83
|
+
if (ancestors.has(image))
|
|
84
|
+
return;
|
|
85
|
+
const rpaths = [...new Set([...image.rpaths.map(value => {
|
|
86
|
+
const expanded = expand(value, loader, executable);
|
|
87
|
+
if (!expanded)
|
|
88
|
+
throw new Error(`Invalid LC_RPATH ${value} in ${image.file}.`);
|
|
89
|
+
return expanded;
|
|
90
|
+
}), ...inherited])];
|
|
91
|
+
const context = JSON.stringify([loader, executable, rpaths]);
|
|
92
|
+
let contexts = visited.get(image);
|
|
93
|
+
if (contexts?.has(context))
|
|
94
|
+
return;
|
|
95
|
+
if (!contexts)
|
|
96
|
+
visited.set(image, contexts = new Set());
|
|
97
|
+
contexts.add(context);
|
|
98
|
+
if (image.id && !cleanRpath(image.id) && !expand(image.id, loader, executable)?.startsWith(app + path.sep)) {
|
|
99
|
+
throw new Error(`Invalid LC_ID_DYLIB ${image.id} in ${image.file}.`);
|
|
100
|
+
}
|
|
101
|
+
const chain = new Set([...ancestors, image]);
|
|
102
|
+
for (const load of image.loads) {
|
|
103
|
+
const expanded = expand(load, loader, executable);
|
|
104
|
+
if (expanded && systemPath(expanded))
|
|
105
|
+
continue;
|
|
106
|
+
const candidates = cleanRpath(load) ? rpaths.map(dir => path.join(dir, load.slice("@rpath/".length))) : expanded ? [expanded] : [];
|
|
107
|
+
let resolved = false;
|
|
108
|
+
for (const candidate of candidates) {
|
|
109
|
+
if (systemPath(candidate)) {
|
|
110
|
+
// Swift libraries may live in the dyld cache. The SDK stubs also keep this from accepting a missing bundled library.
|
|
111
|
+
sdk ??= (await execute(root, ["xcrun", "--sdk", "macosx", "--show-sdk-path"], { capture: true })).trim();
|
|
112
|
+
if (existsSync(candidate) || existsSync(path.join(sdk, candidate.replace(/\.dylib$/, ".tbd"))))
|
|
113
|
+
resolved = true;
|
|
114
|
+
}
|
|
115
|
+
else if (existsSync(candidate)) {
|
|
116
|
+
const dependency = byFile.get(realpathSync(candidate))?.find(other => other.arch === image.arch && other.type === "DYLIB");
|
|
117
|
+
if (dependency) {
|
|
118
|
+
await inspect(dependency, candidate, executable, rpaths, chain);
|
|
119
|
+
resolved = true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (resolved)
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
if (!resolved)
|
|
126
|
+
throw new Error(`Unresolved load path ${load} in ${image.file} (${image.arch}).`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const images = [...byFile.values()].flat();
|
|
130
|
+
for (const image of images.filter(image => image.type === "EXECUTE")) {
|
|
131
|
+
await inspect(image, image.file, image.file, []);
|
|
132
|
+
}
|
|
133
|
+
// Plug-ins and unused universal slices can still load in the main process's context.
|
|
134
|
+
for (const image of images.filter(image => !visited.has(image))) {
|
|
135
|
+
const host = mainImages.find(other => other.arch === image.arch) ?? mainImages[0];
|
|
136
|
+
const rpaths = host.rpaths.map(value => expand(value, main, main));
|
|
137
|
+
await inspect(image, image.file, main, rpaths);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"revision": "
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"revision": "f127c1d97f3b75f3382091f065ea4dc4d096f328",
|
|
5
5
|
"packages": {
|
|
6
6
|
"@react-native-runtimes/core": {
|
|
7
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
8
|
-
"size":
|
|
9
|
-
"sha256": "
|
|
7
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.6/runtimes-4df45cb5ea74.tgz",
|
|
8
|
+
"size": 54050,
|
|
9
|
+
"sha256": "3a04e0455ac44b0bc11cfa315943ad84509c445111a2b3974ca85c8ed489827c"
|
|
10
10
|
},
|
|
11
11
|
"react-native-nitro-modules": {
|
|
12
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
13
|
-
"size":
|
|
14
|
-
"sha256": "
|
|
12
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.6/react-native-nitro-modules-0.37.0-71ddf8c04084.tgz",
|
|
13
|
+
"size": 145595,
|
|
14
|
+
"sha256": "71ddf8c0408471b46db6dc32112586cc7a0bbb63c606721ef3be8fe3438dfb3c"
|
|
15
15
|
},
|
|
16
16
|
"@op-engineering/op-sqlite": {
|
|
17
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
18
|
-
"size":
|
|
19
|
-
"sha256": "
|
|
17
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.6/op-engineering-op-sqlite-18.2.1-afe4b8ce5706.tgz",
|
|
18
|
+
"size": 5847598,
|
|
19
|
+
"sha256": "afe4b8ce5706385af514319ba38076f2d768220e043cc706ace99d0d7adcacd8"
|
|
20
20
|
},
|
|
21
21
|
"react-native-webview": {
|
|
22
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
23
|
-
"size":
|
|
24
|
-
"sha256": "
|
|
22
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.6/react-native-webview-16.0.0-fb06fd26c218.tgz",
|
|
23
|
+
"size": 116275,
|
|
24
|
+
"sha256": "fb06fd26c2188cc9a67581e2a634de385818a7ca7f749226b172fdda561d36d6"
|
|
25
25
|
},
|
|
26
26
|
"expo-audio": {
|
|
27
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
28
|
-
"size":
|
|
29
|
-
"sha256": "
|
|
27
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.6/expo-audio-55.0.18-a8d70b5b39bd.tgz",
|
|
28
|
+
"size": 610139,
|
|
29
|
+
"sha256": "a8d70b5b39bd3b69d95528011f14aa93a0fdf7ff1e6c89e0f7489329230be060"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"runners": {
|
|
33
33
|
"macos-arm64": {
|
|
34
|
-
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.
|
|
35
|
-
"size":
|
|
36
|
-
"sha256": "
|
|
34
|
+
"url": "https://github.com/LegendApp/legend-spark/releases/download/v0.0.6/spark-runner-macos-arm64.zip",
|
|
35
|
+
"size": 13458273,
|
|
36
|
+
"sha256": "5a134d076c4fc13b5c03288f33d9eca847e793f9401d2b9ced79d4417c4e43c9",
|
|
37
37
|
"app": "SparkRunner.app",
|
|
38
38
|
"teamId": "56DD97VT22",
|
|
39
|
-
"fingerprint": "
|
|
39
|
+
"fingerprint": "51f179c1bcc7213b2801837d4decb093ff4bc4153d67f90f1b42b521cd48a1f2"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
2
|
import { readAppConfig } from "./project.js";
|
|
3
3
|
import { existsSync, openSync, closeSync, readSync, readdirSync, realpathSync, lstatSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -6,9 +6,11 @@ import { createRequire } from "node:module";
|
|
|
6
6
|
import { isDeepStrictEqual } from "node:util";
|
|
7
7
|
import { run } from "./commands.js";
|
|
8
8
|
import { digest, nativePackages, readJson, stateFile, writeJson } from "./project.js";
|
|
9
|
+
import { checkReleaseLoadPaths, checkReleasePayload } from "./release-app.js";
|
|
10
|
+
import { checkReleaseTestDriver } from "./release-driver.js";
|
|
9
11
|
const { resolveEntitlements } = createRequire(import.meta.url)("@legendapp/spark-desktop-config/entitlements.cjs");
|
|
10
12
|
export function distributionEntitlements(value) {
|
|
11
|
-
for (const key of ["com.apple.security.get-task-allow", "get-task-allow"]) {
|
|
13
|
+
for (const key of ["com.apple.security.get-task-allow", "get-task-allow", "com.apple.security.cs.disable-library-validation"]) {
|
|
12
14
|
if (value[key] !== undefined && value[key] !== false)
|
|
13
15
|
throw new Error(`${key} must be absent or false in a distribution app.`);
|
|
14
16
|
}
|
|
@@ -31,6 +33,19 @@ export function appEntitlements(root, modules) {
|
|
|
31
33
|
// release binary's module set, not whichever selection file was written last.
|
|
32
34
|
return resolveEntitlements(readAppConfig(root), selected.map((pkg) => pkg.json));
|
|
33
35
|
}
|
|
36
|
+
export function releaseAppExpectation(root, runtime, config, buildVersion) {
|
|
37
|
+
if (runtime.platform !== "macos" || !["release", "go"].includes(runtime.mode))
|
|
38
|
+
throw new Error("Expected a macOS release app or Spark Runner.");
|
|
39
|
+
const bundleId = config.macos?.bundleIdentifier, version = config.version;
|
|
40
|
+
if (!bundleId || !version || typeof buildVersion !== "string" || !buildVersion)
|
|
41
|
+
throw new Error("Bundle identifier and release version metadata must be configured before packaging.");
|
|
42
|
+
return {
|
|
43
|
+
runtime, bundleId, version, buildVersion,
|
|
44
|
+
entitlements: appEntitlements(root, runtime.modules),
|
|
45
|
+
byPath: config.extra?.spark?.signing?.macos?.entitlementsByPath ?? {},
|
|
46
|
+
testDriverInRelease: config.macos?.testDriverInRelease === true,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
34
49
|
function machOType(file) {
|
|
35
50
|
const fd = openSync(file, "r");
|
|
36
51
|
try {
|
|
@@ -87,8 +102,16 @@ export function signingOrder(app) {
|
|
|
87
102
|
return [...new Set([...code, ...containers])].sort((a, b) => b.split(path.sep).length - a.split(path.sep).length || a.localeCompare(b));
|
|
88
103
|
}
|
|
89
104
|
async function entitlementTargets(root, app, order, entitlements, byPath, execute) {
|
|
90
|
-
const targets = new Map(order.map(
|
|
91
|
-
targets.set(app, entitlements);
|
|
105
|
+
const targets = new Map(order.map(file => [file, {}]));
|
|
106
|
+
targets.set(app, distributionEntitlements(entitlements));
|
|
107
|
+
for (const [relative, value] of Object.entries(byPath)) {
|
|
108
|
+
const file = path.join(app, relative);
|
|
109
|
+
if (path.relative(app, file) !== relative || !targets.has(file) || file === app)
|
|
110
|
+
throw new Error(`Unknown nested signing target: ${relative}`);
|
|
111
|
+
if (!isProcessTarget(file) && Object.keys(value).length)
|
|
112
|
+
throw new Error(`Entitlements belong on executable processes, not libraries: ${relative}`);
|
|
113
|
+
targets.set(file, distributionEntitlements(value));
|
|
114
|
+
}
|
|
92
115
|
for (const container of order.filter((file) => /\.(app|xpc|appex)$/.test(file))) {
|
|
93
116
|
const plist = existsSync(path.join(container, "Contents/Info.plist")) ? path.join(container, "Contents/Info.plist") : path.join(container, "Info.plist");
|
|
94
117
|
const info = JSON.parse(await execute(root, ["plutil", "-convert", "json", "-o", "-", plist], { capture: true }));
|
|
@@ -105,70 +128,67 @@ async function entitlementTargets(root, app, order, entitlements, byPath, execut
|
|
|
105
128
|
}
|
|
106
129
|
return targets;
|
|
107
130
|
}
|
|
131
|
+
function isProcessTarget(file) {
|
|
132
|
+
return /\.(app|xpc|appex)$/.test(file) || (lstatSync(file).isFile() && machOType(file) === 2);
|
|
133
|
+
}
|
|
108
134
|
export async function signApp(root, app, credentials, entitlements, byPath = {}, execute = run) {
|
|
109
135
|
app = realpathSync(app);
|
|
110
|
-
distributionEntitlements(entitlements);
|
|
111
136
|
const order = signingOrder(app);
|
|
112
|
-
const relatives = new Set(order.map((file) => path.relative(app, file) || "."));
|
|
113
|
-
for (const [relative, value] of Object.entries(byPath)) {
|
|
114
|
-
if (!relatives.has(relative) || relative === ".")
|
|
115
|
-
throw new Error(`Unknown nested signing target: ${relative}`);
|
|
116
|
-
distributionEntitlements(value);
|
|
117
|
-
}
|
|
118
137
|
const targets = await entitlementTargets(root, app, order, entitlements, byPath, execute);
|
|
119
138
|
for (const file of order) {
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
139
|
+
const args = ["codesign", "--force", "--sign", credentials.hash, "--options", "runtime", "--timestamp"];
|
|
140
|
+
if (isProcessTarget(file)) {
|
|
141
|
+
const relative = path.relative(app, file) || ".";
|
|
142
|
+
const plist = stateFile(root, `packaging/entitlements/${digest(relative)}.plist`);
|
|
143
|
+
writeJson(plist, targets.get(file));
|
|
144
|
+
await execute(root, ["plutil", "-convert", "xml1", plist], { capture: true });
|
|
145
|
+
args.push("--entitlements", plist);
|
|
146
|
+
}
|
|
147
|
+
if (credentials.keychain)
|
|
148
|
+
args.push("--keychain", credentials.keychain);
|
|
149
|
+
await execute(root, [...args, file], { capture: true });
|
|
130
150
|
}
|
|
131
151
|
return order;
|
|
132
152
|
}
|
|
133
|
-
export async function validateApp(root, app,
|
|
153
|
+
export async function validateApp(root, app, identity, expected, notarized, execute = run) {
|
|
134
154
|
app = realpathSync(app);
|
|
135
|
-
if (expected.runner) {
|
|
136
|
-
const runtime = readJson(path.join(app, "Contents/Resources/spark-runtime.json"));
|
|
137
|
-
if (runtime.mode !== "go" || runtime.platform !== "macos" || runtime.arch !== expected.arch)
|
|
138
|
-
throw new Error("Distribution app is not a macOS Spark Runner.");
|
|
139
|
-
}
|
|
140
|
-
else if (!existsSync(path.join(app, "Contents/Resources/main.jsbundle")))
|
|
141
|
-
throw new Error("Distribution app is missing its JavaScript bundle.");
|
|
142
155
|
const info = JSON.parse(await execute(root, ["plutil", "-convert", "json", "-o", "-", path.join(app, "Contents/Info.plist")], { capture: true }));
|
|
156
|
+
checkReleasePayload(app, expected.runtime.mode === "go", info);
|
|
157
|
+
if (expected.runtime.mode === "release")
|
|
158
|
+
checkReleaseTestDriver(app, expected.testDriverInRelease);
|
|
159
|
+
const runtime = readJson(path.join(app, "Contents/Resources/spark-runtime.json"));
|
|
160
|
+
if (!isDeepStrictEqual(runtime, expected.runtime))
|
|
161
|
+
throw new Error("The packaged runtime receipt does not match the release build.");
|
|
143
162
|
for (const [key, value] of Object.entries({ CFBundleIdentifier: expected.bundleId, CFBundleShortVersionString: expected.version, CFBundleVersion: expected.buildVersion })) {
|
|
144
163
|
if (info[key] !== value)
|
|
145
164
|
throw new Error(`Packaged ${key} does not match the release build.`);
|
|
146
165
|
}
|
|
147
|
-
const
|
|
148
|
-
|
|
166
|
+
const executable = info.CFBundleExecutable;
|
|
167
|
+
if (info.CFBundlePackageType !== "APPL" || typeof executable !== "string" || !executable || path.basename(executable) !== executable)
|
|
168
|
+
throw new Error("Invalid app package type or executable name in Info.plist.");
|
|
169
|
+
const main = path.join(app, "Contents/MacOS", executable);
|
|
170
|
+
const arches = (await execute(root, ["lipo", "-archs", main], { capture: true })).trim().split(/\s+/);
|
|
171
|
+
const expectedArch = expected.runtime.arch === "x64" ? "x86_64" : "arm64";
|
|
149
172
|
if (arches.length !== 1 || arches[0] !== expectedArch)
|
|
150
173
|
throw new Error(`The package must contain a ${expectedArch} app.`);
|
|
151
|
-
|
|
174
|
+
// Apple TN3127's Developer ID Application requirement, independent of the certificate's display name.
|
|
175
|
+
const developerId = "anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists";
|
|
176
|
+
await execute(root, ["codesign", "--verify", "--deep", "--strict", "--verbose=2", "-R=" + developerId, app], { capture: true });
|
|
152
177
|
const order = signingOrder(app);
|
|
153
178
|
const targets = await entitlementTargets(root, app, order, expected.entitlements, expected.byPath, execute);
|
|
154
179
|
for (const file of order) {
|
|
155
180
|
const signature = await execute(root, ["codesign", "-dvvv", file], { capture: true });
|
|
156
|
-
if (!signature.includes(`Authority=${
|
|
181
|
+
if (!signature.includes(`Authority=${identity.name}\n`) || !signature.includes(`TeamIdentifier=${identity.teamId}\n`) || !/flags=.*\bruntime\b/.test(signature) || !/^Timestamp=/m.test(signature)) {
|
|
157
182
|
throw new Error(`Invalid Developer ID signature, hardened runtime, or timestamp: ${file}`);
|
|
158
183
|
}
|
|
159
|
-
const signedEntitlements = await execute(root, ["codesign", "-d", "--entitlements", "
|
|
160
|
-
// Inspect the final signature, not just the input entitlement file.
|
|
184
|
+
const signedEntitlements = await execute(root, ["codesign", "-d", "--entitlements", "-", "--xml", file], { capture: true });
|
|
161
185
|
const xml = signedEntitlements.match(/<\?xml[\s\S]*?<\/plist>|<plist[\s\S]*?<\/plist>/)?.[0];
|
|
162
|
-
|
|
163
|
-
if (xml) {
|
|
164
|
-
const plist = stateFile(root, "packaging/verified-entitlements.plist");
|
|
165
|
-
await writeFile(plist, xml);
|
|
166
|
-
actual = distributionEntitlements(JSON.parse(await execute(root, ["plutil", "-convert", "json", "-o", "-", plist], { capture: true })));
|
|
167
|
-
}
|
|
186
|
+
const actual = xml ? distributionEntitlements(JSON.parse(execFileSync("/usr/bin/plutil", ["-convert", "json", "-o", "-", "-"], { input: xml, encoding: "utf8" }))) : {};
|
|
168
187
|
const desired = targets.get(file);
|
|
169
188
|
if (!isDeepStrictEqual(actual, desired))
|
|
170
189
|
throw new Error(`Signed entitlements do not match the release configuration: ${file}`);
|
|
171
190
|
}
|
|
191
|
+
await checkReleaseLoadPaths(root, app, main, order.filter(file => lstatSync(file).isFile()), execute);
|
|
172
192
|
if (notarized) {
|
|
173
193
|
await execute(root, ["xcrun", "stapler", "validate", app], { capture: true });
|
|
174
194
|
await execute(root, ["spctl", "--assess", "--type", "execute", "--verbose=4", app], { capture: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
"node": ">=24.19.0"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@legendapp/spark-desktop-config": "0.0.
|
|
14
|
+
"@legendapp/spark-desktop-config": "0.0.6",
|
|
15
15
|
"ws": "8.21.0",
|
|
16
16
|
"expo-desktop": "1.0.6",
|
|
17
17
|
"npm": "11.21.1",
|
|
18
18
|
"typescript": "5.9.3",
|
|
19
19
|
"cross-spawn": "7.0.6",
|
|
20
|
-
"@legendapp/spark-window-options": "0.0.
|
|
20
|
+
"@legendapp/spark-window-options": "0.0.6",
|
|
21
21
|
"diff": "8.0.4",
|
|
22
22
|
"yaml": "2.9.1",
|
|
23
|
-
"@legendapp/spark-expo-compat": "0.0.
|
|
23
|
+
"@legendapp/spark-expo-compat": "0.0.6"
|
|
24
24
|
},
|
|
25
25
|
"private": true
|
|
26
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spark-template-blank-typescript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"postinstall": "node node_modules/@legendapp/spark/init-template.cjs"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@legendapp/spark": "0.0.
|
|
16
|
+
"@legendapp/spark": "0.0.6",
|
|
17
17
|
"expo": "55.0.32",
|
|
18
18
|
"expo-desktop": "1.0.6",
|
|
19
19
|
"expo-desktop-prebuild-config": "1.1.3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spark-template-universal",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react-native-web": "0.21.0",
|
|
42
42
|
"uniwind": "1.6.3",
|
|
43
43
|
"tailwindcss": "4.2.4",
|
|
44
|
-
"@legendapp/spark": "0.0.
|
|
44
|
+
"@legendapp/spark": "0.0.6"
|
|
45
45
|
},
|
|
46
46
|
"overrides": {
|
|
47
47
|
"expo": "55.0.32",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spark-template-windows",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-native-windows": "0.83.2",
|
|
29
29
|
"expo-desktop-modules-core": "55.0.2",
|
|
30
30
|
"expo-desktop-stubs": "55.0.2",
|
|
31
|
-
"@legendapp/spark": "0.0.
|
|
31
|
+
"@legendapp/spark": "0.0.6"
|
|
32
32
|
},
|
|
33
33
|
"overrides": {
|
|
34
34
|
"expo": "55.0.32",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-clipboard",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
37
|
+
"@legendapp/spark-desktop-app": "0.0.6"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
|
40
40
|
"expo-clipboard": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-codex",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
13
|
+
"@legendapp/spark-desktop-app": "0.0.6",
|
|
14
14
|
"react-native-nitro-modules": "0.37.0"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-commands",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.tsx",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"src"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@legendapp/spark-ui": "0.0.
|
|
12
|
-
"@legendapp/spark-desktop-shortcuts": "0.0.
|
|
13
|
-
"@legendapp/spark-settings": "0.0.
|
|
11
|
+
"@legendapp/spark-ui": "0.0.6",
|
|
12
|
+
"@legendapp/spark-desktop-shortcuts": "0.0.6",
|
|
13
|
+
"@legendapp/spark-settings": "0.0.6",
|
|
14
14
|
"@legendapp/state": "^3.0.0-beta.42",
|
|
15
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
15
|
+
"@legendapp/spark-desktop-app": "0.0.6"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": "^19.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-context-menu",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
37
|
+
"@legendapp/spark-desktop-app": "0.0.6"
|
|
38
38
|
},
|
|
39
39
|
"private": true
|
|
40
40
|
}
|
|
@@ -21,6 +21,7 @@ static inline BOOL SparkTestDriverStart(void)
|
|
|
21
21
|
}
|
|
22
22
|
static inline BOOL SparkTestDriverActive(void) { return NO; }
|
|
23
23
|
static inline void SparkTestDriverDidMount(void) {}
|
|
24
|
+
static inline void SparkTestDriverDidReload(void) {}
|
|
24
25
|
static inline BOOL SparkTestDriverEnding(void) { return NO; }
|
|
25
26
|
#else
|
|
26
27
|
|
|
@@ -30,6 +31,7 @@ FOUNDATION_EXPORT BOOL SparkTestDriverStart(void);
|
|
|
30
31
|
FOUNDATION_EXPORT BOOL SparkTestDriverActive(void);
|
|
31
32
|
// The host reports each mounted UI transaction; captures wait until mounts settle.
|
|
32
33
|
FOUNDATION_EXPORT void SparkTestDriverDidMount(void);
|
|
34
|
+
FOUNDATION_EXPORT void SparkTestDriverDidReload(void);
|
|
33
35
|
// YES once the runner's session has ended: that termination is teardown, not a user quit,
|
|
34
36
|
// so the host terminates without running the app's quit guards.
|
|
35
37
|
FOUNDATION_EXPORT BOOL SparkTestDriverEnding(void);
|
|
@@ -33,6 +33,7 @@ static void SparkDriverTerminate(void) { ending = YES; [NSApp terminate:nil]; }
|
|
|
33
33
|
BOOL SparkTestDriverActive(void) { return active; }
|
|
34
34
|
BOOL SparkTestDriverEnding(void) { return ending; }
|
|
35
35
|
void SparkTestDriverDidMount(void) { lastMount = CACurrentMediaTime(); }
|
|
36
|
+
void SparkTestDriverDidReload(void) { lastMount = 0; }
|
|
36
37
|
static NSArray<NSString *> *const SparkBuiltInCommands = @[@"ping", @"navigate", @"openFile", @"waitFor", @"setAppAppearance", @"capture", @"pointerEvents", @"restorePointer", @"quit"];
|
|
37
38
|
static NSMutableDictionary<NSString *, SparkTestDriverHandler> *SparkModuleCommands(void) {
|
|
38
39
|
static NSMutableDictionary *commands;
|
|
@@ -92,6 +92,7 @@ module.exports = function withSparkDesktop(config) {
|
|
|
92
92
|
paths: [mod.modRequest.projectRoot],
|
|
93
93
|
})))).replace(/#\{/g, "\\#{");
|
|
94
94
|
mod.modResults.contents = mod.modResults.contents.replaceAll('"#{config[:reactNativePath]}-macos"', macOSPath);
|
|
95
|
+
mod.modResults.contents = require("./rpaths.cjs").stripSwiftToolchainRunpath(mod.modResults.contents);
|
|
95
96
|
const selectionFile = statePath(mod.modRequest.projectRoot, "native-selection.json", "macos");
|
|
96
97
|
const { included, excluded } = fs.existsSync(selectionFile) ? JSON.parse(fs.readFileSync(selectionFile, "utf8")) : { included: [], excluded: [] };
|
|
97
98
|
mod.modResults.contents = require("./autolinking.cjs").excludeNativeModules(mod.modResults.contents, excluded);
|
|
@@ -385,4 +385,18 @@ function removeExpoApplicationAlias(rn, expo) {
|
|
|
385
385
|
fs.renameSync(temporary, file); // Preserve package-manager cache hardlinks.
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
|
|
388
|
+
function patchExpoComputerName(expo) {
|
|
389
|
+
const file = path.join(expo, "ios/Utilities/ConstantsProvider.swift");
|
|
390
|
+
if (!fs.existsSync(file)) return;
|
|
391
|
+
const source = fs.readFileSync(file, "utf8");
|
|
392
|
+
const lookup = "#elseif os(macOS)\n return ProcessInfo.processInfo.hostName";
|
|
393
|
+
if (!source.includes(lookup)) return;
|
|
394
|
+
const patched = source
|
|
395
|
+
.replace("internal final class ConstantsProvider", "#if os(macOS)\nimport SystemConfiguration\n#endif\n\ninternal final class ConstantsProvider")
|
|
396
|
+
.replace(lookup, '#elseif os(macOS)\n return SCDynamicStoreCopyComputerName(nil, nil) as String? ?? ""');
|
|
397
|
+
const temporary = `${file}.spark-${process.pid}.tmp`;
|
|
398
|
+
fs.writeFileSync(temporary, patched);
|
|
399
|
+
fs.renameSync(temporary, file);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
module.exports = { appPatchIssues, prepareNativePatches, removeExpoApplicationAlias, patchExpoComputerName, appPatches, layerPatches, resolveManifest, withoutReceipt };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export function prepareNativePatches(root: string, installed?: { name: string; root: string; json: any }[]): Record<string, { root: string }>;
|
|
2
2
|
export function removeExpoApplicationAlias(reactNativeMacOSRoot: string, expoModulesCoreRoot: string): void;
|
|
3
|
+
export function patchExpoComputerName(expoModulesCoreRoot: string): void;
|
|
3
4
|
export type AppPatch = { version?: string; file: string; thirdParty: boolean; error?: string; bytes: Buffer };
|
|
4
5
|
export function appPatches(root: string, app: any): Record<string, AppPatch>;
|
|
5
6
|
export type PatchLayer = { text: string; applied?: string; apply: boolean; error(relative: string): string } | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-desktop-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "app.plugin.cjs",
|
|
6
6
|
"files": [
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"expo-desktop-config-plugins": "1.3.2",
|
|
14
|
-
"@legendapp/spark-desktop-host": "0.0.
|
|
15
|
-
"@legendapp/spark-window-options": "0.0.
|
|
14
|
+
"@legendapp/spark-desktop-host": "0.0.6",
|
|
15
|
+
"@legendapp/spark-window-options": "0.0.6",
|
|
16
16
|
"@expo/config-plugins": "55.0.12",
|
|
17
17
|
"diff": "8.0.4"
|
|
18
18
|
},
|