@appliance.sh/sdk 1.5.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/CHANGELOG.md +24 -0
- package/package.json +27 -0
- package/scripts/postbuild.ts +29 -0
- package/src/index.ts +2 -0
- package/src/models/appliance.ts +21 -0
- package/src/version.ts +1 -0
- package/tsconfig.json +10 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## 1.5.0 (2025-12-15)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- add cdk experimental stacks ([#8](https://github.com/appliance-sh/appliance.sh/pull/8))
|
|
6
|
+
- **api-server:** init nest project ([#7](https://github.com/appliance-sh/appliance.sh/pull/7))
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- package repository url again ([#19](https://github.com/appliance-sh/appliance.sh/pull/19))
|
|
11
|
+
- package repository url ([#18](https://github.com/appliance-sh/appliance.sh/pull/18))
|
|
12
|
+
- nx release projects ([#17](https://github.com/appliance-sh/appliance.sh/pull/17))
|
|
13
|
+
- nx release groups ([#16](https://github.com/appliance-sh/appliance.sh/pull/16))
|
|
14
|
+
- npm package public again ([#15](https://github.com/appliance-sh/appliance.sh/pull/15))
|
|
15
|
+
- npm package public ([#14](https://github.com/appliance-sh/appliance.sh/pull/14))
|
|
16
|
+
- release node setup ([#13](https://github.com/appliance-sh/appliance.sh/pull/13))
|
|
17
|
+
- release npm ([#12](https://github.com/appliance-sh/appliance.sh/pull/12))
|
|
18
|
+
- nx release ci again ([#11](https://github.com/appliance-sh/appliance.sh/pull/11))
|
|
19
|
+
- nx release ci ([#10](https://github.com/appliance-sh/appliance.sh/pull/10))
|
|
20
|
+
- nx workspaces and packages ([#9](https://github.com/appliance-sh/appliance.sh/pull/9))
|
|
21
|
+
|
|
22
|
+
### ❤️ Thank You
|
|
23
|
+
|
|
24
|
+
- Eliot Lim @eliotlim
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@appliance.sh/sdk",
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "SDK for installing, running, and developing applications for the Appliance platform",
|
|
5
|
+
"repository": "https://github.com/appliance-sh/appliance.sh",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Eliot Lim",
|
|
8
|
+
"type": "commonjs",
|
|
9
|
+
"main": "index.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
"require": "./dist/cjs/index.js",
|
|
12
|
+
"import": "./dist/esm/index.js",
|
|
13
|
+
"types": "./dist/types"
|
|
14
|
+
},
|
|
15
|
+
"types": "./dist/types",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc --module commonjs --outDir dist/cjs && tsc --moduleResolution node --module es2022 --outDir dist/esm && npm run postbuild && npm link",
|
|
18
|
+
"clean": "rm -rf ./dist/",
|
|
19
|
+
"dev:setup": "npm link",
|
|
20
|
+
"postbuild": "npx ts-node scripts/postbuild.ts",
|
|
21
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"zod": "^4.1.13",
|
|
25
|
+
"zod-to-ts": "^2.0.0"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { execSync } from 'child_process';
|
|
2
|
+
import { readFileSync, writeFileSync } from 'fs';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
|
|
5
|
+
const updateVersion = (filePath: string, version: string): void => {
|
|
6
|
+
const fileContent = readFileSync(filePath, 'utf8');
|
|
7
|
+
const updatedContent = fileContent.replace(/0\.0\.0-semantically-released/g, version);
|
|
8
|
+
writeFileSync(filePath, updatedContent, 'utf8');
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const main = (): void => {
|
|
12
|
+
try {
|
|
13
|
+
// Get the latest Git tag
|
|
14
|
+
const latestTag = execSync('git describe --tags --abbrev=0').toString().trim();
|
|
15
|
+
|
|
16
|
+
// Define file paths to update
|
|
17
|
+
const filesToUpdate = [join(__dirname, '../dist/cjs/version.js'), join(__dirname, '../dist/esm/version.js')];
|
|
18
|
+
|
|
19
|
+
// Update version in each file
|
|
20
|
+
filesToUpdate.forEach((filePath) => updateVersion(filePath, latestTag));
|
|
21
|
+
|
|
22
|
+
console.log(`Version updated to ${latestTag} in files:`, filesToUpdate);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
console.error('Error updating version:', error);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
main();
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const applianceBaseInput = z.object({
|
|
4
|
+
manifest: z.literal('v1'),
|
|
5
|
+
name: z.string(),
|
|
6
|
+
version: z.string(),
|
|
7
|
+
scripts: z.record(z.string(), z.string()),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const applianceTypeContainerInput = applianceBaseInput.extend({
|
|
11
|
+
type: z.literal('container'),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const applianceTypeOtherInput = applianceBaseInput.extend({
|
|
15
|
+
type: z.literal('other'),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const applianceInput = z.discriminatedUnion('type', [applianceTypeContainerInput, applianceTypeOtherInput]);
|
|
19
|
+
|
|
20
|
+
export type ApplianceInput = z.infer<typeof applianceInput>;
|
|
21
|
+
export type Appliance = z.output<typeof applianceInput>;
|
package/src/version.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const VERSION = '0.0.0-semantically-released';
|