@rio-cloud/cdk-v2-constructs 7.13.4 → 7.13.5-alpha.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/docs/changelog.md +2 -0
- package/package.json +3 -3
- package/scripts/publish.sh +32 -0
- package/scripts/set-package-version.ts +9 -9
- package/version.json +1 -1
- package/scripts/publish.ts +0 -57
- package/tsconfig.scripts.json +0 -11
package/docs/changelog.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [7.13.5-alpha.0](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv7.13.4&sourceBranch=refs%2Ftags%2Fv7.13.5-alpha.0) (2025-12-10)
|
|
6
|
+
|
|
5
7
|
## [7.13.4](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv7.13.3&sourceBranch=refs%2Ftags%2Fv7.13.4) (2025-12-09)
|
|
6
8
|
|
|
7
9
|
## [7.13.3](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv7.13.2&sourceBranch=refs%2Ftags%2Fv7.13.3) (2025-12-02)
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"main": "lib/index.js",
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
|
-
"version": "7.13.
|
|
18
|
+
"version": "7.13.5-alpha.0",
|
|
19
19
|
"types": "lib/index.d.ts",
|
|
20
20
|
"stability": "stable",
|
|
21
21
|
"exports": {
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"release": "npm run release:check && npm run release:build",
|
|
71
71
|
"release:alpha": "npm run release:check && npm run release:build:alpha",
|
|
72
72
|
"release:dry-run": "npm run build && npm run docgen && npm run release:check && commit-and-tag-version -i docs/changelog.md -a --dry-run",
|
|
73
|
-
"set-package-version": "ts-node --project tsconfig.
|
|
74
|
-
"publish": "
|
|
73
|
+
"set-package-version": "ts-node --project tsconfig.dev.json scripts/set-package-version.ts",
|
|
74
|
+
"publish": "./scripts/publish.sh"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@types/jest": "29.5.13",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
echo $(pwd)
|
|
5
|
+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
6
|
+
PACKAGE_NAME='@rio-cloud/cdk-v2-constructs'
|
|
7
|
+
PACKAGE_JSON="$ROOT_DIR/package.json"
|
|
8
|
+
|
|
9
|
+
cd "$ROOT_DIR"
|
|
10
|
+
|
|
11
|
+
if ! git describe --tags --exact-match HEAD >/dev/null 2>&1; then
|
|
12
|
+
echo "No tag found; skipping publish"
|
|
13
|
+
exit 0
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
VERSION="$(jq -r '.version // empty' "$PACKAGE_JSON")"
|
|
17
|
+
|
|
18
|
+
if [[ -z "$VERSION" ]]; then
|
|
19
|
+
echo "package.json must contain a version"
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if npm view "${PACKAGE_NAME}@${VERSION}" version >/dev/null 2>&1; then
|
|
24
|
+
echo "✅ Version ${VERSION} already exists, skipping publish"
|
|
25
|
+
exit 0
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
echo "🚀 Publishing ${PACKAGE_NAME}@${VERSION}"
|
|
29
|
+
if ! npm publish --access public; then
|
|
30
|
+
echo "npm publish failed. You might need to create a new token on npmjs.com" >&2
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env ts-node
|
|
2
2
|
import { readFileSync, writeFileSync } from 'fs';
|
|
3
|
-
import path from 'path';
|
|
3
|
+
import * as path from 'path';
|
|
4
4
|
|
|
5
5
|
const rootDir = path.resolve(__dirname, '..');
|
|
6
6
|
const versionFile = path.join(rootDir, 'version.json');
|
|
7
7
|
const packageFile = path.join(rootDir, 'package.json');
|
|
8
8
|
|
|
9
9
|
type VersionFile = {
|
|
10
|
-
|
|
10
|
+
version?: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
function main(): void {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const { version } = JSON.parse(readFileSync(versionFile, 'utf8')) as VersionFile;
|
|
15
|
+
if (!version) {
|
|
16
|
+
throw new Error('version.json must contain a version field');
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const pkg = JSON.parse(readFileSync(packageFile, 'utf8')) as Record<string, unknown>;
|
|
20
|
+
const updated = { ...pkg, version };
|
|
21
|
+
writeFileSync(packageFile, `${JSON.stringify(updated, null, 2)}\n`, 'utf8');
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
main();
|
package/version.json
CHANGED
package/scripts/publish.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ts-node
|
|
2
|
-
import { spawnSync } from 'child_process';
|
|
3
|
-
import { readFileSync } from 'fs';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
|
|
6
|
-
const PACKAGE_NAME = '@rio-cloud/cdk-v2-constructs';
|
|
7
|
-
const PACKAGE_JSON_PATH = path.resolve(__dirname, '..', 'package.json');
|
|
8
|
-
|
|
9
|
-
function run(command: string, args: string[], inheritOutput = true): number {
|
|
10
|
-
const result = spawnSync(command, args, { stdio: inheritOutput ? 'inherit' : 'ignore' });
|
|
11
|
-
if (result.error) {
|
|
12
|
-
throw result.error;
|
|
13
|
-
}
|
|
14
|
-
return result.status ?? 1;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function ensureTaggedCommit(): void {
|
|
18
|
-
const status = run('git', ['describe', '--tags', '--exact-match', 'HEAD'], false);
|
|
19
|
-
if (status !== 0) {
|
|
20
|
-
console.log('No tag found; skipping publish');
|
|
21
|
-
process.exit(0);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function getPackageVersion(): string {
|
|
26
|
-
const pkg = JSON.parse(readFileSync(PACKAGE_JSON_PATH, 'utf8')) as { version?: string };
|
|
27
|
-
if (!pkg.version) {
|
|
28
|
-
throw new Error('package.json must contain a version');
|
|
29
|
-
}
|
|
30
|
-
return pkg.version;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function ensureVersionNotPublished(version: string): void {
|
|
34
|
-
const status = run('npm', ['view', `${PACKAGE_NAME}@${version}`, 'version'], false);
|
|
35
|
-
if (status === 0) {
|
|
36
|
-
console.log(`✅ Version ${version} already exists, skipping publish`);
|
|
37
|
-
process.exit(0);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function publish(version: string): void {
|
|
42
|
-
console.log(`🚀 Publishing ${PACKAGE_NAME}@${version}`);
|
|
43
|
-
const status = run('npm', ['publish', '--access', 'public']);
|
|
44
|
-
if (status !== 0) {
|
|
45
|
-
console.error('npm publish failed. You might need to create a new token on npmjs.com');
|
|
46
|
-
process.exit(status);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function main(): void {
|
|
51
|
-
ensureTaggedCommit();
|
|
52
|
-
const version = getPackageVersion();
|
|
53
|
-
ensureVersionNotPublished(version);
|
|
54
|
-
publish(version);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
main();
|