aurasu 0.1.10 → 0.1.12
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/aura.package-integrity.json +4 -4
- package/aura.package-integrity.sig +1 -1
- package/bin/play.js +35 -9
- package/package.json +1 -1
|
@@ -207,8 +207,8 @@
|
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
"path": "bin/play.js",
|
|
210
|
-
"sha256": "
|
|
211
|
-
"size":
|
|
210
|
+
"sha256": "1b7726063c6eee98d97cf448327a466fea94693e1639e3bb4c280b4077a5971c",
|
|
211
|
+
"size": 43204
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
"path": "config/gameplay/game.config.js",
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
"path": "package.json",
|
|
225
|
-
"sha256": "
|
|
225
|
+
"sha256": "a4b36686e1ab891b94e3ce1228ece8dee6d9a75cb6bcb764038f647f2f4ea761",
|
|
226
226
|
"size": 569
|
|
227
227
|
},
|
|
228
228
|
{
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
"description": "A hit-circle rhythm game built with AuraJS.",
|
|
315
315
|
"name": "aurasu",
|
|
316
316
|
"type": "module",
|
|
317
|
-
"version": "0.1.
|
|
317
|
+
"version": "0.1.12"
|
|
318
318
|
},
|
|
319
319
|
"publishedMetadata": {
|
|
320
320
|
"authored": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
lN3H45BdR1iwm7SnLRfoqMDr9OHd8CqdXpSGJeuWX0zOP9nCOTEbWlXfELdSLy4w6B+6fbgQLg4NcziobsloBQ==
|
package/bin/play.js
CHANGED
|
@@ -62,21 +62,47 @@ function resolveAuraMaxxBinary() {
|
|
|
62
62
|
return process.platform === 'win32' ? 'auramaxx.cmd' : 'auramaxx';
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
function resolveAuraAliasBinary() {
|
|
66
|
+
return process.platform === 'win32' ? 'aura.cmd' : 'aura';
|
|
67
|
+
}
|
|
68
|
+
|
|
65
69
|
function resolveNpmBinary() {
|
|
66
70
|
return process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
67
71
|
}
|
|
68
72
|
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
function resolveInvocationCwd() {
|
|
74
|
+
const forwardedCwd = process.env.AURA_INVOKE_CWD;
|
|
75
|
+
if (forwardedCwd && isAbsolute(forwardedCwd)) {
|
|
76
|
+
return resolve(forwardedCwd);
|
|
72
77
|
}
|
|
73
|
-
|
|
78
|
+
|
|
79
|
+
const shellPwd = process.env.PWD;
|
|
80
|
+
if (shellPwd && isAbsolute(shellPwd)) {
|
|
81
|
+
return resolve(shellPwd);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return resolve(process.cwd());
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function canProbeBinary(binary) {
|
|
88
|
+
const probe = spawnSync(binary, ['--help'], {
|
|
74
89
|
stdio: 'ignore',
|
|
75
90
|
env: process.env,
|
|
76
91
|
});
|
|
77
92
|
return !probe.error && probe.status === 0;
|
|
78
93
|
}
|
|
79
94
|
|
|
95
|
+
function isAuraMaxxInstalled() {
|
|
96
|
+
if (process.env.AURAMAXX_CLI_AVAILABLE === '1') {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
if (localAuraCli) {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
const candidates = [resolveAuraMaxxBinary(), resolveAuraAliasBinary()];
|
|
103
|
+
return candidates.some((binary, index) => candidates.indexOf(binary) === index && canProbeBinary(binary));
|
|
104
|
+
}
|
|
105
|
+
|
|
80
106
|
async function installAuraMaxxGlobally() {
|
|
81
107
|
return new Promise((resolveInstall) => {
|
|
82
108
|
const child = spawn(
|
|
@@ -376,7 +402,7 @@ async function promptSelect(message, options, defaultValue) {
|
|
|
376
402
|
|
|
377
403
|
function normalizeDisplayPath(targetPath) {
|
|
378
404
|
const resolvedPath = resolve(targetPath);
|
|
379
|
-
const relativePath = relative(
|
|
405
|
+
const relativePath = relative(resolveInvocationCwd(), resolvedPath).replaceAll('\\', '/');
|
|
380
406
|
if (!relativePath) return '.';
|
|
381
407
|
if (!relativePath.startsWith('.') && !relativePath.startsWith('/')) {
|
|
382
408
|
return `./${relativePath}`;
|
|
@@ -405,10 +431,10 @@ function resolveUniqueDestination(preferredPath) {
|
|
|
405
431
|
|
|
406
432
|
function resolveDefaultForkDestination() {
|
|
407
433
|
const defaultBaseName = `${toPackageShortName(packageName)}-fork`;
|
|
408
|
-
const
|
|
409
|
-
const baseDir = isSubpath(projectRoot,
|
|
434
|
+
const invocationCwd = resolveInvocationCwd();
|
|
435
|
+
const baseDir = isSubpath(projectRoot, invocationCwd)
|
|
410
436
|
? dirname(projectRoot)
|
|
411
|
-
:
|
|
437
|
+
: invocationCwd;
|
|
412
438
|
return resolveUniqueDestination(resolve(baseDir, defaultBaseName));
|
|
413
439
|
}
|
|
414
440
|
|
|
@@ -457,7 +483,7 @@ function parseForkArgs(args) {
|
|
|
457
483
|
async function resolveForkDestination(args) {
|
|
458
484
|
const parsed = parseForkArgs(args);
|
|
459
485
|
if (parsed.destination) {
|
|
460
|
-
return resolve(
|
|
486
|
+
return resolve(resolveInvocationCwd(), parsed.destination);
|
|
461
487
|
}
|
|
462
488
|
|
|
463
489
|
const suggestedDestination = resolveDefaultForkDestination();
|