@cdk-x/multipass 0.3.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/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/lib/generated/index.d.ts +2 -0
- package/dist/lib/generated/index.d.ts.map +1 -0
- package/dist/lib/generated/index.js +4 -0
- package/dist/lib/generated/resources.generated.d.ts +181 -0
- package/dist/lib/generated/resources.generated.d.ts.map +1 -0
- package/dist/lib/generated/resources.generated.js +168 -0
- package/dist/lib/provider/index.d.ts +2 -0
- package/dist/lib/provider/index.d.ts.map +1 -0
- package/dist/lib/provider/index.js +4 -0
- package/dist/lib/provider/provider.d.ts +17 -0
- package/dist/lib/provider/provider.d.ts.map +1 -0
- package/dist/lib/provider/provider.js +20 -0
- package/dist/package.json +31 -0
- package/package.json +30 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/generated/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { ProviderResource, IResolvable, PropertyValue } from '@cdk-x/core';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
/**
|
|
4
|
+
* All Multipass resource type identifiers, grouped by domain.
|
|
5
|
+
*
|
|
6
|
+
* Use these constants when constructing L1 resources to avoid typos.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MultipassResourceType: {
|
|
9
|
+
/** VM resources. */
|
|
10
|
+
readonly VM: {
|
|
11
|
+
/** `Multipass::VM::Mount` */
|
|
12
|
+
readonly Mount: "Multipass::VM::Mount";
|
|
13
|
+
/** `Multipass::VM::Network` */
|
|
14
|
+
readonly Network: "Multipass::VM::Network";
|
|
15
|
+
};
|
|
16
|
+
/** Compute resources. */
|
|
17
|
+
readonly Compute: {
|
|
18
|
+
/** `Multipass::Compute::Config` */
|
|
19
|
+
readonly Config: "Multipass::Compute::Config";
|
|
20
|
+
/** `Multipass::Compute::Instance` */
|
|
21
|
+
readonly Instance: "Multipass::Compute::Instance";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Props for {@link MltMount}.
|
|
26
|
+
*
|
|
27
|
+
* A host-to-guest directory mount that can be referenced by one or more MltInstance resources.
|
|
28
|
+
*/
|
|
29
|
+
export interface MultipassMount {
|
|
30
|
+
/**
|
|
31
|
+
* Absolute path on the host machine.
|
|
32
|
+
*/
|
|
33
|
+
source: string;
|
|
34
|
+
/**
|
|
35
|
+
* Absolute path inside the guest VM.
|
|
36
|
+
*/
|
|
37
|
+
target?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* L1 construct for a Multipass Mount resource.
|
|
41
|
+
*
|
|
42
|
+
* A host-to-guest directory mount that can be referenced by one or more MltInstance resources.
|
|
43
|
+
*/
|
|
44
|
+
export declare class MltMount extends ProviderResource {
|
|
45
|
+
/** The CloudFormation-style type name for this resource. */
|
|
46
|
+
static readonly RESOURCE_TYPE_NAME = "Multipass::VM::Mount";
|
|
47
|
+
source: string;
|
|
48
|
+
target?: string;
|
|
49
|
+
constructor(scope: Construct, id: string, props: MultipassMount);
|
|
50
|
+
protected renderProperties(): Record<string, PropertyValue>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Props for {@link MltNetwork}.
|
|
54
|
+
*
|
|
55
|
+
* A Multipass network interface that can be referenced by one or more MltInstance resources.
|
|
56
|
+
*/
|
|
57
|
+
export interface MultipassNetwork {
|
|
58
|
+
/**
|
|
59
|
+
* Name of the host network interface (e.g. 'bridge', 'en0').
|
|
60
|
+
*/
|
|
61
|
+
name: string;
|
|
62
|
+
/**
|
|
63
|
+
* Network mode.
|
|
64
|
+
*/
|
|
65
|
+
mode?: 'auto' | 'manual';
|
|
66
|
+
/**
|
|
67
|
+
* Optional MAC address override.
|
|
68
|
+
*/
|
|
69
|
+
mac?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* L1 construct for a Multipass Network resource.
|
|
73
|
+
*
|
|
74
|
+
* A Multipass network interface that can be referenced by one or more MltInstance resources.
|
|
75
|
+
*/
|
|
76
|
+
export declare class MltNetwork extends ProviderResource {
|
|
77
|
+
/** The CloudFormation-style type name for this resource. */
|
|
78
|
+
static readonly RESOURCE_TYPE_NAME = "Multipass::VM::Network";
|
|
79
|
+
name: string;
|
|
80
|
+
mode?: 'auto' | 'manual';
|
|
81
|
+
mac?: string;
|
|
82
|
+
constructor(scope: Construct, id: string, props: MultipassNetwork);
|
|
83
|
+
protected renderProperties(): Record<string, PropertyValue>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Props for {@link MltConfig}.
|
|
87
|
+
*
|
|
88
|
+
* Multipass configuration root. Acts as the parent resource that groups MltInstance resources into a single synthesized YAML file.
|
|
89
|
+
*/
|
|
90
|
+
export interface MultipassConfig {
|
|
91
|
+
/**
|
|
92
|
+
* VM instances to include. Each entry is a reference to an MltInstance resource via resource.ref.
|
|
93
|
+
*/
|
|
94
|
+
instances?: IResolvable[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* L1 construct for a Multipass Config resource.
|
|
98
|
+
*
|
|
99
|
+
* Multipass configuration root. Acts as the parent resource that groups MltInstance resources into a single synthesized YAML file.
|
|
100
|
+
*/
|
|
101
|
+
export declare class MltConfig extends ProviderResource {
|
|
102
|
+
/** The CloudFormation-style type name for this resource. */
|
|
103
|
+
static readonly RESOURCE_TYPE_NAME = "Multipass::Compute::Config";
|
|
104
|
+
/**
|
|
105
|
+
* The `configId` attribute of this resource.
|
|
106
|
+
* Resolves to `{ ref: logicalId, attr: 'configId' }` at synthesis time.
|
|
107
|
+
*/
|
|
108
|
+
readonly attrConfigId: IResolvable;
|
|
109
|
+
instances?: IResolvable[];
|
|
110
|
+
constructor(scope: Construct, id: string, props?: MultipassConfig);
|
|
111
|
+
protected renderProperties(): Record<string, PropertyValue>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Props for {@link MltInstance}.
|
|
115
|
+
*
|
|
116
|
+
* Declares a Multipass virtual machine. Synthesizes a YAML configuration file committed to the repository.
|
|
117
|
+
*/
|
|
118
|
+
export interface MultipassInstance {
|
|
119
|
+
/**
|
|
120
|
+
* Name of the VM instance.
|
|
121
|
+
*/
|
|
122
|
+
name: string;
|
|
123
|
+
/**
|
|
124
|
+
* Ubuntu image alias or remote path (e.g. '22.04', 'jammy').
|
|
125
|
+
*/
|
|
126
|
+
image?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Number of virtual CPUs.
|
|
129
|
+
*/
|
|
130
|
+
cpus?: number;
|
|
131
|
+
/**
|
|
132
|
+
* Memory allocation (e.g. '2G', '512M').
|
|
133
|
+
*/
|
|
134
|
+
memory?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Disk size (e.g. '20G').
|
|
137
|
+
*/
|
|
138
|
+
disk?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Whether to add a bridged network interface.
|
|
141
|
+
*/
|
|
142
|
+
bridged?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Launch timeout in seconds.
|
|
145
|
+
*/
|
|
146
|
+
timeout?: number;
|
|
147
|
+
/**
|
|
148
|
+
* Network interfaces to attach. Each entry is a reference to an MltNetwork resource via resource.ref.
|
|
149
|
+
*/
|
|
150
|
+
networks?: IResolvable[];
|
|
151
|
+
/**
|
|
152
|
+
* Host-to-guest directory mounts. Each entry is a reference to an MltMount resource via resource.ref.
|
|
153
|
+
*/
|
|
154
|
+
mounts?: IResolvable[];
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* L1 construct for a Multipass Instance resource.
|
|
158
|
+
*
|
|
159
|
+
* Declares a Multipass virtual machine. Synthesizes a YAML configuration file committed to the repository.
|
|
160
|
+
*/
|
|
161
|
+
export declare class MltInstance extends ProviderResource {
|
|
162
|
+
/** The CloudFormation-style type name for this resource. */
|
|
163
|
+
static readonly RESOURCE_TYPE_NAME = "Multipass::Compute::Instance";
|
|
164
|
+
/**
|
|
165
|
+
* The `vmId` attribute of this resource.
|
|
166
|
+
* Resolves to `{ ref: logicalId, attr: 'vmId' }` at synthesis time.
|
|
167
|
+
*/
|
|
168
|
+
readonly attrVmId: IResolvable;
|
|
169
|
+
name: string;
|
|
170
|
+
image?: string;
|
|
171
|
+
cpus?: number;
|
|
172
|
+
memory?: string;
|
|
173
|
+
disk?: string;
|
|
174
|
+
bridged?: boolean;
|
|
175
|
+
timeout?: number;
|
|
176
|
+
networks?: IResolvable[];
|
|
177
|
+
mounts?: IResolvable[];
|
|
178
|
+
constructor(scope: Construct, id: string, props: MultipassInstance);
|
|
179
|
+
protected renderProperties(): Record<string, PropertyValue>;
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=resources.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.generated.d.ts","sourceRoot":"","sources":["../../../src/lib/generated/resources.generated.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;IAChC,oBAAoB;;QAElB,6BAA6B;;QAE7B,+BAA+B;;;IAGjC,yBAAyB;;QAEvB,mCAAmC;;QAEnC,qCAAqC;;;CAG/B,CAAC;AAOX;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;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ict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// AUTO-GENERATED — DO NOT EDIT
|
|
4
|
+
//
|
|
5
|
+
// Generated by spec-to-cdkx from Multipass JSON Schema files.
|
|
6
|
+
// To regenerate: yarn nx run @cdk-x/multipass:codegen
|
|
7
|
+
// ============================================================
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MltInstance = exports.MltConfig = exports.MltNetwork = exports.MltMount = exports.MultipassResourceType = void 0;
|
|
10
|
+
const core_1 = require("@cdk-x/core");
|
|
11
|
+
/**
|
|
12
|
+
* All Multipass resource type identifiers, grouped by domain.
|
|
13
|
+
*
|
|
14
|
+
* Use these constants when constructing L1 resources to avoid typos.
|
|
15
|
+
*/
|
|
16
|
+
exports.MultipassResourceType = {
|
|
17
|
+
/** VM resources. */
|
|
18
|
+
VM: {
|
|
19
|
+
/** `Multipass::VM::Mount` */
|
|
20
|
+
Mount: 'Multipass::VM::Mount',
|
|
21
|
+
/** `Multipass::VM::Network` */
|
|
22
|
+
Network: 'Multipass::VM::Network',
|
|
23
|
+
},
|
|
24
|
+
/** Compute resources. */
|
|
25
|
+
Compute: {
|
|
26
|
+
/** `Multipass::Compute::Config` */
|
|
27
|
+
Config: 'Multipass::Compute::Config',
|
|
28
|
+
/** `Multipass::Compute::Instance` */
|
|
29
|
+
Instance: 'Multipass::Compute::Instance',
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* L1 construct for a Multipass Mount resource.
|
|
34
|
+
*
|
|
35
|
+
* A host-to-guest directory mount that can be referenced by one or more MltInstance resources.
|
|
36
|
+
*/
|
|
37
|
+
class MltMount extends core_1.ProviderResource {
|
|
38
|
+
/** The CloudFormation-style type name for this resource. */
|
|
39
|
+
static RESOURCE_TYPE_NAME = 'Multipass::VM::Mount';
|
|
40
|
+
source;
|
|
41
|
+
target;
|
|
42
|
+
constructor(scope, id, props) {
|
|
43
|
+
super(scope, id, {
|
|
44
|
+
type: MltMount.RESOURCE_TYPE_NAME,
|
|
45
|
+
});
|
|
46
|
+
this.node.defaultChild = this;
|
|
47
|
+
this.source = props.source;
|
|
48
|
+
this.target = props.target;
|
|
49
|
+
}
|
|
50
|
+
renderProperties() {
|
|
51
|
+
return {
|
|
52
|
+
source: this.source,
|
|
53
|
+
target: this.target,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.MltMount = MltMount;
|
|
58
|
+
/**
|
|
59
|
+
* L1 construct for a Multipass Network resource.
|
|
60
|
+
*
|
|
61
|
+
* A Multipass network interface that can be referenced by one or more MltInstance resources.
|
|
62
|
+
*/
|
|
63
|
+
class MltNetwork extends core_1.ProviderResource {
|
|
64
|
+
/** The CloudFormation-style type name for this resource. */
|
|
65
|
+
static RESOURCE_TYPE_NAME = 'Multipass::VM::Network';
|
|
66
|
+
name;
|
|
67
|
+
mode;
|
|
68
|
+
mac;
|
|
69
|
+
constructor(scope, id, props) {
|
|
70
|
+
super(scope, id, {
|
|
71
|
+
type: MltNetwork.RESOURCE_TYPE_NAME,
|
|
72
|
+
});
|
|
73
|
+
this.node.defaultChild = this;
|
|
74
|
+
this.name = props.name;
|
|
75
|
+
this.mode = props.mode;
|
|
76
|
+
this.mac = props.mac;
|
|
77
|
+
}
|
|
78
|
+
renderProperties() {
|
|
79
|
+
return {
|
|
80
|
+
name: this.name,
|
|
81
|
+
mode: this.mode,
|
|
82
|
+
mac: this.mac,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.MltNetwork = MltNetwork;
|
|
87
|
+
/**
|
|
88
|
+
* L1 construct for a Multipass Config resource.
|
|
89
|
+
*
|
|
90
|
+
* Multipass configuration root. Acts as the parent resource that groups MltInstance resources into a single synthesized YAML file.
|
|
91
|
+
*/
|
|
92
|
+
class MltConfig extends core_1.ProviderResource {
|
|
93
|
+
/** The CloudFormation-style type name for this resource. */
|
|
94
|
+
static RESOURCE_TYPE_NAME = 'Multipass::Compute::Config';
|
|
95
|
+
/**
|
|
96
|
+
* The `configId` attribute of this resource.
|
|
97
|
+
* Resolves to `{ ref: logicalId, attr: 'configId' }` at synthesis time.
|
|
98
|
+
*/
|
|
99
|
+
attrConfigId;
|
|
100
|
+
instances;
|
|
101
|
+
constructor(scope, id, props = {}) {
|
|
102
|
+
super(scope, id, {
|
|
103
|
+
type: MltConfig.RESOURCE_TYPE_NAME,
|
|
104
|
+
});
|
|
105
|
+
this.node.defaultChild = this;
|
|
106
|
+
this.attrConfigId = this.getAtt('configId');
|
|
107
|
+
this.instances = props.instances;
|
|
108
|
+
}
|
|
109
|
+
renderProperties() {
|
|
110
|
+
return {
|
|
111
|
+
instances: this.instances,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.MltConfig = MltConfig;
|
|
116
|
+
/**
|
|
117
|
+
* L1 construct for a Multipass Instance resource.
|
|
118
|
+
*
|
|
119
|
+
* Declares a Multipass virtual machine. Synthesizes a YAML configuration file committed to the repository.
|
|
120
|
+
*/
|
|
121
|
+
class MltInstance extends core_1.ProviderResource {
|
|
122
|
+
/** The CloudFormation-style type name for this resource. */
|
|
123
|
+
static RESOURCE_TYPE_NAME = 'Multipass::Compute::Instance';
|
|
124
|
+
/**
|
|
125
|
+
* The `vmId` attribute of this resource.
|
|
126
|
+
* Resolves to `{ ref: logicalId, attr: 'vmId' }` at synthesis time.
|
|
127
|
+
*/
|
|
128
|
+
attrVmId;
|
|
129
|
+
name;
|
|
130
|
+
image;
|
|
131
|
+
cpus;
|
|
132
|
+
memory;
|
|
133
|
+
disk;
|
|
134
|
+
bridged;
|
|
135
|
+
timeout;
|
|
136
|
+
networks;
|
|
137
|
+
mounts;
|
|
138
|
+
constructor(scope, id, props) {
|
|
139
|
+
super(scope, id, {
|
|
140
|
+
type: MltInstance.RESOURCE_TYPE_NAME,
|
|
141
|
+
});
|
|
142
|
+
this.node.defaultChild = this;
|
|
143
|
+
this.attrVmId = this.getAtt('vmId');
|
|
144
|
+
this.name = props.name;
|
|
145
|
+
this.image = props.image;
|
|
146
|
+
this.cpus = props.cpus;
|
|
147
|
+
this.memory = props.memory;
|
|
148
|
+
this.disk = props.disk;
|
|
149
|
+
this.bridged = props.bridged;
|
|
150
|
+
this.timeout = props.timeout;
|
|
151
|
+
this.networks = props.networks;
|
|
152
|
+
this.mounts = props.mounts;
|
|
153
|
+
}
|
|
154
|
+
renderProperties() {
|
|
155
|
+
return {
|
|
156
|
+
name: this.name,
|
|
157
|
+
image: this.image,
|
|
158
|
+
cpus: this.cpus,
|
|
159
|
+
memory: this.memory,
|
|
160
|
+
disk: this.disk,
|
|
161
|
+
bridged: this.bridged,
|
|
162
|
+
timeout: this.timeout,
|
|
163
|
+
networks: this.networks,
|
|
164
|
+
mounts: this.mounts,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.MltInstance = MltInstance;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/provider/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Provider } from '@cdk-x/core';
|
|
2
|
+
/**
|
|
3
|
+
* Provider for Multipass resources.
|
|
4
|
+
*
|
|
5
|
+
* Use with a `Stack` and `YamlFileSynthesizer` to synthesize Multipass VM
|
|
6
|
+
* configuration files committed to the repository.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const provider = new MltProvider();
|
|
11
|
+
* const stack = new Stack(app, 'DevVMs', { provider });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare class MltProvider extends Provider {
|
|
15
|
+
readonly identifier = "multipass";
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/lib/provider/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IACvC,SAAgB,UAAU,eAAe;CAC1C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MltProvider = void 0;
|
|
4
|
+
const core_1 = require("@cdk-x/core");
|
|
5
|
+
/**
|
|
6
|
+
* Provider for Multipass resources.
|
|
7
|
+
*
|
|
8
|
+
* Use with a `Stack` and `YamlFileSynthesizer` to synthesize Multipass VM
|
|
9
|
+
* configuration files committed to the repository.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const provider = new MltProvider();
|
|
14
|
+
* const stack = new Stack(app, 'DevVMs', { provider });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
class MltProvider extends core_1.Provider {
|
|
18
|
+
identifier = 'multipass';
|
|
19
|
+
}
|
|
20
|
+
exports.MltProvider = MltProvider;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cdk-x/multipass",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./package.json": "./package.json",
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"!**/*.tsbuildinfo"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@cdk-x/core": "0.2.0",
|
|
20
|
+
"constructs": "^10.4.2",
|
|
21
|
+
"tslib": "^2.8.1"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@cdk-x/spec-to-cdkx": "0.2.0",
|
|
25
|
+
"@cdk-x/testing": "0.2.0"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"type": "commonjs"
|
|
31
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cdk-x/multipass",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./package.json": "./package.json",
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"!**/*.tsbuildinfo"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@cdk-x/core": "0.3.0",
|
|
20
|
+
"constructs": "^10.4.2",
|
|
21
|
+
"tslib": "^2.8.1"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@cdk-x/spec-to-cdkx": "0.3.0",
|
|
25
|
+
"@cdk-x/testing": "0.3.0"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
}
|
|
30
|
+
}
|