@rbbtsn0w/idocs 0.1.0-beta.2 → 1.2.0

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/README.md CHANGED
@@ -6,13 +6,16 @@ This package distributes the `idocs` Swift CLI through npm.
6
6
 
7
7
  ```bash
8
8
  npm install -g @rbbtsn0w/idocs
9
+ idocs --help
9
10
  ```
10
11
 
11
- By default, `postinstall` downloads `idocs-darwin-arm64.tar.gz` from:
12
+ For normal users, this is the complete install flow. `postinstall` downloads the matching `idocs-darwin-arm64.tar.gz` asset from GitHub Releases automatically.
13
+
14
+ If install fails, rerun the install and inspect the npm output. A failed download should be treated as a release packaging problem, not as an expected manual setup step.
12
15
 
13
- `https://github.com/RbBtSn0w/Apple-iDocs/releases/download/v{version}`
16
+ ## Advanced: Alternate Release Mirror
14
17
 
15
- Override the release URL if needed:
18
+ `IDOCS_RELEASE_BASE_URL` is only for internal mirrors or custom release hosting. It is not required for the normal npm install path.
16
19
 
17
20
  ```bash
18
21
  export IDOCS_RELEASE_BASE_URL="https://github.com/<owner>/<repo>/releases/download/v{version}"
@@ -32,6 +35,6 @@ npm --prefix npm link
32
35
  idocs --help
33
36
  ```
34
37
 
35
- ## Strict install mode
38
+ ## Non-strict install mode
36
39
 
37
- Set `IDOCS_NPM_STRICT_INSTALL=1` to fail install when binary download fails.
40
+ Set `IDOCS_NPM_STRICT_INSTALL=0` only if you intentionally want to keep the wrapper installed without a binary for local debugging flows.
package/bin/idocs.js CHANGED
@@ -11,10 +11,9 @@ const frameworksPath = resolve(here, "../dist/Frameworks");
11
11
 
12
12
  if (!existsSync(binaryPath)) {
13
13
  console.error("iDocs binary not found at npm/dist/idocs.");
14
- console.error("Try one of the following:");
15
- console.error(" 1) npm --prefix npm run fetch-binary");
16
- console.error(" 2) export IDOCS_RELEASE_BASE_URL='https://github.com/<owner>/<repo>/releases/download/v{version}'");
17
- console.error(" 3) npm --prefix npm run link-local");
14
+ console.error("Reinstall @rbbtsn0w/idocs so postinstall can download the matching release asset.");
15
+ console.error("If reinstall still fails, review the npm install output for the underlying packaging error.");
16
+ console.error("For local repository development only, run npm --prefix npm run link-local.");
18
17
  process.exit(1);
19
18
  }
20
19
 
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@rbbtsn0w/idocs",
3
- "version": "0.1.0-beta.2",
3
+ "version": "1.2.0",
4
4
  "publishConfig": {
5
- "access": "public"
5
+ "access": "public",
6
+ "provenance": true
6
7
  },
7
8
  "description": "npm distribution wrapper for the iDocs Swift CLI",
8
9
  "repository": {
@@ -16,7 +17,7 @@
16
17
  "license": "MIT",
17
18
  "type": "module",
18
19
  "bin": {
19
- "idocs": "./bin/idocs.js"
20
+ "idocs": "bin/idocs.js"
20
21
  },
21
22
  "files": [
22
23
  "bin",
@@ -37,5 +38,14 @@
37
38
  },
38
39
  "engines": {
39
40
  "node": ">=20"
41
+ },
42
+ "devDependencies": {
43
+ "@semantic-release/changelog": "^6.0.3",
44
+ "@semantic-release/commit-analyzer": "^13.0.1",
45
+ "@semantic-release/git": "^10.0.1",
46
+ "@semantic-release/github": "^11.0.6",
47
+ "@semantic-release/npm": "^12.0.2",
48
+ "@semantic-release/release-notes-generator": "^14.1.0",
49
+ "semantic-release": "^25.0.3"
40
50
  }
41
51
  }
@@ -11,7 +11,7 @@ const targetPath = resolve(distDir, "idocs");
11
11
  const frameworksTargetDir = resolve(distDir, "Frameworks");
12
12
 
13
13
  function info(msg) {
14
- console.log(`[idocs-cli] ${msg}`);
14
+ console.log(`[@rbbtsn0w/idocs] ${msg}`);
15
15
  }
16
16
 
17
17
  function findFromDerivedData() {
@@ -42,9 +42,9 @@ function resolveLocalBinary() {
42
42
 
43
43
  const sourcePath = resolveLocalBinary();
44
44
  if (!sourcePath) {
45
- console.error("[idocs-cli] Could not locate a local iDocs binary.");
46
- console.error("[idocs-cli] Build first: ./scripts/tuist-silent.sh build iDocs");
47
- console.error("[idocs-cli] Or set IDOCS_LOCAL_BINARY=/absolute/path/to/idocs");
45
+ console.error("[@rbbtsn0w/idocs] Could not locate a local iDocs binary.");
46
+ console.error("[@rbbtsn0w/idocs] Build first: ./scripts/tuist-silent.sh build iDocs");
47
+ console.error("[@rbbtsn0w/idocs] Or set IDOCS_LOCAL_BINARY=/absolute/path/to/idocs");
48
48
  process.exit(1);
49
49
  }
50
50
 
@@ -9,8 +9,9 @@ const distDir = resolve(npmRoot, "dist");
9
9
  const binaryPath = resolve(distDir, "idocs");
10
10
  const frameworksPath = resolve(distDir, "Frameworks");
11
11
  const tmpArchive = resolve(distDir, "idocs-darwin-arm64.tar.gz");
12
+ const extractedBundleDir = resolve(distDir, "idocs-darwin-arm64");
12
13
  const force = process.argv.includes("--force");
13
- const strictInstall = process.env.IDOCS_NPM_STRICT_INSTALL === "1";
14
+ const strictInstall = process.env.IDOCS_NPM_STRICT_INSTALL !== "0";
14
15
 
15
16
  function log(msg) {
16
17
  console.log(`[@rbbtsn0w/idocs] ${msg}`);
@@ -24,6 +25,7 @@ function fail(msg, err) {
24
25
  if (strictInstall) {
25
26
  process.exit(1);
26
27
  }
28
+ console.error("[@rbbtsn0w/idocs] Continuing because IDOCS_NPM_STRICT_INSTALL=0.");
27
29
  }
28
30
 
29
31
  function getVersion() {
@@ -112,7 +114,12 @@ async function main() {
112
114
  unlinkSync(tmpArchive);
113
115
  log("Binary installed successfully.");
114
116
  } catch (error) {
115
- fail("Binary download failed. Install will continue in non-strict mode.", error);
117
+ rmSync(tmpArchive, { force: true });
118
+ rmSync(extractedBundleDir, { recursive: true, force: true });
119
+ fail(
120
+ "Binary download failed. npm/dist/idocs was not refreshed from the release asset.",
121
+ error
122
+ );
116
123
  }
117
124
  }
118
125