sparkling-app-cli 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +48 -0
- package/bin.js +16 -0
- package/dist/commands/autolink.d.ts +8 -0
- package/dist/commands/autolink.d.ts.map +1 -0
- package/dist/commands/autolink.js +611 -0
- package/dist/commands/autolink.js.map +1 -0
- package/dist/commands/build.d.ts +7 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +59 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/copy-assets.d.ts +8 -0
- package/dist/commands/copy-assets.d.ts.map +1 -0
- package/dist/commands/copy-assets.js +38 -0
- package/dist/commands/copy-assets.js.map +1 -0
- package/dist/commands/doctor/checks.d.ts +9 -0
- package/dist/commands/doctor/checks.d.ts.map +1 -0
- package/dist/commands/doctor/checks.js +368 -0
- package/dist/commands/doctor/checks.js.map +1 -0
- package/dist/commands/doctor/index.d.ts +5 -0
- package/dist/commands/doctor/index.d.ts.map +1 -0
- package/dist/commands/doctor/index.js +131 -0
- package/dist/commands/doctor/index.js.map +1 -0
- package/dist/commands/doctor/types.d.ts +18 -0
- package/dist/commands/doctor/types.d.ts.map +1 -0
- package/dist/commands/doctor/types.js +6 -0
- package/dist/commands/doctor/types.js.map +1 -0
- package/dist/commands/run-android.d.ts +6 -0
- package/dist/commands/run-android.d.ts.map +1 -0
- package/dist/commands/run-android.js +93 -0
- package/dist/commands/run-android.js.map +1 -0
- package/dist/commands/run-ios.d.ts +8 -0
- package/dist/commands/run-ios.d.ts.map +1 -0
- package/dist/commands/run-ios.js +240 -0
- package/dist/commands/run-ios.js.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +155 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +122 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/exec.d.ts +7 -0
- package/dist/utils/exec.d.ts.map +1 -0
- package/dist/utils/exec.js +36 -0
- package/dist/utils/exec.js.map +1 -0
- package/dist/utils/paths.d.ts +22 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +54 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/ui.d.ts +12 -0
- package/dist/utils/ui.d.ts.map +1 -0
- package/dist/utils/ui.js +81 -0
- package/dist/utils/ui.js.map +1 -0
- package/dist/utils/verbose.d.ts +4 -0
- package/dist/utils/verbose.d.ts.map +1 -0
- package/dist/utils/verbose.js +25 -0
- package/dist/utils/verbose.js.map +1 -0
- package/package.json +44 -0
package/dist/config.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.loadAppConfig = loadAppConfig;
|
|
7
|
+
/// <reference types="node" />
|
|
8
|
+
// Copyright (c) 2025 TikTok Pte. Ltd.
|
|
9
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
10
|
+
// LICENSE file in the root directory of this source tree.
|
|
11
|
+
const fs_1 = __importDefault(require("fs"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const child_process_1 = require("child_process");
|
|
14
|
+
const url_1 = require("url");
|
|
15
|
+
const module_1 = require("module");
|
|
16
|
+
let registeredTsNode = false;
|
|
17
|
+
const pkgRequire = (0, module_1.createRequire)(__filename);
|
|
18
|
+
function isEsmProject(cwd) {
|
|
19
|
+
try {
|
|
20
|
+
let dir = cwd;
|
|
21
|
+
while (true) {
|
|
22
|
+
const pkg = path_1.default.join(dir, 'package.json');
|
|
23
|
+
if (fs_1.default.existsSync(pkg)) {
|
|
24
|
+
const json = JSON.parse(fs_1.default.readFileSync(pkg, 'utf8'));
|
|
25
|
+
return json?.type === 'module';
|
|
26
|
+
}
|
|
27
|
+
const parent = path_1.default.dirname(dir);
|
|
28
|
+
if (parent === dir)
|
|
29
|
+
break;
|
|
30
|
+
dir = parent;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// ignore, assume CJS
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
function ensureTsNodeRegistered() {
|
|
39
|
+
if (registeredTsNode) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
43
|
+
const tsNode = pkgRequire('ts-node');
|
|
44
|
+
tsNode.register({
|
|
45
|
+
transpileOnly: true,
|
|
46
|
+
compilerOptions: {
|
|
47
|
+
module: 'commonjs',
|
|
48
|
+
moduleResolution: 'node',
|
|
49
|
+
esModuleInterop: true,
|
|
50
|
+
jsx: 'react-jsx',
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
registeredTsNode = true;
|
|
54
|
+
}
|
|
55
|
+
async function loadAppConfig(cwd, configFile = 'app.config.ts') {
|
|
56
|
+
const configPath = path_1.default.resolve(cwd, configFile);
|
|
57
|
+
if (!fs_1.default.existsSync(configPath)) {
|
|
58
|
+
throw new Error(`App config not found at ${configPath}`);
|
|
59
|
+
}
|
|
60
|
+
// If the project is ESM, jump straight to the ESM loader path.
|
|
61
|
+
if (isEsmProject(cwd)) {
|
|
62
|
+
return loadAppConfigViaEsm(cwd, configPath);
|
|
63
|
+
}
|
|
64
|
+
let loaderPath = configPath;
|
|
65
|
+
if (path_1.default.extname(configPath) === '.ts') {
|
|
66
|
+
// Create a temporary CommonJS wrapper to load the TS config reliably even in ESM packages
|
|
67
|
+
const tempDir = path_1.default.resolve(cwd, '.sparkling');
|
|
68
|
+
fs_1.default.mkdirSync(tempDir, { recursive: true });
|
|
69
|
+
loaderPath = path_1.default.join(tempDir, 'app.config.cjs');
|
|
70
|
+
const escaped = path_1.default.resolve(configPath);
|
|
71
|
+
const content = [
|
|
72
|
+
'const { register } = require("ts-node");',
|
|
73
|
+
'register({',
|
|
74
|
+
' transpileOnly: true,',
|
|
75
|
+
' compilerOptions: {',
|
|
76
|
+
" module: 'commonjs',",
|
|
77
|
+
" moduleResolution: 'node',",
|
|
78
|
+
' esModuleInterop: true,',
|
|
79
|
+
" jsx: 'react-jsx',",
|
|
80
|
+
' },',
|
|
81
|
+
'});',
|
|
82
|
+
`const mod = require(${JSON.stringify(escaped)});`,
|
|
83
|
+
'module.exports = mod.default ?? mod;',
|
|
84
|
+
].join('\n');
|
|
85
|
+
fs_1.default.writeFileSync(loaderPath, content);
|
|
86
|
+
}
|
|
87
|
+
// Try CommonJS require first; if the project is ESM, fall back to an ESM loader
|
|
88
|
+
try {
|
|
89
|
+
ensureTsNodeRegistered();
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
91
|
+
const mod = require(loaderPath);
|
|
92
|
+
const config = (mod.default ?? mod);
|
|
93
|
+
if (!config || !config.lynxConfig) {
|
|
94
|
+
throw new Error(`Invalid AppConfig in ${configPath}: missing lynxConfig`);
|
|
95
|
+
}
|
|
96
|
+
return { config, configPath };
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
// Fallback to ESM loader
|
|
100
|
+
return loadAppConfigViaEsm(cwd, configPath, err);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function loadAppConfigViaEsm(cwd, configPath, originalError) {
|
|
104
|
+
const tempDir = path_1.default.resolve(cwd, '.sparkling');
|
|
105
|
+
fs_1.default.mkdirSync(tempDir, { recursive: true });
|
|
106
|
+
const readerScript = path_1.default.join(tempDir, 'read-app-config.mjs');
|
|
107
|
+
const fileUrl = (0, url_1.pathToFileURL)(configPath).href;
|
|
108
|
+
const script = [
|
|
109
|
+
`const url = ${JSON.stringify(fileUrl)};`,
|
|
110
|
+
'const mod = await import(url);',
|
|
111
|
+
'const cfg = (mod.default ?? mod);',
|
|
112
|
+
'const out = { lynxConfig: cfg.lynxConfig ?? {}, platform: cfg.platform ?? {}, paths: cfg.paths ?? {}, appName: cfg.appName };',
|
|
113
|
+
'process.stdout.write(JSON.stringify(out));',
|
|
114
|
+
].join('\n');
|
|
115
|
+
fs_1.default.writeFileSync(readerScript, script);
|
|
116
|
+
// Resolve ts-node/esm loader relative to this package to avoid relying on the app's node_modules
|
|
117
|
+
const esmReq = pkgRequire;
|
|
118
|
+
let esmLoader = 'ts-node/esm';
|
|
119
|
+
try {
|
|
120
|
+
esmLoader = esmReq.resolve('ts-node/esm');
|
|
121
|
+
}
|
|
122
|
+
catch { }
|
|
123
|
+
const res = (0, child_process_1.spawnSync)('node', ['--loader', esmLoader, readerScript], {
|
|
124
|
+
cwd,
|
|
125
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
126
|
+
env: process.env,
|
|
127
|
+
});
|
|
128
|
+
if (res.status !== 0) {
|
|
129
|
+
const stderr = res.stderr?.toString('utf8') ?? '';
|
|
130
|
+
const stdout = res.stdout?.toString('utf8') ?? '';
|
|
131
|
+
const message = [stderr.trim(), stdout.trim(), originalError ? String(originalError) : '']
|
|
132
|
+
.filter(Boolean)
|
|
133
|
+
.join('\n');
|
|
134
|
+
throw new Error(`Failed to load app config via ESM: ${message}`);
|
|
135
|
+
}
|
|
136
|
+
const raw = res.stdout?.toString('utf8') || '{}';
|
|
137
|
+
let parsed;
|
|
138
|
+
try {
|
|
139
|
+
parsed = JSON.parse(raw);
|
|
140
|
+
}
|
|
141
|
+
catch (jsonErr) {
|
|
142
|
+
throw new Error(`Failed to parse app config JSON: ${String(jsonErr)}\nRaw: ${raw}`);
|
|
143
|
+
}
|
|
144
|
+
if (!parsed || typeof parsed !== 'object') {
|
|
145
|
+
throw new Error('Invalid app config structure: expected an object');
|
|
146
|
+
}
|
|
147
|
+
const config = {
|
|
148
|
+
...parsed,
|
|
149
|
+
};
|
|
150
|
+
if (!config.lynxConfig || typeof config.lynxConfig !== 'object') {
|
|
151
|
+
config.lynxConfig = {};
|
|
152
|
+
}
|
|
153
|
+
return { config: config, configPath };
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;AAqDA,sCAiDC;AAtGD,8BAA8B;AAC9B,sCAAsC;AACtC,yEAAyE;AACzE,0DAA0D;AAC1D,4CAAoB;AACpB,gDAAwB;AACxB,iDAA0C;AAC1C,6BAAoC;AACpC,mCAAuC;AAIvC,IAAI,gBAAgB,GAAG,KAAK,CAAC;AAC7B,MAAM,UAAU,GAAG,IAAA,sBAAa,EAAC,UAAU,CAAC,CAAC;AAE7C,SAAS,YAAY,CAAC,GAAW;IAC/B,IAAI,CAAC;QACH,IAAI,GAAG,GAAG,GAAG,CAAC;QACd,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,GAAG,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;YAC3C,IAAI,YAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;gBACtD,OAAO,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC;YACjC,CAAC;YACD,MAAM,MAAM,GAAG,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACjC,IAAI,MAAM,KAAK,GAAG;gBAAE,MAAM;YAC1B,GAAG,GAAG,MAAM,CAAC;QACf,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,qBAAqB;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AAC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,CAAC;IACnE,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;IACjD,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,OAAO,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,oCAAoC,MAAM,CAAC,OAAO,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;IACtF,CAAC;IAED,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IAED,MAAM,MAAM,GAAuB;QACjC,GAAI,MAAkC;KACvC,CAAC;IAEF,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QAChE,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,MAAmB,EAAE,UAAU,EAAE,CAAC;AACrD,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAmHzC,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
// Copyright (c) 2025 TikTok Pte. Ltd.
|
|
5
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const autolink_1 = require("./commands/autolink");
|
|
9
|
+
const build_1 = require("./commands/build");
|
|
10
|
+
const copy_assets_1 = require("./commands/copy-assets");
|
|
11
|
+
const doctor_1 = require("./commands/doctor");
|
|
12
|
+
const run_android_1 = require("./commands/run-android");
|
|
13
|
+
const run_ios_1 = require("./commands/run-ios");
|
|
14
|
+
const ui_1 = require("./utils/ui");
|
|
15
|
+
const verbose_1 = require("./utils/verbose");
|
|
16
|
+
const program = new commander_1.Command();
|
|
17
|
+
program.name('sparkling-cli').description('Sparkling workspace helper CLI');
|
|
18
|
+
program.option('-v, --verbose', 'Enable verbose logging for debugging');
|
|
19
|
+
program.hook('preAction', (thisCommand) => {
|
|
20
|
+
const opts = thisCommand.optsWithGlobals();
|
|
21
|
+
(0, verbose_1.enableVerboseLogging)(opts.verbose);
|
|
22
|
+
if ((0, verbose_1.isVerboseEnabled)()) {
|
|
23
|
+
(0, verbose_1.verboseLog)('Verbose logging enabled');
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* Resolve skipCopy option from --copy and --skip-copy flags
|
|
28
|
+
* @param opts Command options
|
|
29
|
+
* @returns Whether to skip copying
|
|
30
|
+
*/
|
|
31
|
+
function resolveSkipCopy(opts) {
|
|
32
|
+
// If --copy is explicitly set, don't skip
|
|
33
|
+
if (opts.copy)
|
|
34
|
+
return false;
|
|
35
|
+
// If --skip-copy is explicitly set, skip
|
|
36
|
+
if (opts.skipCopy)
|
|
37
|
+
return true;
|
|
38
|
+
// Default: skip copy (recommended for development)
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
program
|
|
42
|
+
.command('build')
|
|
43
|
+
.description('Build Lynx bundle using app.config.ts (no-copy by default)')
|
|
44
|
+
.option('--config <path>', 'Path to app.config.ts', 'app.config.ts')
|
|
45
|
+
.option('--copy', 'Copy assets to native shells')
|
|
46
|
+
.option('--skip-copy', 'Skip copying assets to native shells')
|
|
47
|
+
.action(async (opts) => {
|
|
48
|
+
const cwd = process.cwd();
|
|
49
|
+
const skipCopy = resolveSkipCopy(opts);
|
|
50
|
+
await (0, build_1.buildProject)({ cwd, configFile: opts.config, skipCopy });
|
|
51
|
+
});
|
|
52
|
+
program
|
|
53
|
+
.command('copy-assets')
|
|
54
|
+
.description('Copy dist assets into Android/iOS resource locations')
|
|
55
|
+
.option('--source <path>', 'Path to compiled assets', 'dist')
|
|
56
|
+
.option('--android-dest <path>', 'Android asset destination', 'android/app/src/main/assets')
|
|
57
|
+
.option('--ios-dest <path>', 'iOS asset destination', 'ios/SparklingGo/SparklingGo/Resources/Assets')
|
|
58
|
+
.action(async (opts) => {
|
|
59
|
+
const cwd = process.cwd();
|
|
60
|
+
await (0, copy_assets_1.copyAssets)({
|
|
61
|
+
cwd,
|
|
62
|
+
source: opts.source,
|
|
63
|
+
androidDest: opts.androidDest,
|
|
64
|
+
iosDest: opts.iosDest,
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
program
|
|
68
|
+
.command('autolink')
|
|
69
|
+
.description('Autolink Sparkling method modules for Android and iOS')
|
|
70
|
+
.option('--platform <platform>', 'Platform to autolink: android|ios|all', 'all')
|
|
71
|
+
.action(async (opts) => {
|
|
72
|
+
const cwd = process.cwd();
|
|
73
|
+
const raw = String(opts.platform ?? 'all').toLowerCase();
|
|
74
|
+
const allowed = ['android', 'ios', 'all'];
|
|
75
|
+
const platform = (allowed.includes(raw) ? raw : 'all');
|
|
76
|
+
if (!allowed.includes(raw)) {
|
|
77
|
+
console.warn(ui_1.ui.warn(`Unknown platform "${opts.platform}", defaulting to 'all'.`));
|
|
78
|
+
}
|
|
79
|
+
await (0, autolink_1.autolink)({ cwd, platform });
|
|
80
|
+
});
|
|
81
|
+
program
|
|
82
|
+
.command('run:android')
|
|
83
|
+
.description('Build Lynx bundle, copy assets, and install Android debug build')
|
|
84
|
+
.option('--copy', 'Copy assets to native shells')
|
|
85
|
+
.option('--skip-copy', 'Skip copying assets to native shells')
|
|
86
|
+
.action(async (opts) => {
|
|
87
|
+
const cwd = process.cwd();
|
|
88
|
+
const skipCopy = resolveSkipCopy(opts);
|
|
89
|
+
await (0, run_android_1.runAndroid)({ cwd, skipCopy });
|
|
90
|
+
});
|
|
91
|
+
program
|
|
92
|
+
.command('run:ios')
|
|
93
|
+
.description('Build Lynx bundle, copy assets, and launch iOS simulator build')
|
|
94
|
+
.option('--copy', 'Copy assets to native shells')
|
|
95
|
+
.option('--skip-copy', 'Skip copying assets to native shells')
|
|
96
|
+
.option('--device <nameOrId>', 'Simulator name or UDID to run')
|
|
97
|
+
.option('--skip-pod-install', 'Skip running pod install before building iOS')
|
|
98
|
+
.action(async (opts) => {
|
|
99
|
+
const cwd = process.cwd();
|
|
100
|
+
const skipCopy = resolveSkipCopy(opts);
|
|
101
|
+
await (0, run_ios_1.runIos)({
|
|
102
|
+
cwd,
|
|
103
|
+
skipCopy,
|
|
104
|
+
device: opts.device,
|
|
105
|
+
skipPodInstall: opts.skipPodInstall,
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
program
|
|
109
|
+
.command('doctor')
|
|
110
|
+
.description('Check if your environment is ready to build a Sparkling app')
|
|
111
|
+
.option('--platform <platform>', 'Platform to check: android|ios|all', 'all')
|
|
112
|
+
.action(async (opts) => {
|
|
113
|
+
const raw = String(opts.platform ?? 'all').toLowerCase();
|
|
114
|
+
const allowed = ['android', 'ios', 'all'];
|
|
115
|
+
const platform = (allowed.includes(raw) ? raw : 'all');
|
|
116
|
+
if (!allowed.includes(raw)) {
|
|
117
|
+
console.warn(ui_1.ui.warn(`Unknown platform "${opts.platform}", defaulting to 'all'.`));
|
|
118
|
+
}
|
|
119
|
+
await (0, doctor_1.doctor)({ platform });
|
|
120
|
+
});
|
|
121
|
+
program.parse(process.argv);
|
|
122
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.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,gBAAM,EAAC;QACX,GAAG;QACH,QAAQ;QACR,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,cAAc,EAAE,IAAI,CAAC,cAAc;KACpC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,6DAA6D,CAAC;KAC1E,MAAM,CAAC,uBAAuB,EAAE,oCAAoC,EAAE,KAAK,CAAC;KAC5E,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACrB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;IACzD,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAA8B,CAAC;IACpF,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,OAAE,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,QAAQ,yBAAyB,CAAC,CAAC,CAAC;IACrF,CAAC;IACD,MAAM,IAAA,eAAM,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface PlatformConfig {
|
|
2
|
+
android?: {
|
|
3
|
+
packageName?: string;
|
|
4
|
+
};
|
|
5
|
+
ios?: {
|
|
6
|
+
bundleIdentifier?: string;
|
|
7
|
+
simulator?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export type LynxConfig = unknown;
|
|
11
|
+
export interface RouterEntry {
|
|
12
|
+
path: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RouterConfig {
|
|
15
|
+
main?: RouterEntry;
|
|
16
|
+
[name: string]: RouterEntry | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface SplashScreenPluginConfig {
|
|
19
|
+
backgroundColor?: string;
|
|
20
|
+
image?: string;
|
|
21
|
+
imageWidth?: number;
|
|
22
|
+
dark?: {
|
|
23
|
+
image?: string;
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export type PluginConfig = ['splash-screen', SplashScreenPluginConfig] | [string, Record<string, unknown>?];
|
|
28
|
+
export interface AppConfig {
|
|
29
|
+
lynxConfig: LynxConfig;
|
|
30
|
+
appName?: string;
|
|
31
|
+
platform?: PlatformConfig;
|
|
32
|
+
paths?: {
|
|
33
|
+
androidAssets?: string;
|
|
34
|
+
iosAssets?: string;
|
|
35
|
+
};
|
|
36
|
+
appIcon?: string;
|
|
37
|
+
router?: RouterConfig;
|
|
38
|
+
plugin?: PluginConfig[];
|
|
39
|
+
}
|
|
40
|
+
export interface MethodModuleConfig {
|
|
41
|
+
name: string;
|
|
42
|
+
root: string;
|
|
43
|
+
android?: {
|
|
44
|
+
packageName?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
projectDir?: string;
|
|
47
|
+
buildGradle?: string;
|
|
48
|
+
};
|
|
49
|
+
ios?: {
|
|
50
|
+
moduleName?: string;
|
|
51
|
+
className?: string;
|
|
52
|
+
podspecPath?: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,GAAG,CAAC,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E,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2025 TikTok Pte. Ltd.
|
|
3
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
4
|
+
// LICENSE file in the root directory of this source tree.
|
|
5
|
+
// Avoid hard dependency on external type packages in library types;
|
|
6
|
+
// use a minimal alias for Lynx config shape.
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,yEAAyE;AACzE,0DAA0D;AAC1D,qEAAqE;AACrE,6CAA6C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runCommand = runCommand;
|
|
4
|
+
// Copyright (c) 2025 TikTok Pte. Ltd.
|
|
5
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const verbose_1 = require("./verbose");
|
|
9
|
+
async function runCommand(command, args, options = {}) {
|
|
10
|
+
if ((0, verbose_1.isVerboseEnabled)()) {
|
|
11
|
+
const envKeys = Object.keys(options.env ?? {});
|
|
12
|
+
const cwd = options.cwd ?? process.cwd();
|
|
13
|
+
const envLabel = envKeys.length ? ` env:${envKeys.join(',')}` : '';
|
|
14
|
+
(0, verbose_1.verboseLog)(`Running "${command} ${args.join(' ')}" (cwd: ${cwd})${envLabel}`);
|
|
15
|
+
}
|
|
16
|
+
const child = (0, node_child_process_1.spawn)(command, args, {
|
|
17
|
+
cwd: options.cwd,
|
|
18
|
+
env: { ...process.env, ...options.env },
|
|
19
|
+
stdio: 'inherit',
|
|
20
|
+
shell: false,
|
|
21
|
+
});
|
|
22
|
+
await new Promise((resolve, reject) => {
|
|
23
|
+
child.on('error', reject);
|
|
24
|
+
child.on('close', code => {
|
|
25
|
+
if ((0, verbose_1.isVerboseEnabled)()) {
|
|
26
|
+
(0, verbose_1.verboseLog)(`${command} exited with code ${code ?? 0}`);
|
|
27
|
+
}
|
|
28
|
+
if (code && !options.ignoreFailure) {
|
|
29
|
+
reject(new Error(`${command} exited with code ${code}`));
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
resolve();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=exec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":";;AAYA,gCAgCC;AA5CD,sCAAsC;AACtC,yEAAyE;AACzE,0DAA0D;AAC1D,2DAA2C;AAC3C,u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AK,CAAC,GAAG,OAAO,qBAAqB,IAAI,EAAE,CAAC,CAAC,CAAC;gBACzD,OAAO;YACT,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a project path from the current working directory
|
|
3
|
+
* @param cwd - Current working directory
|
|
4
|
+
* @param segments - Path segments to join
|
|
5
|
+
* @returns Resolved absolute path
|
|
6
|
+
* @throws Error if cwd is empty
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveProjectPath(cwd: string, ...segments: string[]): string;
|
|
9
|
+
/**
|
|
10
|
+
* Convert a path to POSIX format (forward slashes)
|
|
11
|
+
* @param p - Path to convert
|
|
12
|
+
* @returns POSIX-style path
|
|
13
|
+
*/
|
|
14
|
+
export declare function toPosixPath(p: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Get relative path from one location to another in POSIX format
|
|
17
|
+
* @param from - Source path
|
|
18
|
+
* @param to - Target path
|
|
19
|
+
* @returns Relative path in POSIX format
|
|
20
|
+
*/
|
|
21
|
+
export declare function relativeTo(from: string, to: string): string;
|
|
22
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAO7E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAK7C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAQ3D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveProjectPath = resolveProjectPath;
|
|
7
|
+
exports.toPosixPath = toPosixPath;
|
|
8
|
+
exports.relativeTo = relativeTo;
|
|
9
|
+
// Copyright (c) 2025 TikTok Pte. Ltd.
|
|
10
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
11
|
+
// LICENSE file in the root directory of this source tree.
|
|
12
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
13
|
+
/**
|
|
14
|
+
* Resolve a project path from the current working directory
|
|
15
|
+
* @param cwd - Current working directory
|
|
16
|
+
* @param segments - Path segments to join
|
|
17
|
+
* @returns Resolved absolute path
|
|
18
|
+
* @throws Error if cwd is empty
|
|
19
|
+
*/
|
|
20
|
+
function resolveProjectPath(cwd, ...segments) {
|
|
21
|
+
if (!cwd || typeof cwd !== 'string') {
|
|
22
|
+
throw new Error('cwd must be a non-empty string');
|
|
23
|
+
}
|
|
24
|
+
// Filter out empty segments
|
|
25
|
+
const validSegments = segments.filter(s => s && typeof s === 'string');
|
|
26
|
+
return node_path_1.default.resolve(cwd, ...validSegments);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Convert a path to POSIX format (forward slashes)
|
|
30
|
+
* @param p - Path to convert
|
|
31
|
+
* @returns POSIX-style path
|
|
32
|
+
*/
|
|
33
|
+
function toPosixPath(p) {
|
|
34
|
+
if (!p || typeof p !== 'string') {
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
return p.split(node_path_1.default.sep).join('/');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get relative path from one location to another in POSIX format
|
|
41
|
+
* @param from - Source path
|
|
42
|
+
* @param to - Target path
|
|
43
|
+
* @returns Relative path in POSIX format
|
|
44
|
+
*/
|
|
45
|
+
function relativeTo(from, to) {
|
|
46
|
+
if (!from || typeof from !== 'string') {
|
|
47
|
+
return toPosixPath(to || '');
|
|
48
|
+
}
|
|
49
|
+
if (!to || typeof to !== 'string') {
|
|
50
|
+
return '';
|
|
51
|
+
}
|
|
52
|
+
return toPosixPath(node_path_1.default.relative(from, to));
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":";;;;;AAYA,gDAOC;AAOD,kCAKC;AAQD,gCAQC;AA/CD,sCAAsC;AACtC,yEAAyE;AACzE,0DAA0D;AAC1D,0DAA6B;AAE7B;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,GAAW,EAAE,GAAG,QAAkB;IACnE,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IACD,4BAA4B;IAC5B,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;IACvE,OAAO,mBAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,aAAa,CAAC,CAAC;AAC7C,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,CAAS;IACnC,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,CAAC,KAAK,CAAC,mBAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,IAAY,EAAE,EAAU;IACjD,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtC,OAAO,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/B,CAAC;IACD,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,WAAW,CAAC,mBAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const ui: {
|
|
2
|
+
headline: (msg: string) => string;
|
|
3
|
+
success: (msg: string) => string;
|
|
4
|
+
warn: (msg: string) => string;
|
|
5
|
+
error: (msg: string) => string;
|
|
6
|
+
info: (msg: string) => string;
|
|
7
|
+
muted: (msg: string) => string;
|
|
8
|
+
tipLabel: string;
|
|
9
|
+
tip: (msg: string) => string;
|
|
10
|
+
prompt: (msg: string) => string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/utils/ui.ts"],"names":[],"mappings":"AA0EA,eAAO,MAAM,EAAE;oBACG,MAAM;mBACP,MAAM;gBACT,MAAM;iBACL,MAAM;gBACP,MAAM;iBACL,MAAM;;eAER,MAAM;kBACH,MAAM;CACrB,CAAC"}
|
package/dist/utils/ui.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ui = void 0;
|
|
7
|
+
// Copyright (c) 2025 TikTok Pte. Ltd.
|
|
8
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
9
|
+
// LICENSE file in the root directory of this source tree.
|
|
10
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
11
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
13
|
+
const DEFAULT_CONFIG = {
|
|
14
|
+
labels: { tip: 'Tip' },
|
|
15
|
+
colors: {
|
|
16
|
+
headline: 'cyan',
|
|
17
|
+
success: 'green',
|
|
18
|
+
warn: 'yellow',
|
|
19
|
+
error: 'red',
|
|
20
|
+
// Use blue for info to improve contrast on light themes
|
|
21
|
+
info: 'blue',
|
|
22
|
+
// Use dim for muted text to avoid low-contrast gray on light themes
|
|
23
|
+
muted: 'dim',
|
|
24
|
+
tipLabel: 'cyan',
|
|
25
|
+
tipText: 'blue',
|
|
26
|
+
promptLabel: 'blue',
|
|
27
|
+
promptText: 'blue',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
const colorFns = {
|
|
31
|
+
cyan: chalk_1.default.cyan,
|
|
32
|
+
green: chalk_1.default.green,
|
|
33
|
+
yellow: chalk_1.default.yellow,
|
|
34
|
+
red: chalk_1.default.red,
|
|
35
|
+
white: chalk_1.default.white,
|
|
36
|
+
gray: chalk_1.default.gray,
|
|
37
|
+
grey: chalk_1.default.grey,
|
|
38
|
+
magenta: chalk_1.default.magenta,
|
|
39
|
+
blue: chalk_1.default.blue,
|
|
40
|
+
};
|
|
41
|
+
function loadUiConfig() {
|
|
42
|
+
const candidate = node_path_1.default.join(process.cwd(), 'packages', 'common', 'cli-style.config.json');
|
|
43
|
+
if (node_fs_1.default.existsSync(candidate)) {
|
|
44
|
+
try {
|
|
45
|
+
const parsed = JSON.parse(node_fs_1.default.readFileSync(candidate, 'utf8'));
|
|
46
|
+
return parsed;
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// ignore parse errors, fall back to defaults
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return {};
|
|
53
|
+
}
|
|
54
|
+
const cfg = loadUiConfig();
|
|
55
|
+
const palette = { ...DEFAULT_CONFIG.colors, ...(cfg.colors ?? {}) };
|
|
56
|
+
const labels = { ...DEFAULT_CONFIG.labels, ...(cfg.labels ?? {}) };
|
|
57
|
+
function paint(msg, colorName, bold = false) {
|
|
58
|
+
const key = colorName?.toLowerCase();
|
|
59
|
+
if (key === 'none' || key === 'default' || key === 'reset') {
|
|
60
|
+
return bold ? chalk_1.default.bold(msg) : msg;
|
|
61
|
+
}
|
|
62
|
+
if (key === 'dim') {
|
|
63
|
+
const styled = chalk_1.default.dim(msg);
|
|
64
|
+
return bold ? chalk_1.default.bold(styled) : styled;
|
|
65
|
+
}
|
|
66
|
+
const fn = key ? colorFns[key] : undefined;
|
|
67
|
+
const colored = fn ? fn(msg) : msg;
|
|
68
|
+
return bold ? chalk_1.default.bold(colored) : colored;
|
|
69
|
+
}
|
|
70
|
+
exports.ui = {
|
|
71
|
+
headline: (msg) => paint(msg, palette.headline, true),
|
|
72
|
+
success: (msg) => paint(msg, palette.success, true),
|
|
73
|
+
warn: (msg) => paint(msg, palette.warn, true),
|
|
74
|
+
error: (msg) => paint(msg, palette.error, true),
|
|
75
|
+
info: (msg) => paint(msg, palette.info, false),
|
|
76
|
+
muted: (msg) => paint(msg, palette.muted, false),
|
|
77
|
+
tipLabel: paint(labels.tip ?? 'TIP', palette.tipLabel, true),
|
|
78
|
+
tip: (msg) => `${paint(labels.tip ?? 'TIP', palette.tipLabel, true)} ${paint(msg, palette.tipText, true)}`,
|
|
79
|
+
prompt: (msg) => paint(msg, palette.promptText ?? palette.promptLabel ?? palette.info, true),
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=ui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/utils/ui.ts"],"names":[],"mappings":";;;;;;AAAA,sCAAsC;AACtC,yEAAyE;AACzE,0DAA0D;AAC1D,sDAAyB;AACzB,0DAA6B;AAC7B,kDAA0B;AAQ1B,MAA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