@highstate/library 0.9.19 → 0.9.20
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 +175 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/third-party/index.ts +1 -0
- package/src/third-party/yandex.ts +211 -0
Binary file
|
package/dist/index.js
CHANGED
@@ -4621,6 +4621,180 @@ var virtualMachine2 = defineUnit({
|
|
4621
4621
|
}
|
4622
4622
|
});
|
4623
4623
|
|
4624
|
-
|
4624
|
+
// src/third-party/yandex.ts
|
4625
|
+
var yandex_exports = {};
|
4626
|
+
__export(yandex_exports, {
|
4627
|
+
cloudEntity: () => cloudEntity,
|
4628
|
+
connection: () => connection4,
|
4629
|
+
virtualMachine: () => virtualMachine3
|
4630
|
+
});
|
4631
|
+
var cloudEntity = defineEntity({
|
4632
|
+
type: "yandex.cloud.v1",
|
4633
|
+
schema: z.object({
|
4634
|
+
token: z.string().optional(),
|
4635
|
+
serviceAccountKeyFile: z.string().optional(),
|
4636
|
+
cloudId: z.string(),
|
4637
|
+
defaultFolderId: z.string(),
|
4638
|
+
defaultZone: z.string(),
|
4639
|
+
regionId: z.string().optional()
|
4640
|
+
}),
|
4641
|
+
meta: {
|
4642
|
+
color: "#0080ff"
|
4643
|
+
}
|
4644
|
+
});
|
4645
|
+
var connection4 = defineUnit({
|
4646
|
+
type: "yandex.connection.v1",
|
4647
|
+
args: {
|
4648
|
+
/**
|
4649
|
+
* The availability zone for resources.
|
4650
|
+
*/
|
4651
|
+
defaultZone: $addArgumentDescription(z.string().default("ru-central1-d"), `The availability zone for resources.`),
|
4652
|
+
/**
|
4653
|
+
* The region ID for resources.
|
4654
|
+
*/
|
4655
|
+
regionId: $addArgumentDescription(z.string().default("ru-central1"), `The region ID for resources.`)
|
4656
|
+
},
|
4657
|
+
secrets: {
|
4658
|
+
/**
|
4659
|
+
* The service account key file content (JSON).
|
4660
|
+
*/
|
4661
|
+
serviceAccountKeyFile: $addArgumentDescription({
|
4662
|
+
schema: z.string().meta({ language: "json" }),
|
4663
|
+
meta: {
|
4664
|
+
title: "Service Account Key File"
|
4665
|
+
}
|
4666
|
+
}, `The service account key file content (JSON).`)
|
4667
|
+
},
|
4668
|
+
inputs: {
|
4669
|
+
...inputs2
|
4670
|
+
},
|
4671
|
+
outputs: {
|
4672
|
+
/**
|
4673
|
+
* The Yandex Cloud connection.
|
4674
|
+
*/
|
4675
|
+
yandexCloud: $addInputDescription(cloudEntity, `The Yandex Cloud connection.`)
|
4676
|
+
},
|
4677
|
+
meta: {
|
4678
|
+
description: `The connection to a Yandex Cloud account.`,
|
4679
|
+
title: "Yandex Cloud Connection",
|
4680
|
+
category: "Yandex Cloud",
|
4681
|
+
icon: "simple-icons:yandexcloud",
|
4682
|
+
iconColor: "#0080ff"
|
4683
|
+
},
|
4684
|
+
source: {
|
4685
|
+
package: "@highstate/yandex",
|
4686
|
+
path: "connection"
|
4687
|
+
}
|
4688
|
+
});
|
4689
|
+
var virtualMachine3 = defineUnit({
|
4690
|
+
type: "yandex.virtual-machine.v1",
|
4691
|
+
args: {
|
4692
|
+
/**
|
4693
|
+
* The platform ID for the instance.
|
4694
|
+
*/
|
4695
|
+
platformId: $addArgumentDescription(z.string().default("standard-v3"), `The platform ID for the instance.`),
|
4696
|
+
/**
|
4697
|
+
* The resources to allocate to the virtual machine.
|
4698
|
+
*/
|
4699
|
+
resources: $addArgumentDescription(z.object({
|
4700
|
+
/**
|
4701
|
+
* The number of CPU cores.
|
4702
|
+
*/
|
4703
|
+
cores: z.number().default(2).meta({ title: camelCaseToHumanReadable("cores"), description: `The number of CPU cores.` }),
|
4704
|
+
/**
|
4705
|
+
* The amount of memory in GB.
|
4706
|
+
*/
|
4707
|
+
memory: z.number().default(4).meta({ title: camelCaseToHumanReadable("memory"), description: `The amount of memory in GB.` }),
|
4708
|
+
/**
|
4709
|
+
* The core fraction (10-100).
|
4710
|
+
*/
|
4711
|
+
coreFraction: z.number().min(10).max(100).optional().meta({ title: camelCaseToHumanReadable("coreFraction"), description: `The core fraction (10-100).` })
|
4712
|
+
}).prefault({}), `The resources to allocate to the virtual machine.`),
|
4713
|
+
/**
|
4714
|
+
* The boot disk configuration.
|
4715
|
+
*/
|
4716
|
+
disk: $addArgumentDescription(z.object({
|
4717
|
+
/**
|
4718
|
+
* The disk size in GB.
|
4719
|
+
*
|
4720
|
+
* For `network-ssd-nonreplicated` must be multiple of 93.
|
4721
|
+
*/
|
4722
|
+
size: z.number().default(20).meta({ title: camelCaseToHumanReadable("size"), description: `The disk size in GB.
|
4723
|
+
|
4724
|
+
For \`network-ssd-nonreplicated\` must be multiple of 93.` }),
|
4725
|
+
/**
|
4726
|
+
* The disk type.
|
4727
|
+
*/
|
4728
|
+
type: z.string().default("network-ssd-nonreplicated").meta({ title: camelCaseToHumanReadable("type"), description: `The disk type.` }),
|
4729
|
+
/**
|
4730
|
+
* The image family to use.
|
4731
|
+
*/
|
4732
|
+
imageFamily: z.string().default("ubuntu-2204-lts").meta({ title: camelCaseToHumanReadable("imageFamily"), description: `The image family to use.` })
|
4733
|
+
}).prefault({}), `The boot disk configuration.`),
|
4734
|
+
/**
|
4735
|
+
* The network configuration.
|
4736
|
+
*/
|
4737
|
+
network: $addArgumentDescription(z.object({
|
4738
|
+
/**
|
4739
|
+
* The subnet ID to connect to.
|
4740
|
+
* If not specified, will auto-discover the default subnet for the zone.
|
4741
|
+
*/
|
4742
|
+
subnetId: z.string().optional().meta({ title: camelCaseToHumanReadable("subnetId"), description: `The subnet ID to connect to.
|
4743
|
+
If not specified, will auto-discover the default subnet for the zone.` }),
|
4744
|
+
/**
|
4745
|
+
* Whether to assign a public IP.
|
4746
|
+
*/
|
4747
|
+
assignPublicIp: z.boolean().default(true).meta({ title: camelCaseToHumanReadable("assignPublicIp"), description: `Whether to assign a public IP.` }),
|
4748
|
+
/**
|
4749
|
+
* The list of DNS servers.
|
4750
|
+
*/
|
4751
|
+
dns: ipv46Schema.array().default([]).meta({ title: camelCaseToHumanReadable("dns"), description: `The list of DNS servers.` })
|
4752
|
+
}).prefault({}), `The network configuration.`),
|
4753
|
+
/**
|
4754
|
+
* The IPv4 address configuration.
|
4755
|
+
*/
|
4756
|
+
ipv4: $addArgumentDescription(z.discriminatedUnion("type", [
|
4757
|
+
z.object({
|
4758
|
+
type: z.literal("dhcp")
|
4759
|
+
}),
|
4760
|
+
z.object({
|
4761
|
+
type: z.literal("static"),
|
4762
|
+
address: z.string(),
|
4763
|
+
prefix: ipv4PrefixSchema.default(24),
|
4764
|
+
gateway: z.string().optional()
|
4765
|
+
})
|
4766
|
+
]).default({ type: "dhcp" }), `The IPv4 address configuration.`),
|
4767
|
+
/**
|
4768
|
+
* The SSH configuration.
|
4769
|
+
*/
|
4770
|
+
ssh: $addArgumentDescription(vmSshArgs, `The SSH configuration.`),
|
4771
|
+
/**
|
4772
|
+
* Additional metadata for cloud-init.
|
4773
|
+
*/
|
4774
|
+
metadata: $addArgumentDescription(z.record(z.string(), z.string()).default({}), `Additional metadata for cloud-init.`)
|
4775
|
+
},
|
4776
|
+
secrets: {
|
4777
|
+
...vmSecrets
|
4778
|
+
},
|
4779
|
+
inputs: {
|
4780
|
+
yandexCloud: cloudEntity,
|
4781
|
+
...inputs2
|
4782
|
+
},
|
4783
|
+
outputs: serverOutputs,
|
4784
|
+
meta: {
|
4785
|
+
description: `The virtual machine on Yandex Cloud.`,
|
4786
|
+
title: "Yandex Cloud Virtual Machine",
|
4787
|
+
category: "Yandex Cloud",
|
4788
|
+
icon: "simple-icons:yandexcloud",
|
4789
|
+
iconColor: "#0080ff",
|
4790
|
+
secondaryIcon: "codicon:vm"
|
4791
|
+
},
|
4792
|
+
source: {
|
4793
|
+
package: "@highstate/yandex",
|
4794
|
+
path: "virtual-machine"
|
4795
|
+
}
|
4796
|
+
});
|
4797
|
+
|
4798
|
+
export { arrayPatchModeSchema, booleanPatchSchema, cloudflare_exports as cloudflare, common_exports as common, databases_exports as databases, distributions_exports as distributions, dns_exports as dns, git_exports as git, implementationReferenceSchema, k3s_exports as k3s, k8s_exports as k8s, mullvad_exports as mullvad, network_exports as network, nixos_exports as nixos, prefixKeysWith, proxmox_exports as proxmox, restic_exports as restic, sops_exports as sops, ssh_exports as ssh, talos_exports as talos, timeweb_exports as timeweb, wireguard_exports as wireguard, yandex_exports as yandex };
|
4625
4799
|
//# sourceMappingURL=index.js.map
|
4626
4800
|
//# sourceMappingURL=index.js.map
|