stuff
This commit is contained in:
4
packages/resource-storage/.gitignore
vendored
Normal file
4
packages/resource-storage/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/node_modules/
|
||||
/dist/
|
||||
/coverage/
|
||||
/.env
|
||||
29
packages/resource-storage/package.json
Normal file
29
packages/resource-storage/package.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"type": "module",
|
||||
"main": "dist/exports.js",
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"test:unit": "vitest --run --passWithNoTests",
|
||||
"test": "pnpm run \"/^test:/\""
|
||||
},
|
||||
"packageManager": "pnpm@10.6.0",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"exports": {
|
||||
".": "./dist/exports.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "catalog:",
|
||||
"@vitest/coverage-v8": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
"vitest": "catalog:",
|
||||
"@morten-olsen/box-configs": "workspace:*",
|
||||
"@morten-olsen/box-tests": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@morten-olsen/box-k8s": "workspace:*"
|
||||
},
|
||||
"name": "@morten-olsen/box-resource-storage",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
0
packages/resource-storage/src/exports.ts
Normal file
0
packages/resource-storage/src/exports.ts
Normal file
15
packages/resource-storage/src/resources/storage.schemas.ts
Normal file
15
packages/resource-storage/src/resources/storage.schemas.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { z } from '@morten-olsen/box-k8s';
|
||||
|
||||
const hostSpec = z.object({
|
||||
type: z.literal('host'),
|
||||
path: z.string(),
|
||||
});
|
||||
|
||||
const locationSpec = hostSpec;
|
||||
|
||||
const storageSpecSchema = z.object({
|
||||
location: locationSpec,
|
||||
backup: locationSpec.optional(),
|
||||
});
|
||||
|
||||
export { storageSpecSchema };
|
||||
0
packages/resource-storage/src/resources/storage.ts
Normal file
0
packages/resource-storage/src/resources/storage.ts
Normal file
9
packages/resource-storage/tsconfig.json
Normal file
9
packages/resource-storage/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"extends": "@morten-olsen/box-configs/tsconfig.json"
|
||||
}
|
||||
12
packages/resource-storage/vitest.config.ts
Normal file
12
packages/resource-storage/vitest.config.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { getAliases } from '@morten-olsen/box-tests/vitest';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig(async () => {
|
||||
const aliases = await getAliases();
|
||||
return {
|
||||
resolve: {
|
||||
alias: aliases,
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user