aurasu 0.1.9 → 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 +5 -5
- package/aura.package-integrity.sig +1 -1
- package/bin/play.js +36 -7
- 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,8 +222,8 @@
|
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
"path": "package.json",
|
|
225
|
-
"sha256": "
|
|
226
|
-
"size":
|
|
225
|
+
"sha256": "a4b36686e1ab891b94e3ce1228ece8dee6d9a75cb6bcb764038f647f2f4ea761",
|
|
226
|
+
"size": 569
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
"path": "prefabs/playfield.prefab.js",
|
|
@@ -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,18 +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
|
-
const
|
|
73
|
+
function resolveInvocationCwd() {
|
|
74
|
+
const forwardedCwd = process.env.AURA_INVOKE_CWD;
|
|
75
|
+
if (forwardedCwd && isAbsolute(forwardedCwd)) {
|
|
76
|
+
return resolve(forwardedCwd);
|
|
77
|
+
}
|
|
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'], {
|
|
71
89
|
stdio: 'ignore',
|
|
72
90
|
env: process.env,
|
|
73
91
|
});
|
|
74
92
|
return !probe.error && probe.status === 0;
|
|
75
93
|
}
|
|
76
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
|
+
|
|
77
106
|
async function installAuraMaxxGlobally() {
|
|
78
107
|
return new Promise((resolveInstall) => {
|
|
79
108
|
const child = spawn(
|
|
@@ -373,7 +402,7 @@ async function promptSelect(message, options, defaultValue) {
|
|
|
373
402
|
|
|
374
403
|
function normalizeDisplayPath(targetPath) {
|
|
375
404
|
const resolvedPath = resolve(targetPath);
|
|
376
|
-
const relativePath = relative(
|
|
405
|
+
const relativePath = relative(resolveInvocationCwd(), resolvedPath).replaceAll('\\', '/');
|
|
377
406
|
if (!relativePath) return '.';
|
|
378
407
|
if (!relativePath.startsWith('.') && !relativePath.startsWith('/')) {
|
|
379
408
|
return `./${relativePath}`;
|
|
@@ -402,10 +431,10 @@ function resolveUniqueDestination(preferredPath) {
|
|
|
402
431
|
|
|
403
432
|
function resolveDefaultForkDestination() {
|
|
404
433
|
const defaultBaseName = `${toPackageShortName(packageName)}-fork`;
|
|
405
|
-
const
|
|
406
|
-
const baseDir = isSubpath(projectRoot,
|
|
434
|
+
const invocationCwd = resolveInvocationCwd();
|
|
435
|
+
const baseDir = isSubpath(projectRoot, invocationCwd)
|
|
407
436
|
? dirname(projectRoot)
|
|
408
|
-
:
|
|
437
|
+
: invocationCwd;
|
|
409
438
|
return resolveUniqueDestination(resolve(baseDir, defaultBaseName));
|
|
410
439
|
}
|
|
411
440
|
|
|
@@ -454,7 +483,7 @@ function parseForkArgs(args) {
|
|
|
454
483
|
async function resolveForkDestination(args) {
|
|
455
484
|
const parsed = parseForkArgs(args);
|
|
456
485
|
if (parsed.destination) {
|
|
457
|
-
return resolve(
|
|
486
|
+
return resolve(resolveInvocationCwd(), parsed.destination);
|
|
458
487
|
}
|
|
459
488
|
|
|
460
489
|
const suggestedDestination = resolveDefaultForkDestination();
|