@highstate/library 0.9.33 → 0.9.34
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/dist/highstate.library.msgpack +0 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/common/files.ts +11 -0
- package/src/nixos.ts +3 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@highstate/library",
|
3
|
-
"version": "0.9.
|
3
|
+
"version": "0.9.34",
|
4
4
|
"type": "module",
|
5
5
|
"highstate": {
|
6
6
|
"type": "library"
|
@@ -25,14 +25,14 @@
|
|
25
25
|
"biome:check": "biome check --error-on-warnings"
|
26
26
|
},
|
27
27
|
"dependencies": {
|
28
|
-
"@highstate/contract": "^0.9.
|
28
|
+
"@highstate/contract": "^0.9.34",
|
29
29
|
"remeda": "^2.21.0"
|
30
30
|
},
|
31
31
|
"devDependencies": {
|
32
32
|
"@biomejs/biome": "2.2.0",
|
33
|
-
"@highstate/cli": "^0.9.
|
33
|
+
"@highstate/cli": "^0.9.34",
|
34
34
|
"@typescript/native-preview": "^7.0.0-dev.20250920.1",
|
35
35
|
"type-fest": "^4.41.0"
|
36
36
|
},
|
37
|
-
"gitHead": "
|
37
|
+
"gitHead": "7b534223b0838ae6ed087847978ab8dfd3d5530d"
|
38
38
|
}
|
package/src/common/files.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { Simplify } from "type-fest"
|
1
2
|
import {
|
2
3
|
fileContentSchema as baseFileContentSchema,
|
3
4
|
fileMetaSchema as baseFileMetaSchema,
|
@@ -129,9 +130,19 @@ export type File = z.infer<typeof fileEntity.schema>
|
|
129
130
|
export type FileMeta = z.infer<typeof baseFileMetaSchema>
|
130
131
|
export type FileContent = z.infer<typeof fileContentSchema>
|
131
132
|
|
133
|
+
export type EmbeddedFile = Simplify<File & { content: { type: "embedded" } }>
|
134
|
+
export type ArtifactFile = Simplify<File & { content: { type: "artifact" } }>
|
135
|
+
export type LocalFile = Simplify<File & { content: { type: "local" } }>
|
136
|
+
export type RemoteFile = Simplify<File & { content: { type: "remote" } }>
|
137
|
+
|
132
138
|
export type Folder = z.infer<typeof folderEntity.schema>
|
133
139
|
export type FolderMeta = z.infer<typeof folderMetaSchema>
|
134
140
|
export type FolderContent = z.infer<typeof folderContentSchema>
|
135
141
|
|
142
|
+
export type EmbeddedFolder = Simplify<Folder & { content: { type: "embedded" } }>
|
143
|
+
export type ArtifactFolder = Simplify<Folder & { content: { type: "artifact" } }>
|
144
|
+
export type LocalFolder = Simplify<Folder & { content: { type: "local" } }>
|
145
|
+
export type RemoteFolder = Simplify<Folder & { content: { type: "remote" } }>
|
146
|
+
|
136
147
|
export type Checksum = z.infer<typeof checksumSchema>
|
137
148
|
export type ChecksumAlgorithm = z.infer<typeof checksumAlgorithmSchema>
|
package/src/nixos.ts
CHANGED
@@ -76,6 +76,9 @@ export const inlineFlake = defineUnit({
|
|
76
76
|
* The code of the `flake.nix` file.
|
77
77
|
*
|
78
78
|
* In this code you can reference other flakes, modules, files, and folders by their names.
|
79
|
+
* The inputs for them will be automatically added to the `inputs` attribute of the flake.
|
80
|
+
*
|
81
|
+
* You can run this component to see the generated `flake.nix` file in pages.
|
79
82
|
*/
|
80
83
|
code: z.string().meta({ language: "nix" }),
|
81
84
|
},
|