@rio-cloud/cdk-v2-constructs 7.13.3 → 7.13.4

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 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.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
+
5
7
  ## [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)
6
8
 
7
9
  ## [7.13.2](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv7.13.1&sourceBranch=refs%2Ftags%2Fv7.13.2) (2025-11-25)
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.3",
18
+ "version": "7.13.4",
19
19
  "types": "lib/index.d.ts",
20
20
  "stability": "stable",
21
21
  "exports": {
@@ -69,7 +69,9 @@
69
69
  "release:push": "echo '✅ pushing release' && git push origin master --follow-tags",
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
- "release:dry-run": "npm run build && npm run docgen && npm run release:check && commit-and-tag-version -i docs/changelog.md -a --dry-run"
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.scripts.json scripts/set-package-version.ts",
74
+ "publish": "ts-node --project tsconfig.scripts.json scripts/publish.ts"
73
75
  },
74
76
  "devDependencies": {
75
77
  "@types/jest": "29.5.13",
@@ -0,0 +1,57 @@
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();
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ts-node
2
+ import { readFileSync, writeFileSync } from 'fs';
3
+ import path from 'path';
4
+
5
+ const rootDir = path.resolve(__dirname, '..');
6
+ const versionFile = path.join(rootDir, 'version.json');
7
+ const packageFile = path.join(rootDir, 'package.json');
8
+
9
+ type VersionFile = {
10
+ version?: string;
11
+ };
12
+
13
+ function main(): void {
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
+
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
+ }
23
+
24
+ main();
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.dev.json",
3
+ "compilerOptions": {
4
+ "rootDir": ".",
5
+ "noEmit": true,
6
+ "esModuleInterop": true
7
+ },
8
+ "include": [
9
+ "scripts/**/*.ts"
10
+ ]
11
+ }
package/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "7.13.3"
2
+ "version": "7.13.4"
3
3
  }