rwsdk 1.0.0-alpha.20-test.20250929182842 → 1.0.0-alpha.20-test.20250929191955
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/scripts/addon.mjs +3 -5
- package/package.json +1 -1
package/dist/scripts/addon.mjs
CHANGED
|
@@ -15,7 +15,6 @@ async function getRwSdkProjectRootDir(cwd) {
|
|
|
15
15
|
}
|
|
16
16
|
export const addon = async () => {
|
|
17
17
|
const addonName = process.argv[2];
|
|
18
|
-
console.log(process.argv);
|
|
19
18
|
if (!addonName ||
|
|
20
19
|
process.argv.find((arg) => arg === "-h") ||
|
|
21
20
|
process.argv.find((arg) => arg === "--help")) {
|
|
@@ -36,9 +35,8 @@ export const addon = async () => {
|
|
|
36
35
|
console.error('Could not find "rwsdk" in your dependencies or devDependencies.');
|
|
37
36
|
process.exit(1);
|
|
38
37
|
}
|
|
39
|
-
const
|
|
40
|
-
await fs.
|
|
41
|
-
await fs.mkdir(tmpDir, { recursive: true });
|
|
38
|
+
const tmpDirPrefix = path.join(os.tmpdir(), `rwsdk-addon-${addonName}-`);
|
|
39
|
+
const tmpDir = await fs.mkdtemp(tmpDirPrefix);
|
|
42
40
|
const downloadUrl = `https://github.com/redwoodjs/sdk/releases/download/${rwsdkVersion}/${addonName}-${rwsdkVersion}.tar.gz`;
|
|
43
41
|
console.log(`Downloading addon "${addonName}" version ${rwsdkVersion}...`);
|
|
44
42
|
const filePath = path.join(os.tmpdir(), `rwsdk-addon-${addonName}-${rwsdkVersion}.tar.gz`);
|
|
@@ -55,7 +53,7 @@ export const addon = async () => {
|
|
|
55
53
|
await decompress(filePath, tmpDir);
|
|
56
54
|
console.log();
|
|
57
55
|
console.log("Download complete!");
|
|
58
|
-
console.log(`The addon files are located in: ${
|
|
56
|
+
console.log(`The addon files are located in: ${tmpDir}`);
|
|
59
57
|
console.log();
|
|
60
58
|
console.log("To continue, open the step-by-step instructions:");
|
|
61
59
|
const instructionsPath = path.join(tmpDir, "INSTRUCTIONS.md");
|
package/package.json
CHANGED