ferrflow 2.0.0 → 2.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/bin/ferrflow.js +19 -18
- package/package.json +9 -9
- package/platforms/darwin-arm64/package.json +16 -0
- package/platforms/darwin-x64/package.json +16 -0
- package/platforms/linux-arm64/package.json +16 -0
- package/platforms/linux-x64/package.json +16 -0
- package/platforms/win32-x64/package.json +16 -0
- package/scripts/publish-wasm.sh +35 -0
- package/scripts/publish.sh +66 -0
package/bin/ferrflow.js
CHANGED
|
@@ -8,36 +8,37 @@ import { createRequire } from "module";
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
const require = createRequire(import.meta.url);
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"darwin-x64": "ferrflow-darwin-x64",
|
|
19
|
-
"darwin-arm64": "ferrflow-darwin-arm64",
|
|
20
|
-
"win32-x64": "ferrflow-windows-x64",
|
|
21
|
-
};
|
|
11
|
+
const PLATFORMS = {
|
|
12
|
+
"linux-x64": "@ferrflow/linux-x64",
|
|
13
|
+
"linux-arm64": "@ferrflow/linux-arm64",
|
|
14
|
+
"darwin-x64": "@ferrflow/darwin-x64",
|
|
15
|
+
"darwin-arm64": "@ferrflow/darwin-arm64",
|
|
16
|
+
"win32-x64": "@ferrflow/win32-x64",
|
|
17
|
+
};
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
const
|
|
19
|
+
function getBinaryPath() {
|
|
20
|
+
const key = `${process.platform}-${process.arch}`;
|
|
21
|
+
const pkg = PLATFORMS[key];
|
|
25
22
|
|
|
26
|
-
if (
|
|
23
|
+
if (pkg) {
|
|
27
24
|
try {
|
|
28
|
-
|
|
25
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
26
|
+
return require.resolve(`${pkg}/bin/ferrflow${ext}`);
|
|
29
27
|
} catch {
|
|
30
28
|
// optional dep not installed
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
// Fallback: local dev build
|
|
35
|
-
const ext = platform === "win32" ? ".exe" : "";
|
|
33
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
36
34
|
const devBuild = join(__dirname, "..", "..", "target", "release", `ferrflow${ext}`);
|
|
37
35
|
if (existsSync(devBuild)) return devBuild;
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
console.error(
|
|
38
|
+
`Unsupported platform: ${process.platform}-${process.arch}\n` +
|
|
39
|
+
"Install ferrflow from https://github.com/FerrFlow-Org/FerrFlow/releases"
|
|
40
|
+
);
|
|
41
|
+
process.exit(1);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
const binary = getBinaryPath();
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"ferrflow": "./bin/ferrflow.js"
|
|
4
4
|
},
|
|
5
5
|
"description": "Universal semantic versioning for monorepos and classic repos",
|
|
6
|
-
"homepage": "https://
|
|
6
|
+
"homepage": "https://ferrflow.com",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"semver",
|
|
9
9
|
"versioning",
|
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
"changelog",
|
|
12
12
|
"release"
|
|
13
13
|
],
|
|
14
|
-
"license": "
|
|
14
|
+
"license": "MPL-2.0",
|
|
15
15
|
"name": "ferrflow",
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"ferrflow
|
|
18
|
-
"ferrflow
|
|
19
|
-
"ferrflow
|
|
20
|
-
"ferrflow
|
|
21
|
-
"ferrflow-
|
|
17
|
+
"@ferrflow/darwin-arm64": "2.2.0",
|
|
18
|
+
"@ferrflow/darwin-x64": "2.2.0",
|
|
19
|
+
"@ferrflow/linux-arm64": "2.2.0",
|
|
20
|
+
"@ferrflow/linux-x64": "2.2.0",
|
|
21
|
+
"@ferrflow/win32-x64": "2.2.0"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/FerrFlow/FerrFlow.git"
|
|
25
|
+
"url": "git+https://github.com/FerrFlow-Org/FerrFlow.git"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
|
-
"version": "2.
|
|
28
|
+
"version": "2.2.0"
|
|
29
29
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cpu": [
|
|
3
|
+
"arm64"
|
|
4
|
+
],
|
|
5
|
+
"description": "FerrFlow macOS arm64 binary",
|
|
6
|
+
"license": "MPL-2.0",
|
|
7
|
+
"name": "@ferrflow/darwin-arm64",
|
|
8
|
+
"os": [
|
|
9
|
+
"darwin"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/FerrFlow-Org/FerrFlow.git"
|
|
14
|
+
},
|
|
15
|
+
"version": "2.2.0"
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cpu": [
|
|
3
|
+
"x64"
|
|
4
|
+
],
|
|
5
|
+
"description": "FerrFlow macOS x64 binary",
|
|
6
|
+
"license": "MPL-2.0",
|
|
7
|
+
"name": "@ferrflow/darwin-x64",
|
|
8
|
+
"os": [
|
|
9
|
+
"darwin"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/FerrFlow-Org/FerrFlow.git"
|
|
14
|
+
},
|
|
15
|
+
"version": "2.2.0"
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cpu": [
|
|
3
|
+
"arm64"
|
|
4
|
+
],
|
|
5
|
+
"description": "FerrFlow Linux arm64 binary",
|
|
6
|
+
"license": "MPL-2.0",
|
|
7
|
+
"name": "@ferrflow/linux-arm64",
|
|
8
|
+
"os": [
|
|
9
|
+
"linux"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/FerrFlow-Org/FerrFlow.git"
|
|
14
|
+
},
|
|
15
|
+
"version": "2.2.0"
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cpu": [
|
|
3
|
+
"x64"
|
|
4
|
+
],
|
|
5
|
+
"description": "FerrFlow Linux x64 binary",
|
|
6
|
+
"license": "MPL-2.0",
|
|
7
|
+
"name": "@ferrflow/linux-x64",
|
|
8
|
+
"os": [
|
|
9
|
+
"linux"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/FerrFlow-Org/FerrFlow.git"
|
|
14
|
+
},
|
|
15
|
+
"version": "2.2.0"
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cpu": [
|
|
3
|
+
"x64"
|
|
4
|
+
],
|
|
5
|
+
"description": "FerrFlow Windows x64 binary",
|
|
6
|
+
"license": "MPL-2.0",
|
|
7
|
+
"name": "@ferrflow/win32-x64",
|
|
8
|
+
"os": [
|
|
9
|
+
"win32"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/FerrFlow-Org/FerrFlow.git"
|
|
14
|
+
},
|
|
15
|
+
"version": "2.2.0"
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
VERSION="${1:?Usage: publish-wasm.sh <version>}"
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
7
|
+
REPO_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")"
|
|
8
|
+
WASM_DIR="${REPO_DIR}/ferrflow-wasm"
|
|
9
|
+
|
|
10
|
+
echo "Building @ferrflow/wasm@${VERSION}..."
|
|
11
|
+
|
|
12
|
+
cd "$WASM_DIR"
|
|
13
|
+
wasm-pack build --target bundler --scope ferrflow
|
|
14
|
+
|
|
15
|
+
cd pkg
|
|
16
|
+
|
|
17
|
+
# Rename package from @ferrflow/ferrflow-wasm to @ferrflow/wasm
|
|
18
|
+
node -e "
|
|
19
|
+
const fs = require('fs');
|
|
20
|
+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
21
|
+
pkg.name = '@ferrflow/wasm';
|
|
22
|
+
pkg.version = '${VERSION}';
|
|
23
|
+
pkg.repository = {
|
|
24
|
+
type: 'git',
|
|
25
|
+
url: 'git+https://github.com/FerrFlow-Org/FerrFlow.git',
|
|
26
|
+
directory: 'ferrflow-wasm'
|
|
27
|
+
};
|
|
28
|
+
pkg.homepage = 'https://ferrflow.com';
|
|
29
|
+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
|
|
30
|
+
"
|
|
31
|
+
|
|
32
|
+
echo "Publishing @ferrflow/wasm@${VERSION}..."
|
|
33
|
+
npm publish --access public
|
|
34
|
+
|
|
35
|
+
echo "Published @ferrflow/wasm@${VERSION}"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
VERSION="${1:?Usage: publish.sh <version>}"
|
|
5
|
+
|
|
6
|
+
# Map: archive name -> platform dir
|
|
7
|
+
declare -A ARCHIVES=(
|
|
8
|
+
["ferrflow-linux-x64.tar.gz"]="linux-x64"
|
|
9
|
+
["ferrflow-linux-arm64.tar.gz"]="linux-arm64"
|
|
10
|
+
["ferrflow-darwin-x64.tar.gz"]="darwin-x64"
|
|
11
|
+
["ferrflow-darwin-arm64.tar.gz"]="darwin-arm64"
|
|
12
|
+
["ferrflow-windows-x64.zip"]="win32-x64"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
16
|
+
NPM_DIR="$(dirname "$SCRIPT_DIR")"
|
|
17
|
+
WORK_DIR="$(mktemp -d)"
|
|
18
|
+
|
|
19
|
+
echo "Downloading release binaries for v${VERSION}..."
|
|
20
|
+
|
|
21
|
+
for archive in "${!ARCHIVES[@]}"; do
|
|
22
|
+
platform="${ARCHIVES[$archive]}"
|
|
23
|
+
echo " ${archive} -> @ferrflow/${platform}"
|
|
24
|
+
|
|
25
|
+
gh release download "v${VERSION}" -p "$archive" -D "$WORK_DIR"
|
|
26
|
+
|
|
27
|
+
# Prepare platform package
|
|
28
|
+
pkg_dir="${WORK_DIR}/packages/${platform}"
|
|
29
|
+
mkdir -p "${pkg_dir}/bin"
|
|
30
|
+
|
|
31
|
+
# Extract binary
|
|
32
|
+
if [[ "$archive" == *.zip ]]; then
|
|
33
|
+
unzip -q "${WORK_DIR}/${archive}" -d "${pkg_dir}/bin/"
|
|
34
|
+
else
|
|
35
|
+
tar xzf "${WORK_DIR}/${archive}" -C "${pkg_dir}/bin/"
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# Copy and patch package.json
|
|
39
|
+
cp "${NPM_DIR}/platforms/${platform}/package.json" "${pkg_dir}/package.json"
|
|
40
|
+
cd "$pkg_dir"
|
|
41
|
+
npm version "$VERSION" --no-git-tag-version --allow-same-version
|
|
42
|
+
npm publish --access public
|
|
43
|
+
cd - > /dev/null
|
|
44
|
+
done
|
|
45
|
+
|
|
46
|
+
# Publish main wrapper
|
|
47
|
+
echo "Publishing main package ferrflow@${VERSION}..."
|
|
48
|
+
cd "$NPM_DIR"
|
|
49
|
+
|
|
50
|
+
# Update version and optionalDependencies versions
|
|
51
|
+
npm version "$VERSION" --no-git-tag-version --allow-same-version
|
|
52
|
+
|
|
53
|
+
node -e "
|
|
54
|
+
const pkg = JSON.parse(require('fs').readFileSync('package.json', 'utf8'));
|
|
55
|
+
for (const dep of Object.keys(pkg.optionalDependencies || {})) {
|
|
56
|
+
pkg.optionalDependencies[dep] = '${VERSION}';
|
|
57
|
+
}
|
|
58
|
+
require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
|
|
59
|
+
"
|
|
60
|
+
|
|
61
|
+
npm publish --access public
|
|
62
|
+
|
|
63
|
+
echo "Published ferrflow@${VERSION} with all platform packages"
|
|
64
|
+
|
|
65
|
+
# Cleanup
|
|
66
|
+
rm -rf "$WORK_DIR"
|